.net alternatives

by Michel Grootjans
posts - 66, comments - 121, trackbacks - 1

My Links

News

Shelfari: Book reviews on your book blog

Twitter












Archives

Post Categories

Thoughts on JP's readability

This post is a comment on JP's post on redability.
JP asks what the community thinks about the readability of this piece of code:

Run.the<wire_up_global_error_handling>()
.then
<initialize_the_container_for_the_user_interface>()
.then
<initialize_the_user_interface_registry>()
.then
<initialize_the_ui_images_registry>()
.then
<initialize_the_main_menus>()
.execute();

My first feelings: only JP writes like this ;-)

After reading it with full attention, I realize it clearly communicates its intent. I'm quite comfortable understanding what it does. I see only one downside:
The way you name your classes 'do_this_for_the_thingie_that_needs_to_be_done' is hard to swallow for a majority of developers. It goes against all the coding standards I have ever seen. FxCop will surely choke on it.

However, if naming conventions prevents your naming style. You've got TWO choices:
- Follow the naming convention and forget about that elegant way of expressing intent
- Question the validity of the naming convention

Both of these choices have a cost.
The first option is easy but will eventually keep you in the stone age.
The second might end you up in a lot of meetings where you'll have to defend your case before management for the next 6 months, with only a small hope of success.
If you're lucky (like I am right now), you're in a dynamic team where code conventions are not written in stone. If the team agrees on this way of coding, we just do it TOGETHER.
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Wednesday, August 27, 2008 12:37 PM | Filed Under [ .net ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: