Live data from Hacker News

Code snippets on Microsoft website shown in form of images.

msdn.microsoft.com

11–20 of 58 posts

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

#11
post #9

More importantly, that is some of the nastiest looking JavaScript I've seen in a while. I think MS are doing everyone a favour.

there _is_ something to be said for not allowing copy&paste, but I'd be more worried of poor read&type-rs :)

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

#13
post #9

More importantly, that is some of the nastiest looking JavaScript I've seen in a while. I think MS are doing everyone a favour.

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

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

#16
post #5

Curious. Sometimes people do that sort of thing to avoid copy/pasting, but I wonder if in this case it's a poor man's way of getting syntax highlighting on the web: just screenshot an IDE instead of dealing with a syntax-highlighting-in-HTML tool.

You are probably right. I've found the MSDN pretty inconsistent. There are a number of C#/VB.net examples that don't have any syntax highlighting at all. It all depends which area you are in.

It's not just MSDN which is inconsistent.

Microsoft's web presence in general varies widely. The philosophy appears to highly favor providing access to knowledge/content over standardization of form/presentation.

The scale of Microsoft's web properties is vast and they do not waste resources trying to get a herd of cats to goosestep.

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

#18

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

For a company of 92,000+ people I am sure there are at least a few C and D-level people in charge of MSDN content. However, for a company of 92,000+ people, I would have also assumed there would be a standard tool or process for doing this sort of thing. Edit: updating employee totals. Holy crap MSFT is big.

I suspect that letting people do their own thing when it comes to placing content on the web is based on two historical features of Microsoft.

The first is that because many Microsoft employees were strongly engaged with computers, there were many early adopters of the internet and more importantly the web (Microsoft.com registered in 1991). I suspect that the anything goes culture of the wild west days of the web persists to some degree within the organization.

The second historical factor is that there were a lot of employees with fuck you money during the early days of Microsoft's web presence and Microsoft management didn't waste resources forcing developers to heel to the sacred ideas of branding experts.

If you dig around Microsoft, you will find lots of standard tools - e.g. MSDN has a fairly consistent graphic presentation when it comes to technical documentation - it just looks nothing like Channel9. However, these differences, while not ideal for consumers, are pretty much irrelevant when it comes to supporting developers.

Yes the bitmap code snippets are embarrassing but not in a Facebook security hole kind of way. Any developer doing .NET programming isn't going to be greatly slowed down by typing in the code rather than copying and pasting from the MSDN page.

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

#20
post #9

More importantly, that is some of the nastiest looking JavaScript I've seen in a while. I think MS are doing everyone a favour.

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

When the code was adjusted to fit on the website they lost a lot of the formatting, and severely hurt the readability of the code. It appears that the lines of code were rather long, but were word-wrapped to fit within the size of that image, creating linebreaks at unexpected places. The first and last lines of the block open and close curly braces, but the rest of the code is not indented.

Readability is something you need to be aware of, but don't worry about learning bad practice. You'll become opinionated pretty quickly on your own.

Post reply on HN