Tuesday, June 15, 2010

The boy scout rule

When you leave the camp, leave it a bit better than you found it . From this presentation (which I found interesting, but very annoying at times, and the beginning is simply too silly)(via Victor Hurdugaci). Which applied to code is:

Leave the code you fix a bit better than you found it. Fix one small thing or two. Rearrange some code. make it work a bit better.

I think it's an incredibly good piece of advice - bugs usually creep in badly written code - and by fixing badly written code whenever you see it you might fix a bug before it appears.

Monday, June 14, 2010

TDD stupid question

Ok, repost, too many mistakes.

I was watching a video with a guy very excited about TDD (a big mdeah from my side) - but mostly by the most inane part of it, which is 'pair programming'.

Why is that a good idea? Doesn't it sound like a "two stupid people put together might make as much as a good programmer, hopefully" thing?

Pair programming sucks big time - two people cannot write the same line of code, get the heck over it.