Screencasts Galore!
March 28th, 2007
I’m a peepcode fan. For $9 you get a great, in depth tutorial on whatever the topic might be.
A week or two ago I learned about railscasts. These are just as pro as the for pay peepcodes, but they’re free. The big difference being the railscasts are very short. Often less than 5 minutes. Ryan picks something small to cover, and covers it well. Most of the time the topic is fairly novice, but I’d be lying if I said I didn’t learn anything.
haml == fun
March 27th, 2007
I just spent the obligatory 20 minutes with haml and it’s css brother sass. I really enjoy both. I created a test project and converted some scaffold_resource generated rhtml into haml in very little time. I’m sure others have pointed out that it’s attention to tabs makes it very python-esque, but I like it. I think forcing proper tabs in HTML is a good thing.
Is the resulting .haml superior to the rhtml it replaces? The definitive answer: depends
The biggest problem I see with haml and sass is the barrier to entry (albeit small…it’s still there). I’m often working with designers that are savvy enough to get into the views and fix things that need fixing. RHTML is perfect for them. Most have used PHP before and have no trouble realizing <%= %> is dynamic content. They just work around that and all is well. In this situation, rhtml wins. You want the designer you’re working with to be as comfortable as possible (read: fast).
All that said, haml was fun. If you’re doing a solo project or on a team that’s willing to spend the 20 minutes per person to learn it, I think it’d be the way to go. I’ll probably be cutting some of the templates in mybizexpenses over to haml for fun.
Web Typography
March 27th, 2007
I’m no designer, but I enjoyed listening to Mark Boulton and Richard Rutter’s SXSW panel titled Web Typography Sucks. I wasn’t there, but they kindly provided the slides @ http://webtypography.net/sxsw2007/.
My favorite part was comparing these two slides (I had to shrink the screenshots for width reasons - but I think the point is preserved):


I’m inspired to pick my Elements of Typographic Style up again.
Hrmmm...Nevermind that Java thing
March 22nd, 2007
One of my favorite features of NetNewsWire is the ability to highlight differences (it’s an option in general prefs). When a post you’ve previously downloaded is edited, the deleted lines are shown in red and struck through and the new content is in green. Most of the time someone just changes the wording of something. Every now and then, something funny changes. This morning I noticed a ruby on rails job posting was edited in a humorous way:

I’m guessing that line about maintaining a Java app turned some folks away ;) Or maybe trying to make your job posting “Rock” was the flaw.
Creating a Public Subversion Repository
March 10th, 2007
When I created uptime_generator, I had to provide a public svn repository. Having never done this before, I had to learn. This post will be primarily useful to slicehost’rs running Ubuntu and having installed most of their setup via this walkthrough.
The Short
Follow these instructions
The Long
My apache install had ‘dav_module’, but it didn’t have ‘dav_svn_module’. So after going through the “Updating the Apache configuration” steps from above, my ‘apachectl configtest’ said:
Next I read the “Installing the mod_dav_svn modules” from the same page. From that I realized I needed to download the subversion sources and rebuild. I ran
make
Alright. Now I’ve got what I need. I went back to httpd.conf and added the LoadModule:
Saved and re-ran ‘apachectl configtest’. All was well. Restarted Apached and was happy to see ‘revision 0’. It worked!
All in all in went quite smoothly.
Hopefully this helps someone (or minimally, Future Me).
My First Plugin - uptime_generator
March 9th, 2007
After I posted my last entry I was chatting with Louie about it and he helped me realize it might be a good job for a generator. Having never created a plugin nor a generator before, I had some learnin’ to do. Well, that learnin’ happened. You can reap the benefits via
Then run:
Your app should now respond to /success.txt.
At this point you could deploy and point your favorite uptime svc at that URL, or you could open uptime_controller.rb and make the ‘success’ method more robust.
Enjoy!
Useful resources:
Explanation on creating a generator: http://wiki.rubyonrails.org/rails/pages/UnderstandingGenerators
Example generator: http://topfunky.net/svn/plugins/topfunky_power_tools/
I also peeked at the scaffold_resource generator from rails proper.
Cheap Way to Monitor Your Rails App
March 9th, 2007
I’ve been using http://uptime.openacs.org to monitor a static site for a while now. Not long ago I realized it could be used to monitor a rails app too. To do this, you have to:
- create an action who’s result simply outputs ‘success’
- make sure you can get to that action via a route.
Deploy that and point the uptime servers at it and you’re good to go. You can get fancy by making the new ‘success’ action return an error if it can’t do a simple ActiveRecord query or something similar. Make it test whatever you care about. And all this for free.
update: I created a plugin that creates a generator to generate a controller and a route as described above. Available here.
Introducing mybizexpenses.com
March 3rd, 2007
Earlier this week I was doing my taxes and came up with the simple idea for mybizexpenses.com. The goal was to create a web app to keep track of my business expenses to make filing my ‘07 taxes a tad easier. About eight hours worth of work later, it’s here, and useful (to me).
Anyway, give it a whirl. What’s up there now is and will always be 100% free. I may add the ability to upload and store receipts associated with an expense. There’d probably be a small monthly fee for that. Let me know what you’d like.
The simple interface was inspired by basecamp’s time tracking feature (which I quite enjoy).
