Live data from Hacker News

Code snippets on Microsoft website shown in form of images.

msdn.microsoft.com

31–40 of 58 posts

Re: Code snippets on Microsoft website shown in form of images.

#33
post #26
post #22

Earlier quoted context omitted.

Just a few quick observations: The formatting is non-existant. That makes me angry. Because I have OCD. Most programmers do. There's a lot of direct use of DOM traversing, which makes the code rather brittle. (Use a css selector for binding to the DOM - jQuery is the de-facto standard tool here). Variables are not encoded in the URL. And when it is, it happens on a separate line from where it's used. That's just bad…

> That makes me angry. Because I have OCD. Most programmers do. I assume you mean fake, self-diagnosed OCD, then.

Yeah. Real OCD is no joke. It is a terrible illness. And I don't get angry over bad formatting either :)

Re: Code snippets on Microsoft website shown in form of images.

#37

I hope it was an accident/mistake, otherwise it makes Microsoft look ridiculous as fuck.

Proper syntax hi-lighting html markup is used for most of the MSDN content I've used recently. Definitely for the .NET and WinRT content.

Re: Code snippets on Microsoft website shown in form of images.

#39

Earlier quoted context omitted.

I am learning javascript nowadays. Can you describe, what is wrong with this javascript? So that, I won't learn any bad practice.

I'm not the most savvy javascript developer, but I'll take a stab at it. Variable declarations and assignments happen on multiple lines in the 2nd snippet instead of all being defined at once. var currentLanguage = "en"; var spanish = "es"; var german = "de"; var english = "en"; vs var currentLanguage = "en", spanish = "es", german = "de", english = "en"; Additionally, "en" is assigned twice. If you're going to take…

I don't see a bunch of variable definitions on one line as an improvement, just reads less easily and only feels justified in the case of some low numbers like

    var x = 0, y = 1, z = 0;
    // Some looping or similar here
I do agree with your using of `english` variable to assign `currentLanguage`.

Re: Code snippets on Microsoft website shown in form of images.

#40

Someone please explain how this isn't a Reddit-esque tempest in a teapot? Sure, it's silly, but getting angry over it? Ridiculous.

Developers love to complain about other people's minor bugs, and yet hate it when testers open them against their own code. "Who even cares about this?"
Post reply on HN