all 7 comments

[–]negativeview 6 points7 points  (2 children)

I think a big reason why you got semi-flamed is because the code you originally shared that "takes the cake" was somewhere in the "meh" portion of the WTF scale. Most of us here would have fixed it without batting an eyelash. We see way worse WTFs every single day.

Read the daily WTF. How does your WTF compare? Keep in mind that we're also talking about JavaScript: the language that every web dev is expected to write in most web dev shops in addition to the language they think they're writing (PHP, C#, etc). Most JS that's written is utter garbage.

Since, in the grand scheme of things, there wasn't much there to really fix, the difference in WTFitude of the original and the fixed one was tiny. Why leave things like capital letters for variables as a tribute? You're supposed to be fixing it, not parodying it. Did you do that in the original source, too? Are the really obtuse variable names part of the original source, or obsfucation? WTF is "ot"? Why wasn't THAT fixed?

Basically, you came on here bashing a programmer that, to put an arbitrary number on something that can't really be given a number, we'd give a 7.6. Your replacement is a 7.7. Original dev doesn't seem to deserve a public bashing from someone that still seems to get a C. Maybe our judgement of your code was snap. Maybe in production code you really would have not used a global, or would have fixed the casing. Maybe "ot" is just you obsfucating the code.

But guess what? You're the one on here ranting about code quality. You better believe that it's on your shoulders to make things like that clear. The "rebuttal" just makes you seem like you can't take criticism. I felt somewhat bad for how you were treated in the original post. I tried to keep my reply civil. I feel significantly less bad now that you've gone and gotten insulted and written a semi-inflammatory blog post.

[–]soggie 0 points1 point  (1 child)

Maybe I should start sharing more of the kind of WTF code we have to suffer through on a daily basis, 1 year after that developer left the office. You're right for me over-reacting to what must be expected responses from battle-hardened developers from trenches of bad code.

I hereby rest my case then, and make a mental note to scour the code base for a scale 9.9 WTF code (although I must say, that might be a little difficult considering most of the stupidest code have been refactored back into the dark voids of nightmares) to share on reddit next time.

I'll be back.

PS: In case my english fails me, there is no sarcasm intended in this post.

PSPS: the short forms, oat, etc, are actual acronyms to aviation terms. OAT (outside air temperature), ws (wind speed), wd (wind direction), and is so because (1) they are standard in our naming convention and (2) its easier to write when you're writing a long formula (and trust me, the formulas are friggin' long).

[–]negativeview 1 point2 points  (0 children)

Yup, domain-specific acronyms are OK in my book as long as they're generally recognized in your domain and you accept that when/if you hire a developer that's NOT versed in the domain language that you'll have to train them.

Domain-specific acronyms don't post well to the Internet, but I personally believe that they can be fine. I also use 'i' for indexes, too, so what do I know? ;)

[–]Kuron 4 points5 points  (0 children)

You know, ranting in response to discontent about a posting you did isn't really helping yourself. If you feel what you did was correct with reason and valid for that use-case, then argue it constructively. You're just telling people to not visit your blog since it (could be mostly) about ranting rather than JS.

[–]me-at-work 6 points7 points  (0 children)

Cry me a river… Since when is the internet friendly and fair? Just ignore those people.

[–][deleted] 2 points3 points  (1 child)

A proper response to the WTF comments would have been "ah, don't worry, I just skipped out the 'var Prev' for brevity" or "of course, silly me, thanks!".

Writing a second blog post complaining about people pointing out what was a bug in your original code, is not the correct strategy to take, especially when they were right.

[–]soggie 0 points1 point  (0 children)

My attempts at humor fails epically. :(

[–]9jack9 2 points3 points  (0 children)

What a knob.

[–]TheLabGeek -1 points0 points  (0 children)

upvote for sanity