November 2006 - Posts

Is IT certification still relevant?

I received an interesting article, dealing with the issue on the necessity of getting certified.  I have to admit, that I'm one of those sitting on the fence.  For one, some certifications' lifetimes are so short that they may not be worth it.  An example of this would be Microsoft's .NET certifcations, with .NET 2.0 barely out for more than a year, .NET 3.0 certifications are already in the works.

Another thing is the easy access to "sample" questionnaires.  I know of several former co-workers (in a previous company) who got certified just by reading the questionnaires over and over again and memorizing the correct answer for each question.  It's kind of disheartening to know that some people get certified without actually "deserving" it.  Given that, it somehow lessens the "weight" of holding a certification title.  What's to stop employers from assuming that you're just one of those who used a "sample questionnaire" to obtain the certification?

If certifications were really awarded only to those who deserve it, and if there were no, for lack of a better term, "cheat sheets", I think IT certification would definitely be worth it.  But hey, that's just my opinion.  Feel free to share your comments.

Any thoughts?

Posted by raistlin | 9 comment(s)
Filed under:

An interesting read...

This article, which I first read in December 2005, really made think... and reminisce... Big Smile

It's a bit long, but i think it's worth reading.  I never thought I'd miss the "old days" of programming. Smile

Posted by raistlin | with no comments

.NET: How to determine if a variable can be converted to a particular type

Platform: .NET Framework
Language: C#

Using reflection, we can determine if a particular variable can be converted to another data type.  This is useful if you're not sure if the conversion that you're about to perform is valid or not.  Although this can be done using the common way of converting, for example:

      int x = 10;
   Convert.ToDateTime(x);


However, the previous code will throw an exception, so you're obligated to enclose the code in the "try...catch" block.  Exceptions are, however, expensive operations and can be avoided in cases of invalid conversions.  By changing the above code to:

       using System.ComponentModel;
       ...
       ...
       ...

       int x = 10;

       IConvertible c = x as IConvertible;
       if (c == null)
       {
             // code here
       }

       if (TypeDescriptor.GetConverter(x).CanConvertTo(typeof(System.DateTime)) == false)
       {
             // code for invalid conversion here
       }

you can avoid using exceptions just to handle invalid conversions.

I know what you're thinking, it takes several lines more than the "common" way.... but you can encapsulate all this code into a conversion function, and using the above code would become more "convenient".  One thing to note though, the "CanConvertTo" returns false when checking if a string variable can be converted to a boolean type.  So special handling should be done within the function for such a case.

I've attached a simple console app demonstrating this.  Also, take note of the "IConvertible.ToType" conversion function in the attachment.  Very useful, IMHO.

For further information, refer to the MSDN documentation on the TypeDescriptor, TypeConverter classes and the IConvertible interface.

HYFTU

Posted by raistlin | 6 comment(s)
Filed under: , ,

First Blog, First Post

Hi! Welcome to my blog.  Hopefully, I'll be able to post a lot of stuff that you'll fnd helpful/useful/informative.

Check back from time to time. Smile

Posted by raistlin | 5 comment(s)
Filed under: