Category: Rants

New Years Resolution: Fewer Code Comments!

Clean Code: A Handbook of Agile Software Craftsmanship

Recently I’ve been reading Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin). This is a must read, and I’d recommend it to programmers of all skill levels. It has reminded me of many things that I’ve mistakenly unlearned over the past few years as I’ve struggled to battle against tighter and tighter deadlines and push out as much functionality as possible.

One of the main points that I’ve taken from the book is that comments make programmers lazy. For some reason we seem to think we can name our variables anyway we like as long as we give them a nice descriptive comment. Likewise, instead of refactoring code into nice methods with expressive names that follow the Single Responsibility Principle, we tend to create long functions that do many things and again litter them with comments describing what we are trying to do. This leads to problems, as our comments can be misleading, without actually reading and understanding the code we don’t know what is really going on.

My new years resolution is to comment less. In fact, I plan to write as few comments as I can. Instead I will concentrate on writing expressive code that speaks for itself. This will lead to some quite lengthy function and variable names, but I’m a fast typer. So do you think comments make you lazy? Or are they a necessary evil or the limited expressiveness of our high level languages?

The Effect of Meetings on a Developer’s Productivity

I came across this article titled Maker’s Schedule, Manager’s Schedule. It makes a very interesting point about the effects of meetings on a Software Developer’s productivity. I have to agree with everything in it. My personal experience is that a meeting completely blows at least half a days development. I need long periods of time to focus on a task, find my zen and really get to grips with solving the problems I am working.

Since I became a team leader, I have tried to avoid organising unnecessary meetings, especially when it is obvious that the team have their minds on what is important to us all, their code.

What do you think? Do you find breaking up your day with meetings means you get less real work done?

Success Tackling Comment Spam

Spam

Two weeks ago I was complaining about the default Akismet Spam Protection that comes installed with Wordpress. It has always been a bit of a pain having to trawl through the spam trap once a week to pick out the odd legitimate comment, so I stopped doing it. After a brief blogging holiday I came back and found a few nice comments rotting away under Spam. I posted a bit of an apology and a complaint and then Keiron suggested I try WP-SpamFree, a Wordpress plugin that he was testing.

It takes a more pro-active approach to spam protection. Rather than act as a simple filter that places spam in the Spam Trap. It completely blocks spam posters and particularly bots from leaving posts. It is really effective at this and means there is no spam to search through at all. Great if you get lots of incoming spam or are just a bit lazy like I am ;-) .

Well I’ve tried it out for two weeks, and I can now give it a hearty recommendation. It has managed to block those dodgy russian comments (Anyone else get these?), spam links, and all the other nasty stuff I was getting, and as far as I can tell there are no false positives. My traffic has increased a bit over the last couple of weeks and this plugin has saved me a bit of work, and a lot of headaches, as spam attempts have gone through the roof. So if you hate having to manage spam comments as much as I do, give it a go.

Creative Commons License photo credit: vic15

New MacBook Range – My Two Cents

Teacher's Pet!
Creative Commons License photo credit: Sister72

Apple don’t half know how to build hype around their product launches. For the past few days rumour and hearsay have permeated through the blogosphere about what Apple were goi to announce today in their notebook conference. It turns out that much of what I have read has come true. It all looked so promising this morning, I was hoping for more though…I was disappointed.

The thing is their isn’t much of leap forward in terms of the machine’s specification. They look nice, the new manufacturing process and aluminium cases will hopefully improve some of quality issues I’ve experienced with previous models, cracks in the plastic cased models and bends in the aluminium ones.

The Multitouch trackpad sounds nice, but is it really that useful. Will software developers take advantage of this when you consider the small install base, I don’t think so. Also, it’s made of glass! Why? I guess it will look good but it’s not really a killer feature for me.

Battery life is claimed to be improved, but I hardly ever spend more than a couple of hours away from a power point. When I do I certainly don’t have my laptop with me so that’s another bonus that doesn’t mean anything to me.

The one area that tempts me is the graphics. Dropping the Intel chipset in the MacBook and sticking SLI in the MacBook Pro is almost enough for me. I use my laptop for occasional game and I also mess around with OpenGL programming. The features of the GeForce 9000 range would be quite an improvement over my Inspiron’s 7900 graphics. That said, any serious games playing is done on the XBox or Playstation and I can generally get buy with what I’ve got on the 7900 for OpenGL.

Of coarse the final factor that prevents me from upgrading is the cost. I’m not interested in anything with less than a 17inch display so the MacBook is out, which just leaves the MacBook Pro. Base price of the unit £1949, that’s some serious cash, something like that is going to need insurance, which is extra cost of coarse. Oh yeah, then I need to buy another copy of Windows Vista, which isn’t cheap either. With extras I guess it’s looking at around £2500. Forget it.

Doesn’t look like I’ll be upgrading my laptop this year. The old Dell Inspiron 9400 is an unwieldy beast, but it performance well, especially with top of the range display. Sorry Mr Jobs, the only way you’re going to get any cash out of me is through the iTunes Store.

Image | WordPress Themes