Not a development post (in the true meaning of the word :)) but more about a website I found a few days ago… Jamendo.com – I spend my coding time listening to music, it’s how I work and particularly with the distractions of an office with other people, it’s often the only way to ‘zone in’ to the work.
Jamendo provides a collection of royalty free music, free to download and share etc. It’s given me more options to listen to now, so that’s a good thing.
Check it out and see what you think!
Just Let It Go
2008, May, 14 · 4 Comments
I was reading a blog post (Narcissism of Small Code Differences) today, and something rang true.
Basically the post (or what I got from it), is that the differences in ways people program are just that, differences. Just because a bit of code maybe isn’t written the way I would write it, doesn’t mean it’s wrong. As depicted in the post, there may be reasons why code is done in a certain way!
I mention this now, as I’ve just come across some code from a co-worker that in the past, I probably would have re-written, it’s a simple thing, and really more style based than efficiency etc.
The co-workers code reads like:
if(!xxx)
{
/*Do some stuff*/
return false;
}
else
return true;
Here I would itch to get rid of the ‘else’, either:
if(!xxx)
{
/*Do some stuff*/
return false;
}
return true;
as the ‘else’ is irrelevant in this case. Or even:
if(xxx)
return true;
/*Do some stuff*/
return false;
Neither would change the way the method works, but both are purely style changes that look more pleasing to me. But, hey! What if the original coder prefers it his way – it’s wrong for me to force my style on someone else.
So today I’ve decided to let go any style changes unless they significantly make the code easier to read / debug etc… Yay for narcissistic me!
Categories: Comment
Tagged: Comment