Slashdot Mirror


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.'"

43 of 262 comments (clear)

  1. Obviously it is... by Anonymous Coward · · Score: 4, Funny

    You silly open source GIMP developers...

  2. When loading a kernel module... by Anonymous Coward · · Score: 5, Funny

    Cancel, or "pimp this bitch"

    1. Re:When loading a kernel module... by flyingsquid · · Score: 5, Funny

      "It looks like you're trying to write a letter expressing your dissatisfaction with an escort service. Would you like help trying to bitch out this pimp?"

  3. I have an idea for the style guide by Anonymous Coward · · Score: 5, Insightful

    How about, when naming variables, you have to put the first letter of the typename in the start of the variable name!

    And then later let's change the types in the API but keep the unmatching old names for compatibility!

    1. Re:I have an idea for the style guide by skids · · Score: 5, Funny

      I don't know, I found the chapter on EnterpriseInterfaceThunkClassEnterpriseGeneratorCOMParameterInterfaceThunk32 COM_Enterprise_Enterprize_ENTERPRISE very illuminating.

    2. Re:I have an idea for the style guide by maxwell+demon · · Score: 5, Insightful

      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.

      Please tell that to Microsoft.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:I have an idea for the style guide by Rinikusu · · Score: 5, Informative

      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
    4. Re:I have an idea for the style guide by NevarMore · · Score: 5, Insightful

      I was (am?) the generation who learned to code in the mid-90s. I hate to sound lazy, but once we got over that hungarian nonsense, every team I've worked on just agreed (or had dictated) an autoformatter for our IDE and just made sure to run it before we committed. Hell one team had it setup as a pre-commit hook in SVN. It mooted many of the style arguments and let us focus on solving real problems.

      Hell the more modern IDEs like Eclipse, IntelliJ, and VisualStudio even suggest variable names and hint for proper case. As programmers and software engineers should we not use software tools to do tedious and mundane work for us?

    5. Re:I have an idea for the style guide by LambdaWolf · · Score: 4, Informative

      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..."
    6. Re:I have an idea for the style guide by swillden · · Score: 3, Informative

      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.
    7. Re:I have an idea for the style guide by Coriolis · · Score: 3, Interesting

      As a huge fan of fluent code, but also as someone who prefers to see the distinction between a promise and a concrete implementation to be at a glance of the class definition, I have to disagree. Of course you should be using a language derived from your problem domain, but if your problem domain contained all you needed for the solution, then it itself would be the computer program. At some level, you have to use the language of the solution domain, you can't wish it away. I would also say that, these days, having to chance the name from ISomething to plain Something is no big deal, due to built-in refactoring support. Finally, what are the deprecated constructs and styles in C#? Can't think of any of the top of my head.

      --
      Rgasuya aata! : I have been coding Perl and cannot tell where my fingers are now!
    8. Re:I have an idea for the style guide by DrXym · · Score: 3, Insightful
      Microsoft used hungarian notation most likely because it seemed like a good idea at the time. Various BASIC dialects were untyped or only loosely typed ($, % etc.) and C/C++ development environments weren't (and still aren't) very good at reflection / refactoring. So it was a useful hint to the programmer to save them hunting around to find the declaration. Microsoft's book series, e.g. Code Complete also pushed the idea onto external developers.

      Nowadays I think the reasons for hungarian have largely disappeared. Modern IDEs for Java or .NET provide enough assistance that you can find out the type of something by hovering over it. You'll get the type and any documentation. And ctrl clicking the type takes you to the definition. There is no need to decorate the type because it just adds noise. Personally I don't even like scoping which some Java devs seem to do with _ on the front of member variables because it usually confuses the IDE.

      It may still have some use in JavaScript or Perl or other polymorphic environments where the editor / IDE and the runtime is pretty useless at assisting developers though it should probably be done in a limited way, e.g. s for string, n for number, a for array etc.

    9. Re:I have an idea for the style guide by TheRaven64 · · Score: 5, Informative

      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
  4. Rude words by madprof · · Score: 5, Informative

    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.

    1. Re:Rude words by nschubach · · Score: 5, Funny

      What if you are actually writing software for a pimp or dog breeding?

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
    2. Re:Rude words by Samantha+Wright · · Score: 5, Funny

      Then you use neutral terminology, like 'executive-level sex worker' and 'that one secretary who talks too much.'

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
  5. They are bad at naming things. by Anonymous Coward · · Score: 5, Funny

    Take the 'Malicious Software Removal Tool' for one example. Sounds to me like a malicious program that goes and removes software from your computer. They should have called it the 'Tool for Removing Malicious Software'. I look at such ambiguity with a laugh. I recently had a dialogue box on my computer saying something along the lines of "Problem Reporting _____". (I forget the exact text.) Does that mean that the system is reporting a problem, or having a problem reporting? Considering that most users of the software are not experts, they should try harder to make things less confusing.

    1. Re:They are bad at naming things. by adjuster · · Score: 5, Funny

      Reminds me of the short-lived Critical Update Notification Tool Microsoft released back in the early 2000's. (Yeah-- they really named it that, though they _quickly_ backpedaled on the name...)

      --
      The Attitude Adjuster, I hate me, you can too.
    2. Re:They are bad at naming things. by 140Mandak262Jamuna · · Score: 4, Funny

      Take the 'Malicious Software Removal Tool' for one example. Sounds to me like a malicious program that goes and removes software from your computer.

      The name accurately describes what the software does and how. Your explanation that it is a malicious tool that removes software is correct. Your mistake is to assume it is a tool to remove malicious software.

      --
      sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    3. Re:They are bad at naming things. by VortexCortex · · Score: 4, Funny

      They should have called it the 'Tool for Removing Malicious Software'

      I'm sorry, you'll have to take up your grievance with Richard Stallman; Apparently GPLv3 is the only license allowed for derivatives acronyms such as TRMS.

  6. Bad title by PCM2 · · Score: 5, Informative

    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!
    1. Re:Bad title by davester666 · · Score: 4, Insightful

      Why is this for sale? You'd think they would want more well-designed software for their platform, especially with Metro just around the corner.

      --
      Sleep your way to a whiter smile...date a dentist!
    2. Re:Bad title by gbjbaanb · · Score: 5, Insightful

      It's the best way to encourage consistency across applications and the accompanying documentation. Does that not happen anymore?

      no, it doesn't happen anymore. The original style guide was good - it said how much space to leave around the edges of dialogs, how big to make buttons and where to put the ok/cancel buttons. the end result was an overall look and feel that made sense no matter which application you used, and that meant TCO was reduced as users knew how to use it.

      Fast forward to the XAML/WPF/C# era and all that went out the window in favour of "rich" UIs where you have a stupid coloured orb that everyone thinks is decoration until you realise it's the main system menu, and every application has a different set of awful skins.

      I would hope (haven't read it) that this redresses the balance.

    3. Re:Bad title by Gadget_Guy · · Score: 4, Informative

      no, it doesn't happen anymore. The original style guide was good...

      Which one was the original one? Was it the one for Vista and Windows 7? Or Windows XP? Or this tome for Windows 98, 2000 and XP (which was also available in book format)? And I have this one for Windows 95 on my bookshelf.

      I am sure that Windows 3.x had them too. For all the faults of Microsoft, you can't say that they don't like publishing books on how to program their operating systems.

      Fast forward to the XAML/WPF/C# era and all that went out the window in favour of "rich" UIs where you have a stupid coloured orb that everyone thinks is decoration until you realise it's the main system menu, and every application has a different set of awful skins.

      I agree with you on rise of flashy, non-standard user interfaces, but if you want to adhere to an official style guide now you can still use the ones written for each Windows platform (see my first link).

    4. Re:Bad title by SplashMyBandit · · Score: 3, Interesting

      Yeah, the "understated" UIs look great but are actually poorly designed from a usability perspective.

      Example: Last week I bought an iPhone 4S and couldn't figure out how to make a call. I went to "Phone" where I had contacts and was presented with buttons for doing Face Time, sending messages, sharing contacts, and adding a contact to favorites, but there was no button to make a call. I mean, given that choosing the Phone app means you will want to make a call on a selected contact about 95% of the time you would think there would be a massive "Call" icon, since that is the most common thing you'd like to do. It turns out you have to tap on the phone number to make the call - even though there is absolutely nothing to indicate that tapping the number would make a call (my expectation was that tapping the number would edit it). Now that I know that all the interface elements are clickable "buttons" *even if they don't look like the buttons shown elsewhere* things are much easier (and this is coming from a long-time user of Macs). While many of the UI features of Apple are excellent I consider their minimalist approach has gone so far as to present too little information. My point here is that while we are decrying Microsoft for their UI designs we can also do the same for Apple. Mostly less is more, but sometimes less really is less. One of my hats is a trained technical writer and from that point-of-view I consider some elements of Apple's style to be very, very bad - but that is not a particularly fashionable point of view at the moment.

    5. Re:Bad title by Froboz23 · · Score: 4, Funny

      I agree that this document should be free rather than for sale. For more details on why I think this document should be free, please refer to my Kindle eBook "Why I think the Microsoft Style Guide Should Be Free", available for download from Amazon for only 99 cents.

      --
      Take off every Sig. For great justice.
  7. Master/slave by Samantha+Wright · · Score: 5, Informative

    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!
    1. Re:Master/slave by Samantha+Wright · · Score: 4, Informative

      Addendum:

      Huh?

      Dear Neil McAllister,

      Netscape named their implementation of ECMAScript as 'JavaScript' as the result of a cross-promotional stunt with Sun. Netscape was bought by AOL. AOL merged with Time-Warner. This merger was the largest acquisition in business history. I can't believe you don't know this.

      Sincerely,

      Thinking You Were Born Yesterday, Or Perhaps Last Week At The Earliest

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
    2. Re:Master/slave by 93+Escort+Wagon · · Score: 4, Informative

      Netscape named their implementation of ECMAScript as 'JavaScript' as the result of a cross-promotional stunt with Sun.

      Except I seem to recall JavaScript pre-dated ECMAScript - and the ECMAScript Wikpedia page seems to support my recollection of the timing.

      The naming was certainly a promotional stunt, though.

      --
      #DeleteChrome
    3. Re:Master/slave by NoMaster · · Score: 3, Informative

      That terminology originally comes from disk drive buses

      It's much older than that.

      --
      What part of "a well regulated militia" do you not understand?
    4. Re:Master/slave by PPH · · Score: 3, Funny

      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.")

      Damn! I just finished changing all master/slave references to pimp/bitch. And now they tell me that this won't do either?

      How about top/bottom?

      Domme/sub?

      --
      Have gnu, will travel.
  8. You may scoff, but style is everything by phonewebcam · · Score: 4, Funny

    Choose the single leg double-hand overarm for distance.
    Or, if you want maximum impact, and hence noise when the chair lands, go for height: a full seat grab upper thrust is your best option.
    Then there's the full intimidator, often accompanied with shrieks alluding to colorfully burying someone whilst holding it by two legs high above your head - this move requires two full laps of the office before deployment.

  9. If it's in the Style Guide, it actually happened.. by DontScotty · · Score: 4, Interesting

    And - people can not avoid or fix mistakes which they do not know about.

    Silence on an issue = consent. So, if MSFT had not mentioned avoiding "'pimp' or 'bitch"; someone raised in an environment where that was ok - (looking at you, teens and young twenty-somethings who grew up saying "That's Gay" when you meant wrong, bad, or odd) may not fully realize the problem with borderline and unacceptable language.

    Example: Error Message = "What a bitch! Just dumped a debug file in my program folder" or in the HELP>ABOUT saying "Hey, if you want additional functionality, allow me to pimp the ENHANCED version @ paymemorecash.local"

  10. Design patterns: alternate names by Anonymous Coward · · Score: 5, Funny

    You may be familiar with design patterns. Those in the know sometimes give them nonstandard names, such as:

    • pimp - Define an object that encapsulates how a set of objects interact. Promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.
    • bitch - Attach additional responsibilities to an object dynamically keeping the same interface.
    • pms - Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.
    • company bathroom - Ensure a class has only one instance, and provide a global point of access to it.
    • strapon - Convert the interface of a class into another interface clients expect. An adapter lets classes work together that could not otherwise because of incompatible interfaces.
    • player - Use sharing to support large numbers of similar objects efficiently.
    • dating - Allows concurrent read access to an object, but requires exclusive access for write operations.
    • screw - Represent an operation to be performed on the elements of an object structure.
    • orgy - Combining multiple observers to force properties in different objects to be synchronized or coordinated in some way.
    • "let's not put it on, baby" - Reduce the overhead of acquiring a lock by first testing the locking criterion (the 'lock hint') in an unsafe manner; only if that succeeds does the actual lock proceed. Can be unsafe when implemented in some language/hardware combinations.
    • "I love you" - Manages operations that require both a lock to be acquired and a precondition to be satisfied before the operation can be executed.
    • divorce - Addresses problems with the asynchronous pattern that occur in multithreaded programs
    • alimony - asynchronous interface to resources that must be handled synchronously.
  11. There is a good reason for this... by wbr1 · · Score: 4, Funny

    ...admonish developers to "not use slang that may be considered profane or derogatory, such as 'pimp' or 'bitch,'" but apparently it is.'"

    Microsoft does not want their true relationship with their customers to become widely known.

    --
    Silence is a state of mime.
  12. Re:If it's in the Style Guide, it actually happene by bloodhawk · · Score: 3, Interesting

    while the derogatory terms etc may seem obvious, there are plenty of less obvious mistakes that people fall into. For instance we used naming conventions on errors in on of our production applications that referred to greek mythology and specifically the underworld. It came as quite a shock when we received official complaints from religious nutcases that said they were offended by our blasphemy. Since then we have had to rewrite a lot of that to use far more boring errors.

  13. It's simple really... 2 rules, 2 things to avoid. by gestalt_n_pepper · · Score: 4, Insightful

    1) Software is a conversation. Be polite.

    2) Software is a servant, not an equal or a master. Software is the waiter. Don't put behavior in your software that you wouldn't accept in a restaurant.

    The most aggravating and common user interface fails to avoid are:

    1) Interruptions (e.g. Microsoft dialogs telling you updates have been installed, as if you give a rat's ass, refreshing a window or dialog that doesn't appear to need to be refreshed, being too helpful and hovering like Clippy).

    2) Being ignored (Clicking or typing on screen and watching nothing happen).

    There are, of course, many other transgressions, but most of them can be addressed by thinking through a restaurant example. If the waiter came and rearranged your dishes and silverware in the middle of your meal, you'd be furious. If the OS comes in and rearranges your screen while you're working, taking away your focus, you'll be furious. If the waiter keeps ignoring you or is slow, you get angry. If the OS keeps ignoring you, or gets slow, you get angry.

    There are thousands of things you can do to improve an interface, but miss this stuff and you fail.

    --
    Please do not read this sig. Thank you.
  14. Re:If it's in the Style Guide, it actually happene by russotto · · Score: 3, Interesting

    while the derogatory terms etc may seem obvious, there are plenty of less obvious mistakes that people fall into.

    And sometimes not-mistakes. As some of the executives of a company I once worked for had to explain away (to a female user working for a major customer, naturally) an error box written by an ex-employee by claiming it was simply an unfortunate typo for "count error".

  15. Re:Nobody is happy by TheRaven64 · · Score: 4, Funny

    is that an API does not break "unwritten" conventions like always returning true even when the operation was unsuccessful

    Most POSIX APIs return true on error and false on failure. The idea is that this lets you write if (something()) { error_handler(); }. I've no idea why they thought this made more sense than if (!something()), but judging by the rest of UNIX I suspect that they had to type their code in morse with one hand while fighting a tiger with the other, so every character saved could mean the difference between life and death...

    --
    I am TheRaven on Soylent News
  16. Art of programming by jellomizer · · Score: 4, Insightful

    Software development is a form of art where Math/Logic/Science/Engineering are our mediums to work with. Being an art form the software developer feels the need to express themselves in their program, in one way or an other.
    However much like real artists in order to make a living they need to do a buch of commissioned work where you need to make what the boss wants and your personal style is limited. And as you get more artists on a project you need a style guide to make sure the project is consistent.
    GNU projects often lose a good UI compared to their closed source counterpart because each artist is making their own statement in the program. I find that the GIMP does this. Now this isn't a flaw in the GNU but a good GNU project needs the same oversite and rules a good closed source solution needs, and often much earlier in the process because open source you get a lot of people doing a little bit of code, while closed source you get a few people doing the bulk.

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  17. Re:Nobody is happy by 19thNervousBreakdown · · Score: 5, Insightful

    Because that way there's only one success, and many failures.

    0(false) = success
    1(true) = failure
    2(true) = different failure
    3(true) = yet another failure

    --
    <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
  18. Re:Nobody is happy by UnknownSoldier · · Score: 3, Informative

    > 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:

    enum Result
    {
        PASS
      , FAIL_OUT_OF_MEMORY
      , FAIL_INVALID_HANDLE
      , FAIL_BAD_PATH
    };
     
    Result ReadFile( const char * filename, void * buffer );
     
    void Foo( const char * filename, void * buffer )
    {
      Result result;
      if (result = ReadFile( filename, buffer ))
      {
    /* handle error */
      }

    Make sense?