MetaSkills.net

Autotest Infinite Loop On Failure & Error

Posted On: April 6th, 2008 by kencollins

I just had an issue pop up today that seemed to be an issue for a few others. It seemed that all of a sudden that my autotest was stuck in an infinite loop after a failure or error. At first I thought it was related to some additions to my ~/.autotest file but after commenting out the whole lot of additions there, I realized it was something else. Here was my fix. Basically I think these errors are always related to a file that has changed during your test run. Now we just have to find out what that files are. Here are the steps I took to find out.

Tags: autotest, rails, ruby

How To Stop Delivery Of An Email Within An ActionMailer Method

Posted On: April 3rd, 2008 by kencollins

OK, so you want to keep your code placement REALLY organized. You have read about my persnicketyness and now you want to practice the best in concern placement and keep those controllers of yours really slim. Like me, you may want to try and keep controller feature additions to very specific one liners of code. Organizing your controller code to do just that with ActiveRecord models or even your own custom classes is a pretty easy task, but how do you keep things simple when dealing with controller actions that have to send email AND you want that single email link of code to be responsible for everything in it's own encapsulated way.

MacBook With 4GB Of Memory

Posted On: April 3rd, 2008 by kencollins
macbook_4gb_memory.png

My MacBook is about a year old now and I've read in quite a few places that they could be upgraded to around 3.3GB of memory for this specific model. Unlike the latest MacBook which can "as advertised" accommodate 4GB of memory, the theory was that the Santa Rosa chipset can address all 4GB. It could very well be that technically my MacBook is only using ~3.3GB of that memory but the performance has been significant for a very cheap stick of RAM. I highly recommend Crucial.

I think this upgrade will have to hold me for some time. In general it has really helped my uptime. Odd as that is I think working with only 2GB of memory caused a lot of IO swap and memory corruption. Especially when stopping and starting so many different mongrels for local Rails development. As of this writing I have not found an issue that I have had to reboot for... uptime 10 days and going strong.

To keep my uptime going strong, I just purchased an app called iFreeMem today after reading about it on TUAW. Because I use PhotoShop ever now and then it really helped having this utility free up some memory that it would not release. So far it is working great!

Don't Be A Plinko Programmer

Posted On: March 26th, 2008 by kencollins
plinko.png

One of the things that I have really grown persnickety about is the placement of code. For example, I am a huge advocate that controllers in a rails project should read like a mini Domain Specific Language (DSL) and that as much logic as possible be delegated to the models. In my opinion the best way to do that in a Rails project is to learn the proper usage of ActiveRecord Association Extensions. You can check out the Rails API on this page and scroll down to the section called "Association Extensions" if you read the official docs. In short:

MetaSkills.net Reborn on Mephisto

Posted On: March 21st, 2008 by kencollins

DraxWell after a year of neglect, the MetaSkills.net blog has been reborn on Mephisto. Previously I was using Drupal and it finally got to a point where I was so deep into ruby that I did not even have the gumption to open up a PHP session to publish anything. The sad part is that I told myself that this PHP disdain would help me get off my butt and move to Mephisto. You know, eat my own dog food – obviously procrastination won out – but not forever. For the past week I worked hard to get the Meta theme for Drupal converted to Mephisto. You can use this theme yourself if you want, the source is available on my github and I am making updates often. Heck... feel free to fork the project and make some changes or let me know if you want me to incorporate them into mine.

Rake task to read and write the ActiveRecord schema version table.

Posted On: January 31st, 2007 by kencollins

After attending Rails Edge in Reston, Virginia I decided to move some common tasks from my ~/.irbrc file and put them into Rake. I thought I would share a task that reads and writes the ActiveRecord schema table. Sometimes in migrations this is either good to know or manually change. Simply copy this in a foo.task file in your project/lib/tasks directory and use rake -T to see the description and usage. I have placed these tasks in the db:version namespace.

Web Service Woes

Posted On: December 29th, 2006 by kencollins

Only now do I really get this image from DHH's blog. I am really beginning to despise SOAP for some reason, but I guess I will "get it" as I learn more about it -- as it seems to be the only way to do business with the big players out there. For a glimpse of some of my hell, check out this Ruby + SOAP4R + WSDL Hell article.

Tags: ruby, soap, webservice