The past year has been quite an experience. I started doing asp.net back in 2001, then stopped programing alltogether from 2003 to about 1 year ago this month. A good friend of mine got me a job with him at a small telemarketing company doing asp.net using vb.net. This is great, I can finally start making some decent money. The problem is, I'm finally up to speed with things and want to start doing things the "right" way. Let me explain. (we're also the only two .net developers there.)
My opinion of the "right" way is to use OPTION EXPLICIT an OPTION STRICT and to use some type of simple naming conventions on variables, not random names. For the past year, due to the fact that I didn't have the updated knowledge on these topics, I just did it his way and I've noticed a lot of problems with doing it his way. Let's say I have to go in and work on some of his code, or he asks me to change something for him. No problem... until I run into statements like this...
Dim evy = gboffnum( jessica, erik) And the function of gboff num is declared like
Function gboffnum( jambi, poto )
WTF is that? I see jessica and erik delcared at the top of the page as
Public jessica, erik followed by like 6 or 7 other variables. Then there's good old sqlstr.
sqlstr is also a public variable. Sometimes it's a sqlcommand, other's its just a string containing a sql query. This just can't be healthy. And don't forget about all the late-binding errors I've run across while debugging.
My friend argues and complains about me trying to get him to use Option Strict (currently I just say Option Explicit to him... I don't think he's quite ready for an explenation as to what Option Strict is yet nor things like late-binding.) He says it's just not the way he codes and he likes being able to use one variable for multiple things and that creating multiple variables of correct types just takes up too much memory... WTF.
Then there is the program I wrote, which sends data to a webservice. It takes the webservice anywhere between 3-15 seconds to return a success or failure so I put that into a thread and have the return logged into a database so I can see that everything is working right. He has told me that by creating this one thread, asp.net actually creates like 200 threads for it because it is called in a server.execute.... WTF. He's told me code behind is slower and uses up more memory because the page has to call the reference to the code behind or pre-compiled dll.. WTF. I've been told to only use .htm because it's faster than .html due to the fact that a file with the extension of .html's encoding is different... WTF
Now, I've gotten him to start giving his variables types, he complains, but he does it. How do I get someone who is a decent programmer (there is stuff he can do that I cannot) and make him a great programmer? He's a self-proclaimed narcisist, which is bad because that means, he knows everything, and he's always right (or atleast thinks he's right) and I can almost never win an argument with him when it comes to this stuff, even when I know I'm right and have abundant resources all over the web that tell me I'm doing the right thing.