Close and Go BackBack to Viget

Throwing a Boomerang

Kevin McFadden
Kevin McFadden, Former Staffer, July 12, 2006 0

A boomerang is a crafty device invented by the aborigines of Australia having the useful feature of returning to the thrower when properly thrown and its target missed. Of course, if you fail to pay attention, the boomerang could very well come back and hit you. Similarly, failing to catch your exceptions and check your method return variables can also bonk you on the head. Usually the day before release. Friday at 4:45 PM. On the night your friends celebrate your birthday. Without you.

We will ignore try-catch for now since most of our development is in PHP and its API is almost completely procedural. Being a procedural language, pretty much every function has a return value. Some of these are important and some can be occasionally ignored. Which are which?

Continue reading "Throwing a Boomerang"

We're the Developers

at Viget Labs. We write about web development trends, tips, best practices, industry events, and our projects — all with an emphasis on Ruby on Rails.

Recent Comments

Tony,

I understand and agree that the back-end shouldn’t output code (html code), and only content. The templates (aka views) should do the trick, but instead of having lot’s of if/else conditionals inside the view, you may just output the following content.

No information available

The template would loop in an array and put all the <li>’s inside the <ul>.
I don’t see anything wrong, nor...