- 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
Admin
Admin
Methinks this code has come from beyond the Ballmer peak.
Admin
Ah yes, because clearly there's such a thing as "Standard English" as opposed to "American English". Not at all ethnocentric there.
But kudos for seeing through the insipid facade of critiquing the code sample and spotting mschaad's clearly nationalistic agenda.
Good point. I suppose for maximum semantic clarity with minimum of panic-inducing nationalist saber-rattling, we should really starting using the terms "English" and "USish". Although, to avoid the appearance of disingenuity and insensitivity, I suggest we go one better and adopt "UKish" and "USish".
Admin
I can tell you're trying hard to troll, but someone should smack you back into reality just the same.
Admin
include (lib.universe) include (lib.nothought) include (lib.greatbooksofhistory)
. . .
Admin
Admin
What we have here is a simple misunderstanding of object-oriented principles. Someone told him "every function should have a this self-reference" which becomes apparent once you look at some of his other function names:
system_will_wait_for_a_connection_request_when_you_call_this_function handle_initial_connection_request_with_this_function login_page_will_be_shown_when_control_is_passed_to_this_function look_up_user_id_and_password_in_database_using_perimeters_passed_to_this_function check_for_successful_drop_table_sql_injection_and_if_it_happened_restore_the_table_with_this_function ...
Admin
Hey Nagesh is not the only one guilty of butchering the English language. I work with many WASPs and their use of the English language is not much better.
Admin
get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function
Admin
What a great project. It can only be compared to Great Pyramid in Giza.
The manager should hire a few million Egyptian slaves. They would complete the source code with all the elseif-s.
Admin
Isn't it obvious? It supports numbers up to 15, right? Then it had to be AT LEAST 15 versions of this product. After all, each supported number should be carefully designed, coded and tested.
You can't possibly expect for such a product to support, say 10 numbers in version 1.0, can you??
CAPTCHA: transverbero
Admin
The first .NET project I worked on made use of "temperate" variables and "temperate" tables.
Perhaps it was the same guy?
Admin
'*** Product name: numbers to word enterprise edition Current version 15.1
Others have commented on the version number but that is random. The giveaway here for the humour-impaired is the words "enterprise edition".
THIS CODE IS IRONIC, YOU GUYS. IT WAS WRITTEN BY SOMEONE WHO HAD TO SUFFER WTFS CREATED BY COLLEAGUES, OR IMPOSED BY MANAGERS. IT'S LIKE SOME OF THE INTENTIONALLY ENTERPRISEY CODE WRITTEN IN COMMENTS ON OTHER POSTINGS, i.e. A HIGHLY SARCASTIC RESPONSE WELL EARNED BY OTHER WTFS.
If it were a calculator it would suit the old WTF calculator contest. BY DESIGN.
Sheesh.
Admin
[/Spanish vocabulary rant]
============================================
This was written on the Twelfth of Never, right?============================================
Nah -- just use a colloquialism from Québec: "tasunien". (Pronounced tah-zu-nee-ENH [nasal N], from the latter sounds of États Unis [United States].)Admin
[SpellingNazi] You mean cheques? [/SpellingNazi]
Captcha - opto - I opto point out your spelling mistakes while you point out grammar mistakes.
Admin
You can't do it, you a weak bitch, you gotta keep tha PMP hand strong.
Admin
I've only seen 2 developers that write code worse than that, but amazingly most other developers I've worked with aren't that much better. Only about 10% of software developers are worth a shit, while the rest just get in the way. Pathetic.
Admin
My Python version... I wrote this before I saw Gavin's post, then tweaked it a little.
http://pastebin.com/dyeU8ykb
Admin
The first WTF is VB (VB.NET?).
The second WTF is the blatant spelling error.
The third WTF is the ridiculous symbol names.
The fourth WTF is assigning an error message to a 'mode' parameter... I first lost my composure here.
The fifth WTF is the NOP when the first parameter is an empty string, and worse it checks for the condition again after it can't possibly be true!
The sixth WTF is writing the 'mode' to the response stream.
It keeps going and going... What's worse, some of these behaviors are evident in my colleagues' code...
Captcha: tation - The first thing that popped into my head was "tater nation", and for that I'm sure I'm going to Hell.
Admin
I had to write one of these recently. Downloaded one from the Internet and translated it into PHP. Only mine had to be multi-lingual (warning - different languages parse numbers differently). Had to build in a limit of 999,999,999 because America and England can't agree on 1,000,000,000.
Admin
I'd be keen to see the German equivalent of this function.
Admin
I thought you said it had to be multi-lingual?
Admin
Myself, I'd have preferred the use of the SI prefix scheme: gigaquid or terabuck.
Admin
This is a good demonstration of why VB and VB.NET should not exist at all. These supposedly easy-to-handle languages attract a whole lot of idiots who demand they can write code when in fact they don't even know how to turn it off and on again. C++ or C# might have stopped them in time, but they can feel right at home with Basic dialects and squeeze out something that is rather a crime than any use. We will sad examples like this as long as there are programming languages that pretend to be simple.
Admin
Self-documenting functions. Why have sqrt(x) when you could have calculate_the_square_root_of_the_number_you_want_to_get_the_square_root_of_which_is_passed_into_this_function(x)
Admin
I've written something like this before (by "Like this" I mean, it had a similar desired output). It was to act as a poor mans speech synthesizer. I needed audio notifications that would read out numbers, so had wav files for 0-20, one for each ten from then to 90 (20, 30, 40...) and then words like "Hundred", "Thousand", "Million" and importantly "And". Then my code would parse an integer and create a queue of which sound files to play. As I recall it took maybe 15 lines of code...
Then again, I'd hate to see what happens when this guy discovers recursion!
Admin
You forgot to say how it's passed to the function? Is it a perimiter? A circumference? What?!? How do you expect people to understand what your function does if you don't name it correctly!??!
Admin
/agree . java modern style function naming inside of VB . how much worse can it get ?
Admin
Admin
As others said it is so hilariously bad it has to be a joke.
But then, if it actually got in the codebase and stayed there, I guess the author was making a point about some WTF going on around.
Admin
You know now that you say that it must be a COBOL conversion. I have seen some (automatic) COBOL to C 'compilers' that would turn the entire DATA DIVISION into one large struct or depending on how it got used elsewhere in the program a union of a few large structs. It was clear no human being evening if they had never written printf("hello world"); before would have come up with it.
Similarly I can't imagine anyone would come up with this naming scheme for functions in BASIC unless they were working with an existing code base, perhaps (hopefully or my faith in humanity will die) automatically generated in some way.
Admin
They use 'special' cheques which have separate pre-printed boxes for each text 'digit,' with a pre-printed 'label' above each box. So for example, 'millions,' hundred thousands,' 'ten thousands,' 'thousands,' 'hundreds,' 'tens,' 'units,' 'pence.'
When the cheque hits the PC (or other) printer, each box has the text for zero to nine (as appropriate) printed into it. Much simpler, and avoids any grammar problems (!).
Admin
My favourite bit is how the example given doesn't even work with the current implementation. get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function("pass_a_number","13,387,281") would return "Exceeds word range."
Admin
Admin
Do you think?
Yeah... I'm not so sure anything about this code makes sense... ;o)
Admin
Admin
i'm a native english english speaker. i try to overlook spelling and grammatical errors in written language (unless it's a proofreading task, or something i have to sign.) communication is the aim; syntax, spelling and punctuation conventions make comprehension easier and misunderstanding less likely (in theory*)
"USian" is twee and cliche, and sounds like someone spelling out "usen." if i had to use "US" instead of "American" (for example, if my audience were pedants or wierdos likely to be respond with the "2 continents" argument regardless of the context) then i'd say "US-esque", just because it sounds nicer; "USian"
as for the OP: it's clearly been written specifically for submission to TDWTF; TRWTF is commenters who don't realise this.
p.s. the captchas are so trivial (and repetitive) that very few robots are incapable of solving them, we should just be thankful they don't deign to comment here.
*In theory, theory is the same as practice. In practice, it is not
Admin
+2
Admin
I've been a reader for a very long time, and this is the best I've seen. I'd call fake, but it'd be very difficult to come up with something this good. Amazing, dazzling, scintillating... awe inspiring! It's so good it goes to eleevn!
BTW (related), if anyone needs a decimal to English currency converter, I have one posted. I was surprised when I looked and couldn't find one before I wrote it.
Admin
It calculates the parameter (2*pi) of the first perimeter. Duh.
Admin
Admin
geoffrey is plain pagal - (crazy).
java has created more value for business. java is not restricted to just business apps, but also used inside your car, your camera, your phone, your alarm clock and everywhere you can care to think of.
So geoffrey is failing in providing any true picture of world.
Admin
[quote=Article] 'Sometimes a 'four' would be outputted when '5' was passed through the perimeter[/quote] NOW that episode of Star Trek makes sense. Heh. 4 lights....
Admin
I like this section a lot more than the actual conversion:
It is strangely Zen like...
Admin
Admin
Yes, but who buys new beer if the last bottle falls down the wall?
Admin
The American tic of loathing the English defending their language (notice that the Scots, Welsh and Irish won't defend it); and getting confused between Britain and the coutries that make it, is one of the many reasons I loathe Armerican people on the internet.
Admin
Neither COBOL nor PL/I have provided the value of VB in aggregate. While everything may have been running one of those mainframe languages at one time, it was also at a time when total business activity was far lower than it was at the dawn of RAD platforms. Additionally, computing was a far smaller percentage of total business activity. There is a difference between greater reach and value provided.
One could argue that VB broke ground in business computing. Being able to rapidly deploy user-friendly tools for workers' every day tasks, as well as seamless integration with Excel and Access, made Visual Basic a pioneer in the business world.
Admin