The Daily WTF's Journal
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 9 most recent journal entries recorded in The Daily WTF's LiveJournal:

    Friday, January 3rd, 2014
    11:15 am
    Error'd: Lightspeed is Too Slow for MY Luggage

    "Apparently our luggage desperately wanted to arrive at Manchester airport ahead of our plane," Maciek O. writes, "So much so that it attempted to perform an illegal operation to achieve that."

     

    "You know, I don't think I want to download the featured download," Angela writes.

     

    "I was on HarborFreight.com and searched for 'bike stand' (without quotes). Apparently, I didn't; but I did," wrote Chris Swingler.

     

    "Amazon is giving the 'did you mean' message for any search after adding the Prime Eligible search constraint," writes Cody.

     

    Wikipedia is making Kevin doubt his searching abilities.

     

    "Apparently flying from San Diego to Spokane WA on October 19 create some kind of rift in the space time continuum giving an extra Saturday," writes Matt.

     

    "Remember when downloading 135MB on Napster would take half a day?" writes Ernie C., "Pepperidge Farm remembers... but Adobe doesn't."

     

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Thursday, January 2nd, 2014
    11:15 am
    Representative Line: Productive Testing

    Unit tests have many uses. Primarily, they’re the canary in the coal mine of our code, and alert us when changes are about to go horribly wrong. When Niels’s team saw a recent change broke their unit test, they instantly knew how to fix it.

    In the DONE column of the kanban board, a post it reads 'Remove Failing Test'

    And look at that, it’s already moved over into the “Done” column of their Kanban board. That’s some serious productivity.

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Wednesday, January 1st, 2014
    11:15 am
    New Year Daily WTF Resolutions

    Happy 2014 everybody! Lots of people make terrible New Year Resolutions. The problem is that they all sound like really good ideas, but you never actually commit to executing them past the first week of January. Lose weight...save money...bathe... We here at The Daily WTF though only commit to important resolutions. Achievable goals that impact our daily lives.

    Here are some of our goals for the coming year:

    Dan Adams-Jacobson

    Since it's so common to make resolutions one has no hope of keeping, I resolve to buy a 5120 x 2880 resolution display, which is 27" Retina resolution. And doesn't exist yet. But hope springs eternal...

    Charles Robinson

    I don't want just one resolution. I want ALL THE RESOLUTIONS! I vow to get an array of monitors where one is set to the optimum setting for every possible resolution. I will then display them in a manner that would make the Batcomputer blush. After that, I will take a panoramic picture of them all and send it to whoever the hell puts pictures in dictionaries so they can place it next to the definition of "Multitasking".

    Lorne Kates

    In 2014, I'll be Paradox of Choice by lowering the elusive third dimension of resolution: Color Depth.

    I'm changing my resolution to 16. Not 16 bit, but 16 colors. Do you really need more than one blue? Blue is blue is blue. And several shades of red? wasteful! Having only one shade of grey would have saved the world the pain of some truly horrific literature.

    This will also force web designers to make better, cleaner websites. They won't be able to make mistakes like orange-on-orange text. Web designers simply can't be trusted with so many colors. It's irresponsible. With only 256 combinations of colors, they can look at a printout to see how every color contrasts with every other color.

    Once the world realizes how right I am, maybe in 2015 we can resolve to save electricity by going green-- monochrome green, that is.

    Mark Bowytz

    Personally, I'm thinking of going to 800x600 because I'm feeling kind of nostalgic for my Windows 98 days ...and I broke my LCD monitor and all I have is this crappy mid-90's era off-brand 15" CRT.

    Remy Porter

    I can't just make a single resolution. I have one screen at 2880x1800, with others at 1920x1080, 1650x1070 (yes, really, I'm as puzzled by that monitor as anyone), and 1366x768.

    Will I be able to keep up on all of these resolutions for next year? Probably.

    Snoofle

    Maybe I need an iPhone with a 24” display.

    A small client of mine emailed me a spreadsheet that was so large that it didn’t fit on a 24 inch monitor – to my iPhone. She knew I was on vacation and all I had was my phone on which to receive email. Why? “Because the iPhone has a good display with lots of pixels, so I thought you’d be able to see and work with it”

    Yes, you can zoom and scroll, but...

    Bruce Johnson

    Well, my favorite resolution is 80x24. But that’s just because I got started in computers back in the IBM 3270 days.

    Ellis Morning

    "You're getting a bigger monitor!" my new boss declared.

    OK? I hadn't asked for one. My little monitor suited me just fine, but now this obnoxious 1920x1080 beast perches atop my docking station. The astronauts on the ISS can see me filling out my timesheets whenever they fly past. (Yes, multiple. That's a WTF waiting to be written.)

    Seriously, I'm the worst about upgrading hardware. If it's good, I see no point in replacing it, and will hang on until it literally cannot go anymore, or until someone else gets fed up and buys me a new shiny. My trusty 2005 brick-phone, however, is going nowhere.

    Erik Gern

    2013 was my busiest, most fragmented year by far. I've become so scatterbrained that I can't finished a sentence without checking Twitter midway through! So this year, I'm simplifying things. My 2013 resolution will be 80 x 40 columns of monochrome ASCII text, without modal windows. At least Google+ won't be any uglier in Lynx than in Chrome!

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Tuesday, December 31st, 2013
    11:15 am
    Classic WTF: The Firing Offense

    It's been a great year here at The Daily WTF and according to our in-house statisticians, The Firing Offense by Charles Robinson, published on May 21st, was our most popular article in 2013! Enjoy and see you back on January 2nd, 2014.


    Egon was fortunate enough to land a front-line support job fresh out of college, but he didn’t enjoy a single minute of it. He continued to slog thru the seven circles of Helldesk for about a year until he found an opportunity to move on. An opening at nearby WTF University’s Electronic Engineering department needed to be filled by a well-rounded IT guy. Egon didn’t think he had much of a chance to land the job, but desperation made him try.

    The head of the Engineering department, Bill, invited Egon in for an interview. “I’m not going to lie to you,” Bill said. “We don’t have anyone to keep our computer systems running right now since the last guy left on a ‘Mission’ to South America. We’re in a bind here so if you know the difference between a computer chip and a potato chip, you’re qualified enough.” The interview didn’t get any harder. He explained to Bill what knowledge he had and asked what the workload and hours would be like. “Oh, I don’t know. We don’t care what hours you work as long as you’re available if we need you. If nothing is going wrong with the computers, feel free to make yourself at home in our lab and do some ‘research’ of your own. Would you be able to start next week?”

    It was hard to say “Yes” any faster than Egon did.

    Several weeks at WTF U flew by and Egon knew this was his dream job. He made more money, the work load was very light and he didn’t have to deal with complete morons on the phone any more. He couldn’t think of any set of circumstances where he would leave, especially not for a silly ‘Mission’.

    The biggest problem Egon ever faced was determining just what to screw around with during his ample downtime. There was the 16 core workstation that he installed “borrowed” copies of several computer games on. There was the electronics lab where he would make Frankenstein devices out of spare circuit boards and resistors. He even wired up some motion sensors to the doors so they made the Star Trek door opening noise when someone entered.

    Egon was free to do nearly anything. He discovered the “environmental testing chamber” was just the right temperature to keep a case of beer refreshingly cold. He spent his lunch breaks sipping a few brews then crushing the cans with a device he made out of an old vacuum pump. During times when WTF U was out of session and the department was practically empty, he would include more illict, combustible refreshment with his liquid lunch. The industrial ventilation system took care of the smoke.

    Any of these things might have been a firing offense, anywhere else. The students loved him, the faculty were happy with his performance, and Bill hadn’t heard a single complaint. Something else entirely got Egon fired.

    One day, he found some old mag-stripe readers in a forgotten desk drawer. Egon blew the dust off and connected one to his workstation via parallel port. More-so out of curiosity than malice, he decided to see how hard cloning his WTF U security badge might be. His badge did everything from pay for his lunch in the cafeteria to grant him access to areas restricted only to Engineering personnel.

    The stripe on the card was bi-phase encoded and used a standard ISO character set so Egon was able to write a quick app to decode what was essentially plaintext. One swipe, and Egon was stunned to find only his staff ID number staring back at him. Impossible! Everyone’s staff ID number was available in the University’s directory. Anyone could view it. Armed with someone’s staff ID number, Egon or anyone with the know-how could make an ID card from credit card, train ticket or just a piece of card with some VHS tape stuck to the back. Once the card was cloned, it might be used for anything from paying for parking to getting in to the BioChem lab where the smallpox sample was kept!

    Egon couldn’t keep this knowledge to himself. He called Bill right away and explained the issue. “Thanks for reporting this!” Bill said. “I’ll pass this on to my superiors and make sure they know you’re the one who discovered this!” Egon hung up and beamed with pride. Surely he had done a good deed and saved WTF U unthinkable troubles down the line. Maybe he would even get a raise or a promotion to “security expert” or something!

    The next day, Egon came to work, ready to receive his due accolades. Instead, he found Bill at his desk frowning and holding an empty box. “I’m sorry, kid. The powers-that-be interpreted your findings as a blatant attack on our security system and they told me to fire you immediately… There’s nothing I can do. You did good work, while you were here.” Egon’s head spun as he grasped at the reality that his dream job came to an abrupt end.

    Egon struggled to say something to Bill. All he could come up with was “Can I at least get my beer out of the enviro test chamber?”

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Monday, December 30th, 2013
    11:15 am
    Classic WTF: A Crony Joke

    Today's 2013 WTF flashback article is a great one written by Remy Porter back on July 30th and is a perfect example of Hanlon's Razor in action.


    Steve set aside his Turkish pizza and borek and answered the phone. He was taking lunch around the corner from the office.

    “The server is down!” his boss grumbled into the phone. “Where are you? Can you come back in? This is production! Production is down!”

    Steve boxed his lunch up and wiped the grease from his fingers, then slogged back to the office. The server was not, in fact, down, but their core application process was. The management panic was inaccurate, but justified. Steve restarted the service before investigating.

    listing of the /etc directory

    It came up, and it stayed up.

    Between piping-hot bites of borek, Steve dug through the system. He looked for logs, core dumps, or any other traces of what might have caused the application to crash. Nothing of the kind existed. Since the process stayed up, Steve wrote the issue off as a combination of cosmic rays and butterfly farts in Taiwan. He logged the issue and finished his lunch.

    The next day, nothing interesting happened. Nor the day after that. Weeks passed. Then months .

    The process went down during lunch again. This time, Steve was already at his desk, enjoying a much healthier lunch, packed up from home. When his boss came in, panicking about production being down, Steve ignored his sandwich and restarted the service.

    It came up, and it stayed up. Once again, there were no traces of any error or crash.

    The days, weeks and months shambled along. At seemingly random intervals, Steve or one of his co-workers would get a frantic message from their boss: “The server is down!” Sometimes the process died on a weekend. Sometimes they went months without issue, other times the process auto-destructed twice in the same week. Every time, someone was fixing the server while cramming their lunch into their food-hole.

    Steve got to thinking. It happened seemingly randomly, but only ever during lunch. As if it were on a schedule…

    Steve checked the crontab file on the production server. Like many production systems, the file was large and stuffed with a huge pile of jobs that were needed to keep everything running like it was supposed to. Steve grepped for jobs scheduled to run sometime during the 12PM hour, and found this one:

    12 22 * * * kill 21342

    Every day, at 12:22PM, the system killed whichever process had the ID 21342. Most days, that was probably no process. Some days, maybe a user’s shell got the PID. But every once in a while, the great roulette wheel of process scheduling came up “00”, and their main production application got assigned that ID.

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Friday, December 27th, 2013
    11:15 am
    Classic WTF: A Misleading Memory

    Today's Best of '13 classic was written by Ellis Morning and originally ran back on March 12th. It shows that one constant remains as true today as it was years ago: the very worst users are sure to call just as you're about to walk out the door. Google+


    6:55 PM. Tom's shift ended in precisely five minutes. Neither he nor any of his late-shift copilots were on the phone at the moment, so increasingly carefree banter flowed through an otherwise empty office. His co-workers discussed that new game, Myst, and the latest puzzle that stumped them. They'd keep it up all the way out to their cars.

    There was one break in the banter: 6:59, that magical time when everyone rushed to his or her cubicle to hover a finger over the button that would release him or her from the phone queue. Tom jumped out of his chair and joined them in that much. Performing late-day housekeeping on his open tickets had taken longer than he’d anticipated, but it was good not to have to wait out the eternity that stretched between 6:55 and 7:00.

    An even longer eternity spanned between 6:59 and 7:00, but the inexorable march of time sided with the support team. Only seconds to go, and-

    Tom’s phone began to ring.

    He cursed under his breath. The air filled with the sympathetic groans- sympathetic but nevertheless grateful they weren’t at the top of the queue.

    Tom plunked back into his chair, donned his headset, and answered the call. With practiced speed, he created a new ticket and gleaned the caller’s name, company info, and the product for which they were calling. He then summoned his best upbeat persona. “So, what can I help you with today?”

    “Well, the program runs, but it won’t be long before it starts misbehaving in strange ways,” the caller said. “Sometimes I can’t click on any options, sometimes the whole computer freezes…”

    RAM issue, Tom thought. The more the customer rambled on, the more certain he was. The product in question used a DOS extender, and required a robust 4 MB of RAM to function properly. Many users ignored that requirement, and tried to run with only 2 MB.

    “How much memory is on your machine, sir?” Tom asked when he could wedge in a word, raising his metaphorical sword over the heart of the beast.

    “Four megabytes.”

    Alas, the beast was in another castle. “OK, can you start up the program and read off what it says in the bottom-left corner?” Tom asked.

    “Sure.” Pause. “Memory… 4096 KB.”

    Tom led the caller through twenty minutes of troubleshooting within the application. Despite the machine having sufficient memory, Tom still believed he was staring down a memory problem. The program had locked up and crashed the caller’s machine a few times, causing several reboots. The memory check on the startup screen said 4 megabytes as well.

    “What kind of computer is that, sir?” he asked during one of the pauses.

    “An IBM… PS/1.”

    Tom frowned. “You’re certain it’s got four megs? We’ve run into issues like this on two-megabyte PS/1s.”

    “I ordered and installed this machine myself,” the caller insisted. “I know there’s four megs.”

    Another forty minutes slipped by as Tom ran the caller through every program setting, log, and external diagnostic he could think of. CONFIG.SYS, HIMEM.SYS, a utility that output a system profile… everything came up with sufficient RAM, and yet the program still behaved like it was choking to death. Between each troubleshooting step, Tom waited amid the uncomfortable silence of a deserted office.

    “I’m sorry, I’m not sure what else we can check,” Tom admitted. “Would it be possible if we adjourned for the evening, and I can call you back tomorrow once I’ve done more research on my end to see what we can try next?”

    “I really need to get this working tonight,” the caller urged.

    Ugh. Tom racked his brain. “OK, um… maybe there’s something wrong with the RAM itself. Let’s run that last memory diagnostic again, but I want you to add a few switches that will break down the RAM usage into its separate parts.” It also output the memory values in hexadecimal. “Read back the characters at the end of each line for me, please.”

    The customer complied as though pronouncing glyphs from the Rosetta Stone.

    Tom wrote down each value. “Hold on one sec.” He muted the phone, then went down the list of figures, converting each one to decimal before summing them for a grand total of…

    2048.

    It was a good thing the phone was muted, because an inappropriate word left Tom’s mouth. He spent a couple of seconds tamping down his frustration, putting a smile on his face that was more like a snarl, then…

    Unmute. “OK, thanks for holding. Sir? According to the output from this diagnostic, your PC only has 2MB of RAM.”

    “I know,” the caller said.

    Tom’s jaw dropped. “What? I thought-”

    “If I said it only had 2MB, you’d just tell me the program can’t run.”

    Tom faltered in the wake of an hour of calculated deception and wasted life. He dropped his pen and jumped to his feet, burning off a fraction of the rage that might otherwise have induced him to put his fist through a cubicle wall. “Sir, it can’t run on 2MB.”

    “This is why I hate calling you people,” the caller seethed. “You just say no all the time and never do anything to help. I want to talk to your manager!”

    Tom’s manager was long gone, which was unfortunate. She had put in her time supporting the product in question, and would gladly get on the phone and talk the customer down without throwing Tom under the bus. Thinking fast, he came up with his own lie. Why not? “My manager’s not here right now, sir; we’re past our normal operating hours for the evening. However, I’ll be happy to review a recording of our call with her first thing tomorrow morning, and have her call you back with-”

    Click.

    YES. Tom’s shop didn’t record calls.

    He still burned with frustration, but at least he was off the phone. Tom logged out of the queue, closed the ticket, and headed off to salvage his evening.

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Thursday, December 26th, 2013
    11:15 am
    Classic WTF: The Biggest Boon-Dongle in the World

    With the year drawing to a close, it's a great opportunity to review our best articles from 2013. Here's one written by snoofle that was originally published back on January 31st.


    Telecommunications manufacturing is a cut-throat business. Features, functionality and hardware need to be added and continuously improved at a frenetic pace in order to stay one step ahead of the competition. Engineers must constantly increase their skills to leverage the latest advances in technology to design and build the best product possible at the lowest cost. Slip up just a little, and it can be a death knell for your company.

    To save costs, Dog and Bone Corporation (DNB) had eased up on their latest-and-greatest push. Budgets shrank. Progress on adding new features slowed. Hardware upgrades failed to happen. Meetings to justify every little thing began to become the main task in everyone's day. Competitors leapfrogged. Interest waned. Unfortunately, this caused their flagship private telephone exchange (DBX) product to start to stagnate and made some of the engineers begin to feel that their skills were getting to be a little out of date. Engineering-eyes began to wander.

    In the white hot heat of competition, DNB needed something to revive sales of their flagship DBX. If it happened to persuade some engineers to stay because there was actually something interesting to work on, then so much the better.

    Duncan E. was on the team that helped develop one of the new features: an interface to permit an external computer to not only receive notification of telephone activity within the DNB exchange but to control features and behaviour of the exchange itself! Perhaps not particularly astonishing by standards of today, but in 1990 this was cutting-edge stuff. The latest tools were brought in and the team was trained in a suitably advanced formal methodology, so as to be best equipped to produce an excellent product.

    Lo and behold, over many long months the team laboured: analysing the requirements, capturing state transition behaviour, and designing the gateway that would provide the magic window into the telephone exchange. When the magic window was switched on, it worked remarkably well - a strong indicator that formal methods were a valuable tool for DNB's future. For once, management had done it correctly; they gave the engineers the tools, training and blessing to do it right, and it worked. The engineers were also quite pleased with their accomplishments.

    Then management reverted to their usual meddling and it began. Delete this. Add that. Change this. Then one of them mentioned that they had read an article about hackers and software piracy.

    The DNB management team was worried that nasty software copying thieves would come and take the program from them, stealing all the hard work and effort that the development team had poured into this paragon of software. They wanted their investment in the program to be protected. Period.

    And so it was decreed that a dongle would be added. Without this dongle the software would not run. Without this dongle the software would be without worth. Without this dongle, there would be no way to control the DBX. Software would run amok. Skynet would arise. Empires would crumble. And horror of horrors, phone calls might even be rerouted so that only robo-telemarketing calls could be received.

    It was Duncan who implemented the dongle code. He took great pains to insert a macro to do the dongle checking rather than using a function call (so as to make it harder for software pirates to hack the dongle-present check).

    It was also Duncan who realized that the dongle was an effort in futility, although he left before he told anyone. After all, the software wouldn't run without a DBX to talk to, making the telephone exchange itself the biggest dongle in the world.

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Tuesday, December 24th, 2013
    11:15 am
    Best of Email: Questionable Maintenance, A Refund on Storage, and More

    Don't forget, The Daily WTF loves terrible emails. If you have some to share, mail in your mail!


    So...When is Maintenance Again? (from Eric J.)

    I got this email from one of the hosting providers we use for some smaller sites. I just can't figure out when I should be prepared for the maintenance. Today (which is Friday the 26th), the 29th (which is Monday), or on Tuesday (which I'm assuming is what they meant by Tuesdayay).

     

     

    Storage Tax Refund (from Matt Whitfield)

    Woohoo! Looks like the HMRC have decided to refund me some storage space. I'm going to ask to be refunded in 1.44MB floppies...

     

    Be sure to bring a Wetsuit (from Visakh)

    This is an email I got from a recruiter. Seems like I need to know brush up on my scuba diving skills.

     

    An Interesting Email from a Very Confused Customer (from David)

    ________________________________________________________
    From: dwayne@redactedISP.com
    To: support@initrode.com
    Subject: Complaint/Concern
    
    To Whom it may concern,
    
    I am interested, and am already using a number of your programs, 
    but, I was just wondering what programming language you use?  
    I don't like to use the Python language.  My Grandmother went 
    to India 13 times doing Missionary work, I went with her seven 
    times, and we know how many people over there die every year 
    from venomous snake bites.
    
    I also have concerns about the Java language.  The company that
    developed it, Sun Corp. and now more recently Oracle, does not 
    hold to the Biblical standards that we so fondly cherish. Recently, 
    Java has also been the subject of security concerns in the States.
    
    Thank you very  much for your attention!
    Awaiting your reply.
    Dwayne
    
    

     

    What's in a (Computer) Name? (from Jacob L.)

    I'm setting up a new network for a business and have to eliminate all the old computers from our static IP list. Rather than ping them all to test, I asked everyone in the company (a tech company of about 40 people) to send me their computer's name. I gave them instructions and said if they have trouble to come ask me. This is the response I got from someone in our sales department.

     

    Step 1...Profit? (from David Smith)

    After purchasing VMware Fusion I wasn't sure where to start. Luckily the confirmation email they sent me had steps to follow.

     

    Web 0.1 Spam Filter (from Dan)

    An interesting way of avoid email spam... I received this automated response while trying to contact one of our customers:

    ________________________________________________________
    From: do-not-reply@redacted-technologies.com
    To: dan@initech.com
    Subject: RE: Project Details
    
    This email address is for a redundant mail server only. If you have legitimate 
    business to discuss, please phone 01908 437661, or alternatively print your 
    email and fax to 01908 437667. We apologise for any inconvenience.
    
    

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
    Monday, December 23rd, 2013
    11:15 am
    CodeSOD: Where's Windows?

    Java was touted as write once, run anywhere to emphasize its cross-platform advantages. Of course, the devil is in the details, and to interact with the local operating system, you still need to know something about it.

    Without a built-in facility, the only real way to figure out the local OS is to try to exec commands unique to each OS and then check to see which ones succeed, and what value(s) get returned. For example, uname -a provides useful information on *nix systems, but is useless on Windows. It can be as painful as trying to find Waldo.

    Fortunately, since different operating systems tend to have their own unique command sets and such, the designers of Java built in a convenient way of discerning the OS on which the JVM is running:

      String osName = System.getProperties().getProperty("os.name");
    

    The values returned by the above snippet are:

    • AIX
    • Digital Unix
    • Free BSD
    • HP
    • Irix
    • Linux
    • Mac OS
    • Mac OS X
    • MPE/iX
    • Netware 4.11
    • OS/2
    • Solaris
    • Windows 2000
    • Windows 7
    • Windows 8
    • Windows 95
    • Windows 98
    • Windows ME
    • Windows NT
    • Windows Server 2008
    • Windows Vista
    • Windows XP

    ...and probably a few others.

    How folks choose to use this information is where things start to fall apart.

    For example, if you wanted to run a command in a subshell, in Win 95/98/... you run: command.com. In Win NT and forward, it's: cmd.exe. In *nix, it's: {c | k | tc}sh.exe, and so forth.

    A. B.'s coworkers came up with:

      if (osName.indexOf("Windows 9") > -1) {  // Win-95, 98
         cmdBase = new String[3]; 
         cmdBase[0] = "command.com"; 
         cmdBase[1] = "/c"; 
         cmdBase[2] = "set"; 
      } else if ((osName.indexOf("NT")           > -1) || 
                 (osName.indexOf("Windows 2000") > -1) ) { 
         cmdBase = new String[3]; 
         cmdBase[0] = "cmd.exe"; 
         cmdBase[1] = "/c"; 
         cmdBase[2] = "set"; 
      } else {// our last hope, we assume Unix 
         cmdBase = new String[3]; 
         String[] cmdConfigValue = new String[5]; 
         cmdConfigValue[0]=getProfileString("SYSTEM", "UNIX_ENV0", "/usr/bin/env"); 
         cmdConfigValue[1]=getProfileString("SYSTEM", "UNIX_ENV1", ""); 
         cmdConfigValue[2]=getProfileString("SYSTEM", "UNIX_ENV2", ""); 
         cmdConfigValue[3]=getProfileString("SYSTEM", "UNIX_SHELL0", "/bin/sh"); 
         cmdConfigValue[4]=getProfileString("SYSTEM", "UNIX_SHELL1", "-c");
         // construct cmdBase from the pieces
      }
    

    I wonder what they'll do when Windows 9 comes out?

    [Advertisement] BuildMaster 4.0 is here! Check out the brand-new UI and see how you can deploy directly from TeamCity (and other CI) to your own servers, the cloud, and more.
The Daily WTF   About Sviesta Ciba