Sunday, August 23, 2009

Why codereviews should be a teamthing

Often codereviews are done by one person, the technical lead of your team.

In my opinion it's better to make each developer of your team do codereviews.

My arguments

1. Having all developers doing codereviews enforces well-documented codingstandards..
2. Which also leads to discussions about what these codingstandards should be.
3. Each developer is forced to understand the workflow of an application which isn't his, which expands his domain knowledge.
4. Each developer learns from others and is given an opportunity to teach and discuss why someone chose a certain path.. There is always something new to learn, even for seasoned developers. You might just pick up that latest trick doing whizbang Silverlight 3 stuff from that freshman that just started working this year.
5. Multiple perspectives on a problem can only benefit the outcoming solution.

What are your thoughts?

Thursday, August 20, 2009

My holiday in France in five pictures

Last week I went on a holiday to France with my girlfriend and her family.

Because pictures say more than words..

One: The location - Laguepie, Albi



Two: The house and "la piscine"



Three: Me enjoying the sun



Four: Only in France you find a 1955 Peugeot 403 with numberplates just standing there next to the road



Five: Random picture of one of the towns next to Laguepie



Looking forward to the next holiday :)

Monday, August 17, 2009

Book review: Screwed - The Truth About Life as a Prison Officer



My name is Ronnie Thompson. Being a Prison Officer for Her Majesty's Prison Service was something I used to be proud of. I soon realised the truth of what it's like working as a screw. A fucking headache. The pressures, duties, life-wrecking conditions, danger - none of this is known to the public, but all of it makes up a day in the life of a Prison Officer.


My thoughts

Ronnie takes you on a tour through the whole prison system, giving you a detailed look into the - rotten - real system. This is not what you see in movies or read in the paper. His critical view on the inside together with lots of funny, weird and awesome anekdotes make this book a must-read!

Get the book - Screwed: The Truth About Life as a Prison Officer

Sunday, August 16, 2009

Book review: Hell's Angel



This book is the biography of Ralph 'Sonny' Barger. Sonny is one of the cofounders off the Hells Angels.

You should read this book when..
- you are interested in the history of the Hells Angels
- you like to know their side of the story of their crime history
- you like hearing tough stories at the bar
- you are into biking
- you enjoy freedom

In general I enjoyed reading this book. Some parts where a bit boring, but the most anekdotes were awesome!

Get the book - Hell's Angel: The Life and Times of Sonny Barger and the Hell's Angels Motorcycle Club

Saturday, August 1, 2009

Managing UserControls using Interfaces

It's a pretty common situation where you have multiple UserControls in a page which all expose the same functionalities.

In the project I'm working on right now, we have a big TabContainer. And each Tab is a UserControl. One button should make all the Tabs save their data, but not every Tab is always loaded into the TabContainer. As you can guess, we needed something generic.

That's why I introduced the ITab interface. Every UserControl implements this interface.

When I hit that save-button, a method iterates trough the ControlCollection and looks for every type that implements the ITab interface.

Take a look at this codesnippet.



The public method Iterates through the ControlCollection and checks if the Type is a Tab using the private IsTab() method. This private method uses Type.GetInterfaces() to iterate through all the Interfaces for that Type. If the control is a Tab, I cast it to an ITab and call a public method depending on the ReportMode.