Code Elegance

Archive for March, 2009

Are we sure that goto is dead?

Last week, during a code review I found this code (I cut some lines to keep the post short)

 

// [Cut]
case USER_AGENT:
     // [Cut]...various code....
     goto default; //we want it to be added to serverVariables
case CONTENT_TYPE:
     // [Cut]...more code (with some "if")
     goto default; //we want it to be added to serverVariables
 case USER_LANGUAGE:
     ParseUserLanguage(variableValue);
     break;
 default:
     ServerVariables.Add(variableName, variableValue);
     break;
// [Cut]...continue...

No words.

 

Technorati Tags: ,,
3 comments

Horizontal growth

Reading some posts about “gratification” on Luka’s blog I think how (in Italy) the next step for a software developer is to  became a project manager.

First: it is not clear how this two roles are correlated. It’s absolutely false that a good developer will be a good manager.

Second: what make you think that I, as a developer, want to became a project manager? I love my profession, I love develop software and I hate working with project and excel.

I would like that our bosses would give us other path, an alternative to the vertical growth. I would like to have the horizontal growth.

I mean, I would like to have more space to try new practices, to go to the conferences, to buy new books and to learn new technologies.

This would benefit all the company because I would share my know how with other developers and I could give something different to my company.

So, managers out there: think about this!

No comments

TDD Course in Bologna

Like I already write here (in Italian) next week I will teach a the Test Driven Development Course in Bologna.

The course is in two days and will have a practical cut (most of the second day is dedicated to write a real application in TDD).

We will start from Unit Testing, passing through the Mock Objects and Refactoring to arrive to real TDD.

And for the UgilALT.net members there will be a 10% discount.

More info here.

Technorati Tags: ,,
No comments

1024 Tests

I love Unit Tests, and I feel very confortable when the number of tests is high :-)

1024

No comments