- 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
Great. Only two posts and nobody's whining about who are the finalists... Just some frist psotter and someone (thankfully) telling him off.
Anyway, I'll start the whining. God I hope I'm one of the finalists!
Admin
Here's my submission:
4 x 5 = ?
Admin
I just thank it is funny how many posts got deleted from here, and then to compound that, my response to one is still here when the response to another is gone. I'll never figure out how they decide what to remove and what to keep.
With all that said, how many finalist are there? More than five apparently but how many?
Admin
I would guess that since it is a twelve article series that they narrowed it down to twelve finalists. Just a guess.
Admin
well, since he said it was a twelve article series, I presume twelve. Unless some are just so bad that they demand three articles in themselves!
Admin
Well, before I got busy at work I had planned to write a calculator with all possible answers hard-coded in a giant switch statement (I had started writing a script to generate the switch statement for me to paste into the program). If some entrants had better ideas than that maybe it will take a few articles each to explain them.
Admin
Yeah just a guess, and a good one, but it is possible that he could present more than one in each article. I doubt it, but it is possible.
Admin
I really hope that somebody took a picture of a desk calculator on a wooden table, and used that for their interface. That's what I planned to do, but never got around to it due to time constraints.
Admin
A switch statement? Better would be to make each one its own if block.
Admin
I'd have probably called the function getPaula(), and put it in brillant.c, but as I said, I was too busy with conference for such fun...
Admin
I think everyone had the idea of using a switch statement, but that's not nearly extensible enough.
Putting the answers of the test cases in a (poorly documented) Access database, now that's extensible!
Admin
I expecting the winning solution to have most of its code stored in XML files and being relayed through Excel spreadsheets.
Admin
I was going to do it, but they took so long getting the GTK+ skeleton out the door that my ADHD kicked in and I moved on to other things.
My calculator was going to use the "system()" function to call wget/curl/netcat/something to use Google's calculator feature, saving the results to a temporary file. The program would then open the file and read the entire thing into a character array. Indexing one character at a time, it was going to use strncmp() to find the result. If no result could be found, the error result would be returned.
But, as I said, I lost interest.
Admin
I didn't have time, or I would've coded the calculator using a college project I had done. We programmed an entire CPU/ALU/etc emulator that took its own microcode. I had planned on having what would surely be a very confusing UI involving a wooden table generate the microcode that was fed into the emulator.
And because the emulator was coded in my college days in ADA then translated as a means to learn C++, it is chock full of WTF-worthy code.
Too bad I didn't have more time to spare :/
Admin
Hey that was my idea! I actually ended up running popen("perl ...").
Admin
I spent several weeks on the project. I had regular status meetings, and I let myself know that things were going great! That it was almost done, just a few more tweaks here and there.
When it came time to submit everything I discovered I only written:
#include "stdio" int main() { printf("I are brilant"); exit(1); }
Then I left a note to myself on a wooden table "I focked up"
Admin
LOL TEH WINNAR
Admin
so if it is so hard to pick one finalist, could you get the entrants to agree that the macbook/vaio should be broken up into ten ipods (or something of similar value, dunno what the kids like these days) so that you could handle ties more easily?
Admin
shell out to system(), generate program and compile it, store answers in database, switch statement... yawn...
didn't anybody come up with anything interesting?
Admin
I did not make up anyting horribly clever, but I do hope I had pretty bad bug/codeline ratio... Reading some peoples descriptions of their calculators, I have about snowballs chance in hell in being a finalist :D
Admin
Have the finalists been emailed? Is there any way to find out in advance that you're not a finalist?
Admin
I thought of putting in a submission with the test values entered in the code in a constant array and checked, but thought it was too obvious and am sure someone else did it, so didn't bother.
Admin
Admin
I got an email from Alex saying that I was a finalist. So if you didn't get the email, you're probably not a finalist.
Admin
That's what I had in mind first. But then I figured I could read the results from the worsethanfailure.com site, where the testcases are presented (with the correct answer). The reason why I didn't bother to do it is that I had the feeling that I was going to be annoyed by the wtf-preference of the jury.
To captcha test: I AM a robot. But I can read, see? :)
Admin
Oh well... I suppose now I can post all about my implementation.
Admin
I didn't enter, but what I wanted to do was pop up a window with an abacus in it, do the calculation and then return the answer to the calculator.
Then I thought that I should spend the time with my kids.
Admin
I sort of did. I didn't have a suitable calculator to hand so I photographed the closest looking object I could find at short notice. A keyboard suitably modified with a felt tip pen:
[image]Admin
i was going to enter, and i would have written this amaaaaazingly bad code that like, so tewtally would have won and there would only have been ONE finalist.
but then i remembered that i didn't write anything so i didn't enter, so i'm just going to sit back and enjoy the competition entries instead
:P
Admin
Why'd you cross out the decimal point key?
Admin
unfortunately derivative
http://www.ioccc.org/
Goals of the Contest
Obfuscate: tr.v. -cated, -cating, -cates. 1. a. To render obscure. b. To darken. 2. To confuse: his emotions obfuscated his judgment. [LLat. obfuscare, to darken : ob(intensive) + Lat. fuscare, to darken < fuscus, dark.] -obfuscation n. obfuscatory adj
Admin
"[T]he goal of the OMGWTF contest is not to flex your algorithmic muscles and solve some abstract computational problem like you might in an ACM contest. Nor is it like the International Obfuscated C Coding Contest; in fact, writing code like that would be a surefire way to lose this contest. Instead, the goal of the OMGWTF contest is to solve an incredibly simple problem using the most obscenely convoluted way imaginable."
Yes, complexity can be a form of obfuscation, but not when it's managed properly. A good entry to this competition may be complex, but it won't be obfuscated.
Admin
Because the specification for the calculator only requires you to enter whole numbers. Therefore I didn't need to implement a decimal place key. In fact non of my maths functions can actually handle decimal points. Even the division function moves the decimal place to the right so that all the numbers are whole, including the answer, then moves the decimal place back after the calculation. All my maths is done via string manipulation, there are no numbers involved.
Admin
I never got around to making it because of school, but I was going to have mine connect to the OMGWTF website and download the list of test cases and use those as answers.