My dearest VB.NET programmers (and C# programmers up to a point), I once again have to inform you of one of my pet peeves. This is pretty much a follow-up to one of my previous posts, but more than two years after, I still work in projects from various online sources as well as professionally that are littered with the warnings about undefined variables:
I don’t like Visual Basic, yet in many Microsoft shops, VB is still being used especially in combination with ASP.NET. The problem with Visual Basic is that it’s not very strongly typed. Conventions are often thrown out of the window and Senior VB developers often hold their seniority as experience which, is more fiction than fact.
How many more times do I have to see Functions which don’t return anything and should have been declared as Subs.
Variable 'XYZ' is used before it has been assigned a value.
Variable declaration without an 'As' clause; type of Object assumed.
Ugh. You’d think that people with 15 years of development experience wouldn’t dismiss this kind of stuff and just do the right thing.