Archive for 2009

Did you think your site validated input properly? Think again!

Wednesday, October 21st, 2009

You’ve written a PHP based web app, and you’ve made sure it doesn’t cause errors if the user submits unexpected values via any URLs or forms. But there’s something you quite likely forgot to test: What if the data that’s expected to be a singular value happens to be ...

Is commenting your code useless?

Thursday, October 15th, 2009

James Carr has written a well argumented post about comments. To sum it up shortly, he says comments are the lowest form of communication, and that commenting freshly written code is not a good idea. I tend to disagree, and here’s why.

Going to review Zend Framework 1.8 Web Application Development

Monday, October 12th, 2009

I was contacted by Packt Publishing to review a new Zend Framework book, Zend Framework 1.8 Web Application Development. I have previously reviewed Object-Oriented JavaScript, also published by Packt, which was a quality title so I’m looking forward to reading this ZF book. The book is written by Keith ...

Common programming errors and how to avoid them

Thursday, October 8th, 2009

Back in august, I introduced the error tracking challenge. While it didn't get as much participation as I had hoped for, I did manage to collect some results. In this post, I'll go through the most common ones, and suggest some approaches to avoiding them. Suggest your own errors and tips ...

Error tracking challenge is over

Tuesday, September 29th, 2009

Just as a reminder: If you participated in the error tracking challenge and haven't yet mailed your results to me, please do so ASAP. The address is jani at codeutopia net I will be posting some results next week.

Google Wave impressions

Thursday, September 24th, 2009

So I got a Google Wave developer sandbox account. If you don't know what Google Wave is, you've probably been living under a rock, and you should go check out the aforementioned link. It has a nifty video demonstrating various parts of it. I've had time to play with it for ...

What is a null object, and when are they useful?

Saturday, September 12th, 2009

If you've written code, you've probably used the value null to indicate some variable is not set. This is perfectly good, but did you know there's more to nulls than just the value null? There is also a null object, which doesn't really have anything to do with the value null, ...

How to get free publicity by screwing up your friendly URL algorithm

Monday, September 7th, 2009

Today I'll share a fun story with you. Would you like to get free publicity? Go ahead and make a poor friendly URL implementation, like the Finnish Broadcasting Corporation, or YLE - the national broadcasting company of Finland - did. YLE had a very naive friendly URL algorithm on their web ...

Improving code with peer reviews

Tuesday, September 1st, 2009

Peer reviewing is the practice of looking at code written by others to find errors or ways to improve the code. Sometimes also called desktop reviewing, this approach can be useful for various reasons: If you have a coworker who is more experienced than you, you can learn from him/her It's often ...

What makes an abstraction good, and why should I care?

Friday, August 28th, 2009

You probably know what abstraction means - making a complex process simpler - but do you know what makes an abstraction good, and why it's important? If you are writing code for a project that lives a bit longer, or has multiple developers working on it, having a good abstraction matters. ...