|
Next competition idea
Last post 04-28-2008 8:16 AM by Welbog. 26 replies.
-
05-20-2007 3:30 AM
|
|
-
Jivlain


- Joined on 09-28-2006
- Posts 43
|
So.... can the next OMGWTF contest be to write some sort of boring CRUD app? While I couldn't think up enough good ideas to warrant an entry in this one, my current project has so many WTFs it's not funny :) (yes, I will post about it later. Let it finish first. We don't want to miss any of the juicy, juicy fruit)
http://jivlain.wordpress.comYes, it does control my brain. Why do you ask?
|
|
-
-
gunny


- Joined on 05-20-2007
- Posts 7
|
Re: Next competition idea
As it seems as we are going through basic Windows programs, a Notepad like text editor seems likely. Personally I'd like to something with a different language, maybe something like Python, the idea being to really push the language: mini operating system anyone?
|
|
-
-
Xeron


- Joined on 04-28-2007
- Posts 14
|
Re: Next competition idea
Ooh. A WTF operating system would be great, especially if you could code it in any language you like. <inevitable jibe> Microsoft would win, though. </inevitable jibe>
|
|
-
-
asuffield


- Joined on 05-31-2006
- Posts 2,137
|
Re: Next competition idea
Xeron:Ooh. A WTF operating system would be great, especially if you could code it in any language you like. <inevitable jibe> Microsoft would win, though. </inevitable jibe>
You have clearly never used MVS / OS/390. Even "Windows for Warships" does not compare. It is the system which inspired the widespread use of COBOL as a simpler, saner approach to programming. It does not have anything resembling the filesystems you know. (Its descendant z/OS is somewhat less inspired by psychotic zombie trolls, and IBM has abandoned support for the older versions in disgust - sometimes, the kindest thing you can do with a legacy system is to take it out behind the barn and set it on fire)
|
|
-
-
Einsidler


- Joined on 11-15-2006
- Posts 99
|
Re: Next competition idea
asuffield:It is the system which inspired the widespread use of COBOL as a simpler, saner approach to programming.
OH MY GOLD, WHAT THE FUCK!?!? (I said 'gold' instead of 'god' because that statement proves there is no god)
Download my OMGWTF entry, Romanorum Computus
|
|
-
-
Worf


- Joined on 05-15-2007
- Posts 14
|
Re: Next competition idea
Let's stick to simple tasks, because it's always more fun to see how one can mess up even the simplest task. Complex tasks bring complexity that may be unavoidable. E.g., the calculator app is perfect, since it's a generic simple task, but as everyone has seen, you can screw it up very badly. Which is the essence of a WTF. Maybe we could do a text-based one. Given a text file, process it in some way, say word-wrapping. Or go with some fundamental CS type problems - searching, sorting, queues, deques (double-ended queues), stacks, etc. It's quite endless just how one really can mess up a simple queue.
|
|
-
-
Dark Shikari


- Joined on 04-25-2007
- Posts 94
|
Re: Next competition idea
Worf:Let's stick to simple tasks, because it's always more fun to see how one can mess up even the simplest task. Complex tasks bring complexity that may be unavoidable. E.g., the calculator app is perfect, since it's a generic simple task, but as everyone has seen, you can screw it up very badly. Which is the essence of a WTF. Maybe we could do a text-based one. Given a text file, process it in some way, say word-wrapping. Or go with some fundamental CS type problems - searching, sorting, queues, deques (double-ended queues), stacks, etc. It's quite endless just how one really can mess up a simple queue.
How about a bubblesort?
|
|
-
-
Worf


- Joined on 05-15-2007
- Posts 14
|
Re: Next competition idea
Dark Shikari:
Ooh, I think that would be nice. There are plenty of ways to screw something as conceptually simple as bubblesort. Perhaps somehow magically turning it into exponential complexity? (That, I think, is the essence of a WTF here. Something conceptually simple, done in outrageous ways, and yet, anyone with a tiny amount of clue knows the obvious answer)
|
|
-
-
-
death


- Joined on 05-21-2007
- Posts 123
|
Re: Next competition idea
Something from the realm of databases would be GREAT! So those of us that arent that clever in C but do like DB-ing could have a chance...
So all know who I am: MasterPlanSoftware:
Congratulations you are the TRWTF.
|
|
-
-
rev


- Joined on 08-10-2006
- Posts 20
|
Re: Next competition idea
death:Something from the realm of databases would be
GREAT! So those of us that arent that clever in C but do like DB-ing
could have a chance...
How about an phone/address book? That would leave plenty of room for WTFs.
|
|
-
-
Massimo


- Joined on 04-25-2007
- Posts 84
|
Re: Next competition idea
rev:How about an phone/address book? That would leave plenty of room for WTFs.
That's an absolutely great idea!
|
|
-
-
Thuktun


- Joined on 08-29-2005
- Posts 65
|
Re: Next competition idea
Dark Shikari:How about a bubblesort?
How about a task that involves sorting, but doesn't specified the sort algorithm? Then you get the added ability to come up with your own clever sorting algorithm. Or in case you have crappy sorting algorithms and/or implementations, maybe sort multiple times with multiple algorithms and choose the most frequently-chosen result.
Stating that you have to implement a bubble sort seems unnecessarily restrictive.
|
|
-
-
Worf


- Joined on 05-15-2007
- Posts 14
|
Re: Next competition idea
Einsidler: Dark Shikari:
:D
Bah, that's a stupid implementation of bubblesort. Good implementations do the swap without a temporary variable. (For a WTF-iness definition of "good". Swapping without temporary variables is a standard technique when RAM was scarce, so it was good then, but it's a great way to confuse people now since its not obvious. Plus, saving the 4 bytes of RAM a float takes for the extra complexity in the code...)
|
|
-
-
Einsidler


