EYEHEARTZOMBIES

Archive for the 'Rails' Category

The update of Webpen went really well. I was quite surprised when it worked the first time I tried it. Just goes to show how the universe likes to screw with you. I’m not finished with it, though, by any means. I need to do a bit of an overhaul on the database, too, so that’s kind of put me in slump on it. Soon, though. Soon I will have the bastard figured out and work will resume.

The most awesome thing this week, though, was getting back into Camping. It’s amazingly easy to get started and really makes you learn Ruby more thoroughly. I have a feeling those small wheels are going to come in handy really soon. If nothing else, it’s another bullet point to add onto a resumé.

No, that sounds wrong. i don’t learn things just to stick them on a piece of paper to sell myself more. I learn things so I can use them. I learned Ruby on Rails so I could make web applications like I thought we needed; I learned CSS ’cause font tags and table-based layouts are tedious and extra work. So, now I’m learning Camping ’cause not everything needs the power and heft of Rails behind it.

Some of you know I’ve been looking for a job for the past while. The rest of you do now.

So last night I decided I needed to try and get Webpen updated to the new look I’ve been working on for it. Yeah, did I mention I haven’t really even touched Webpen in about a year? Been a little busy with the whole move-and-have-a-baby thing, then the raise-the-baby thing.

Anyway, I failed at it. My code looks so horribly ugly compared to how I know Rails code is supposed to look. It’s just…pathetic. Yeah, feel sorry for me. Come on, do it.

Today I think I may buy the updated version of the Rails PDF and start learning again. I really need to get this updated, both for the users and for the potential employers looking at it. Wish me luck.

I don’t know why, but I can’t stop listening to Saves the Day lately. Anyway, that’s not really the point of this post.

I don’t think it has one, to be honest with you. Just wanted to drop a line and say hello. Give you all an update on my Rails progress. And other fun tidbits, I guess.

Rails is going surprisingly well. It’s a great framework and Ruby is a great language. I had problems learning even a little bit of Python, but Ruby has been a snap so far. Probably because it’s so spoken and only has two types of arrays (Python has at least 3). Not to mention the useful help you (usually) get from the IRC channel.

My first big project has actually been going well. I’ve locked down the alpha version and I’ve started really digging into to the beta. It’s a gaming database that’ll eventually support game blogging and commenting. It’ll also generate custom reports that can be saved out to PDF. Yeah, I know, sounds adventurous and over-the-top. It is. But you always do a cannonball to get over the shock of cold water.

So what does it do right now? Well, you can add games and consoles of course. Users have to log in to do anything that modifies the database. In the beta version, users can modify their profile to list their email address and a short bio of them. I’m thinking of adding a file upload so you can post a picture, but I haven’t decided yet. I’m leaning towards yes, though, since that’d make an easy addition to the blog side of it.

All in all this has taken me about 4 or 5 days of really working on it (not just poking at Rails). I’ve had a few people beta testing it, and I’d post the link here, but my host just took down Ruby support last night until some issues get sorted out (server kept crashing).

I’ve become a bit of an evangelist for Rails, too, it seems. I’ve posted about it several times on here and I’ve gotten Ray, Manny, and Pete all interested in it. I think Ray’s the only one who’s actually stuck a foot into it, though. It’d be really handy to have a Rails expert on my AIM list, though. Maybe I’ll have to try and fill that role for the others.

So, enough about Rails and programming. Elaine and John and I went to their mother’s house over the weekend. We ended up watching Howl’s Moving Castle ’cause we all love Miyazaki’s movies. It was typical Studio Ghibli goodness. I recommend it to anyone who likes animation, be it Japanese or not.

Well, I guess that’s about it for now. I’ve been working on a simple Rails app (damnit, there I go again) to use as a tutorial for any who are interested. Leave me a comment and if there’s some responce, I’ll finish it and post how to do it. It’s a shopping list. I’ll try to add in some nifty AJAX or something to make it more worthwhile.

By the way:

Which Family Guy character are you?

There, Ray. Happy? Anyway, getting into the development of Ruby on Rails does kind of seem like a trip to see the Wizard. I didn’t pick up any scarecrows, tin men, lions, or wicked witches, but I did pick up a lot of other stuff.

To start with, I had to get my machines up and working well. My Linux machine was already running Apache, PHP and MySQL (Standard Query Language, but I needed to add Ruby, RubyGems and, last but not least Ruby on Rails to it. I downloaded and compiled all of them from source and eventually got everything up and running, except I couldn’t get the server to give me Ruby pages, so I used the Ruby on Rails-native server, WEBrick. That worked fine for a day or so.

Now I’ve decided I want faster access to my Ruby stuff, so I’ve set it up on my iBook. All of the software listed above, plus FastCGI to speed up delivery a bit. It seems to be streaming along nicely, with my 256mb of RAM only taking a bit of a hit from running both the Apache2 and MySQL servers.

So, now I have to start learning, right? Yeah, that was my thought, too. So I started on the tutorials. I worked through all of Rolling with Ruby on Rails tutorial and part of the second installment of it before that script went belly up. I think this isn’t a fluke as Manny had the same problem I did. That was Sunday on the Linux box.

Yesterday, Monday, I sat down on my Rails-serving iBook and worked through “How to Make a (small) Publication Management App (RoR Wiki)”http://manuals.rubyonrails.com/read/chapter/48#page132 and it worked for awhile. I noticed a lot of errors where the author seemed to be reading/referencing a different tutorial/script. Finally it stopped working near the end and I just gave up on it. Still, learned some more syntax and some gotchas.

Today was the next trial, I guess. I sat down this morning to work through a tutorial I had seen yesterday during my browsing. How to Make a Todo List Program with Rails and it worked perfectly. I know. I’m as amazed as you are! Heh, no, it’s a great tutorial and the author is really good at explaining what each line/command does.

After completing it (probably took about 2 hours total), I decided to try and expand upon it. I wanted to add a bit more information to each item by adding a due date to it. Obviously some elements wouldn’t have a due date, so I had to address that as well. So I added two new fields to my MySQL table for each of those and started working.

After a few hours and some head=>desk banging, I managed to get it working just like I want. Big thanks to the people in #rubyonrails on irc.freenode.net, too. They pointed me in the right direction a few times. I then started styling it with CSS and it looks good. It’s a blatant rip on 37Signals, but I don’t care.

So, maybe tomorrow’ll bring another app. I’m thinking of a social application, actually. Mad Libs + Introductory Questionnaire. Any name ideas?