metautonomo.us

Confounding URL typists since 2007.

Monthly Archives: August 2008

PHP: A Bridge Too Many?

2 Comments

Development language preferences are funny things. I’m well aware of the benefits that come from being familiar with many languages, not least of which is the perspective needed to discern the right tool for each job. As they say, when the only tool you have is a hammer, everything looks like a nail. I’ve had exposure (in varying degrees) to a fair number of programming languages in my time: BASIC, Pascal, Ada, C, Bourne Shell, Perl, Python, PHP, Java, Javascript, VB, and Ruby among them, so I feel as though I do have some general ideas about the kinds of features I look for in a language.

All that being said, there are some tools that I can’t help but wonder about. PHP is one of them.
Read the rest of this post

Filed under Blog
Aug 20, 2008

Today, you’re as dumb as you’ll ever be.

0 Comments

If you’ve been coding for a while, particularly if you spend much time with the agile development crowd, you’ve probably heard the term YAGNI, or “You Ain’t Gonna Need It.” Simply put, this principle states that we shouldn’t spend time adding features or flexibility that you don’t need right now, because it’s likely that you ain’t gonna need it later, either. I recently purchased Russ Olsen’s excellent book, , in which he makes one of the most eloquent and succinct arguments for YAGNI I’ve yet seen.
Read the rest of this post

Filed under Blog
Aug 19, 2008

Modifying Association Methods Dynamically

0 Comments

Recently, I encountered a bug in ActiveRecord’s AssociationCollection. When you push a new record into an associated collection, the collection in memory is always appended to, even if :uniq is set for the association. This causes a discrepancy in such a collection’s contents until a reload from the database removes the duplicates. While waiting for feedback on the patch I submitted, I wanted to fix the problem in my application. Now, I could have just redefined the AssociationCollection class during my app’s initialization, but that wouldn’t be very interesting. Since Rails associations are full of strange and wonderful magic, this posed a fun little coding exercise for a Saturday morning.
Read the rest of this post

Filed under Uncategorized
Aug 2, 2008