Geeks With Blogs

@michelgrootjans
  • michelgrootjans I scored 14 points in the FizzBuzz challenge on HackerRank https://t.co/8vicb8ANPq about 507 days ago
  • michelgrootjans @yreynhout we implemented elasticsearch on our last project. Works like a charm for rails apps. about 512 days ago
  • michelgrootjans Microsoft releases glasses - implementation looks great - https://t.co/RoC1s02irE about 515 days ago

News
Shelfari: Book reviews on your book blog

.net alternatives by Michel Grootjans
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. Posted on Wednesday, August 27, 2008 12:37 PM .net | Back to top


Comments on this post: Thoughts on JP's readability

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © Michel Grootjans | Powered by: GeeksWithBlogs.net | Join free