Feed the-daily-wtf The Daily WTF

Favorite IconThe Daily WTF

Link http://thedailywtf.com/
Feed http://syndication.thedailywtf.com/TheDailyWtf
Updated 2024-10-05 02:16
Bonus WTF: 5:22
No, it isn't an extended cut of a John Cage song, it's a new feature article that we put together- but you can't read it here, you can only read it over at our sponsor site: 5:22.Special thanks to Infragistics, for helping support TDWTF.A worldwide leader in user experience, Infragistics helps developers build amazing applications. More than a million developers trust Infragistics for enterprise-ready user interface toolsets that deliver high-performance applications for Web, Windows and mobile applications. Their Indigo Studio is a design tool for rapid, interactive prototyping.[Advertisement] Use NuGet or npm? Check out ProGet, the easy-to-use package repository that lets you host and manage your own personal or enterprise-wide NuGet feeds and npm repositories. It's got an impressively-featured free edition, too!
Announcements: Experience Your Own Support Stories at Inedo
Support stories have alwaysbeenamongsomeofmyfavorite.Not enough links for you? Here, I'll just share my favorite favorite: Radio WTF Presents: Quantity of Service.It's not so much the sense of smug superiority that comes with diagnosing ID-10t and PEBCAK errors, but more a sense of appreciation. I've been there — my first grown-up job was on a helpdesk — and to this day I still handle a fair bit of BuildMaster and ProGet support inquiries. And actually, that's why I'm writing this message today.We've been growing a bit at Inedo this past year, and there was a position / job opportunity that I wanted to share with you: Support Analyst. This is not a typical helpdesk role by any means. Actually, it's a blend of roles — support, service, technical writing, and development — and since we're a small team, we'll all be working on doing all of these things together.But I thought the most interesting part about this opportunity is the Developer Growth Opportunity. From the posting:
Representative Line: Truely Representative
There’s bad code, and then there’s code so bad that you only need to see one line of code to understand how bad it actually is. Simon supplied this tiny horror which manages to combine all that’s wrong with PHP with the worst of loose typing and a thick layer of not really understanding what you’re doing.
The Batman
CodeSOD: Pointerrific
Working with a legacy codebase is like embarking on an archaeological expedition to a foreign land: you never know what ancient artifacts you're going to uncover. Will it be the mighty fast inverse square root? The rusty yet still operational Duff's device? An old COBOL module forgotten by time, quietly holding the universe together?Unfortunately for Matteo I., his escapade wasn't nearly as fruitful. Digging through the muddy codebase, all he found were horrible C++ and linked lists. Lots and lots and lots of linked lists.Now, the thing about linked lists is that they didn't age very well. Back when processors were less smart and locality wasn't an issue, they were a reasonable trade-off—but as technology marched on, new data structures were invented, and processor caches grew, the drawbacks started to overshadow the benefits. And so, they were relegated to college textbooks and old programmers' tales.Still, in the hands of a skilled programmer, those outmoded structures could still be made to perform well. Judging by the code below, however, "skilled programmers" were not a resource Matteo’s predecessors had in abundance...
Loafing Around
Mandatory Fun Day: Classic WTF: Mandatory Fun
It's hard to believe that it's been 7 years since the last installments of MFD. Mark's been too busy doing art for things like Release! to waste his artistic talents here with us. From back in 2008, I've grabbed a few of my personal favorites from the old MFD days. --Remy
CodeSOD: Classic WTF: XML Abuse
Is it still trendy to hate on XML? Of course it is! But this WTF would still be a WTF if it were built in JSON, because this is terrible.
Classic WTF: A Temporary Problem
This classic is a perfect example of what happens when you outsource IT functions. You get some short-term, temporary gains, but you'll always lose in the long run.
Tales from the Interview: Classic WTF: Trouble With Founders, the Lost Candidate, and More
I think Tales from the Interview are always a special treat, in part because we don't run them very often. It may also be because at my last job, I was notorious for once making a candidate cry and have a panic attack, but I'm an incredibly nice interviewer! I swear!
Classic WTF: Long Distance DATE$ing
The Fourth of July was this weekend, and this is the perfect time for us to have our little Summer Vacation. For this week, sit back, enjoy some nice weather along with some Classic WTFs (nice weather not guaranteed, definitions of "nice" may vary from user to user).
Error'd: A Defined Sense of Taste
"This was in the appetizers section. I wonder if they do 1920x1200 for an entree," wrote Semaj.
News Roundup: I'm Not Married to the Idea
A bit more than 15 years ago, the software industry was barreling straight into a crisis: the dreaded Y2K bug. Vital software was going to fail in odd ways, banks weren’t going to handle transactions, planes weren’t going to fly, nuclear reactors weren’t going to react, cats and dogs living together, mass hysteria, real wrath of God type stuff.The software industry rallied, software got patched, and at the stroke of midnight, not much actually happened. Over the past week, a different bug has been keeping a small pool of software developers up at night. Welcome to the world of Y2Gay.In a landmark decision, the United States Supreme Court revised the business requirements and integrity constraints on the marriage relationship, removing some legacy constraints and essentially updating to better reflect the actual needs of their end users. This policy decision now has to be implemented in every state, county, town and hamlet across the country. Every change breaks somebody’s workflow, and this one is no exception.Shortly after the decision was made, stories like this started cropping up. Making software changes, especially in an IT shop as small and disorganized as a local county office (which in many cases have only one staff member doing IT) is a uniquely challenging task. In what might be the first authentic miracle in Texas, Williamson County managed to get a software update out before a week went by.Other states are having their own rush to fix their software. St. Tammany Parish in Louisiana called their IT tech back from vacation. In the meantime, someone noticed that they still have pens in Louisiana, so they’re just printing the old forms and correcting the language by hand. Poor Denton County, Texas does not have pens, and didn’t issue updated licenses until Monday.Kentucky is another state that still has pens:
CodeSOD: Mistakes Were Made
As a general rule, “dead code” should never be commented out, but instead, should be replaced. If you ever need to review the history, source control contains that information.But sometimes, the “I’ll just comment it out” lets us see the moment of realization, when a developer discovers that they’ve done the absolute wrong thing. Clara sends us this:
Uncommon Respect
Coyne viewed the coming work week with dread. His employer spent roughly the sum of all the employee’ 401k holdings on a weeklong mandatory communications training course. The problem of no work getting done during training was solved by having mandatory after-hours work to make up for it.The training program centered around three simple tenets to holding effective meetings: Common Respect, Common Purpose, and Common Goals. Before the training started, Coyne’s manager, Stefen, made an announcement. “After completion of this course,” he said, “there will be no excuse for having an unsuccessful meeting. We’ll be tracking meeting results, and bad meetings will be documented and reviewed during your annual performance evaluations. Now, let me introduce your trainer, Trent…”Coyne knew where this was going. Meetings would be the same, but now they doubled as ammunition on performance reviews. Worse, Stefen now had three new terms to throw around, ad nauseum, when he decided to hijack a meeting and tell everyone his mandate. The training tried to make that harder for him, though, by introducing a “Talking Pillow” on the very first day.“Part of Common Respect,” Trent explained, “is adhering to someone’s right to speak.” If you started blabbering without holding the Talking Pillow, you were violating the Common Respect tenet. You could only speak if you were holding the pillow, and once you were done with your spiel, the talking pillow would be passed on so someone else could give input. Coyne and his team were forced to practice it, and most of them had no trouble with the Kindergarten exercise- aside from Stefen, who kept violating the rules.The ensuing days of training delved into the Common Purpose and Common Goals part of the program. Common Purpose could be summarized as, “Everyone should agree on the purpose of the meeting and stick to it.” Stefen gleefully tacked on an “or else!”. Ever the cynic, Coyne could already see Stefen taking this as a license to focus any meeting on what he wanted it to be about. Disagreeing with Stefen would be trampling the sacred order of the Common Purpose.As far as Common Goals, these were meant to imply everyone would leave the meeting with the same goals, consisting of a to-do list of deliverables. Anything other than concluding a meeting with Common Goals would be considered a failure. Terms like “post-meeting harmony” were thrown around to make it seem like an ideal situation.The week ended, and Trent and his fellow consultants were happy to pack up their talking pillows and take their exorbitant check for a week’s worth of work that could have fit into a one hour webinar. “Best of luck, everyone!” Trent said through a grin as he shook everyone’s hand. “I’m sure you’ve all seen the importance of RESPECTING each other’s PURPOSE to achieve GOALS, and you all have that in COMMON now!” He chuckled like this were a clever phrase, and Coyne rolled his eyes.Before the trainers were out of the parking lot, Stefen raised his own talking pillow on high and shouted, “Listen up, everyone! First thing Monday morning, we’re putting this knowledge to good use. I’m calling a 7AM meeting to discuss the strategy for the Initrode migration, so show some Common Respect and be there on time!”Most of Coyne’s co-workers didn’t usually start their day until 8 or 9. “Common Respect” apparently didn’t extend to scheduling meetings during core hours. But Coyne and his team members shambled into the conference room, zombie-like, just before 7AM on Monday. Stefen was already seated at the head of the table, with the talking pillow, and had scrawled “COMMON RESPECT, PURPOSE and GOALS” on the whiteboard.“Have a seat, everyone. Now that we’re familiar with the communication terms, here’s how it’s going to be. You’re going to respect what I have to say. The purpose of this meeting is to inform you of how we’re going to do the Initrode client migration. The goal after this meeting is for all of you to take the flat files the clients are going to send us in their database formats and convert it to ours.”Coyne glanced around the table. He, and most of his teammates had already had conversations with Initrode about the migration, and Initrode had agreed to convert most of their data into an industry-standard transmission file, which could be directly imported- no additional conversions required. None of Coyne’s co-workers objected, so Coyne slowly reached out for the talking pillow in front of Stefen. “I’m not looking for any input on this, Coyne!” Stefen yelled as he snatched the pillow away and launched it out the door.[Advertisement] BuildMaster is more than just an automation tool: it brings together the people, process, and practices that allow teams to deliver software rapidly, reliably, and responsibly. And it's incredibly easy to get started; download now and use the built-in tutorials and wizards to get your builds and/or deploys automated!
CodeSOD: We All Float Down Here…
When Maarten first saw the utility function below, he couldn’t imagine why converting a number from float to double required a string intermediate. Fortunately, whoever wrote this code followed best practices: their comment not only explained what the code is doing, it also explained why.
Error'd: What, What?
"Ah...it looks like someone is testing in Production as every link on Cleveland.com starts with this helpful alert," James writes.
CodeSOD: Practical ValiDATEion
Handling dates is difficult.On paper, it doesn't seem to be a complicated task. After all, computers are good with numbers, and what are days, months and years if not small, supposedly easy-to-deal-with numbers?But behind this deceptively simple façade lie all sorts of nasty traps. The historical baggage of our civilization means that a good programmer needs to deal with tens of different date formats, multiple calendars, leap years, leap seconds, and some dates simply going missing. One might argue that humanity should've hammered out a more unified, common system long ago — but since we're still at least two hundred years away from adopting stardates, we have to keep accounting for each and every edge case.Fortunately, we coders are a smart bunch. Most languages have a good date library that takes at least some of that burden off our shoulders. Unfortunately, this being The Daily WTF, today's specimen decided to ignore them all and reinvent the wheel, with quite a few jagged edges...
Ponderous at the Ponderosa
Depending upon how long you've been in this industry, you've seen your fair share of bad design, bad code and bad users. Darren A. explains his dealings with bad management, and how a string of edicts there-from can crush kill destroy an organization.In the past, before management decided to, well, manage, Darren's company was able to complete 15-25 major projects each year. Then they hired a new Head of Software Services, who felt that he needed to actively manage all facets of how things were done...
CodeSOD: A Convoluted Time Machine
The web team and the JDE development team rarely see eye-to-eye in Cho's company. Cho, the JDE developer, worked in a world full of Oracle databases and important financial records. Andrew, a web developer, worked in a world full of MS-SQL and sales appointments. So when Andrew asked Cho to put together a job that would remove debt records older than six years so they'd stop showing up in his sales reports, he figured she had things well in hand."Six years?" mused Cho. "I'll have to build a custom function to figure out the start and end dates... I'll get back to you."Two weeks after launch, several production incidents had been traced back to this new functionality. Of course, Cho had gone on vacation, so it was up to Andrew to dive into the seedy world of Oracle databases and debug the function...
Finally Clear
Neil’s first contributions to the company codebase were to be tested in the fires of a late afternoon code review. Donavan, a veteran of Java since 1.1, was asked to sit in.It began as a thankfully uneventful affair — but then Donavan noticed that Neil had removed the finally from an existing try/catch/finally block.“Why’d you do that?” he asked.“Well, because a finally block is indeterministic,” Neil explained.Donavan frowned, smoothing out the startled What?! in his throat into a calmer, “What do you mean?”“You never know when it’s going to execute,” Neil elaborated. “It may never execute. It also causes severe performance and portability problems. It’s not good practice to use.”“I’ve… never heard of that,” Donavan replied, patiently stowing his skepticism for the moment. “I can only think of two reasons why a finally block might not run: one, the thread executing the try/catch is halted or killed. Two, the JVM crashes or exits in the try or catch block.”“I’ve read about this before. I know what I’m talking about,” Neil huffed, folding his arms.“Where’d you read this?” Donavan asked gamely.“I think it came from a book called Effective Java,” Neil replied.“I have that book,” Donavan replied. “This is news to me.”Neil tugged at his collar. “Well, I — I think you’ll find the new code performs much better, and is safer.”“Did you run any performance tests against it?” Donavan asked.Neil’s face grew steadily redder, until he wrapped around the spectrum and approached violet. “I have fifteen years of Java experience!”The experience card? With Donavan? This guy was new, all right.“Whoa! You don’t have to get defensive about this.” Donavan put up his hands. “I just want to know why you did this, and what your source was. I’m not going to propagate this information by saying ‘Some guy told me this was the case.’ I’d like to read it for myself.”“I know it was Effective Java,” Neil replied. “Look it up, if you want!”The rest of the code review proceeded without fanfare. Upon returning to his cube, Donovan googled for information on when and why not to use finally in Java. He found nothing enlightening.Then he searched for “Effective Java finally.” There, in an online version of the book, Chapter Two made reference to avoiding finalizers, stating the exact same facts Neil had attributed to the hapless finally block.There it dawned on Donavan: Neil had either confused the terms, or he believed that a finally block was actually itself a finalizer.Donavan jumped up and checked Neil’s cube, only to find it empty. So he sent an email with the citation. I can see how the terms can be confusing, he added at the end, hoping to soften the blow.After clicking the Send button, Donavan sat back and folded his arms with a thoughtful frown, pondering the long-term effects of such an innocent slip. In Neil’s alleged 15 years of experience, how many finally blocks had he delete-keyed into oblivion?Fortunately, Neil wasn’t so set in his ways that he couldn’t correct course when proven wrong. He and Donavan had a good laugh about it the next day. And once Neil finally understood finally, they could finally program happily ever after.[Advertisement] BuildMaster is more than just an automation tool: it brings together the people, process, and practices that allow teams to deliver software rapidly, reliably, and responsibly. And it's incredibly easy to get started; download now and use the built-in tutorials and wizards to get your builds and/or deploys automated!
Error'd: Language Barriers
"'Soll das Fenster geschlossen werden?' means roughly 'Should the window be closed?'," wrote David, "Hovering over the 'No' option shows that it will invoke doNothing(). Thank goodness!"
Taxing Production Tests
As some readers already know, the Polish government is not on the best of terms with modern technology. We'd be damned, however, if that stopped us from trying- even if the end result is as much of a mess as Michał reports it to be.The story began in 2008, when the government decided it needed some presence on this new hip thing called the Internet. And so, the Electronic Platform of Public Administration Services, or ePUAP for short, was born- a website serving to ease communication between public administration and Polish citizens. It went mostly unheeded until 2011, when the Trusted Profile functionality was introduced- and with it, the ability for people to do taxes, file applications, and submit other paperwork fully online.Surprisingly, the website worked mostly fine. But soon after the first wave of interest, problems began to appear. Every update led to major downtime. Features such as password recovery would either break or have days-long delays. And, an investigation of a corruption scandal revealed that ePUAP- along with several other services- was the fruit of rather shady dealings.Michał's story concerns an incident from a month ago, when the whole system crashed and burned. Most users were unable to log in, and the lucky ones who could found that their Trusted Profiles and personal data were missing. It turned out to be a major problem for everyone who elected to do their taxes over the Internet, since the system broke down just a few days before the April 30 tax deadline. Their only other options were to wait several hours in line at their local public offices, get hit with huge financial penalties, or write formal letters to the tax department describing how sorry they were.The media caught the story, and managed to get a response from the Ministry of Administration and Digitization:The work on a new version of ePUAP is underway. Maintenance-related downtime is expected. There's nothing alarming about it. Unfortunately, the tests we do can't be fully done over weekends.Apparently, newfangled inventions such as "testing environments" haven't fully permeated the Iron Curtain. And so, this country-wide platform- holding the personal data of hundreds of thousands of people- is being tried in battle on production servers, during the year's most intense period of activity.[Advertisement] Release!is a light card game about software and the people who make it. Play with 2-5 people, or up to 10 with two copies - only $9.95 shipped!
CodeSOD: Defensive Programming
Marino was handed this code. Like all great code, it’s written defensively, protecting itself against nulls, empty strings, and other unexpected values.I mean, sort of.
Paying Cache for Insurance
If you asked the web developers at XYZ Insurance, a mere network engineer like Billy had no business snooping around in their code. “He probably doesn’t even know what HTML stands for,” they’d sneer, and they kept sneering until a routine change to fulfill an audit requirement brought their internal website grinding to a halt.
Best of Email: Best of Email: Super Spam Edition
Next time you get an unwanted email, before you kick it into the bit-bucket, give it a quick read through. If it makes you go "WTF?!", kick it our way instead. We love 'em!What's in a name anyway? (From Chris)Mr. LName (or FName as his friends call him) sure are racking up a lot of bills on my email.
Error'd: Helpful as Ever!
"One very helpful error, followed by another, and then Oracle Forms Designer crashed," Owen C. wrote, "I suppose at least it made an effort to tell me something was wrong!"
The Daily WTF: Live: The Worst Boss Ever
On April 10th, I hosted The Daily WTF: Live! in Pittsburgh. It was a blast. We had a great crowd, and some great performances.Our final story is another one of my own, and this one is about… the worst boss ever. I mean it, and in this story, I can prove it. This is also arguably my first interaction with a real WTF.Direct Link(MP3)This episode is brought to you by our sponsor, Puppet Labs. Check out their intro video, it gives a pretty good overview of how they help their customers get things done. Start a free trial today!This brings our season of TDWTF:Live to a close. I had fun hosting and recording these stories, and I hope you had fun listening to them. Next Thursday will return to your regularly scheduled WTFs.And since Paula is freaking out at the moment, pop over here for the comments.TranscriptAt the Daily WTF, there’s one kind of story we get a lot of submissions for that we don’t often run, and these fall into the category of what I like to call a Bad Boss Story. There are three reasons we don’t run bad boss stories. The first one is you never really know if it’s truly that this boss was a terrible boss, or it was just somebody that has sour grapes. ‘Cause sometimes, you read them, and you’re like, ‘You just didn’t like the guy. It’s not that you had a bad boss, you just didn’t get along.’The other reason is that there’s nothing IT specific about any bad boss story. Everybody’s had a bad boss. Raise your hand if you’ve had a bad boss. Pretty much everybody. And that’s one of the other reasons we don’t run them, there’s nothing IT specific. But the main reason we don’t run a lot of bad boss stories, is because I had the worst boss.And I can prove this, and I’m about to in the next couple of minutes, I’m going to prove that I had the worst boss.My story starts a little bit like Mark’s. I was graduating college and it was just around the DotCom bust. And I did not want to, after graduation, go home and live with my parents. I was very, very opposed to this. I happened to have some friends who were generous enough to let me impose upon their closet. I lived in their closet for about six months, so I really wanted a job. I was not very picky about the job, there was nothing really going, so as soon as I found a job- and it was an IT job. I was doing stuff with Word and Excel, not programming, but it was an IT job. Y’know what, it’s an IT job, I’m going to take it, and I don’t care about any of the details.And that was my first mistake.So, I walk in on the first day, and the Big Boss, Tom, the owner of the company is there to greet me. And I’m kinda overwhelmed almost instantly by Tom. Because first, Tom was so orange that Tropicana has sued him for trademark infringement. It wasn’t just, like the bottle-tan, Jersey Shore orange, because he had grey hair, and he wanted to ensure that he didn’t have any seams, so he would work the tanning lotion into his scalp, so he had this fringe of orange hair all the way around.And that was just the first thing you notice. The second thing you notice is that he’s a very grabby boss. The very first thing he does is slap his hand on my shoulder and give it that… squeeze. “Hows everything GOING?” Ugggghhhhh.But everything was going pretty well, because I had a job, and in a couple weeks I was going to be getting a paycheck. Everything was going well. I was enthusiastic.I learned, very quickly, Tom was not- as much as he pretended to care (How’s everything going, SQUEEZE SQUEEZE SQUEEZE) he didn’t really care about his employees. So, when he needed you to work two weeks straight, 16 hour days, you were 16 hour days for two weeks straight. There was no compensation. There was no buy you a pizza. He didn’t buy you dinner. You just did that, because that was your job.And again, I was still kinda happy to have a job, so I would drag my ass in at 7 in the morning, and leave at around 10 PM at night, and I’d do that for two weeks straight, three weeks straight- no, actually, after the third week, I needed to travel to a different location, so Friday night after the third week I get Saturday, but then Sunday I have to go drive ten hours away to the other side of New York State, which is where this was based.So, that’s the next thing I learned about Tom. But y’know what? That’s still not why he’s the worst boss I ever had.I learned a few other things about Tom, over time. First off, Tom didn’t have a good sense of where he was at any given moment, or what his purpose there was. One day, I’m sitting in the break room with one of my co-workers, and Tom comes in- and he bursts, he just explodes into the room, full of energy. There is a reason why he has come into the employee break room. He is looking for someone, to tell them something, and he bursts in, and he’s about to do it- you can see him winding up, you can see the gears turning. Then he looks at my co-worker, and he looks at her tights, which have this check pattern on them, and he says, “I just want to play tic-tac-toe on your legs.” And then he turns around and walks out. And we just take a long moment, I look at Paige, she looks at me, and we ask, “Did that just happen?” and the answer is yes.Later that day, I was getting a cup of coffee and all of the sudden, THUMP “How’s everything going?” Ugh.Little later than that, we actually learned another fact, didn’t know it at the time. Tom, and his wife- who worked there, she was actually the Vice President- always a sign of a healthy company- they were swingers. And they did invite some employees to some parties at points. They did invite some employees to parties at points. I don’t know whether to be happy or insulted that this never happened to me, but y’know? None of that is why Tom was the worst boss I ever had.Tom was the sort of boss that really loved to have pep talks. Every Friday, at 4:30, you did not go home, you went to the mandatory meeting. There was no excuse that would get you out of that meeting. There was no excuse that would get you out of that meeting. If you called in sick that day, you couldn’t get out of that meeting. He really wanted to give you your pep-talk. And his pep-talk were absolutely content-free, but you also learned another thing about Tom.Friday, at 4:30, Tom would be dragging ass just like the rest of us. You’d see him in the hallway and he wouldn’t go “THUMP How’s everything going?” He’d be, “eh”, it’s Friday, at 4:30. But right before the meeting, he’d go into his office and close the door. And then the door would open, and (sniffling sound) he would come out and he was READY TO PEP YOU UP.But Friday at 4:30 coke fueled meetings were not why Tom was the worst boss I ever had.One day, I come into work, and Tom’s not there. Which, is actually a pretty good thing. Everybody’s pretty happy about that. Nobody’s upset that Tom’s not there, until Chris, the Ops Manager, starts running around frantically to everybody. “There’s a meeting during lunch, and you HAVE to be there. Don’t go to lunch, doesn’t matter if you didn’t think to bring a lunch, you HAVE to be at this meeting.”I’m like, “Oh god, what’s Tom gonna do to us now?” Well, as it turns out, Tom wasn’t going to do anything to us, because Tom had drained the company’s bank accounts, run off to Connecticut, left about two dozen contracts unfulfilled, and was being hounded by lawyers. The content of this 12 o’clock meeting was “We don’t know where Tom is, we don’t know how to get in touch with Tom, but if Tom contacts you, let us know. The State Troopers would like to have a conversation with him.”And that’s STILL not why Tom was the worst boss I ever had.If we rewind just a little bit, keep in mind I was just happy at this point to have a job, but if we rewind just a little bit… One day, I’m standing at a urinal, going to the bathroom, as one does, and all of the sudden…THUMP SQUEEZE SQUEEZE SQUEEZE. “How’s everything going?”There’s so many witting things that you can think of after the fact, that you could have said or done in that situation, but when it actually happens to you, everything just shuts down. EVERYTHING shuts down. You just stop. You wait for it to be over. You wait for Tom to leave. You wash your hands. You just… cry briefly. And then you remember, at least you have a job.[Advertisement] Release!is a light card game about software and the people who make it. Play with 2-5 people, or up to 10 with two copies - only $9.95 shipped!
CodeSOD: Making Progress
Whenever a program needs to perform a long running process, it’s important that it supplies some sort of progress indicator, so the user knows that it’s running. Sometimes it’s a throbber, a progress bar, an hourglass, or the infamous spinning beachball of death.
Announcements: Last Chance to Back Programming Languages ABC++
As most of you know, this last month I have been running another Kickstarter campaign, Programming Languages ABC++: an alphabet book all about programming.In the same spirit as Release!, and The Daily WTF, this project focused on the culture that surrounds our day jobs. Specifically in this case, it was all about getting kids interested in what we do.It turns out that a lot of people were pretty into the idea. We hit our goals in under 2 days, and for the last month have hit every stretch goal we set within hours of posting them.We still have through Thursday to drum up as much support as we can, so please check it out, and share it with friends.I wanted to put one last plug here because I am genuinely proud of this little book. I think it will really do its job and help to get kids excited about the idea of growing up to be a developer. Plus, I think it would make a pretty cool coffee table book for grownups too.Thanks so much,Alex[Advertisement] Release!is a light card game about software and the people who make it. Play with 2-5 people, or up to 10 with two copies - only $9.95 shipped!
The Software Developers Who Say Ni
Tim, the Hardware Enchanter worked at a small hardware/software company which made specialized instruments for a variety of industrial applications. When he wasn’t busy blowing up the English countryside, he designed hardware as well as its firmware- a mix of C and assembly code- which had to fit into 32KB of program memory with 2KB of RAM. He hardly ever touched application code, and was happy with that arrangement.The company’s next product was The Probe. It was a device for measuring and testing other hardware, and its data went to a PC for further analysis. Tim helped design the hardware and wrote most of the firmware, then waited on the software team to make the controller application.And waited. And waited.Finally, he went to speak with the head of the software team, a disagreeable man named Roger. “Who are you?” the man grumbled, obviously upset at his work being disrupted.“There are some who call me… Tim?”“And what is your quest?”“I need your software for The Probe so we can finish testing on the hardware end,” he answered.“Yeah, well, we’re busy,” Roger said gruffly. That wasn’t the response Tim was expecting.“Well, when will you not be busy? We need this software.”Roger adjusted the arrangement of his keyboard and mouse on his desk before harumphing. “Listen, those of us who arrange and design applications are under considerable stress at this period. We have a lot to do and not enough manpower to finish it all.”Tim bit back an expletive, “Well, put it on your list. I’ll throw together something quick to finish hardware testing, but we need you guys to come up with something nice before this sells.”Roger didn’t even respond, and got back to the work of rearranging things on his desk. Tim went back to his office and got to work. He wasn’t really an application-software guy, but he was able to hack together something with a GDI+ GUI to communicate with The Probe. It was ugly, slow, and crashed a lot, but was good enough to complete the required hardware testing. He moved onto other projects while waiting for the software guys to do their job.And so he was quite surprised when, several months later, a customer bought The Probe in bulk, and the Powers That Be demanded immediate shipment. “We don’t even have software written for it yet!” Tim protested.“Roger told us that you wrote the software and it was all ready to go.”“What? No!” Tim was astounded and started shaking his head. “I wrote an application to test The Probe’s hardware interface, but it’s just an internal tool. It’s the most foul, cruel, and bad-tempered application you ever set eyes on!”“Does it work with the hardware?” they asked.“Well, yes…”“Then we’ll ship it. We need this sale. It’s Antioch Industries, and once they buy it, everyone else in the industry will be falling over themselves to upgrade, too.”Tim started to protest again, but The Powers That Be turned to the Release team. “Go on Bors,” they said, “Package a release.”“Right! Silly little bleeder. One shipped product coming right up.”And so, his slow, unwieldy, segfaulting GDI+ application was burned onto a CD, labeled with sharpie, and packed into a box with The Probe. The kaboodle was shipped off to Antioch, like an unholy grenade, waiting for the customer to pull the pin…… and when it finally did go off, all Tim could say was, “I warned you, but did you listen to me? Oh no, you knew, didn’t you? Oh, it’s just a harmless little piece of software, isn’t it?”[Advertisement] Use NuGet or npm? Check out ProGet, the easy-to-use package repository that lets you host and manage your own personal or enterprise-wide NuGet feeds and npm repositories. It's got an impressively-featured free edition, too!
CodeSOD: Required
Managing namespaces in JavaScript presents its own challenge, since the language’s default behavior is to start slapping things into window. For this reason, people have built a number of libraries and practices to solve this problem.Jared’s company, for example, uses RequireJS to load dependencies, like the lodash utility-belt library. Sadly for Jared, their new hire proved that all the module-loading libraries in the world don’t solve incompetence.
Error'd: You've Been Warned!
"This warning comes highly recommended!" writes Sean H.
The Daily WTF: Live: Building a Better Person
On April 10th, I hosted The Daily WTF: Live! in Pittsburgh. It was a blast. We had a great crowd, and some great performances.Seth is a long-time reader of The Daily WTF, and manages to be "all over" the local tech scene. I've met him at a few TDWTF meetups, but also seen him at Code & Supply events. And today's story features robots, so what's not to love.
Announcements: Sponsor Announcement: Infragistics
A few months back, Alex announced our sponsorship program. This has been a great partnership that’s helped us bring you our regular content, but also special features like TDWTF: Live.We’re proud to introduce our second sponsor: InfragisticsA worldwide leader in user experience, Infragistics helps developers build amazing applications. More than a million developers trust Infragistics for enterprise-ready user interface toolsets that deliver high-performance applications for Web, Windows and mobile applications. Their Indigo Studio is a design tool for rapid, interactive prototyping.Infragistics tools allow you to create rich desktop apps in WPF or Window Forms, responsive Web apps in HTML5, JavaScript & MVC, and native mobiles apps for iOS, Android and Windows Phone. Their products are used by companies like IBM, Intel, AT&T and ESPN. Later this year, we’ll do a deep dive into their products.Thanks to the support of Infragistics, we’re going to be able to bring you some exciting new content, arrange more meet-ups, contests, and have more fun all around. To build amazing apps of your own, download a free trial of Infragistics Ultimate today. See for yourself why they're considered the worldwide leader in user interface and user experience development controls.[Advertisement] Use NuGet or npm? Check out ProGet, the easy-to-use package repository that lets you host and manage your own personal or enterprise-wide NuGet feeds and npm repositories. It's got an impressively-featured free edition, too!
CodeSOD: Sleeping In
Rebecca inherited some code that’s responsible for gathering statistical data from network interface. It was originally written a decade ago by one of those developers who wanted to make certain their influence was felt long after they left the company.The code was supposed to write to one of two log files: a “quick log”, with 2-second resolution (but only for the last minute’s data), and a “full log”, with 1-minute resolution.Unfortunately, it would often fail to do anything with the full log. Frustrated that this code- which had lived in a shipping product for over a decade- was so unreliable, Rebecca dug in to see what the problem was.
Welcome to the Real World
“You should get some real-world experience.”D.H. was in college to study video game programming, and his professors encouraged him to find an internship. “The real programming business is nothing like these university assignments.”
CodeSOD: The Busy Little Boolean
Booleans! What can you say? They're deceivingly complex features of any language, and only the most proficient among us is capable of using them properly.Miss M. discovered that one of her cow-orkers found a new way to get the most mileage out of a single boolean variable named count in a single method to see if:
Error'd: It's a Kinda Magic
"One of the UK's leading motoring organizations needs a little help in wand waving on its route planning web site," Cameron wrote.
The Daily WTF: Live: Meeting Halfway
On April 10th, I hosted The Daily WTF: Live! in Pittsburgh. It was a blast. We had a great crowd, and some great performances.John Lange attended the storytelling workshop I co-taught with Kevin Allison, of The Story Studio. His story- about gaming, and friendship, and technology- really struck a chord with me, and I wanted to make sure he got a chance to share it.
CodeSOD: Reversing the String, Belaboring the Point
The position had sat open for months now; the department was straining under the load of too many projects and too few developers, but the pool of candidates was rapidly shrinking. So when Cindy found a resume that looked halfway decent, she immediately recommended tossing them a programming test and scheduling an interview. The phone screen is a bit superfluous given fifteen years experience, she thought. We'll just use a quick test and get to the good part.The test was simple enough: reverse a string, in your language of choice. They were hiring iOS developers, so the candidate was wise enough to choose Objective-C- usually a great choice to demonstrate that you won't need much training on the job.However, generally, you ought to actually be good at the language in question...
Take A Bold
“Hello!” A perky voice chirped over Evan’s shoulder. “May I come in?”It was unbearably early in the morning. Evan had yet to get into any sort of programming groove, and so swiveled away from his computer without difficulty. At the threshold of his cube waited a sunny young morning person he’d never seen before. Beside her rested a re-purposed overhead projector cart. Instead of AV equipment, it bore dozens of shiny new coffee mugs.“Hi! My name’s Kelly.” Beaming, she stepped forward and offered the mug in her hands. “A little treat from the Marketing team! We’re celebrating the creation of a new recruitment bonus program!”Bleary-eyed and far less enthusiastic, Evan took the proffered mug. Harsh florescent lighting glared off its glossy surface, which read:Take A <b/>“Cute, huh?” Kelly asked.Evan managed a limpid half-smile, and nearly dropped the mug alongside the other glorified dust-magnets in his cubicle, before something made him do a double-take. “That’s the wrong tag.”Kelly frowned in confusion. “What?”“There’s a typo,” Evan said. “You wanted ‘Take A Break,’ right? That should be B-R-slash, not B-slash.” He pointed to the mug for emphasis. “Right now, it says ‘Take A Bold.’”“Are you serious?” The smile vanished from Kelly’s face. Her eyes went wide.“Yeah,” Evan said.“Really?”“Serious.”“Really?” Kelly bit her lip, but her eyes betrayed her mirth. “Oh my goodness. You have no idea how many meetings we had. This slogan got batted around everywhere, up down and sideways, and no one ever said anything about that!”How many developers were at those meetings?” Evan asked. The company offered hundreds to choose from.“None. This was all within Marketing.” Kelly giggled freely. “This is everywhere! We’ve got posters, t-shirts, pens…!”Evan joined in her laughter. “Of course. Printing promotional materials is our core business!”“Don’t tell anyone else about this, OK? I’m kinda curious to see how long it goes before someone else brings it up.” Kelly returned to her cart and pushed it away, still red-faced and giggling. “Have a good one!”Heh, typical. How often did Marketing ever vet anything with IT, or even think to? Evan couldn’t even think of any marketers or computer folk who had regular social contact with one another.Well, maybe that’s about to change, he thought with another smirking look at his new mug. The two teams could bond over some nice coffee bolds.[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!
CodeSOD: A Winning Strategy
“Hey,” Roberto said while pairing with an offshore programmer, “this problem would be easier to solve with the Factory pattern.”“What’s that?”Roberto explained both the Factory pattern and the idea of design patterns, and congratulated himself on helping a fellow developer improve their skills. Little did he know, he had created a monster.Things started cropping up in his code base. For example, Roberto found this block:
Error'd: Tell QA They Missed One
"You know, I've always wanted some sideways text that says 'not for sale'," writes Julie, "Too bad I'll never know."
CodeSOD: Sea of SQL
Andy writes: “Operations reported that a query was taking a long time. Even the 'developers' of this query didn't know why it was taking a long time.”I tell ya, folks… some submissions, you just set down and back away slowly… then hunt up a magnifying glass and a bottle of aspirin.
Like a Well-Oiled Machine
It was Housekeeping Sunday in Dirk’s small IT shop, which usually meant taking their diminutive lot of servers down for routine maintenance. Dirk thought he’d change it up this week and add some actual cleaning to their housekeeping tasks. He knew just the man for the job too - Andrew, the Big Boss’s nephew.
CodeSOD: Recruiting Desperation
When hiring programmers, recruiters will often try to be “clever”. Sometimes, this results in a memorable trick, like EA Canada’s job posting billboard.Other times, these stunts don’t go nearly as well. Andrea recently got this job posting from a recruiter. Note, they’re hiring for a PHP job.
Pizza Hacker
...and at 10PM, see if the investigators can track a killer who hacks an online game and tricks children into delivering illegal weapons on the next episode of...It was a quiet, lazy evening. Alan C. was in bed with his wife, getting his well deserved rest after a hectic week at work. Just as he picked up the remote to raise the volume, he was startled by a long, low growl."Hungry?" his wife muttered without opening her eyes."Guess so.""No way I'm cooking anything today. Let's grab a pizza."Alan sighed and picked up his laptop, looking for a pizza place nearby.Mario's Pizza - the best pizza in town! the first Google result screamed at him. Order by phone or online!Not wanting to disturb his half-asleep wife, he entered the website and clicked the big "ORDER ONLINE" button. After a few minutes of picking ingredients, sides, drinks, and sauces, he was ready to place his $50 order of "true Italian goodness". He scrolled down to the end of the form to submit it.Then he scrolled up. Then he scrolled left, right, and sideways, but no matter where he looked, he couldn't proceed with his order. The submit button simply wasn't there.But Alan wasn't a developer for nothing. A simple UI glitch wouldn't stand between him and his thin-crust treat. He fired up the console, opened the site's source, and typed:
Error'd: BSOD Could Go All the Way This Year
"Yes! I'm a huge fan of BSOD. I'm glad to see SportsCenter giving some well deserved recognition!," Mike writes.
CodeSOD: Happy Little (Read-Only) Trees
"Joey," asked Ross of the new contractor, in a slow, careful voice, as though trying to calm a large predator. "Explain to me why the data tree has this read-only flag?""It's more secure that way. Obviously, if it's read-only, arbitrary people can't write to it."Deep inside our Jar? Are we afraid of our own code? Ross wondered, but he dismissed his doubts. Sure, let him have that one. "Okay, but why is there a flag at every single node of the tree?""Well, obviously, if only the root's protected, people can still edit the leaves and branches. We want to protect the whole tree.""Okay, but that means to edit the setting you have to visit every single node, which is O(n) at best.""Price of security, man.""Okay, but even so, why do you flip the flag before every insert, only to set it again after? Doesn't that make building the tree painful?""You can never be too careful." "Okay, even if I buy all that, and even assuming that this is the best possible way to solve this problem- which it's not- Why do you visit every node twice?"
...46474849505152