• C-Derb (unregistered) in reply to anonymouse
    anonymouse:
    The only WTF here is using var for everything
    I agree, but don't let ReSharper hear you say that.
  • neminem (unregistered)

    I haven't read all the comments, but I don't blame him at all. I'm not anti-Microsoft, I work for a company that writes clients and servers that exclusively work under Windows, much of which is written in C#, but I've had to work a little bit with Office interop, and it is disgusting, painful and mindbendingly terrible.

  • (cs)

    The submitter should have included the size of the company with the article. If it's a shop of 20 guys, it's not that bad. But if you work at a large corporation, at least some professionalism should be expected, and if it's not there, you can end up triggering the pinkSlip() event. Although it's not unprecedented: http://www.kuro5hin.org/story/2004/2/15/71552/7795

    Regardless, I'd like to see his thoughts on how Excel handles dates.

  • C-Derb (unregistered) in reply to Spewin Coffee
    Spewin Coffee:
    TRWTF is the use of Microsoft Excel spreadsheets as a database.

    "That's what Microsoft Access is for!"

    LOL!

    But seriously, using a spreadsheet as a database is a recipe for headaches. I can use a spoon to dig a hole and a shovel to eat my cereal, but I should expect things not to work out very well.

    That's not to say that Excel isn't a WTF....it is still the only Office application that still uses a single window for all open files/workbooks, which makes comparing two Excel files side by side impossible. (I forget why I needed to do that once, but it is 2012 and I still can't.)

  • User (unregistered) in reply to Sarten X
    Sarten X:
    Rodnas:
    Well he did comment the code. Unfortuanly, it takes less time to read the code and figure out what is does, than reading the comment. And THAT my friends is NOT best practices. </troll>
    What the code does is obvious. Why it does what it does is not so obvious, so the comment is vital to preventing future regressions. The comedic tone and hyperbole are also vital for improving morale.
    It's a good thing that Sarten X wasn't trolling or anything when he posted that. :-)
  • C-Derb (unregistered) in reply to C-Derb
    C-Derb:
    Spewin Coffee:
    TRWTF is the use of Microsoft Excel spreadsheets as a database.

    "That's what Microsoft Access is for!"

    LOL!

    But seriously, using a spreadsheet as a database is a recipe for headaches. I can use a spoon to dig a hole and a shovel to eat my cereal, but I should expect things not to work out very well.

    That's not to say that Excel isn't a WTF....it is still the only Office application that still uses a single window for all open files/workbooks, which makes comparing two Excel files side by side impossible. (I forget why I needed to do that once, but it is 2012 and I still can't.)

    Meh...maybe I can do this now, if I jump through the right hoops. Thanks, Google.

  • Hello, McFly? (unregistered) in reply to Major DoucheBag
    Major DoucheBag:
    I love how he rants about having to remove the '$' then re-appended it... when from the comments given he could have done a simple if check.
    Except that would scan the string twice - once to see if it needs to do the replace, and again to actually do the replace. So if the string had both a ' and a $ there would be four scans instead of the two the code is using as written.

    And RIGHT$() is only efficient if the string is implemented with a length value. Not positive it could be used here, just heading off the argument it could be used in the IF: it probably would still scan the string just to find the end. Though if it exists it could be used, IF you trust there not be other $s that could be problems. Personally, I'd rather be sure than save some microseconds.

    Pre-scanning a string before a replace is demonstrably a waste of time IF what you are scanning for could be at an unknown location. Conversely, using REPLACE for anything known only to be at the start of a string would be a waste.

  • NaN (Not a Name) (unregistered) in reply to El Ka-Ben
    El Ka-Ben:
    I always thought the source code for Excel was one of those myths... that the core was still some hand-tweaked assembly that Microsoft had inherited way back when they bought it.

    Yeah, I don't know where I heard it.

    I am almost certain that Excel was invented in-house. There was actually a Mac version in the 80's before a Windows version and it was so good, it has been credited with saving the Mac from oblivion. I would imagine that the guts of much of the Excel OLE Automation libraries has not changes since the early 1990's.

    I also remember from the 1990s a guy who saw some Windows code said he saw a comment something like "This has to be this way or Excel won't work"

  • JJ (unregistered) in reply to C-Derb
    C-Derb:
    C-Derb:
    That's not to say that Excel isn't a WTF....it is still the only Office application that still uses a single window for all open files/workbooks, which makes comparing two Excel files side by side impossible. (I forget why I needed to do that once, but it is 2012 and I still can't.)
    Meh...maybe I can do this now, if I jump through the right hoops. Thanks, Google.
    "The right hoops"? The last I checked, "Show all windows in task bar" has been the default for Office apps since Office 2000. I should know: I hate this option and immediately turn it off in all programs when I install Office. Give me back my MDI!

    But even if that weren't available, they are still MDI apps, which means you can view the child windows side-by-side. There are no hoops involved.

  • jay (unregistered)

    Oh, I get it. The WTF is that Paul failed to recognize the infallibility and general awesomeness of Microsoft, right?

  • jay (unregistered) in reply to Rodnas
    Rodnas:
    Well he did comment the code. Unfortuanly, it takes less time to read the code and figure out what is does, than reading the comment. And THAT my friends is NOT best practices. </troll>

    It's often easy to see what a piece of code DOES. Understanding WHY it does it can be the trick. And if a later programmer doesn't know why the code is doing something, at best he may struggle to figure it out. At worst he might think it's a mistake and remove it when in fact it's correct.</billygoat-gruff>

  • Master and Commander of the Troll Amry (unregistered) in reply to Anoldhacker
    Anoldhacker:
    Randy:
    Yeah, it is a well established fact that a certain large and aggressively dominant software company is founded on, composed entirely of, and produces nothing but pure unmitigated evil.

    If you don't know that already, you may have an excuse if you fall into one of these categories:

    1. Innocent child never used computer.
    2. Non technical mind never used anything but one OS.
    3. Technical, but obsessed like an autistic person on the products of a single vendor because once you figured out the option to enable teh shiny on your buttons you thought you were a rock star and stopped learning. Never really designed anything; just snapped together other people's code.
    4. Mental affliction renders you incapable of remembering past abuses and noticing a pattern.

    Thread won. Everyone go home.

    This IS my home, you insensitive clod!

  • jay (unregistered) in reply to Medinoc
    Medinoc:
    Seconded, saying WHY something is done is more important than saying WHAT it is. That's the thing proponents of the "code is its own documentation" philosophy don't understand.

    Yeah, what he said.

    Every now and then I see code comments of this sort:

    fcv=fcv+137; // Add 137 to fcv
    

    And I can only think, Uh, yeah, thanks for clearing up what a plus sign does. I was having trouble figuring that out.

    Left unexplained is what "fcv" is, and what the significance of the number 137 is.

    A useful comment would be something more like, "Convert Fluc Capacitor Voltage from Newtonian to Liebniz scale".

  • mainframe web dev (unregistered) in reply to Master and Commander of the Troll Amry
    Randy:
    Yeah, it is a well established fact that a certain large and aggressively dominant software company is founded on, composed entirely of, and produces nothing but pure unmitigated evil.

    If you don't know that already, you may have an excuse if you fall into one of these categories:

    1. Innocent child never used computer.
    2. Non technical mind never used anything but one OS.
    3. Technical, but obsessed like an autistic person on the products of a single vendor because once you figured out the option to enable teh shiny on your buttons you thought you were a rock star and stopped learning. Never really designed anything; just snapped together other people's code.
    4. Mental affliction renders you incapable of remembering past abuses and noticing a pattern.

    Leave IBM out of this! cries

  • big picture thinker (unregistered)

    There is no WTF here. If you've ever worked with Excel via either the COM interop or the OLE-DB adapter, you would realize that the author of the code is 100% correct.

    The name of each worksheet in a workbook sometimes requires a $ and sometimes does not. It is a huge pain in the ass that's extremely inconsistent and error-prone.

    In my opinion, Excel should never be used as a database. The only [legitimate] reason to access it programmatically should be to port data to a different [better] format. Unfortunately, people who don't realize this continue to believe that Excel is a great way to store data.

    CAPTCHA: plaga -- Programmatic interaction with Excel is a cancerous plaga on businesses; it always results in death and destruction.

  • (cs) in reply to JJ
    JJ:
    C-Derb:
    C-Derb:
    That's not to say that Excel isn't a WTF....it is still the only Office application that still uses a single window for all open files/workbooks, which makes comparing two Excel files side by side impossible. (I forget why I needed to do that once, but it is 2012 and I still can't.)
    Meh...maybe I can do this now, if I jump through the right hoops. Thanks, Google.
    "The right hoops"? The last I checked, "Show all windows in task bar" has been the default for Office apps since Office 2000. I should know: I hate this option and immediately turn it off in all programs when I install Office. Give me back my MDI!

    But even if that weren't available, they are still MDI apps, which means you can view the child windows side-by-side. There are no hoops involved.

    One small hoop. Simply start another Excel instance from the start menu, for every window that you want open concurrently.

  • (cs) in reply to Peter
    Peter:
    "Basically, if something wasn't perfect, it was a disaster. Also, he failed to mention his anti-Microsoft tendencies."

    By show of hands, who among you thought that they might be 'Paul' after reading this bit.

    (raises hand)

    o/

    (Except that I don't forget to mention those tendencies...)

  • (cs) in reply to Rick
    Rick:
    JJ:
    C-Derb:
    C-Derb:
    That's not to say that Excel isn't a WTF....it is still the only Office application that still uses a single window for all open files/workbooks, which makes comparing two Excel files side by side impossible. (I forget why I needed to do that once, but it is 2012 and I still can't.)
    Meh...maybe I can do this now, if I jump through the right hoops. Thanks, Google.
    "The right hoops"? The last I checked, "Show all windows in task bar" has been the default for Office apps since Office 2000. I should know: I hate this option and immediately turn it off in all programs when I install Office. Give me back my MDI!

    But even if that weren't available, they are still MDI apps, which means you can view the child windows side-by-side. There are no hoops involved.

    One small hoop. Simply start another Excel instance from the start menu, for every window that you want open concurrently.

    1. hit the Start button or Windows key
    2. choose "Default Programs" (wait a minute for it to load every possible type of file...)
    3. Highlight .xlsx
    4. Click "Change Program..."
    5. find Excel under C:\Program Files\Microsoft Office[(x86)]
    6. click 'Open' (you aren't really opening it, just selecting it...)

    This overwrites the default DDE method of opening a .xlsx with the command line method; now when you double-click an Excel file, it will open in a new window.

  • decet (unregistered)

    ZOMG, WTF - the comments are longer than the code!!

  • Dolly Dollar (unregistered)

    I certainly prefer my own $$$ to Micro$oft'$!

  • Darth Paul (unregistered) in reply to AP²
    AP²:
    Definitively not a WTF.

    Related, from the Sup-mail source:

    I wonder if this is a similar problem to what I am seeing with tagging photographs. Microsoft has somehow decided that dates that resolve to the day, must also include the time. So, if you say a photograph is 12/3/1998, and the time you tag it is 9:28pm, then the photograph will be tagged as having been taken 12/3/1998 9:28pm.

    For those who say a datetime field must have a time, I personally would have chosen 0:00 as the default in this circumstance for several obvious reasons.

  • Jeff Dege (unregistered)

    Jon Walker (of AutoDesk)'s "The Hacker's Diet" includes Excel spreadsheets for performing the statistical tracking on daily weight measurements that he advocates in the book:

    http://www.fourmilab.ch/hackdiet/comptoolsExcel.html

    He has versions for Excel 2.1, 4.0, 5.0, 7.0, 97, 2002, and 2003. And a note as to why there are so many versions:

    Why So Many Versions?

    The Hacker's Diet spreadsheets were originally developed in 1990 with Excel 2.1 on Microsoft Windows 3.1. Some of the components in the package use Excel macros which are, for the most part, relatively simple and straightforward compared to those found in a typical corporate Excel application. Nonetheless, thanks to Microsoft's practice of “strategic incompatibility” and utter contempt for the investment made by their customers, these rudimentary macros have required specific modifications for every single new version of Excel in the decade since they were originally released, and things have gotten worse, not better, since Microsoft introduced the new Visual Basic programming language for Excel (itself a cesspool of release-to-release incompatibility), due to what appears to be a deliberate Microsoft strategy to destabilise the original macro language in order to force customers onto the new one (at a cost to Microsoft corporate clients I estimate on the order of a hundreds of millions of U.S. dollars).

    The upshot of this is that while in a reasonable world spreadsheets and macros would be capital, created once and then used thereafter with no additional attention, in the world of Microsoft, software developed for their platforms is a “wasting asset” more like a stock option with an strike date about 18 months from the time it was developed. By then Billy Boy or one of his Kode Kiddies will have changed their mind about something (or simply introduced a gratuitous incompatibility, whether for strategic reasons, due to sloppiness or incompetence, or just for the Hell of it) which pulls the carpet out from under the application and its users when they “upgrade” to a more recent Microsoft release (which is increasingly involuntary as more and more new computers are sold pre-loaded with the latest releases of Microsoft operating systems and applications, offering the customer no option but to pay the “Microsoft Tax” bundled in the cost of the system).

  • foo (unregistered) in reply to Shinobu
    Shinobu:
    Jerry, please read Windows Can but Won't.
    This article is TRWTF:
    Now a program that was using the old A.DLL decides to call a function in. It naturally expects the old version of B.DLL, but instead it gets the new version. Depending on what sort of change you made to B.DLL, this call may work—or it may crash.
    Never heard of library versioning in case of non-upward-compatible API changes?
    When you write code that communicates between processes, you generally expect that the same version of the code will be running in each process
    I really wonder, is this just a lame excuse, is the author mentally challenged, or is this a symptom of Microsoft's global arrogance? They don't need to look outside their windows and find out that elsewhere, communicating processes do not only often use different versions of some code, but often completely different codebases, often even running on different OSs (if the communication is over a network). Sure, interoperability causes some issues, but instead of whining about them, as he does, he could have looked at solutions that have existed for decades. Most internet protocols, or a tag system as in the PNG format comes to mind to solve exactly those problems he describes. But apparently implementing this properly is asking for too much, instead of forcing every user though the reboot chicanery. (And, of course, not changing your interface with every minor patch also helps.)

    ObOT: The comment in the article is not a WTF.

  • Anonymous Bob (unregistered)

    Oh Lordy. I just started on a project that is supposed to generate its output to Excel. I don't have warm fuzzies anymore :-(

  • History Teacher (unregistered) in reply to aaa
    aaa:
    And to figure *why* it does that?

    "Ours is not to reason why. Ours is but to do and die"

  • (cs) in reply to Rodnas
    Rodnas:
    Well he did comment the code. Unfortuanly, it takes less time to read the code and figure out what is does, than reading the comment. And THAT my friends is NOT best practices. </troll>

    Yes I'll bite (probably not the first but I'm not reading through all this shit).

    The purpose of a comment is not so much to explain what a piece of code does as to explain why it does it. Otherwise someone's going to say: "You delete the $ off the end and replace it? What rubbish! I'm deleting this because it clearly does nothing!"

    I agree. Paul is all right, for all the reasons stated.

  • (cs) in reply to Hello, McFly?
    Hello:
    Major DoucheBag:
    I love how he rants about having to remove the '$' then re-appended it... when from the comments given he could have done a simple if check.
    Except that would scan the string twice - once to see if it needs to do the replace, and again to actually do the replace. So if the string had both a ' and a $ there would be four scans instead of the two the code is using as written.

    And RIGHT$() is only efficient if the string is implemented with a length value. Not positive it could be used here, just heading off the argument it could be used in the IF: it probably would still scan the string just to find the end. Though if it exists it could be used, IF you trust there not be other $s that could be problems. Personally, I'd rather be sure than save some microseconds.

    Pre-scanning a string before a replace is demonstrably a waste of time IF what you are scanning for could be at an unknown location. Conversely, using REPLACE for anything known only to be at the start of a string would be a waste.

    The true waste of time is caring about optimization for such a lightweight function. It's not like this is done a million time inside a loop or takes more than a hundredth of a second. I'd be more worried about the fact that I just ran a test in Excel, and you can have dollar signs in the workbook name. The worst inefficiency is a bug...

  • Lauren Cooper (unregistered)

    I sense a company going down the gutter, screaming along the way "but we were right! We were right all the time!"

  • Dave (unregistered) in reply to Remy Porter
    Remy Porter:
    Every time I see "Jet Engine", I shudder a little.

    Apparently MSJet is so named because it both sucks and blows.

  • Norman Diamond (unregistered) in reply to foo
    foo:
    Shinobu:
    Jerry, please read Windows Can but Won't.
    I really wonder, is this just a lame excuse, is the author mentally challenged, or is this a symptom of Microsoft's global arrogance?
    The latter. It's understandable that people have to chuck their sense of ethics out of fear of being fired by Microsoft, but technical skills are allowed. When writing programs for Windows you'll learn as much from Raymond Chen as you do from Paul.
    foo:
    ObOT: The comment in the article is not a WTF.
    Of course.

    Well, almost.

    The original comment probably wasn't a WTF. The version in the article probably was, because someone toned it down to be safe for work even though its full honest goodness deserves to be posted on The Daily What The Fuck.

  • Norman Diamond (unregistered) in reply to ASheridan
    ASheridan:
    Excel has another "feature" where it can't reliably detect the encoding of a .csv file, so if that CSV is utf8 encoded, but the field headers contain only ascii, it barfs and screws it all up, forcing you to perform a bunch of extra steps to import it correctly.
    Actually it's worse than that. If the .csv file starts with a UTF-8 version of a BOM, Excel figures out the encoding but fucks up the rows and columns. It works if you double-click the file in Windows Explorer, but if Excel is already open and you use the File menu to open a UTF-8 CSV file then Excel's fuckage is worse than what you've seen. By luck I found a workaround, convert the file to Shift-JIS before Excel gets its VD-buggered appendages on the file. Also repro'ed in English language Excel with all contents limited to ASCII, though such files wouldn't be useful for customers in the real world.
  • doramjan (unregistered)

    At least he was kind enough to comment his code!

  • Cheong (unregistered) in reply to Rodnas
    Rodnas:
    Well he did comment the code. Unfortuanly, it takes less time to read the code and figure out what is does, than reading the comment. And THAT my friends is NOT best practices. </troll>
    At least by writing comments like that, you're unlikely to forget about it in the future, saving you the time for needing to read it again.

    That's time saver in the long run...

  • Matt (unregistered)

    These comments are completely legitimate. I am glad they exist. Now turn them into a knife and visit the Excel team.

  • Zippy (unregistered)

    Not exact a WTF, but comments are supposed to explain and help maintain the code. A little snark is acceptable, even desirable when it explains a workaround; devoting the space to venting your general opinions of the software involved is not. Imaging if there were a million lines of code, all commented to death like this. Almost as annoying as Excel.

  • paratus (unregistered) in reply to Tom
    Tom:
    THe real WTF is that he is using Jet Engine instead of a a library that can better handle these work arounds such as NPOI. At least 40% of my job is knowing what other libraries and code bases are out there so that when I run into a problem, I'm not reinventing the wheel every time.
    Hi Tom,

    I've got a query that stores two sets of related data in different fields (name/surname and alias name/alias surname if you like). If an alias is present, I want to use that, otherwise I want to use the real name. I was using NVL, but ran into some problems:

    SELECT nvl(alias_name, name), nvl(alias_surname, surname) FROM mydata
    

    Unfortunately, alias_name can be nnull even when the surname is present (and I don't really want to concatenate them, because that will cause problems in the calling program.

    Could you please assist?

    Cheers.

  • Dude (unregistered) in reply to Jack
    Jack:
    Randy:
    Yeah, it is a well established fact that a certain large and aggressively dominant software company is founded on, composed entirely of, and produces nothing but pure unmitigated evil.

    If you don't know that already, you may have an excuse if you fall into one of these categories:

    1. Innocent child never used computer.
    2. Non technical mind never used anything but one OS.
    3. Technical, but obsessed like an autistic person on the products of a single vendor because once you figured out the option to enable teh shiny on your buttons you thought you were a rock star and stopped learning. Never really designed anything; just snapped together other people's code.
    4. Mental affliction renders you incapable of remembering past abuses and noticing a pattern.
    To the lawyers who even now are drafting up a nice lawsuit, before you appear in court angrily shouting "it is obvious he is describing us perfectly" consider that he might have been taking about Oracle.
    I assumed Apple - especially #3....

    I heard on the grape vine that Apple migth actually allow telephony from one of its future phones

  • Chris (unregistered)

    Paul's not wrong. This is why I stopped doing any sort of Microsoft development when they pulled the calendar control out of Access 2003.

    What. The. Fuck. Microsoft?

  • Cico (unregistered) in reply to Random832

    He's probably a nodejs programmer reading vb for the first time.

  • Cico (unregistered) in reply to Random832
    Random832:
    Lupe:
    TRETF is
        File.Delete(sourceFileName);
    What if the Load fails? The source file will still be deleted, and you're left with something more than a missing '$' to explain away.

    What failure mode do you imagine for this that doesn't involve an exception being thrown?

    He's probably a nodejs programmer reading vb for the first time.

    Ps: weird shit missing quotation forced double posts.

  • Name Withheld (unregistered)

    There's a lot of comments here that this isn't a WTF. It is, and here's why:

    First of all, comments aren't for voicing your opinions, they should be concise, and to the point.

    Second, if the dev was aware of commonly used C# commands, he wouldn't have had to leave that comment at all:

    var sheetName = SheetName.EndsWith("$") ? SheetName : SheetName + "$"; cmd.CommandText = "select * from [" + sheetName + "]";

    The above code clearly indicates that the additional '$' is only added of the sheet name doesn't already end with one. Job done.

  • KJ (unregistered) in reply to Cbuttius

    THIS^

    (Damn you akismet)

  • rickb (unregistered) in reply to ParkinT

    You guys are familiar with Apache's POI libs, right? They seem to have a similar attitude toward's Microsoft's file formats. :)

    http://en.wikipedia.org/wiki/Apache_POI

    POI - Poor Obfuscation Implementation

    POIFS (Poor Obfuscation Implementation File System) – This component reads and writes Microsoft's OLE 2 Compound document format.

    HSSF (Horrible SpreadSheet Format) – reads and writes Microsoft Excel (XLS) format files.

    HPSF (Horrible Property Set Format) – reads "Document Summary" information from Microsoft Office files.

    HWPF (Horrible Word Processor Format) – aims to read and write Microsoft Word 97 (DOC) format files.

    HSLF (Horrible Slide Layout Format) – a pure Java implementation for Microsoft PowerPoint files.

    HDGF (Horrible DiaGram Format) – an initial pure Java implementation for Microsoft Visio binary files.

    HPBF (Horrible PuBlisher Format) – a pure Java implementation for Microsoft Publisher files.

    HSMF (Horrible Stupid Mail Format– a pure Java implementation for Microsoft Outlook MSG files.

    DDF (Dreadful Drawing Format) – a package for decoding the Microsoft Office Drawing format.

  • Mozzis (unregistered) in reply to Anonymous
    1. Butchers postal codes... you have got to be kidding. You are putting in postal codes as numbers and expect the program to somehow know the the leading 0 character is significant? That is really ignorant.

    2. Dates of any kind. I am guessing that there is at one kind you know little about. What the hell are you talking about!?

    ... and similarly for the rest. I really think that most of the people who rant about Microsoft are pea-brained idiots. They apparently can't spend 2 minutes thinking about the complexity of the problems that a program like Excel is trying to solve. And the fact that for 99.9% of users it works wonderfully is a stunning achievement in a world where such a significant portion of the population are ignorant, self-important blowhards like most of the commenters on this thread. I have written a ton of code that interacts with Office: COM, .Net, even barbaric DDE stuff back in the day. I won't deny that the object model is complex. But every single time I had a problem like the guy where the 2003-to-2007 upgrade broke his function silently, there was some stupid mistake in the calling code that was actually to blame.

    My vote for the RWTF: using OleDB to talk to a spreadsheet.

  • Daveytay (unregistered) in reply to Medinoc
    Medinoc:
    Sarten X:
    Rodnas:
    Well he did comment the code. Unfortuanly, it takes less time to read the code and figure out what is does, than reading the comment. And THAT my friends is NOT best practices. </troll>
    What the code does is obvious. Why it does what it does is not so obvious, so the comment is vital to preventing future regressions. The comedic tone and hyperbole are also vital for improving morale.

    Besides... it's unlikely anyone will ever take the time to read the comment unless there's already a bug, and they're going back over old code.

    Seconded, saying WHY something is done is more important than saying WHAT it is. That's the thing proponents of the "code is its own documentation" philosophy don't understand.

    I don't code, but I do make the odd manual/ help sheet for end users and I always try to put in a little brief WHY in instructions; if you don't someone will think that the step is unnecessary. I like shortcuts and promote them when I can; they are part of being human. Justification dampens doubt.

  • (cs)

    TRWTF is concatenating strings with the "+" operator.

    Nothing wrong with the use of var.

  • qbolec (unregistered)

    butcher's gone postal about the code?

  • (cs)

    That's the kind of comment I put in code sometimes; when you've been banging your head against the desk for the best part of day trying to figure out why something doesn't work, only to find that it's because of some bizarre piece of esoterica, that possibly had some logically explanation but you have no idea what it is, sarcasm and bile is often the way to go.

    Also they're comments - they don't hurt the code and sometimes a little back story helps explain why this method that seems stupid exists. And if the way they're written gives a future developer a reason to smile, then so much the better.

  • pencilcase (unregistered)

    To those of you who say that Paul is right, and that there's no WTF here: Well yes.

    But I worry that anyone who feels the need to write that much over such a small issue is taking it very personally. He needs to take time out to read Eckhart Tolle, and to remember that this is his job and what he gets paid for. If it was easy, then everyone would be doing it and he'd be on the dole. Relax. Enjoy. Comments are good, but ranting is sad.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    Otherwise someone's going to say: "You delete the $ off the end and replace it? What rubbish! I'm deleting this because it clearly does nothing!"

    I agree. Paul is all right, for all the reasons stated.

    Any programmer who looks at that line of code and thinks what you have quoted deserves to be taken out and shot (or at the very least given a few lessons in mental unit testing with snoofle's cluebat)...

Leave a comment on “Not Good Enough for Paul”

Log In or post as a guest

Replying to comment #:

« Return to Article