November 08, 2008
So I've been cleaning up my blog's code base and decided to switch to unobtrusive javascript. I've heard many reasons advocating its use but for some reason, they never stuck. Until a couple of weeks ago when I worked on a Railsrumble project with a couple of buddies of mine, one of which was a big advocate of unobtrusive javascript using LowPro. Actually using unobtrusive javascript turned out to be much more gratifying that I anticipated. It satisfied some inner OCD tendencies of mine that a lot of programmers share and it made developing javascript'd UIs much easier to develop and much much easier to maintain.
Looking back, I don't think know why I chose to use the Rails javascript helpers or RJS; I like writing javascript, especially when there are great frameworks out there like LowPro and Prototype. The fact that the Rails javascript helpers generate inline javascript, which sometimes turns out being longer than a simple one-liner, is kind of gross. As for RJS, the fact that it's generates code that contains both the data and the logic makes OCD baby Jesus cry.
The separation of HTML (markup), CSS (presentation), Javascript (interactivity) is almost as awesome as the separation of church and state...oh wait, crap.
If you haven't already switched, do it now!
November 06, 2008
Just as a little background, I'm working on adding the concept of rounds to an application. A "round" is simply an organization unit with a start and end date. Each round has_many :events, and each event has an end date, defined as its moment of expiration. The validation logic for these two models is that an event's end date must be between the round's start/end dates and that rounds cannot overlap. This isn't an issue at all with things like fixtures since that's all manually specified. But I'm using FactoryGirl for generating my test data so things get a little tricky.
Read more...
October 22, 2008
As some of you may know, the build portion of Rails Rumble 2008 was this past weekend. Three of my friends and I competed and I have to say it was an all-around awesome experience.
We created an online game where you can bet on real-world events such as the outcome of an election. Our designer, Chris Bielinski, did an awesome job of whipping up a sweet looking design and making a usable interface in lightning-fast time. It's really important to note the importance of a good designer, I don't think we would have the inspiration to go as far as we did without such a sweet looking design. The other two Rails programmers, Rob Olson and Nathan Esquenazi also kicked ass. With a couple of well-seasoned Rails programmers, there is pretty much nothing that stood as a road block. Together, we plowed through most of our main feature set and had enough time to implement some sweet interface features.
There are a few things that I wanted to emphasize that really contributed to our productivity:
- Don't be afraid to ask questions. There were plenty of times that we asked each other questions about the Rails, Javascript, architectural features, or implementation-specific details.
- Have an idea of what you want to do. Think out some details in advanced, but don't over architect.
- Write tests. Especially because the build phase is restricted to 48-hours, we couldn't afford to have any app-500s thrown; tests are worth it.
- Kick ass designers kick ass. I really can't emphasize enough the importance of having a nice-looking, usable interface.
To anyone who is considering competing next year, I highly recommend it.
You can check out our app at PlayUbetcha.com or the official Rails Rumble URL of ubetcha.r08.railsrumble.com.
Also worth mentioning: I haven't seen all the apps, but from the ones I have seen, props to QFlip and MeetInBetween.us.
September 19, 2008
I just finished up my last week as an intern this summer and decided to quickly throw up a prototype for an idea I had: a community-driven comic strip site. The domain name is InComicForm.com. Basically, it's a simple prototype that lets users sign up and create their own comics, upload their own strips, follow other comics, and some other small features. It also lets users specify their own subdomain, so you end up with something like adventures.incomicform.com.
Play around with it.