- 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
As I looked into the content, my first thought was that this is from one of our system, but not.
Admin
You've got to love when people hard code the same values throughout multiple classes and methods.
Admin
And I love when people are connecting with every call of the function, instead of connecting once for all ...
Admin
==> Database connection (of course) ... could have used connexion pool also.
Admin
Wow, isn't that a Micorsoft Access database? They use simple question marks for the parameters. If it were Oracle, it would break down under the load of the many connections, because Oracle is too stupid to re-use them in a timely fashion. Great job!
Admin
Well, not such a big deal IF the database interface has its own connection pooling mechanism. Doesn't take away from the utter wtf of the code.
I love the way that the variables have the words 'regularexpression' in them, even though the code doesn't actually USE regular expressions anyway
Admin
I cannot fault Rahul. Most offshore people, especially the ones from a particular Eastern country known for its spicy foods and IT "talent", will do just what it asked and nothing more, nothing less. I heard a story somewhere, I'm not sure where, about someone who had Indian contractors install a fan for his mother (it might have BEEN in India, so it's not a "dey tuk ur jerbs" kind of thing). The instructions said that she needed a way to turn the fan on. Later, they found there was no way to turn it off. When asked the contractor stated that "an OFF switch wasn't in the requirements, so it wasn't implemented". They will do EXACTLY what you state, and not apply any critical thinking or thought.
As I understand it, it's a cultural thing. Book knowledge and following instructions is looked highly up, while out-of-the-box thinking and doing things on your own is not. Many years ago on a WTF that I can't remember there was a comment from an Indian national living in India who explained this notion, that looking for exact solutions to problems is good, but doing your own research or looking at documentation to find the answer is not considered acceptable.
Admin
Send it back to the Offshore office... oops sorry: Officeshore Officeice
Admin
FInternal Revenue Servicest!
Admin
I guess they should have gotten a few unsuspected surprises at fInternal Revenue Servicet. Like Doctorastically changing the meaning of many other comments. Hope they turned it Office really quick.
EDIT : Too late. :(
Admin
I'm just left wondering how much faster it would be if it was implemented as a stored procedure, especially one on a database linked to the spreadsheet which underpins the process.
Admin
the so-called "clbuttic" effects of dumbly replacing substrings with other strings.
Funny though: sometimes the search string is actually enclosed in spaces (even more funny: something like "FBI" supersedes " FBI "), so the company must have alread had dealings with faulty search-and-replace effects.
Admin
Don't think so. Wildcards are %, Access uses *. More likely MSSQL
Admin
Admin
If you paid me a pittance to do technical work, you'd get the specification. No more, no less. Can't blame Rahul in this case.
Admin
Trivially speaking these are regular expressions. Most of us do not think of strings without alternatives or closures as regular expressions, any more than we think of them as context-free languages.
Perhaps the manager thought that brute force string matching was the be-all and end-all?
Admin
Again and again people try to do data mining on unstructured data. Again and again people come up with the idea "let's structure it!". And again and again no one wants to do the nasty job. "Why not let a computer do it?" is the answer of it. Result: a very frustrated developer tries to teach the computer to think smart and ends up doing the thing with three times the effort instead of hiring a whorde of interns (or monkey, or whatever) and teach them. The way technology is, they still outsmart the computer by a long shot.
Admin
At least he used parameterized queries...
Admin
When you pay $1/hr for work, you get back $1/hr work.
Admin
If I was working at that place, and then I saw that code, I too might have got my first drink driving offence.
Crazy world.
captcha amet. As Ah was going to St Ives, Ah met a man with seven wives (who was also going to St Ives)...
Admin
This is absolutely true. You just need to select your offshore resources carefully, not simply sell the contract to some company who picks your team and insists on managing them.
Admin
Hate to think of "Office" comments. Office Officeice Officeiceice Officeiceiceice Officeiceiceiceice Officeiceiceiceiceice Officeiceiceiceiceiceice Officeiceiceiceiceiceiceice Officeiceiceiceiceiceiceiceice Officeiceiceiceiceiceiceiceiceice Officeiceiceiceiceiceiceiceiceiceice
Admin
It it really regex though?
Admin
Admin
Admin
TRWTF is that SQL is the supreme programming language and the problem could be easily solved by writting everything in SQL, without regex, wich wasn't used anyway.
Admin
This is why I'm not really afraid of privacy on the internet because no software is capable of doing any meaningful analysis with all the data.
Admin
An instant Clbuttic!
Admin
Admin
Admin
Admin
Let me analyze that to find the forbidden word.
Admin
Admin
Right, I think that was part of the joke. The specs didn't say they needed a way to turn the fan OFF, just turn it ON, so the guy only gave it a way to turn on. Following the specs without applying any thought and resulting in "going out of your way" to do it, instead of risk doing the easier thing but have it not be specified.
Admin
Genius, when it comes to getting paid choose the easiest solution that meets their demands. Not his fault they didn't ask for a performant solution, if so his quote probably would have been a bit higher.
Admin
All the comments about the code aside, it seems the boss has sent his employees on a fool's errand. The ways to say Internal Revenue Service are as varied as the creativity/stupidity of the users. The true WTF is the boss. The real solution to this problem homicide.
Admin
All the comments about the code aside, it seems the boss has sent his employees on a fool's errand. The ways to say Internal Revenue Service are as varied as the creativity/stupidity of the users. The true WTF is the boss. The real solution to this problem is homicide.
Admin
I recognize this code, it was done by my colleague Nagesh from HyperaBad ... It was his final year of college and he needed some money, so, he bid crazy low on some projects offered by the yankees .... I think it was like, a thousandth of a cent per line of code.
see, no WTF here anymore ....
Admin
FInternal Revenue ServiceT =~ s!Internal Revenue Service!IRS!gi;
Admin
It could be that the contractor was given specific instructions about how the solution was to be developed and told not to stray from them. I had a job (contract) like that once.
An engineering firm gave me the spec for a roadway construction delay calculator in a simple Word doc. When I raised some concerns I was told that it was put together by their best minds and to produce the solution exactly as described and not to stray from it. So I did. Then after it didn't work, I explained to them why and got another contract to come up with a solution that would work and then implement it. It turned out to be a good gig.
Admin
Admin
But they are not paid a pittance by Indian standards. In fact, they're amongst the top-earning professionals in the country.
Admin
India power-fail many time so fan get auto-shut off. Silly story insult to me and my country.
Admin
That is plain false. In india, investment banker and fund manager are paid highest salaries.
Admin
Does the fact that bin men and cleaners are paid less than nurses mean nurses aren't underpaid?
among the highest != highest.
you will have to think of a lot more professions to make that statement "plain false"
Admin
Yeah well the first paragraph is a bit racist, but the second paragraph raises some valid arguments. As I was lead to understand it, it may have something to do with the educational system in former British colonies. Yes, still after more than half a century.
It's also a matter of simple statistics. The percentage of good and bad Indian devs is probably comparable to that over here in Europe, but because the population is so much bigger, there are simply more bad coders in absolute numbers. And if you happen to find a rare gem, he'll soon move to a project with a "more important" customer. Happened to us. Our team in India was rather ok, until the team lead over there resigned and started working for Ericsson. From then on everything went downhill.
Admin
You can say that again.
Admin
Admin
Once was enough. I made a comment that i realized was stupid (surprise, surprise), and then the delete button didn't work. But the edit button did. But I couldn't think of a smart comment. So, as my grandmother used to say, if you can't say anything not stupid, don't say anything. Or, in this case, say nothing.
Admin
No, and ironically, this is actually one example of something regexes could have done well.