- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The real WTF is not the abuse of RegEx, the abuse of stored procedures or the insane multiple updates for every row. The real WTF is UPDATING the database and destroying the original data!
Admin
No, just don't make any switch. It plugs into the wall, or is wired without. It's less work.
Admin
Really, the converter should have been built into whatever code was going to process this output. Assuming it did any kind of language parsing, it would have been in a better position to tell the difference between "Dr. Smith" and "Mountainview Dr.", etc.
Admin
If there was a plug in the wall, she could have turned it off. This sounds like an urban legend.
Admin
The lack of content, not the possible bigotry, was the worst part.
To sum up the original quote, "I remember when a thing I don't quite remember happened to someone I forget. He, she, or maybe even they, did some things and stuff, and, eventually, everything got better ... or worse.."
Great post. No really. Keep up the quality.
Admin
The Scots haven't personally offended most of us by writing billions of lines of WTF code.
Admin
Anecdotal for sure, but there might be something to this. I had an Indian guy working for me, but whenever he got a problem his immediate reaction was to ask somebody else for the answer (typically by calling tech support). He seems completely devoid of any impulse to try and solve a problem himself.
One time he asked me how to do something (by e-mail) which I didn't know exactly how to do off-hand myself. I e-mailed him back and said "here's the top three Google results, they look promising."
Admin
The smart thing to do would be write 1 test to test all 3 requirements. What do we get? We get 3 tests that (badly) test each requirement. As OB1 said, they do exactly what you tell them to without actually using their brain.
Admin
Admin
Is this necessarily supposed to be a bad thing? Imagine how many stories you've read here could have been avoided if only the coder had asked someone first...
Admin
I think he'd better also hope that no one uses their address on the street named "Edgewater Doctor".
Admin
I agree.
Like the old joke about the guy who disassembled and reassembled his mower engine, only to find he had one part left over. He decided to try it: It started right up, ran fine, cut grass like it was new. Everything seemed perfect. Then he tried to turn it off ...
Admin
Why is it that any generalization about an ethnic or national group is automatically denounced as racist? I don't think it is at all implausible to theorize that a group of people with a common gene pool and a common culture might have character traits different from those of some other group with a different gene pool and a different culture.
The empirical evidence would seem to confirm such a theory. That is, while blanket universals like, "All Chinese people are good at math" are clearly false, statements like, "On the average Chinese people are better at math by a statistically significant margin" are often true.
Admin
Seriously, it gotta be something cultural... it happens far too many times, too often. Unless they got packs of people paid to post such questions trolling everybody else...
Admin
Sadly similar to our outsourced support for Windows PCs (not our Linux systems; they're supported locally and are top-notch). Whenever I have a problem I have three options:
Fix it myself. This is far and away my preferred solution and the most likely to be successful and leave me feeling good at the end of the day rather than yelling and foaming at the mouth.
Learn to live with it the way it is. This isn't always practical, but even so can often be a much more satisfying option than #3.
Call PC support. Or email; that helps mitigate the language issue somewhat. 90% of the time this approach is successful only if I've researched the problem beforehand and can say, "This is how it's broken; you need to do this specific thing to fix it." I would have done this myself (see option #1 above), but I couldn't because I didn't have the right permissions.
Admin
This story seems more plausible than the one about the fan switch. A lawn mower often has a lever of some kind to turn the gas on and off, and that lever must connect by a cable to the gas valve. It's not hard to imagine there being some bracket or connecting rod that, if missing, does not prevent the cable from being pulled back to open the valve, but which is necessary to prevent the cable from bending rather than closing the valve when pushed forward. Or something of that sort.
But unless the fan maker designed their own electrical switch that has no mechanism for turning it off, or deliberately modified an off-the-shelf switch to disable turning it off, one would normally expect it to work both ways.
And of course there's a difference between "oops, we didn't assemble it correctly, the 'off' doesn't work" and "no one said there should be a way to turn it off so we deliberately designed a switch with no such capability".
All that said, as someone pointed out, if someone was told, "You are to follow these specs exactly as given", they might shrug their shoulders and say, Okay, if that's what you want ... I have had many, many IT projects where I thought the requirements were dumb but my boss or the client said that I was to implement them as given, so I gritted my teeth and that's what I did.
Admin
[quote user="n_slash_a"] When you pay $1/hr for work, you get back $1/hr work.[/quote] Exactly. Our V&V team is in India. We have a number of requirements along the ilk of: (In the I/O layer) - We shall parse data X (In the app layer) - We shall pass data X to the core (In the core layer) - We shall do stuff with data X
The smart thing to do would be write 1 test to test all 3 requirements. What do we get? We get 3 tests that (badly) test each requirement. [/quote]
Actually I would do it like that as well. For two reasons:
(1) Imagine you have just one test. If the test fails, you don't know whether the problem is in app, core or I/O. Especially in a big application this might be a hard debugging job. Also the three layers may have been written by different people and everyone blames on one of the others. In general if I look for a bug, I am happy if the amount of code I have to skip through is as small as possible.
(2) In a large application setting up all layers, wiring all layers etc. may take some time. For the small test I need to set up and wire just one layer (maybe I don't even need the entire layer). Also if you changed nothing but I/O layer you don't need to run all three tests, but just the relevant one. So less time the developer spends on waiting for test results.
If I click the "Submit" button, nothing happens...WTF!
Admin
I can identify with this. "Best minds" often means "people who are paid a lot to not do a great deal but when they were young they used to be computer programmers". As they were considered super-clever then, they're considered super-clever now. Therefore they get the mathematical analysis and technical specification jobs, because everybody thinks they're clever. But they're not, necessarily, and of course may not even have the right domain knowledge either.
Dunning Kruger rides again.
Admin
The return spring pinged off the throttle cable on my Mark 3 Ford Cortina many years ago when I was barrelling down the motorway at about 5 a.m. one morning. A bit frightening when you're going at 90 mph and suddenly realise you can't slow down.
Admin
Admin
Admin
Why would I comment about that?
My fIRSt doctorinking and doctorinking officeence is of a very personal nature and I'd never put that in a webform.
Admin
So much this.
Captcha - distinea: Dis, dis, distineo. (Think Phil Collins)
Admin
Admin
First off, those question marks were inside the text that was passed to a PreparedStatement object. They are placeholders which will get replaced when methods like setString(), setLong(), etc. are called, which you can see on the next two lines of code. The SQL passed to the underlying database will NOT have those question marks.
Secondly, wildcards are _ (single character) and % (multiple characters) in ANSI SQL and also in ADO, whereas DAO (the "native" language of the Jet database engine, which many people incorrectly equate with Access) uses the DOS-style wildcards of ? (single character) and * (multiple characters). So no, Access doesn't necessarily use * as a wildcard; it depends on the data access method that Access is using.
Admin
I've worked with a few people of Indian descent. Some native born Americans, some emigrated. All were very sharp, and good problem solvers.
OTOH, going with the lowest bid contractor gets you the greatest talent, no matter what type of work it is, or where its done.
Admin
hahaha
Admin
In other words: installing the "on" cord but not the "off" cord would give the described effect, which would make the story plausible.
Now I think of it, the last time I saw that kind of switch was in my own bathroom: A mandated switch so a washing-machine could be switched on and off outside of the apparatus itself. That switch was removed (allowed by newer standards) only a couple of years ago, during a renovation.
Admin
Dear me. This hurts just looking at it.
String similarity is a rather common task, I'm surprised the people involved didn't do even a cursory literature search.
One of my favorite dissertations describes this sort of problem, and one method of dynamic searching. I like this dissertation because it is easy to read and not that math-intense. The algorithms described (he really likes Smith-Waterman) are the forerunners of BLAST which was developed for the Human Genome Project.
Dissertation: Adaptive detection of approximately duplicate database records and the database integration approach to information discovery. Alvaro Monge, 1997. http://www.cecs.csulb.edu/~monge/research/thesis.pdf
But, if you really want to put this sort of thing directly into the database, then I'd recommend SimMetrics which is an open source library that you can compile and attach to SQL Server, so your SQL queries can hit these functions directly.
Decent write up:
http://anastasiosyal.com/POST/2009/01/11/18.ASPX
Am I asking too much of the world?
Admin
All of these examples of regex censorship gone wrong are pretty great, but honestly they're kind of small fries. Let's find a more interesting example, shall we?
Like, say...one of the most popular video game franchises ever to grace the planet.
Like....POKEMON.
Y'see, when Pokemon Black & White came out a few years back, they came with a roster boosted with at least 150 brand new monsters, AND an updated Global Trading System to swap monsters with strangers easily. Of course, Nintendo is a family-friendly company, so they implemented an aggressive regex to try to filter out Pokemon that were given offensive nicknames.
Unfortunately, they applied it to not only nicknames, but also the official name of each Pokemon species. It's not clear why they did this (well, I take that back - each monster likely has a single identifier in the "name" field, but how hard would it have been to check that against the species name?) but the end result was that some Pokemon could never be traded.
To this day, I've never bothered trying to hunt down a Crofagrigus.
Captcha: minim - "It seems like trading each monster on the GTS would have been involved in some minim. testing, doesn't it?"
Admin
Anyone who can't figure out how to turn off a lawnmower with a screwdriver shouldn't be using one.
PS - make sure you are not the best ground.
Admin
How come they didn't just send the guy some unit tests along with the specification?
Admin
Source Regular Expression: GNU
Destination Regular Expression: GNU's Not Unix
click
ERROR: OUT OF MEMORY
Admin
I love this. As long as there are dumbass developers like this out there, I'll be paid big bucks.
Admin
The original problem brought back many memories... 20 years ago (how can it possibly be that long)I took a contract that involve mining published material and getting structured data from it....we got the desired results, but it was man-years of design (the previously quoted resources didn't get published till nearly 5 years later!).
The 'classic test case' was to find all the articles that were about Digital Equipment Corp. [still a significant player at the time]. Many times they were referred to just as Digital, but of course, searches on that word had a majority of false positives.....
Ahhh...The memories....
Admin
Of course it's possible for groups of people to have genetic or cultural differences from other groups. But there is probabily some selection bias in effect here. Are you really looking at a representative sample of Indians, or even of Indian programmers? Or are you looking only at a sample of the cheapest Indian programmers your company can find?
Admin
s/big bucks/more than the $1/hr the dumbass developers are making/.
Admin
Admin
Admin
Remembering those halcyon days leading up to Y2K. The classic test case for us was going through half a million lines of code looking for references to dates. Couldn't grep on the word date because it could appear in the middle of an unrelated word like "updated", sometimes it was abbreviated "dt", sometimes "yymmdd" or a substring thereof.
Admin
It's okay to scream at it, though, right?
Admin
Admin
"Rahul..."
Sounds like a bad cough to me.
Admin
Admin
"Some people, when confronted with a problem, think 'I know, I'll use regular expressions.' Now they have two problems." -Jamie Zawinski
Admin
And I'm convinced that the country I live in is economically so well of because people actual do think critically and it is expected of them instead of blindly following orders. it's fine to tell your boss that something is stupid or makes no sense.
Admin
On the slightly serious side: May I point out that changing "IRS" and "I.R.S." to "Internal Revenue Service" -- even assuming you fixed the dumb mistake of not looking for some sort of surrounding delimiters -- barely scratches the surface. What if someone mis-spelled it, e.g. wrote "Inertal Revenue Service"? What it they called it "the tax people"? Or simply, "the government"? How would you distinguish references to "the government" that are referring to the IRS from those that are referring to Congress or the TSA or the state police? Or to some foreign government? An intelligent being could often quickly tell from the context, but how would you program a computer to figure that out?
Admin
"I think it was like, a thousandth of a cent per line of code. see, no WTF here anymore ...."
Paying developers by lines of code is the WTF.
Admin
All exciting guesswork aside, the ? thing is the way parameters are passed by ODBC, regardless of the target DB.
Admin