The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Next competition idea

Last post 04-28-2008 8:16 AM by Welbog. 26 replies.
Page 1 of 1 (27 items)
Sort Posts: Previous Next
  • 05-20-2007 3:30 AM

    Next competition idea

    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.com

    Yes, it does control my brain. Why do you ask?
  • 05-20-2007 8:57 AM In reply to

    • gunny
    • Not Ranked
    • 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?
     

  • 05-20-2007 11:37 AM In reply to

    • Xeron
    • Not Ranked
    • 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>



     

  • 05-20-2007 3:42 PM In reply to

    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)

  • 05-20-2007 8:01 PM In reply to

    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
  • 05-20-2007 8:26 PM In reply to

    • Worf
    • Not Ranked
    • 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.
     

  • 05-20-2007 10:49 PM In reply to

    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? 

  • 05-21-2007 3:50 AM In reply to

    • Worf
    • Not Ranked
    • Joined on 05-15-2007
    • Posts 14

    Re: Next competition idea

    Dark Shikari:

    How about a bubblesort? 

    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)
     

  • 05-21-2007 4:39 AM In reply to

    Re: Next competition idea

    Dark Shikari:

    How about a bubblesort? 

    :D

    Download my OMGWTF entry, Romanorum Computus
  • 05-21-2007 6:04 AM In reply to

    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.

  • 05-21-2007 10:16 AM In reply to

    • rev
    • Not Ranked
    • 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.

  • 05-21-2007 12:28 PM In reply to

    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!

     

  • 05-21-2007 2:18 PM In reply to

    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.

  • 05-21-2007 6:16 PM In reply to

    • Worf
    • Not Ranked
    • Joined on 05-15-2007
    • Posts 14

    Re: Next competition idea

    Einsidler:
    Dark Shikari:

    How about a bubblesort? 

    :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...) 

  • 05-21-2007 8:40 PM In reply to

    Re: Next competition idea

    Worf:
    Einsidler:
    Dark Shikari:

    How about a bubblesort? 

    :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
  • 05-24-2007 10:03 AM In reply to

    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 ?
  • 05-24-2007 10:23 AM In reply to

    Re: Next competition idea

    Worf:
    Einsidler:
    Dark Shikari:

    How about a bubblesort? 

    :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...
  • 05-24-2007 4:27 PM In reply to

    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.
  • 05-24-2007 5:37 PM In reply to

    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?

  • 05-24-2007 6:43 PM In reply to

    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.

  • 05-31-2007 10:34 AM In reply to

    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...
  • 05-31-2007 11:03 AM In reply to

    • Xeron
    • Not Ranked
    • Joined on 04-28-2007
    • Posts 14

    Re: Next competition idea

    Size coding is not necessarily a WTF, and if you're interested in size coding, check out:

     

    Small intros on pouet.net



     

     

  • 06-05-2007 11:09 AM In reply to

    Re: Next competition idea

    Dark Shikari:
    Worf:
    Einsidler:
    Dark Shikari:

    How about a bubblesort? 

    :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.
     

  • 06-07-2007 3:48 PM In reply to

    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

  • 04-27-2008 5:53 PM In reply to

    Re: Next competition idea

    Must be something simple?

    C/C++ 

    1. Directory tree
    2. Trayicon with: logout,  suspend, shutdown

    DB + any code language

    1. 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!
  • 04-28-2008 2:17 AM In reply to

    Re: Next competition idea

     I hate to state the obvious, but we need a desktop search competition.

  • 04-28-2008 8:16 AM In reply to