For the love of all that is good and holy, please double-check – no – triple-freaking-check your spelling when you’re creating a table or column in the database. I now must purposely misspell words in order to retrieve this data and it’s making me mental!
Some prime examples: a table called “comparision”, a column called “committment”, and my all-time favorite – a constant for a fucking comma called “COMA”! What in the blue blazes?!? First off, having to spell out the word comma is not an effective timesaver. Secondly, why do we need a constant for it in the first place, it’s not like the comma character is going to change in any way, so what the hell is the point? Now, I’m not a grammar Nazi and I understand when mistakes happen in emails or posts to message boards (trying to cover my ass in the inevitable case that there’s a typo in this very post), but it is intensely annoying to have to remember to make typos in order to write a query. And now that you’ve already gone and created the table and used it in lots of places, you don’t want to change it. Then WHAT THE FUCK ARE WE USING CONSTANTS FOR IN THE FIRST PLACE??? ggrrrrrrrAAAAAAAAAAAAAAAAAHHHHHHHHHHHHH!!!
My boss does this on purpose; for example if he needs a local variable to keep a count of something or other, he will call it Kount - it drives me fucking potty; the code looks like it was written by a three-year-old.
I had a job once where whoever created the database spelled employee “employe” throughout. After I left that job, it took me a year till I could spell it correctly again. Aggravating as hell, I agree.
Are you kidding? I once worked for a guy that insisted on us putting 3 pages of comments at the top of every procedure. Date, name, weather, whatyouhadforlunch, shortstory, etc.
OTOH, I once wrote this comment: “There are some procedures that defy any easy description, and no comments would suffice to explain them. This is one of them. Deal.”
The worst (ok, maybe not THE worst) is when someone goes through the trouble of commenting, but you can’t understand what in Sam Hill they’re talking about. The guy who created the “COMA” constant was not a native English speaker, so sometimes I have to read his comments with a Russian accent in order to understand what it means. (try saying “coma” with an accent, it’s less a typo and more of a phonetic spelling) He also has a section of code marked as the “Constracter” rather than “Constructer”. Sometimes it makes me laugh. Sometimes.
I thought about that, but I was so irritated that it actually made me register. I wanted to vent to someone who would appreciate it, but I didn’t want to trash talk to any other co-workers, so I figured I’d put it here.
Cryptic logic is sometimes funny, too. If you know VB, you’ll get a kick out of the following (paraphrased) that I ran across when reviewing someone’s code:
Sub MySub
[...snip about 200 lines of code...]
If I > 10 Then
Exit Sub
End If
End Sub
Am I reading that right? He wrote an IF statement without another control to complete the loop, so that the sub was going to end no matter what the result of the IF?
If so, BWAHAHAHAHAHA and I wonder how long it took the guy to catch it in the debugging.
Yep, you’re reading it right. But he never caught it. It never caused a problem. It doesn’t do anything. I just happened to notice it spot-checking his code.
It’s when you add joke logic that you gotta wonder if anyone will notice. I once called a constant BUCKLE_MY_SHOE. I’m sure you can guess what code that went with.
Not to say that those guys arn’t idiots, and they wern’t stupid mistakes, But…
Sometimes that sort of stuff is a bit of a insecure DBA trick. Not many people other then the DBA use the column names everyday. A developer generally just looks up the names while he’s working on that table, then forgets again. Other people (especially contractors) will keep running into errors while writting and debugging because they are not familiar with the nuances, and will be slowed down. But the long time DBA swoops in and saves the day in five minutes, cause he’s used to it. The DBA looks like a hero to the boss, and his value to the company is confirmed. Or at least thats the theory.
A lot of this looks like what I’ve seen when a programmer is working at 3 in the morning on a deadline. I keep having to convince my boss that overtime has diminishing returns, and depending on it is a road to disaster.
So, let me get this straight. People who do stuff like this are actually collecting paychecks for their so-called “programming” while I’m slaving away as an administrative assistant to pay the bills. :sigh!: Help!
Halleluau, you’ve got my sympathies. I once had to modify a database a Japanese coworker of mine had created. I kidded my employer about having cornered the market on Japanese-speaking computer jocks in my city. He was a great guy, but English is difficult enough to spell for a native speaker!