Curious Perversions in Information Technology
Last checked 4 minutes ago.
21 people have subscribed to this feed.
post frequency (last month)
PostRank™
From The Daily WTF, 2 hours ago,
0 comments
As the seasons change and years pass, trees accumulate rings that can be used to determine the age of the tree. This is a result of seasonal growth — the inner section of each ring is formed in the early part of the rapid growth season; this wood is called "early wood" (*snicker*). Then as the temperature changes and growth slows, the darker outer portion of the ring forms ("late wood"). And who can forget the classic scene from Vertigo in which Kim Novak's character hints at a passion for dendrochronology as she finds the years of her birth and death on the rings of a tree. Why do I bring this up? Because seeing bits of the past frozen in time is fascinating.
Nathan B. was called for help when an internal Access application was hanging. After some tinkering, he found that it wasn't hanging, as three reports had successfully printed and the fourth was on its way — it was just taking three times longer than it usually did. Sadly, the reports had to be done that day, and at this pace, they'd still be printing until 6:00 the next morning.
Nathan sighed and slumped into his chair. He was going to have to do something he really didn't want to do — open the file and look at the code. He'd heard horror stories about the original developer, but figured this was something he'd never have to deal with. By the time he found the below snippet, he felt like he needed a cold shower.
Function fDaysLeftInWeek(ByVal dateToTest As Date) As Integer '*****new30
' Comments : Returns
' Parameters:
' Returns :
' John Doe 7/30/98 11AM
' Initrode Global Consulting (555) 555-5555
'move to next day until week increases by one
Dim intWeek As Integer
Dim tmpWW As Integer
Dim testForMonday As Boolean
Dim dateFuture As Date
On Error GoTo fDaysLeftInWeek_Error
dateFuture = DateAdd("d", 1, dateToTest)
fDaysLeftInWeek = 0
intWeek = Format(dateToTest, "ww", vbMonday)
If intWeek = 52 Then 'for quick fix only 12/20/00 jd
'intWeek = 1 'turned off 01/03/02 jd
ElseIf intWeek = 53 Then 'fix 12/28/00 jd
intWeek = 0
End If
'dateFuture = #12/31/01#
'testForMonday = False
Do Until testForMonday = True
If DCount("RowCount", "tbl_5Day", "[DAY]= #" & dateFuture & "#") = 0 Then
dateFuture = DateAdd("d", 1, dateFuture)
tmpWW = Format(dateFuture, "ww", vbMonday)
If tmpWW = 52 Then 'for quick fix only 12/20/00 jd
'intWeek = 1 'turned off 01/03/02 jd
ElseIf intWeek = 53 Then 'fix 12/28/00 jd
intWeek = 0
End If
If intWeek = 1 Then 'fix 01/03/02 12/31/01 is in week 1 and should be considered a Monday. jd
'intWeek = 0
End If
testForMonday = (intWeek + 1 = tmpWW)
Else
dateFuture = DateAdd("d", 1, dateFuture)
tmpWW = Format(dateFuture, "ww", vbMonday)
If tmpWW = 52 Then 'for quick fix only 12/20/00 jd
'intWeek = 1 'turned off 01/03/02 jd
ElseIf intWeek = 53 Then 'fix 12/28/00 jd
intWeek = 0
End If
If tmpWW = 1 Then 'fix 01/03/02 12/31/01 is in week 1 and should be considered a Monday. jd
'tmpWW = 53 'turn off for q402 start
End If
testForMonday = (intWeek + 1 = tmpWW)
fDaysLeftInWeek = fDaysLeftInWeek + 1
End If
Loop
If Weekday(dateToTest) = 1 Or Weekday(dateToTest) = 7 Or (fDaysLeftInWeek = 0 And _
DCount("RowCount", "tbl_5Day", "[DAY]= #" & dateToTest & "#") = 0) Then
fDaysLeftInWeek = -1
End If
Exit Function
fDaysLeftInWeek_Error:
MsgBox "Error:" & Error & " " & Error(Err), 16, "fDaysLeftInWeek_Error"
End Function
This function's purpose? To return a count of work days left in the week. It uses a table (pictured below) for date lookups, and occasionally adds more rows (and 5s) into this table when the application loads.
There's code that fails (often an accidental checkin with something hacky that gets forgotten), and code that takes special time and attention to fail spectacularly, of which this is a shining example. Maintenance is done by quick fixes, and version history is maintained via commented-out lines.
Like the beautiful rings of a tree, this festering mess has a lot to tell us.
From The Daily WTF, 3 days ago,
0 comments
For several years, Clint's company has been working on a game that's undergone several engine and tool changes. And I'll stop you right there- it's not Duke Nukem Forever because this game exists, and has been released.
If you've ever seen or worked in a codebase that has seen significant change, you know that the replaced component is seldom completely exorcised. Little hooks from it remain in some random function that need to stay there or else everything breaks. To give you an idea of some of the changes this game's codebase has seen, have a look at this:
int Level::loadObject( FileHandler* pHandler )
{
LevelObject* pNewObject = new LevelObject();
pNewObject->loadFromFile( pHandler->getString() );
// Revision 10/10: support for new design
pNewObject->newFixUp();
// Revision 01/20: port to xenith engine
pNewObject->xenFixUp();
// Revision 02/11: Make work with new format from level tool
pNewObject->kludgeFixLevelFormat( pHandler );
// Revision 7/15: New physics engine port
pNewObject->hackFixPhysics();
// Revision 11/04: Added physics editing to level tool
pNewObject->postHackPhysicsData( pHandler );
/* SNIP */
//return GE_SUCCESS;
return XENITH_SUCCESS;
}
It was more trouble than anyone would've liked, but things were mostly working. Except now there was a new bug that no one could figure out.
The in-game sports cars' physics were all off. Sometimes you'd nudge a curb and take off; other times it was like you were driving a cluster of anvils on a syrup-covered road. Since they were already low on budget, sports cars were removed.
Then the VW Bugs in the game stopped working. Sometimes they'd flicker on and off, sometimes they were invisible for minutes at a time, sometimes they'd collide with other cars, other times the other vehicles would ghost right through them. So they removed the bugs (so to speak).
Then, well, let's just say things weren't going great for the other vehicles, either.
// // Revision 10/10: Rather than the designers editing all levels
// Management sees this as the quickest fix
// Revision 01/12: Taking out sports cars
// Revision 01/19: No more vw bugs
// Revision 01/22: No more vehicles
if ( pNewObject->getType() != OBJTYPE_TOWER &&
pNewObject->getType() != OBJTYPE_CAR5 &&
pNewObject->getType() != OBJTYPE_CAR2 &&
pNewObject->getEnvType() != ENVTYPE_VEHICLE )
{
getEnvironmentObjMgr()->AddObj( pNewObj );
getPhysicsMgr()->AddBB( pNewObj->getBB() );
// Revision 7/15:
// No need to add proxy here. It's already added
// by the time we get here.
getPhysicsMgr()->RemoveBB( pNewObj->getBB() );
}
Finally, the pedestrians were causing issues. I can neither confirm nor deny that this was the same situation with SimCopter.
// Revision 03/24: Taking out Pedestrians
if ( pNewObject->getEnvType() == ENVTYPE_PEDESTRIAN )
{
getEnvironmentObjMgr()->RemoveObj( pNewObj );
}
Finally, all was well. And now I can't even imagine what The Legend of Zelda would have been like if they hadn't taken the cars and pedestrians out!
From The Daily WTF, 3 days ago,
0 comments
For as long as anyone could remember, there had always been two server rooms: the Cool Room and the Hot Room. The Cool Room was exactly what you’d expect a server room at a mid-sized technology services firm to be: floor-to-ceiling racks along the walls filled with various servers, battery backups, monitors, and KVMs, all tied together with Ethernet and power cables that were neatly tucked in their trays. And, of course, it was a cool 65°F thanks to a pair of dedicated air conditioning units.
The Hot Room, on the other hand, was more like a server closet. It was a cramped 8’ by 10’ room that housed core telecommunications equipment including the firewalls, routers, switches, VPN concentrators, and the PBX system. This room also served as the central hub for the facility’s wiring and had hundreds of cat5 cable running through countless junction boxes. And, of course, it was a sweltering 98°F thanks to all of the equipment that had become even hotter to the touch.
Ted, who had recently joined the firm as an IT Director, was a bit uncomfortable with this setup. Not only did the Hot Room house nearly half a million dollars worth of gear, but if any one of the core components – such as the core router or PBX – failed from overheating, it would be a business catastrophe. He asked Aaron, the network operations manager, for some more background.
“Believe you me,” Aaron explained, clearly used to answering the what’s-up-with-the-Hot-Room question, “we’ve tried for years to get this resolved. What it comes down to, quite simply, is cost. One-hundred and seventy-eight thousand dollars. Even the CTO couldn’t get that amount approved.”
“But,” Ted instinctually questioned, “wouldn’t it cost more than—”
“Cost more than in an outage, you mean?” Aaron interrupted, “yeah, it could. But, then again, it might not. They’re willing to risk it, I guess.”
“Okay,” Ted paused for a moment, “can’t you just move–”
“Move the equipment upstairs to the Cool Room?” Aaron interrupted again, finishing Ted’s sentence, “we’ve already moved what we could. But with everything terminating here, the switches and routers have to stay.”
That made some sense. Ted pondered the problem for another few seconds and then asked, “how about a portable or duct–?”
“Ductless A/C?” Aaron jumped in, “the problem with those – or the portables – is we’ve got no place to vent or drain. So, if we went that route, it’d just be easier to place a few units on the roof. Plus, the portables are all fairly limited when it comes to BTU.”
Ted couldn’t think of any more ideas off the top of his head. Since the Hot Room hadn’t overheated once over the past few years, he felt safe knowing that it probably wouldn’t overheat in the next few weeks. That’d give him plenty of time to come up with a solution that cost less $178,000.
The next day, Ted stopped by their building’s maintenance office to see if the superintendent could help come up with a creative way to duct some cool air in the Hot Room without breaking the bank. Within the hour, the superintendent met Ted in the lobby and they walked over to the Hot Room.
“So we’ve got a bunch of telcom stuff in here,” Ted explained while he unlocked the door. A gust of warm air greeted both Ted and the super when the door opened. “I’m worried that some of it will over–”
“Jeeze oh man!” the superintendent exasperated, “it’s pretty toasty in here. Hang on a sec.”
The super walked down the hall, rifling through a ring of keys, and disappeared around the corner. About sixty seconds later, a blast of cold air came pouring through the ceiling vents. Ted looked up at the ceiling and couldn’t help but stare in awe.
“Yep, that’ll do it,” the superintendent said when he returned a few moments later, “you had a tripped breaker on the VAV box. Hope it wasn’t bothering you for too long.”
By the end of the day, it was a nice 65°F in the Hot Room.
From The Daily WTF, 4 days ago,
0 comments
"All I want to do was take out some cash at the Huntsville, Alabama airport," Monty wrote, "unfortunately, I wasn't quite prepared and my brain threw a Divide_By_Zero error."
"That's quite a lot of growth," Joe Butler writes, "in two weeks, no less!"
"Media Monkey threw this at me a few minutes ago," Bruce wrote, "and now I'm paralyzed with uncertanty."
"It's always good to see when a programmer catches exceptions," Maren writes, "it's even better when that programmer displays his/her own whit when recovering from not-being-able-to-retrieve-the-mission-description exception!"
"I always like to read more details about random errors my computer gives me," David Litster wrote, "Flex Builder 3 did not dissapoint with this wealth of information."
Adriano writes, "I have a feeling that it'll be a while before I can get through all my email."
From The Daily WTF, 4 days ago,
0 comments
"Root beer guy." That's what Dale had always called Burt in his internal monologue. He occupied a similar space in Dale's mind with "Too much makeup" lady, "I always go tanning" guy, and "I always talk about horses" lady. Burt was one of the ever-present background characters of the office, his only differentiating trait a bottle of root beer. And even though he was a net-admin and Dale worked helpdesk, their paths had never really crossed.
That all changed one day when groups from the two departments went out together for lunch. This moniker Dale had assigned to Burt was reinforced when the both lined up when they were about to buy their tacos. "Anything to drink?" the taco-hawking seductress asked.
"No thanks," Burt said with a smile, raising his characteristic bottle of root beer and gently shaking it. "I brought my own." He was the type of person that you either found charming or irritating, but never both.
"So, uh," Dale interjected. "What's the story with the root beer?"
Burt chuckled warmly. "My only vice," he said, holding the bottle near his heart. Dale was more of a Yoo-Hoo man himself, but always considered drinks (like politics and religion) a topic best decided on one's own.
The following day, Dale got a visit from his new friend. "Hey Dale, I got a work order to fix this printer right by your cube!"
"Oh, great. Hey, I'd love to talk, but I've gotta get this fil-"
"Yeah, so how've you been?" Burt cut in. It was actually a rhetorical question, as Burt then launched into a monologue about how he had been.
Dale's eyes shifted back and forth from Burt to his monitor. It would've been clear to anyone other than Burt that he was annoyed. After a few minutes, Burt took the last remaining sip of his root beer, held the bottle upside down over his mouth and smacked the bottom some, and with a disappointed "Aw, man," screwed the cap back on the empty bottle. "Mind if I run and grab a refill?"
Dale certainly didn"t mind, and looked forward to five minutes of silence. Forty five minutes later and still seeing the printer in pieces, Dale got a little concerned. He pictured Burt cheerfully pressing the button for his favorite beverage, and the drink machine just collapsing on him. He asked his cubicle neighbor if she had see Burt.
"No, not since you two were talking earlier." Odd. Dale swung by the drink machine just in case, and fortunately there was no flattened Burt in the room. He probably just took a late lunch, Dale reasoned.
Hours later, Dale had all but forgotten about Burt's mysterious disappearance when suddenly- CreeeeeeeeeeeBANG! "Sh–t." Dale jolted out of his seat, spinning around to catch a glimpse of Burt, scrambling to pick up the cubicle wall that he'd just fallen into. Impressively, he was still clutching his root beer. The look in Burt's eyes revealed that gears were turning — he was probably trying to think of whether to play it cool like the wall had fallen on its own or just to apologize for his near-tragic level of klutziness. The wall would no longer stand on its own, so he discreetly used another cubicle wall to prop it up. "I'll just be..." Burt took a sip of root beer. "On my way..." He turned to leave and stumbled again, but this time managed to gracelessly recover his footing.
Some weeks later, Dale was out to lunch with Brad — a network administrator that worked with Burt. "So that's pretty crazy about Burt, huh?" Brad said.
Dale raised his left eyebrow and curiously asked, "Wait, what do you mean?"
"You didn't hear? I thought you two were all buddy-buddy!"
Well, Burt seemed to think so, Dale thought, as he shrugged his shoulders and turned his hands over.
"You know the root beer that he was always drinking," Brad continued. Dale was certainly aware and had even pictured that Burt's fridge was stocked with nothing but rows and stacks of root beer. “and, you know how he'd disappear for hours at a time?"
"Yeah..." Dale had always wondered what Burt was up to, but now he was feeling a little uncomfortable. This wasn't going to be good.
"Well, we followed him one day on one of his 'breaks.' It turns out that he was leaving the office, walking to his car, and mixing Vodka in with his root beer. We smelled one of the bottles he'd thrown away — it smelled powerful."
Dale remembered all of their previous encounters, and not once had he seen Burt unaccompanied by his "root beer." Dale asked what happened once they found out.
"Well, I didn't know what to do." Brad's tone lowered and he looked down at the table uncomfortably. "I eventually just reported it to our lead, who reported it to his boss, who then took it to HR."
Dale then realized that he hadn't seen Burt in a while. "So he was fired on the spot?"
"Not exactly," he responded, "they wanted to 'talk to him' about it."
Brad looked over his shoulder to see if anyone else they worked with was within earshot, and continued softly "but, the next morning, I stopped by his cube to say 'hi.' When I got close, I saw his legs sticking out into the aisle. He was laying on his side, the root beer bottle was near his hands and spilled across the floor, and he was completely passed out. I'm pretty sure he had mistaken the floor plant for a urinal, too."
Dale wasn't quite sure how to respond, and muttered "whoa."
"Yeah," Brad said uncomfortably. He cleared his throat and then said, "we never really saw him after that."
From The Daily WTF, 5 days ago,
0 comments
Michael F. arrived to an ugly sight — an inbox full of messages with the same subject line. "ERROR: Invalid data near '<Carrier '" And that could only mean one thing. The shipping software company had released a patch to their web service. Having suffered through updates of ClearPath Logistics' software before, he knew exactly how this was going to go.
First, he typed up his usual message that boils down to (and I'm paraphrasing here) "WTF?" He had a contact, Dogan, that he usually alerted when their patches broke things.
Hours later, the second step. Michael received an email notifying him that yes, they did do an update, but no, the error was not their fault.
Minutes later, the third step. Michael responds to let them no that their software hasn't changed in a month, insiting that the problem is definitely on ClearPath's end.
The fourth step was the only step that varied from time to time. Sometimes a passive-aggressive apology from ClearPath, other times more accusations from the vendor that the problem was on their end. This time, Dogan did some analysis on the XML they'd received and replied quickly. Aha! The problem was on Michael's end!
Hi, Some of these requests aren't well formed: <Carrier /> <Service /> <ReqDate /> These are not allowed in the API. Can we ensure the xml requests are well formed. <Carrier></Carrier> <Service></Service> <ReqDate></ReqDate> Let me know if you have any questions.
What you may not realize is that ClearPath has their own version of XML. It's the same as regular XML, without support for those pesky empty element tags.
From The Daily WTF, 5 days ago,
0 comments
Long before the √-button on calculators, and the now-antique slide rules and logarithm tables, people actually had to calculate square roots by hand. Like so many other pre-Computer Age tasks, square root calculation isn’t really complicated, it’s just tedious. The simplest – and, as it happens, the oldest – technique for this the Babylonian method: guess the square root of a number and then continually refine the result by taking the arithmetic mean of the result and the quotient of the number and the result, until you’re satisfied with the precision. In other words:
<script type="text/JavaScript">
var numbr = 5, guess = 2;
do { guess = 0.5 * (guess + numbr/guess); }
while (confirm('Refine Further? ' + guess));
</script>
There are several other methods for approximating square roots, but they all work in a similar manner: start with a seed number, run it through a formula or two, and keep going until you’re satisfied with the result. This approach is known as iterative approximation, and is not used all that often in software development. Engineers, on the other hand, tend to solve problems with physical matter and other analog things, and consequently find iterative methods invaluable.
As a structural engineer, Gabe is very familiar with the iterative methods used in his field to solve common problems such as tensile-stress variance and lateral-torsion resistance. Like the square root example, most of these calculations are simple arithmetic. The complexity, however, comes in the variables that are adjusted in each iteration, which can be anything from peak wind velocity to project cost to the metallurgic makeup of building materials.
Fortunately for Gabe’s firm, the advent of GWBASIC meant that these common problems could be solved in seconds rather than hours with simple programs that any of the engineers could hack together. By the time the 1990’s came around, the firm had developed an impressive collection of GWBASIC programs that solved many of their specific problems.
The programs didn’t change a whole lot over the next two decades. Some were upgraded to QBasic, others were created in Visual Basic 3, a handful were VB6-based, and at least one was developed in VisualBasic.NET. With lots of hacky code stored on a network drive with no version control, it was the kind of environment that would make a software developer scream W-T-F!. But for the engineers, it wasn’t all that bad. It wasn’t all that good either, which was why they were very receptive when a software vendor approached them with a “comprehensive suite of engineering tools.”
“Our software has become a de-facto industry standard,” the sales rep proudly declared in his presentation, “in fact, city building departments come to us for help in developing codes and standards for the computer age.”
“A few other firms have gone the same, ‘in-house tools’ route that you have,” the presenter continued, advancing to a slide with a picture of a demolished building, “but remember that engineers aren’t programmers, don’t want to be programmers, and don’t particularly like programming. When your competition uses software built by programmers and has their staff focus on engineering, they’ll leave you in the dust.”
The engineers certainly didn’t disagree. Program maintenance always took longer than it should, and the prospect of having programs that worked better and were easier to use was certainly enticing.
“And just to make decision even easier, we’re offering a free, three-day trial” he cheerfully added, winking “but I suspect you’ll make your mind up after the first day! I think it’s finally time to join 2008 and wave goodbye to your old GWBASIC programs!”
With nothing to lose, the engineers agreed to give the software a shot.
As it turned out, Gabe was in the middle of a project that needed some serious help from software. He was tasked with figuring out what type of steel beams to use on a bridge they were designing.
It’s always a challenge to determine what steel beams should be used in a structure. Even the basics like load and torsion can be a pain to calculate. The more load that’s needed, the heavier the beam needs to be, which means the greater the load becomes, which means an heavier beam may be needed, which means it may not support the overall structure’s torsion requirements. And, with a range of only sixty or so widths of beams to choose from, switching from one size to another can change things dramatically.
Many years back, someone at the firm had written a simple GWBASIC program to help with this problem. Given an input of about twenty different variables, the program would try every beam size available, calculating and recalculating with each iteration, and eventually spit out a small list of suitable beams. The engineer would then make his choice based other considerations such as cost.
When Gabe fired up the new software, he was quite impressed with its interface. Instead of non-validating input prompts and obscure codes that the GWBASIC program utilized, the new application allowed such luxuries as tabbing between fields and dropdown boxes. Gabe spent about five minutes filling out various variables and then pressed “FIND BEAMS.”
Instead of seeing a small number of beam types come up, the application presented him with a monstrous dropdown list of beam choices and a label that read: please select the beam that you’d like to use.
Gabe wasn’t quite sure what the program meant, so he picked W10x22 and then clicked submit. After a few seconds of a flashy “calculating” animation, the program popped-up another message: Calculation Complete! The beam you selected (W10x22) will not be suitable for the specified conditions.
After closing the pop-up, the program then returned to the main menu. Figuring that he miss-keyed something, Gabe went back into the Beam Selector screen and spent another five minutes entering data. He hit submit, was prompted to select a beam, and then told that the beam he picked didn’t work. He tried once again, only to have to-reenter data, re-select, and then learn his selection was incorrect.
“I guess I don’t really understand the problem,” the vendor said in response to Gabe’s inquiry, “the method for designing beams calls for the engineer to guess a beam size and then run it through the appropriate calculations. That’s what we’re doing, only we’ve made it much easier.”
Gabe explained that their twenty-year-old GWBASIC program didn’t require the engineer to guess different beam sizes, and that it simply output the beams that were appropriate.
“That just doesn’t make sense,” the vendor responded, “the reason you guess first is so that all of those calculations on all of the different beams don’t have to be run. Why bother calculating all that for something – like, say, a W4x10 against a 100K – when you know it’ll always fail. That’s just a waste to calculate.”
In the end, the vendor was right on one thing. Within a day, Gabe’s company made their decision: they stuck with their old, wasteful, GWBASIC programs.
From The Daily WTF, 6 days ago,
0 comments
"After dialing Lenox's toll-free number," Tim Wilde wrote, "I encountered an error message being read to me by a friendly female computer voice. At least the URL it read me was using RFC1918 IP space... though I would love to be able to visit it and find out what I was missing on the actual call!"
Jacob reports, "there's some rather strange happenings in the Greater Philadelphia area according to this story from NBC10"
Not to be out done by some news website, Jim Mercer sent in this picture from the front page of Dubai's The National.
"These two motherboards that NewEgg is selling have some rather interesting features," Steve K, "luckily, I was able to resist the urge to comprehend them."
Mike wrote, "I suppose this resolution would work on just about any problem, not just PictureIt!"
"This window came up while I was searching for a business ethics course," an anonymous reader wrote, "I was left wondering if the Old English version might include Medieval ethics... although Ancient Egyptian might be more interesting."
From The Daily WTF, 7 days ago,
0 comments
J. K.'s boss loves the term "generic." Developing a feature that prompts if one specific field is left blank, that will only be used on that page? Make it generic enough to work on any page. Working on an application that will only ever be used by the local government in Podunk, MA? Make it generic enough to be able to easily change every line of text into Swahili, just in case. He didn't know the ins and outs of what was involved to make this possible, he just wanted his team to wave their collective genericification wand over the application's code.
This is precisely why he was so upset when an email form that was supposed to be generic wasn't working all of the time. It had been built to convert any HTML form with a properly named From, To, and Subject line into an email. And it worked for the most part, until they tried to apply it to a new form with more fields than others that used the control.
Looking in to the code, it didn't take J. K. long to figure out why it wasn't working on the new form.
String memo = "";
for (int i = 0; i < usedField.length; i++) {
if("From".equals(usedField[i].getText())){
request.getSession().setAttribute("From", usedField[i].getValue());
}
if("Sendto".equals(usedField[i].getText())){
request.getSession().setAttribute("Sendto", usedField[i].getValue());
}
if("Subject".equals(usedField[i].getText())){
request.getSession().setAttribute("Subject", usedField[i].getValue());
}
if("Body0".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body1".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body2".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body3".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body4".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body5".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body6".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body7".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body8".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body9".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
if("Body10".equals(usedField[i].getText())){
memo += usedField[i].getValue();
}
// Dozens of "if"s removed for sanity
}
...And it didn't take long after he found this code for him to submit it to The Daily WTF, either.
From The Daily WTF, 10 days ago,
0 comments
Ever since the first Free Sticker Week ended back in February '07, I've been sending out WTF Stickers to anyone that mailed me a SASE or a small souvenir. Nothing specific; per the instructions page, "anything will do." Well, here goes anything, yet again! (previous: Makin' It Fit).
"I recently came across a rather immense in-store credit at BJ's Wholesale," wrote Steve "snoofle" W. (Mattawan, NJ). "Since I usually manage to lose credit slips before I get a chance to use them, I decided to burn through it. After as much back-to-school shopping as is possible there, I wandered the canyons of the warehouse and happened upon the candy aisle. Normally, I'd pass it by, as none of us have any willpower, but then I thought about Alex's dire lunch situation, and figured this would help."
This picture doesn't nearly do this obscene amount of candy justice. There is so much good candy here -- literally, a crapton of it -- that I had to resort to the immediately-available cellphone camera. Had I hoarded the goodies until I brought in a real camera, I would have certainly had a mutiny to deal with. Here's what the candy looks like piled on the conference table with me, of course, enthralled by the loot.
Trying to calculate how much weight I'd gain from having this around, I looked at the nutritional information to see how many calories I'd be in for:
--+--+--+--+--+--+--+--+--+--+--
CALORIES
120 Variety Pack 10,650
Hershey's Kisses 8,200
M&M's 8,780
Recee's Minis 9,240
Mars Mix 8,190
Tootsie Rolls 8,120
TOTAL 52,380
--+--+--+--+--+--+--+--+--+--+--
Calories Per Pound: 3,500
Calories Per Mile: 100 (approx)
--+--+--+--+--+--+--+--+--+--+--
Distance Per Crapton of Candy:

Fortunately, I do have coworkers eager to share in the goodies. Still, I anticipate needing to walk to at least Detroit to undo my share.
Jere P. (Helsinki, Finland) wrote, "This somewhat awkward Operaman t-shirt comes from the good ole' days of Opera's marketing, where their strategy consisted of dressing up one of their employees and a superman suit and the notorious promise by their CEO to swim from Norway to the USA. As for the USB drive, it's a whopping 16MB and filled with random garbage."
Danny Cooper (Hooks, Texas) learned the hard way why some custom mouse pads cost $0.10/each and others are $1.10/each. Too embarrassing to give out as trade-show swag, he sent in a small stack for some WTF Stickers. "You'll find they're one step up from colored Saran wrap," he added, "most paper towels are thicker, though."
(Aspose is a TDWTF sponsor; they're also TDWTF readers)
"At my last job," wrote David Henkel-Wallace (Palo Alto, CA), "if someone saw the 'radioactive' tape in the wrong place, life would suddenly become... exciting. There would also be a lot of paperwork to fill out." I look forward to using the tape for its intended purpose.
Alfonso Via-Reque (Woodridge, IL) send these racing cards from the turn of the century (wait, is it too early to say that?).
"Here are a couple ancient PCMCIA cards I found at the office," Joose K. (Finland) noted, "I was going to pitch 'em, but figured they'd be a fun souvenir." Indeed they are, Joose; and they even taste better than Salmiak.
Paul Gibbs (Brantford, Ontario) sent this random assortment of Canadian stuff.
Followed by Mark Cottman-Fields (St. Lucia, Australia) who sent this random assortment of Austrialian stuff.
I'm surprised that Ethan Schwartz's (Auburndale, MA) office still has these stickers around. They're almost as dangerous as a slow-reacting disintegrating-ray gun. Slap one on the chair in your coworker's cube: BAM, he's seatless by morning. Stick one on a photo frame: BAM, bye-bye picture. They're also a step up from the "Kick Me" sign.
McLaughlin Thomas (Kennewick, WA) sent, quite possibly, the coolest currency I've ever seen. Serious business: it's got see-thru parts, lots of colors, big numbers, different-sized bills, and a bearded dude.
Jonas (Denmark) sent this laptop bag and delightfully tasty candy.
And finally, here's a random assortment of souvenirs from different readers across the world.
Don't forget to snail-mail in your own souvenirs for some TDWTF stickers. Ultra-awesome souvenirs (like, say, mounds of candy... except, don't actually send in mounds of candy, since I'll have enough to last a lifetime fiscal quarter) could even get you a TDWTF mug.
From The Daily WTF, 11 days ago,
0 comments
If Ben E. was given three words to describe his job, he’d use bureaucracy, bureaucracy, and after filling out Form 811B-AW (Request to Use More Than Three Words Form), serious fricken bureaucracy. But alas, when one works for The State, things like serious fricken bureaucracy, vast documentation, and threats of being hired are simply par for the course.
When he first started as an Application Reports Developer for The State, Ben wasn’t at all cynical. While he was certainly aware of the bureaucracy at large government offices, the office he would be working at had all of twenty people. And since they’re quite a distance from The State’s capitol, he naïvely concluded, people would naturally work as a team instead of teaming-up to avoid work.
One of Ben’s first tasks was to configure his workstation to be able to print to the wide-format printer. Though Ben was perfectly capable of following the printer installation wizard, he needed a password to connect to the printer. “Just ask Michael,” Ben’s boss advised, “he sets all that stuff up.”
Michael worked in a cubicle on the other side of the room. It was a good twenty to twenty-five feet from Ben’s desk. “Sorry,” Michael said in response to Ben’s request for some printer help, “you’ll have to run that through Jessica first.”
Jessica was the lead network technician, and her cubicle was directly next to Michael’s. “You’re going to have to call support,” she told Ben, “just dial out 774-6216.”
Ben didn’t mind the runaround. After all, he assumed, a printer setup is a pretty rare occurrence in a small office, and it probably has to go through central networking or something. He walked back to his desk and dialed the number for support.
“The number you dialed is incorrect,” the recording read, “please hang up and try again.”
Figuring he needed an outside line, Ben tried 9-774-6216, only to be greeted by the same message. Ben walked back to Jessica’s desk to see what he was doing wrong. “Uhhh,” she said in a condescending tone, “just pick up your phone and press 7, 7, 4, 6, 2, 1, 6. That’s the support line.”
Ben walked back to his desk and reasoned that he must have pressed one of the wrong buttons on the phone keypad. He tried it again, slowly. 7. 7. 4. 6. 2. 1. 6.
“The number you dialed is incorrect. Please hang up and try again.”
Ben walked back to Jessica’s desk and asked if he needed to dial 9 or something first. “Well yeah,” she scoffed, “of course you have to dial 8 first!”
He walked back to his desk, dialed 8-774-6216, and was once again greeted by the message. Not wanting to appear desperate, Ben waited a little while before returning to Jessica. “Okay, watch me,” she exasperated, clearly annoyed at his persistence. Jessica picked up her phone and pressed 8, 1, 7, 7, 4, 6, 2, 1, 6. “There, see?”
Fortunately, 81-774-6216 did the trick. After returning to his desk and dialing the number, Ben finally got a hold of support and explained his printer problem. “We can certainly help you with that,” the support rep responded, “an onsite network technician will contact you within twenty-four hours. Please note your ticket number: 6840012203.”
Later that day, Ben ran into Jessica in the break room. Since she was one of the two onsite network technicians, he asked her when they’d be able to get to that ticket. “Like I told you on the phone,” Jessica responded in a much nicer tone than before, “someone will contact you.”
It took a few moments for Ben to process the first part of her response. When did I talk to her on the phone? Is she thinking of someone el— and then it dawned on him. There was a reason that the support rep’s voice sounded so familiar: she was Jessica, and 774-6216 was Jessica’s number.
The following morning, Ben’s phone rang. It was Michael, checking to see if Ben had a few minutes to setup the printer. Ben stood up in his low-walled cubicle to get a direct line-of-sight to Michael and invited him on over. Expected him to hang-up, stand-up, and walk twenty feet over, Michael instead responded, “Actually, I’ll just remote in and do it real quick.”
Ten minutes later, Ben watched as Michael remote-controlled his computer from across the room. Halfway through the printer installation, an error dialog popped-up:
There was an error copying file ml882print.hlp: file not found.
[Ignore] [Retry]
Michael clicked Retry, only to have the same exact message pop-up again. He clicked Retry again, and got the same message. After three more attempts, he clicked Start, Shutdown, and then Restart.
When the computer came back up, Michael resumed control and found himself stuck at the same point in the installation. Clicking Retry – even clicking it five times – resulted in the same File Not Found error. Rebooting two more times didn’t help much, either.
As Ben shifted his glaze from his computer screen to Michael controlling his screen, he watched the frustrated Michael pick up his phone and, presumably, explain the problem to the person on the other line. Moments later, Jessica walked over from her cubicle and commandeered Michael’s workstation.
Jessica, now controlling Ben’s workstation through Michael’s, clicked Retry. She, too, was greeted with a file not found message. After clicking Retry twice more, she hesitantly moved the mouse over the Ignore button and then clicked it. Ten seconds later, the printer installation completed successfully.
From The Daily WTF, 11 days ago,
0 comments
From Shari
I arrived a few minutes before my interview and, after notifying the receptionist, took a seat in the lobby and patiently waited for 2:30 to come. When the clock struck quarter to three, I inquired with the receptionist to make sure that 2:30 was the correct meeting time. While she clicked through the company calendar to verify, an employee brisked past the desk and mentioned that he was taking a late lunch and would be back soon.
“Oh,” the receptionist said, “yes, 2:30PM. And actually, Dave, the guy you’ll be meeting with, is out to lunch. He’ll be back soon.”
I anxiously watched the clock pass 2:50. Then 3:00. And then 3:15. When 3:25 finally rolled around, the same guy who left earlier for a late lunch waltzed back in. “Hey there,” he said, “you must be my 2:30. I’m Dave. Sorry for the delay, got a bit behind today... you know how that goes!”
“Uh, yeah,” I responded, clearly annoyed, “I guess I do.”
“Okay then,” he said defensively, “give me five minutes, and we’ll get started.”
Fifteen minutes later and just as I was about to walk out, Dave came back. “Ready?” he asked, gesturing me to follow. We walked back to his office and sat down to finally start the interview.
“Brown!?,” he opened up with, looking at my resume, “what, couldn’t cut it at Harvard?”
I wasn’t quite sure how to respond.
“Kidding, kidding,” Dave cut in, “but seriously though, your degree -- I'm sorry-- your prestigious degree doesn’t mean a whole lot here.”
“Riiight,” I answered, “that’s why I have it as a small bullet point, at the bottom. I graduated over a decade ago, and think my work exper--”
Dave cut me off, “you know, it seems like you have a problem on the personal level.”
“Well,” I said, “you had me wait for over an hour while you went to lunch, and then started off by --”
“Like I said,” he interrupted, “you have a problem on the personal level, even if you might be qualified professionally.”
“Are you serious,” I rhetorically asked, getting more and more annoyed, “what does ‘personal level’ even mean? You’re completely unprofessional! Would you have tolerated a candidate that was an hour late!?”
“Oh,” he scoffed, “so, we’re equals now, is that it?”
“You know what,” I said, “good luck with filling your position. And good day.” I got up and headed towards the door.
“Yep,” he said, smugly, “like I said before, you have a problem on the personal level!”
I bit my lip to prevent a stream of cursing, and just walked out. After cooling down a bit, I realized that this was the most fun I’ve had at a job interview in quite some time.
from Jeremy H.
I’ve found that, while a lot of software engineers are able to apply complex solutions to complex problems, not as many are able to solve simple problems simply. As such, I’ve always found it helpful to pose fairly simple technical problems to candidates and ask them for the simplest possible solution. One scenario I often use for this is the Downloader/Watcher Contention:
Every night, a Downloader program will retrieve a handful of several-gigabyte files from a remote server and save them to a certainly directory on disk. A Watcher program monitors this directory and immediately processes whichever files show up. However, because downloading takes significantly longer than processing, the Watcher program will crash if it reads a file that has not been fully downloaded. How would you prevent this from occurring?
There’s really only one correct answer, and I try my best to guide candidates to get there. Some, like a recent interviewee, never quite get there.
“Well,” the candidate said after some thought, “I’d add a feature to the Watcher that would prevent it from processing files that aren’t fully downloaded.”
“The file doesn’t contain any EOF marker,” I responded, “in other words, there’s no way to determine if a file is done downloading simply by looking at it.”
“Oh, okay,” the candidate replied. He pondered for a full minute and said “so in that case, I would hae the Watcher listen on a TCP/IP port, and have the Downloader tell it when it was done downloading.”
“That seems like a lot of work,” I said, hoping to steer him in the right direction, “so let’s just say you can’t modify the Watcher. All the Watcher does is look for files in a certain directory, and processes one as soon as it sees it.”
“Hmph,” he gruffed, “since I can’t touch the Watcher, I guess I would then move to its dynamically linked libraries. I’d modify fopen() in stdio so that it could open a TCP/IP connection to the Downloader and verify that the download has completed.”
“Uhh,” I stuttered, “I don’t know if that would work. And besides, what if it’s statically linked?”
“This is really unfair,” he scoffed, “no matter what I think of, you’ll be able to come up with a reason it won’t work.”
“I understand why you’d think that,” I explained, “but there’s really a very simple solution to this problem.”
He sighed and thought for another full minute. “Okay, I could tweak the operating system kernel and file system such that it would monitor which files were being written to, and disallow local programs from opening the same file until the program ended.”
“That’s quite a bit invasive,” I countered, “wouldn’t a kernel change affect all the other applications running on the system?”
“That’s a good point,” he lit up, “so, before disallowing the open, I would have to look at the call stack to see what application was calling fopen().”
“Okay,” I said, ready to give up, “so you’re saying, to solve the problem of the Watcher processing files that are not done downloading, you would modify the Linux kernel?”
“Yes!” he cheerfully answered.
“What about if the Downloader just wrote files to a temporary directory, and then moved the file to the appropriate directory when the download was complete.”
He thought for another full minute and said, “I guess that would work, too.”
from Mike
Not too long ago, a recruiter set me up with an interview for a Senior PHP Developer position. I was a bit wary at the prospect of such a role, as I had only been developing for three years. However, the recruiter reassured me that it didn’t hurt to interview and that, if nothing else, I’d get a good interview practice out of it.
In the days leading up to the interview, I boned up on the ins and outs of PHP programming. I had a feeling that it’d be a pretty grueling technical interview. And when I got there, I knew I was right. There were three people waiting to interview me: the VP of Information Technology, the Senior Systems Engineer, and another Senior PHP programmer.
“We like to start things technical,” the programmer said, “hope you don’t mind that!”
Hundreds of PHP functions, variables, and modules flashed through my mind. I was ready for their worst.
“All right,” he began, “if you want to center a page using CSS, how would you go about doing that?”
A simple CSS question! I was very pleased that he started with such a softball. “I’d just use margin: auto,” I confidently responded,” and I’d also make sure the page had the DOCTYPE defined.”
The programmer smiled. “If you want to have the same header and footer files displayed on every page, how would you do that?”
Worried that it was a trick question, I hesitantly responded, “I’d include them?”
He smiled again. The next few questions grew increasingly difficult, with the last one requiring all of two months of working knowledge of HTML, PHP, and CSS to answer.
The rest of the interview went just as well, and as the developer escorted me out he added, “you passed that interview with flying colors! You’re definitely going to be my recommendation. All the others were horrible.”
Not wanting to upset him and lose my chance at getting a good paying job, I resisted my urge to say, “Where the hell are you getting these people then? Any amateur could answer those questions.” I just thanked him and went on my way.
Two days later, I received a “congratulations, you got the job” call from the recruiter. After a bit of pushing, the recruiter revealed that all the other candidates were from him, and that he was the company’s exclusive recruiting agent. I ended up taking the job and am very fortunate that things worked out in the end. Whenever they remind me how I was “a diamond in the rough,” I just smile and nod. I’m sure one day I’ll work up the nerve to tell that the problem is with their diamond-miner.
From The Daily WTF, 12 days ago,
0 comments
Mike W. doesn't know what this means, but is pretty sure that it isn't good.
Not pictured: the File Not Found button.
(submitted by Ace)
Matt Fox chose the basic version to avoid the Maximize Taxes "feature."
Chris bought one.
Keith Garner, I hope you're OK with the WTF community knowing your password.
Vitor was using CorelDRAW when suddenly
From The Daily WTF, 12 days ago,
0 comments
It was the dirtiest look that Derrick had ever seen. As he stood in the foyer, paralyzed by his wife’s dagger-like glare, his mind rushed through all the things he could have possibly done wrong. Did I forget to pick up the kids? Was it someone’s birthday? Crap, it isn’t our anniversary, is it? After a few-second-long silence that lasted an eternity, Derrick nervously stammered a greeting. “Uhh, hi… honey… I’m home?”
She clenched her jaw as her eyes tensed with anger. Without abating her piercing glaze, Derrick’s wife slowly raised her right hand to eye level. Her tight fist gripped a several-page document bearing the unmistakable logo of Scarlet Financial. Derrick grimaced, realizing exactly how much trouble he was in.
Eight months earlier, Joe Judge started his first day as a Web Systems Developer at Scarlet Financial (as I’ll call them). Though he had worked at a handful of financial services firms in the past, Scarlet was a bit different in that they catered specifically to very high net worth individuals. If you didn’t have at least ten million dollars in manageable assets, then you’d have to stick with Charles Schwab, Vanguard, Fidelity, or whatever else the hoi polloi use; Scarlet certainly wasn’t for you.
In the years prior, the internet-savvy demographic within Scarlet’s client base had grown from zero to a large enough number that might leave if they didn’t have any online financial services. So, being the client-focused company that they were, Scarlet set out to build a website that would allow clients to view their positions and manage their account.
At first, the website wasn’t really self-serve; it simply merely managed requests and communication between clients and their financial consultant. But as clients became more internet-savvy, they wanted more interactivity and more features. In a short few years, Scarlet’s basic website turned into a full-fledged financial portal.
When Joe started, the big feature that everyone was working on was called Extended Access Management. The idea of “Extended Access” is commonplace in many high-end financial services firms. Often times, an individual with a complex portfolio of different financial products will need to provide others with limited access to their accounts.
A business partner, for example, may want to monitor his partner’s personal financial records to ensure that there’s enough assets and liquidity to cover their joint guarantees; insurance underwriters, on the other hand, will want continuously verify that their umbrella policies are appropriately coordinated with other insurance policies; and bankers always want to be certain of their borrowers’ solvency, especially when it comes to large, complex loans.
Most of us would solve these “access issues” by simply copying our account statements, redacting unnecessary and sensitive information, and then mailing out the statements to whoever requested them. However, since the usage of Xerox machines, Whiteout, and postage stamps are below Scarlet’s clients, Scarlet developed an internal, extended access system that automatically mailed the appropriate statements with the appropriate level of detail to the appropriate parties at the appropriate times. Joe’s job – along with the rest of the development team – was to externalize this system and allow clients to directly manage extended access through their financial portal.
The extended access system wasn’t terribly complicated. Each client had a “master account” that had full access all of the client’s financial products. The master account could also manage sub-accounts that would have various privileges (full, transactional read-only, summary read-only, etc) on various financial products. Each sub-account could also be assigned statement mailings, so that the sub-account holder would receive the financial information periodically.
However, somewhere along the development process – perhaps in a data migration script – a minor bug slipped through. Master accounts that were setup to receive a Master Account Statement – i.e. the document that showed detailed information about all financial products – defaulted to using the master account holder’s mailing address. With so many sub-accounts and statement mailings in the mix, no one seemed to notice the discrepancy. And besides, why would a master account holder not want the master account statement going to his mailing address, anyway?
As it turned out, there was a good reason why. Certain individuals had worked with their Scarlet advisor to create a sub-account for themselves. The master account statement would be sent to some other address – the office, a post box – while the sub-account statement would be sent home. This enabled the deceitful to easily hide assets from their family – namely, their spouses – without going to the trouble of creating an entirely new account.
Which brings us back to Derrick. Like of many other Scarlet clients, Derrick had a “family” sub-account that didn’t quite represent his entire financial portfolio. And like some of the even more unscrupulous clients, he had a charge card account for his certain, “private” purchases.
With his pulse pounding and his heart quickly ascending to his throat, Derrick knew exactly what had turned his wife into a furious tiger, ready to tear him limb from limb. A million thoughts poured into his head as he tried to recall everything he had charged in the past month, and how he might explain it.
1-800-Flowers – uh... uh… employee… mother passed away! The Ritz – um… err… drinks with a client at the hotel bar! Saks Fifth Avenue – eee… aaa… early Christmas shopping! The Ritz, again – ahh… more drinks with clients! Tiffany's – ooo… secretary appreciation day! The Ritz, yet again – um… yee… accidental charge!
It was a pointless thought exercise. The accidently-mailed master account statement that his wife clenched detailed charge after charge of adulterous activities, many of which were local but occurred while he was “away on business.” And that’s not to mention the “secret” savings account (which grew $9,000 that month alone) that was undoubtedly Derrick’s “start a new life” fund.
While the following month wasn’t quite as painful for Scarlet as it was for some of it clients, they did end up losing several high-profile clients and nearly $450 million in managed assets. Word has it that divorce lawyers, however, made out with quite a pretty penny.
From The Daily WTF, 13 days ago,
0 comments