Geeks With Blogs

News Google

Nick Harrison Blog<Nick>.Next()

Many people seem to be intimidated by some of the most exciting programming features in DotNet.   Reflection comes to mind.

I once did a little client training and on the first day was lectured about this “Reflection Crap.”   We often fear what we don’t understand.  We often avoid technologies that we don’t have to use and cling to more familiar technologies and techniques.  It’s no fun admitting what we don’t know, and it is often faster to do something the old familiar way than it is to use new unfamiliar techniques, even when the new technique is better.

The result is that many people never use reflection or regular expressions, or design patterns or threads, or … until there is no other way to accomplish whatever task they are working on.

The result is that their first exposure to the new technique is pretty complicated and scary.   If the first time you use a regular expression is to handle data validation where nothing else would work, then your first regular expression will be a pretty tough one.   If the first time that you try to understand a piece of reflective logic is while production is down and you are tasked with untangling a failed reflective call, without a doubt you will be tempted to rip out the “reflection crap”.   If your first foray into multi-threaded program is when production is reporting concurrency issues that are costing the company money, you will hate threads.

If on the other hand, you play with regular expressions between projects and start with simple pattern matches and work your way up to more complex patterns, you will have no problem using a 20 character expression to parse a string instead of 40 lines of string manipulation logic code.

If you play with Reflection during design and see how easy it is to interrogate the metadata when you don’t have a business manager breathing down your neck, you will not be afraid to use reflection to loop through the properties of an object at runtime to initialize them to known safe values or loop through the methods of an object searching for new methods to run at.

Playing with these technologies when it is safe, gives you more confidence to be able to pull them out and show them off confidently when it may not be so safe, but when they are most useful.

What are you afraid of?   What were you afraid of that you know use with confidence?   What have you been putting off learning?

Posted on Wednesday, January 9, 2008 9:01 PM | Back to top

Comments on this post: Scared of Complex Technologies? Embrace Them!

comments powered by Disqus

Copyright © Nick Harrison | Powered by: