Why Microsoft Developers Need a Style Guide
snydeq writes "What your interface communicates to users can be just as important as what your software does, writes Fatal Exception's Neil McAllister in discussing the latest edition of the 'Microsoft Manual of Style', a style guide aimed at designers and developers who create Microsoft software, as well as those who write about it. 'The gist of much of Microsoft's advice is that a user's relationship with computer software is a unique one, and it's important to craft the language of software UIs accordingly,' McAllister writes. 'Occasionally, Microsoft's recommendations verge on the absurd. For example, you might not think it necessary to admonish developers to "not use slang that may be considered profane or derogatory, such as 'pimp' or 'bitch,'" but apparently it is.'"
Obviously they do have to put in the bit about not using words that some might find offensive in case someone, having a bad day, put it in and they had no come back.
It's quite incredible what some developers, at any size of company, will do sometimes.
I just want to go on record as saying I hate this headline. I didn't pick it. Furthermore, I don't think there's anything in particular about Microsoft developers that makes them "need a style guide" more than anybody else, and that notion had absolutely nothing to do with my column. I just thought it was interesting that a Microsoft style guide exists, that it's available for sale, and that it has some interesting stuff in it about writing for software UIs that a lot of developers probably don't think about. That's about it.
Breakfast served all day!
Similarly, the relationship between USB peripherals could be described as "master/slave," but these terms could also be considered offensive. (The "Microsoft Manual of Style" says such language is prohibited in "at least one U.S. municipality.")
Dear Neil McAllister,
That terminology originally comes from disk drive buses, and the municipality is Los Angeles. Are you really a tech writer?
Sincerely,
Suspicious
Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
https://developer.apple.com/library/IOs/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html ...
https://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Intro/Intro.html
http://developer.android.com/design/index.html
http://developer.gnome.org/hig-book/
http://docs.blackberry.com/en/developers/deliverables/36511/index.jsp?name=UI+Guidelines+-+BlackBerry+SmartphonesBlackBerry+Smartphones7.1&language=English&userType=21&category=BlackBerry+UI+Guidelines&subCategory=
http://docs.blackberry.com/en/developers/deliverables/27299/index.jsp?name=UI+Guidelines+-+BlackBerry+PlayBook+TabletBlackBerry+PlayBook+Tablet1.0&language=English&userType=21&category=BlackBerry+UI+Guidelines&subCategory=
http://wiki.eclipse.org/User_Interface_Guidelines
Yeah, its hilarious an unusual that Microsoft publishes a design guide for their OS because obviously the author didn't spend 5 minutes on Google...
I haven't thought of anything clever to put here, but then again most of you haven't either.
As an old classic Visual Basic programmer, there was a good reason to use hungarian notation. You had a sorted dropdown list of the classes/types, from which after choosing one, could then choose the method/property to implement in an adjacent dropdown list. Point being, your textboxes were grouped together and your enums were grouped together, and so on. It made managing the code easier.
"When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
There were a lot of who went through college in the early-mid 90s where Hungarian notation was considered proper software development and scores were marked down in various programming classes if you didn't adhere to it. It was the late-90s/early-2000s when people apparently discovered that it was a very, very bad idea especially as we refactored 5-10 year old code. Now it seems we're happy if you just use camel-case.
If you were me, you'd be good lookin'. - six string samurai
How about, when naming variables, you have to put the first letter of the typename in the start of the variable name!
Hungarian notation isn't about using the typename at all.
Indeed. Here is some good reading on the actual purpose of Hungarian notation, although of course it's used wrong far more often than not. I've never used it myself, correctly or otherwise, but I acknowledge that the original intent was at least sensible.
"This algorithm runs in constant time. Come on, 2,147,483,648 is a constant..."
That may be a good reason. The real reason for the rise of Hungarian Notation is that the Microsoft C compiler didn't do type checking for some time after other C compilers had it. If you wanted to have a clue what type you were using you adopted Charles Simonyi's notation (which was used by FORTRAN devs at the time). The problem is, that awful practice of using 'warts' as a prefix stuck around. It even lingers in C# where interfaces are traditionally prefixed with "I". Fortunately this is something that Java conventions avoid - and if you decide to change an interface into a concrete class during development you don't have to go around and rename everything (plus, such prefixes are unnecessary in the modern age, the compiler helps you when you mistake an interface for a concrete class, so the 'wart' has no upside while having the refactoring downside).
The real reason for the rise of Hungarian Notation is that the Microsoft C compiler didn't do type checking for some time after other C compilers had it. If you wanted to have a clue what type you were using you adopted Charles Simonyi's notation (which was used by FORTRAN devs at the time).
Cite? The early Microsoft C compiler was Lattice C, which was an ANSI C compiler. It had to have typechecking.
Also, everything I read says Simonyi invented his notation, or at least the rudiments of it, in the 70s while working for Xerox PARC. So it couldn't have been a reaction to a deficient MS compiler that didn't yet exist.
Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
The third explanation in this thread, and not the correct one either.
Originally, Hungarian notation was used by the Apps group in Microsoft. It was used to indicate things that were not expressed in the C type system. For example, an integer referring to a column number in a spreadsheet would be colsFoo, while another referring to a row would be rowsFoo. If you wrote something like if (rowCurrent When the Systems group adopted the convention, they started using it for the variable type, not its meaning. This completely defeated the point, but the Systems group version was the one that caught on due to their greater influence within the company.
C is one of the few Algol-family languages where this is actually necessary. In most others, you can create a columns type and a rows type that are both integers but can not be implicitly cast to the other.
I am TheRaven on Soylent News
> Most POSIX APIs return true on error and false on success.
You were being funny but it comes down to granularity.
* For success you only need to know that it passed.
* If the function fails you want more details.
Here is an example:
Make sense?