Muli Ben-Yehuda's journal

September 9, 2004

the problem with reading blogs of MS developers …

Filed under: Uncategorized — Muli Ben-Yehuda @ 9:11 PM

… is that you get to view such lovely code snippets:


My god, the ugliness.


  1. Totally agree. Its a different world out there.

    Comment by kalyan — September 9, 2004 @ 11:24 AM | Reply

  2. *cringe* That is horrifying.

    Comment by xtat — September 9, 2004 @ 2:37 PM | Reply

  3. sorry to be the dissenter
    but what is “Ugly” about that??

    Comment by nealsid — September 9, 2004 @ 2:53 PM | Reply

    • Re: sorry to be the dissenter
      first, the obligatory “taste is subjective” disclaimer. Now that we got that out of the way:
      – the API. Why does CreateFile need 7 parameters??? compare and contrast with the posix open() call.
      – the name of the variable “traceLogHandle”. Why do you need the handle part in there? why do you need to explicitly write that it is a traceLog? what else could it be? ‘tl’, or ‘tlfd’, or ‘tfd’ would be my choice, depnding on the context.
      – the name of the function, ‘CreateFile’. I hate mixed case.
      – the magic flags. So many magic flags, I can only imagine what a spaghetti the implementation is.
      – the typographic convention of everything in UPPER CASE. UPPER CASE IS SHOUTING!

      Comment by mulix — September 9, 2004 @ 7:56 PM | Reply

      • Re: sorry to be the dissenter
        non-MS programmers don’t use code notation?
        i wouldn’t want to read someone else’s source having to guess what tlfd and other nice acronyms mean every second or two.
        same goes for caps and mixed cases.

        Comment by Anonymous — September 10, 2004 @ 2:38 AM

      • Re: sorry to be the dissenter

        Comment by ideawerkz — September 10, 2004 @ 3:53 AM

      • Re: sorry to be the dissenter
        Use of “traceFileHandle” is not code notation – it’s the lack thereof or rather, the poor twisted illusion thereof, used by people who don’t understand that programming is 5% communication between man and machine and 95% communication between men and men (or women ๐Ÿ˜‰
        When you speak to someone you will NOT normally say “Good Sir, pry transport me the FourLeggedRoundChair”, you’d simply say “Hey mate, can you pass that chair please?”. The difference between the two is simple: context.
        The piece of code in question looks like the first example – it’s written as if it has no context whatsoever and therefore written according to some strict artifical regime instead of using code as any other langugae and using the context to allow the communication to short.
        Remember that the compiler doesn’t care if it’s
        fd = open(FILE_PATH, ORDWR);
        or the mess in question, but a human is much more easy with the first.

        Comment by Anonymous — September 13, 2004 @ 1:24 AM

  4. puke. eeek.

    Comment by ideawerkz — September 9, 2004 @ 7:30 PM | Reply

  5. My god, the ugliness.
    Which, the code or the MS developer ?
    If it’s the code, I’ve written perl that would make grown men cry. But on that note, as the saying goes, even ugly perl is good perl.
    Hell. Some say that ugly perl is the best perl.

    Comment by the_p0pe — September 9, 2004 @ 7:45 PM | Reply

    • The code, the code. I have nothing against the developer.
      I would say that all perl is ugly perl, but I’m jaded that way ๐Ÿ˜‰

      Comment by mulix — September 9, 2004 @ 7:51 PM | Reply

      • I agree. And I โค perl !

        Comment by the_p0pe — September 9, 2004 @ 7:55 PM

      • python > perl
        forget perl, go study python, a great programming lanugage (which for example bittorrent is based on).
        A very good intruduction book to the already programmer is it’s a free online book, go check it out.

        Comment by Anonymous — September 10, 2004 @ 6:11 AM

      • Re: python > perl
        You are the third person to tell me that. I think I should start listening.

        Comment by the_p0pe — September 10, 2004 @ 10:28 AM

      • Re: python > perl
        python is good to know, and I personally prefer it to perl, but I do not think you should use one (exclusive) or the other. Use the best tool for the job…

        Comment by mulix — September 14, 2004 @ 2:51 AM

      • Re: python > perl
        …the best tool for the job…
        that’s why i’m reading about java right now !

        Comment by the_p0pe — September 14, 2004 @ 8:24 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: