Actually, if you open the book and read it, you will find that it contains a lot of good advice. Microsoft, you must admit, does write a lot of software, and if anyone should be able to comment from a position of experience alone, then Microsoft would certainly qualify.

As for the content, the author apologises if the material is a little too C oriented, but a lot of it applies quite literally to Perl as well, if only because they share a lot of syntax, semantics, and pitfalls, such as:
if ($my_var = 0) { # Why doesn't this EVER run!?!? DoImportantStuff(); }
The author is a strong advocate of the "Hungarian" naming system, where in a strictly typed language like C or C++, the name of the variable indicates its type, such as 'nPeople' (int) or 'pszName' (char *). This is not entirely irrelevant for Perl, that while it will readily convert between int and char, it still isn't psychic. You will be punished severely if you switch up $q for $p when $q is a CGI object and $p is a SQL statement handle. Hungarian would have you call them '$cgi' and '$sth', for example, or perhaps '$cgiMain' and '$sthSelectAll'.

I know, a book about writing good code from Microsoft, the creators of DOS 4.0, Windows NT3 and much, much worse, but when you consider that Windows 2000 actually runs at all, despite being 25 million lines of code, they must be doing something right. It seems that the author wrote the book to try and promote good coding practices within Microsoft, a practice that was strangely absent from one of the world's largest software manufacturers.

While it may not be as comprehensive as XP, it does promote a better methodology than the ad-hoc approach taken by many, and it uses a lot of code examples to illustrate its points. Have a look through it if you have a chance, and see for yourself.

In reply to Re^3: Rewriting some code by tadman
in thread Rewriting some code by Fingo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.