- Joined on 11-15-2006
- Posts 99
|
Re: Next competition idea
Worf: Einsidler: Dark Shikari:
:D
Bah, that's a stupid implementation of bubblesort. Good implementations do the swap without a temporary variable. (For a WTF-iness definition of "good". Swapping without temporary variables is a standard technique when RAM was scarce, so it was good then, but it's a great way to confuse people now since its not obvious. Plus, saving the 4 bytes of RAM a float takes for the extra complexity in the code...)
At least your way might actually work...
Download my OMGWTF entry, Romanorum Computus
|
|
-
-
pitchingchris


- Joined on 04-30-2007
- Elizabethtown, KY
- Posts 360
|
Re: Next competition idea
I agree we should keep it simple... if we go overboard on complexity, who knows how long it will take to judge the submissions ? I think the calculator was a good start and got peoples minds churning. But if we went as far as trying to write an OS, could you imagine the time that it would take to evaluate and test, and judge ?
|
|
-
-
Dark Shikari


- Joined on 04-25-2007
- Posts 94
|
Re: Next competition idea
Worf: Einsidler: Dark Shikari:
:D
Bah, that's a stupid implementation of bubblesort. Good implementations do the swap without a temporary variable. (For a WTF-iness definition of "good". Swapping without temporary variables is a standard technique when RAM was scarce, so it was good then, but it's a great way to confuse people now since its not obvious. Plus, saving the 4 bytes of RAM a float takes for the extra complexity in the code...)
A XORswap isn't WTFy at all I would think...
|
|
-
-
Atrophy


- Joined on 02-28-2007
- Posts 46
|
Re: Next competition idea
So I was thinking maybe we invert the contest format next time... instead of giving a simple problem and coming up with WTF algorithms to solve it, we give an algorithm and look for its most inappropriate use... ie using a bubblesort to make some sort of clock, or Breadth First Search to implement a text editor... etc... or alternatively everyone tries to come up with the most useless program of all time... digital sundial(which requires a solar panel hooked up to your serial port) or Roman Numeral Clock, or Morse Code Text Editor(you're only allowed to type with the . and - keys), etc.
|
|
-
-
TheFeshy


- Joined on 05-04-2007
- Posts 12
|
Re: Next competition idea
So I was thinking maybe we invert the contest format next time...
instead of giving a simple problem and coming up with WTF algorithms to
solve it, we give an algorithm and look for its most inappropriate
use... ie using a bubblesort to make some sort of clock, or Breadth
First Search to implement a text editor.
Oh, good. If we do that, I can use the same entry as this contest. I implemented my calculator as a std::stringbuffer. It seemed like a reasonable place to put all the client/server code, script language interpreter, and XML parser to me at the time. btw, did you know that the locale and imbue functionality built into c++ io streams makes a great event system?
|
|
-
-
asuffield


- Joined on 05-31-2006
- Posts 2,137
|
Re: Next competition idea
TheFeshy:btw, did you know that the locale and imbue functionality built into c++ io streams makes a great event system?
Yes, but it's much neater to use a deque of objects (not pointers to objects) and abuse their constructors/destructors (the event loop being something like while (1) queue.pop_front();). You can do all kinds of interesting things with STL containers and functionality embedded in the copy constructor and destructor.
|
|
-
-
Atrophy


- Joined on 02-28-2007
- Posts 46
|
Re: Next competition idea
I've got another one... smallest executable contest. No offloading your stuff to a webserver somewhere... everything has to be done inside of the executable, and you gotta make a... whatever. Analog clock sounds like a fun one. It'd have to graphically display an analog clock which shows the current system time, including a second hand. Extra credit if you add a millisecond hand...
|
|
-
-
-
Random832


- Joined on 05-09-2007
- Posts 434
|
Re: Next competition idea
Dark Shikari: Worf: Einsidler: Dark Shikari:
:D
Bah, that's a stupid implementation of bubblesort. Good implementations do the swap without a temporary variable. (For a WTF-iness definition of "good". Swapping without temporary variables is a standard technique when RAM was scarce, so it was good then, but it's a great way to confuse people now since its not obvious. Plus, saving the 4 bytes of RAM a float takes for the extra complexity in the code...)
A XORswap isn't WTFy at all I would think...
Who said anything about XOR? (though, if you think XORswap isn't WTFy, you must be a Real Programmer)
a += b; b -= a; a += b; b = -b
Why make it all complicated by doing addresses and casts when dealing with a type that can't XOR? This is so much simpler. And so much more WTF. And, yes, I verified it. Though there may be some pathological cases w/ rounding errors I haven't accounted for.
|
|
-
-
Goplat


- Joined on 03-22-2006
- Posts 54
|
Re: Next competition idea
Worf:Good implementations do the swap without a temporary variable. (For a WTF-iness definition of "good". Swapping without temporary variables is a standard technique when RAM was scarce, so it was good then, but it's a great way to confuse people now since its not obvious. Plus, saving the 4 bytes of RAM a float takes for the extra complexity in the code...)
Unless you're using a VAX, you can't operate on two memory locations at once without a temporary. The xor-swap trick is useless, it just generates worse code and ends up using temporaries anyway. This is what gcc generates for { int tmp = foo; foo = bar; bar = tmp; } movl _foo, %edx movl _bar, %eax movl %eax, _foo movl %edx, _bar This is what it generates for { foo ^= bar; bar ^= foo; foo ^= bar; } movl _bar, %eax movl %eax, %edx xorl _foo, %edx xorl %edx, %eax movl %eax, _bar xorl %eax, %edx movl %edx, _foo
|
|
-
-
djmaze


- Joined on 04-19-2008
- Posts 12
|
Re: Next competition idea
Must be something simple? C/C++ - Directory tree
- Trayicon with: logout, suspend, shutdown
DB + any code language - Output a day range from a table no matter if the day has entries or not (like agenda/calendar ouput view)
The DB one is funny i've seen so many WTF's about this one with people having solutions to output each day with occasional entries in each :) It also can be done on so many ways!
|
|
-
-
Nandurius


- Joined on 05-15-2006
- Posts 324
|
Re: Next competition idea
I hate to state the obvious, but we need a desktop search competition.
|
|
-
|
|