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

GUIs, guys

Last post 05-25-2007 11:36 AM by DAL1978. 41 replies.
Page 1 of 1 (42 items)
Sort Posts: Previous Next
  • 05-16-2007 9:11 AM

    GUIs, guys

    My GUI was nothing special, just a hacked-up version of the skeleton structure that has different little pictures come up when the user presses buttons.

      How cute are these rabbits?

    Anyway, what kind of WTFs did everyone else get up to in their GUIs?

    Download my OMGWTF entry, Romanorum Computus
  • 05-16-2007 9:56 AM In reply to

    Re: GUIs, guys

    I also used the standard GUI, but introduced a subtle bug that would randomly shuffle the buttons. Naturally, all the buttons still work correctly... if you can find them ;)
  • 05-16-2007 10:01 AM In reply to

    Re: GUIs, guys

    I used the Skeleton Solution unmolested. My WTFery was in the means by which the answers were calculated.
    Agile Team-Oriented Waterfall-Centric Cowboy Coder.
  • 05-16-2007 10:04 AM In reply to

    Re: GUIs, guys

    I added a file "menu" with one entry: "quit". If the user tries to close the app it shows a message window with an error. If the user closes this window another one appears and so on..

     

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

    Re: GUIs, guys

    Chemisor:
    I also used the standard GUI, but introduced a subtle bug that would randomly shuffle the buttons. Naturally, all the buttons still work correctly... if you can find them ;)

     

    Not to be rude, but if you explicitly added code to move around the buttons, is it really a bug?  IE does the code seem to have a different intent and fail at achieving it and instead the outcome is that it shuffles the buttons?  If so, good job.  Otherwise, I don't really see how it's a bug.  You just added code to shuffle the buttons, which works as intended.

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

    • phaedrus
    • Top 500 Contributor
    • Joined on 03-20-2007
    • Seattle Ex-Pat living in the Bay Area
    • Posts 111

    Re: GUIs, guys

    The GTK one wasn't ready when my engine was, and it wouldn't run on Windows.  I was kinda hoping to do all my development on Linux+WINE and then have the submission run on Windows, but non-portable ended up being my watch-word.  So, I wrote my interface in Xlib and libXpm[1]: My Calculator

    That's right.  It's an XPM that I #include.  I didn't have to take a screen shot, I just converted it to PNG and uploaded.  Faux Wood Background comes standard.

     (And yes, I know the buttons aren't straight.  Don't point it out.)

    NOTES: [1] They posted the GTK skeleton about an hour before I submitted, and just after I had finished my Xlib/XPM code.  I think that was just to spite me. 

    All men are frauds. The only difference between them is that some admit it. I myself deny it.
    -- H. L. Mencken
  • 05-16-2007 10:10 AM In reply to

    • phaedrus
    • Top 500 Contributor
    • Joined on 03-20-2007
    • Seattle Ex-Pat living in the Bay Area
    • Posts 111

    Re: GUIs, guys

    Oh, and there are some good, honest WTFs in that Xlib code.  Since I've never written Xlib code before (I'm a system software guy, I'm comfortable doing command line, socket, drivers and raw, unitialized, machine code programming).  I realized one big bug in the interface feedback code (the screen flashes when you hit an operation or the clear button).  I started scrolling through the code to fix it, and thought, WTF am I doing?  Wrote a comment, left the algorithm as is, and fixed it the Wrong Way(tm).  It was very satisfying.
    All men are frauds. The only difference between them is that some admit it. I myself deny it.
    -- H. L. Mencken
  • 05-16-2007 10:24 AM In reply to

    Re: GUIs, guys

    th0mas:
    Not to be rude, but if you explicitly added code to move around the buttons, is it really a bug?  IE does the code seem to have a different intent and fail at achieving it and instead the outcome is that it shuffles the buttons?  If so, good job.  Otherwise, I don't really see how it's a bug.  You just added code to shuffle the buttons, which works as intended.

    You'd be surprized how hard it was to innocently shuffle buttons :) It finally took abuse of several global variables, a partially implemented feature, sneaky (but fully justified) bitfield structures, and a multistep buffer overflow cascade to make it all work, to make it look totally baffling in the debugger, and to confuse code analysis tools. 

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

    Re: GUIs, guys

    Chemisor:

    th0mas:
    Not to be rude, but if you explicitly added code to move around the buttons, is it really a bug?  IE does the code seem to have a different intent and fail at achieving it and instead the outcome is that it shuffles the buttons?  If so, good job.  Otherwise, I don't really see how it's a bug.  You just added code to shuffle the buttons, which works as intended.

    You'd be surprized how hard it was to innocently shuffle buttons :) It finally took abuse of several global variables, a partially implemented feature, sneaky (but fully justified) bitfield structures, and a multistep buffer overflow cascade to make it all work, to make it look totally baffling in the debugger, and to confuse code analysis tools. 

    haahahahaha.  good god.  You should enter the obfuscuated C contest.  I lost when I entered, but then again I hid my machine code so well that the judge didn't find it until after I complained that in his analysis of my entry he was totally ignorant to what I had done. 

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

    • IMil
    • Not Ranked
    • Joined on 05-26-2006
    • Posts 30

    Re: GUIs, guys

    Most of the code revealed by other contestants doesn't leave me any hope for a hi-res JPG, but I do expect an honorable mention for nonstandard GUI.

    Has anyone else created a calculator with handwriting input?

     

    Here the top area is for user input (drag mouse in green square to edit current image, in the yellow - to start a new one), below it the stream of recognized characters is displayed and the bottom shows the result of calculation.

    A keypad is provided for the impatient ones (first of all for the judges, as they have to enter more characters then any other sane user will).

    Unfortunately, the recognition is unusable for any practical application. The program only classifies shapes as lines, circles or segments, so you have to input "5" in three distinct strokes. And somehow even I have difficulties drawing "6" so that the program recognizes it properly. Weird...
     

  • 05-16-2007 11:03 AM In reply to

    • phaedrus
    • Top 500 Contributor
    • Joined on 03-20-2007
    • Seattle Ex-Pat living in the Bay Area
    • Posts 111

    Re: GUIs, guys

    IMil:

    Here the top area is for user input (drag mouse in green square to edit current image, in the yellow - to start a new one), below it the stream of recognized characters is displayed and the bottom shows the result of calculation.

    A keypad is provided for the impatient ones (first of all for the judges, as they have to enter more characters then any other sane user will).

    Unfortunately, the recognition is unusable for any practical application. The program only classifies shapes as lines, circles or segments, so you have to input "5" in three distinct strokes. And somehow even I have difficulties drawing "6" so that the program recognizes it properly. Weird...

    Wow, Dude.  That makes mine look polished.  Very nice.

     

    All men are frauds. The only difference between them is that some admit it. I myself deny it.
    -- H. L. Mencken
  • 05-16-2007 11:03 AM In reply to

    • Zor
    • Not Ranked
    • Joined on 05-14-2007
    • Posts 7

    Re: GUIs, guys

    I cant do a screenshot too easily now, but my calculator is a console app with a simulated Windows style GUI. It never creates it's own window, so it hijacks the console window. Well, actually, it will hijack anything with the program's name in the title, which is great. I wrote most of the drawing code - using only the SetPixel and FillRect functions in the Windows API. For drawing the text, I wrote sort of a genetic algorithm that tries to generate lines that cover a font template. So, the text is a bit scribbly, which is also great.
  • 05-16-2007 11:07 AM In reply to

    • phaedrus
    • Top 500 Contributor
    • Joined on 03-20-2007
    • Seattle Ex-Pat living in the Bay Area
    • Posts 111

    Re: GUIs, guys

    th0mas:
    Chemisor:

    th0mas:
    Not to be rude, but if you explicitly added code to move around the buttons, is it really a bug?  IE does the code seem to have a different intent and fail at achieving it and instead the outcome is that it shuffles the buttons?  If so, good job.  Otherwise, I don't really see how it's a bug.  You just added code to shuffle the buttons, which works as intended.

    You'd be surprized how hard it was to innocently shuffle buttons :) It finally took abuse of several global variables, a partially implemented feature, sneaky (but fully justified) bitfield structures, and a multistep buffer overflow cascade to make it all work, to make it look totally baffling in the debugger, and to confuse code analysis tools. 

    haahahahaha.  good god.  You should enter the obfuscuated C contest.  I lost when I entered, but then again I hid my machine code so well that the judge didn't find it until after I complained that in his analysis of my entry he was totally ignorant to what I had done. 

    Shouldn't that be bonus points if even the judges cannot figure out what you're doing?  I mean, really, it is the International OBFUSCATED C Coding Contest, if the judges can't even figure it out, you've done a spectacular job...

    All men are frauds. The only difference between them is that some admit it. I myself deny it.
    -- H. L. Mencken
  • 05-16-2007 11:27 AM In reply to

    • macavenger
    • Not Ranked
    • Joined on 05-15-2007
    • Fairbanks, AK
    • Posts 7

    Re: GUIs, guys

    My "colorful and innovative" two-button interface (scaled down to 50%):

     Calculator Interface

    You press the left button until the top box displays the number/operation you want, then you press the right button to enter it. That warning dialog pops up every time you press the enter button. As an added bonus, the calculator opens full-screen (at least in some window managers), and every time you press the left "select" button, you have a one-in-fifty chance of getting a pop-up telling you that you need to award me the prize in the contest :) No, the rulers aren't there for any purpose- I figured useless GUI widgets qualified as worse than failure :) I considered randomizing the order of the numbers/operations in the selection box each time you entered one, but decided that would be too cruel... :p

    Aluminum iMac 20" C2D 2.4 GHz/300 GB/3 GB
  • 05-16-2007 11:32 AM In reply to

    Re: GUIs, guys

    IMil:

    Most of the code revealed by other contestants doesn't leave me any hope for a hi-res JPG, but I do expect an honorable mention for nonstandard GUI.

    Has anyone else created a calculator with handwriting input?

      [ Image ]

    Here the top area is for user input (drag mouse in green square to edit current image, in the yellow - to start a new one), below it the stream of recognized characters is displayed and the bottom shows the result of calculation.

    A keypad is provided for the impatient ones (first of all for the judges, as they have to enter more characters then any other sane user will).

    Unfortunately, the recognition is unusable for any practical application. The program only classifies shapes as lines, circles or segments, so you have to input "5" in three distinct strokes. And somehow even I have difficulties drawing "6" so that the program recognizes it properly. Weird...
     

    Only if you count mouse gestures as handwriting... I used libstroke for that.

    The code, OTOH, is very clean and just _might_ compile on Windows. Whoever would want to do that, though, is beyond me. 

  • 05-16-2007 12:37 PM In reply to

    • todd
    • Not Ranked
    • Joined on 04-29-2007
    • Posts 9

    Re: GUIs, guys

    Screenshot

     

    The gui is done entirely in xlib, the 3D buttons and display box are done by drawing slightly offset and different colored rectangles.  The letters are drawn with arcs, lines , and rects.

     

    The animated little dudes and animated scissors jump from button to button and if you click a button they are standing on (thus depressing it) they fall through to the button underneath .  You can also click and drag the dudes and scissors around the screen, dropping them off at the top if you like to watch them jump/fall as they make their way to the bottom.

  • 05-16-2007 12:45 PM In reply to

    Re: GUIs, guys

    And you wrote that in C/C++? 'Cause it looks suspiciously like you used Lisp...
    Agile Team-Oriented Waterfall-Centric Cowboy Coder.
  • 05-16-2007 12:48 PM In reply to

    • todd
    • Not Ranked
    • Joined on 04-29-2007
    • Posts 9

    Re: GUIs, guys

    It's written in C++.  The CPU Simulator is written in a language I made up for the contest that resembles lisp.  Then I wrote an interpreter for the language in C++.  So arithmetic expressions get compiled to assembly, optimized, simulated by a CPU emulator written in the lisp like language, which is being interpreted by the lispy language interpreter; which is written in C++.
  • 05-16-2007 12:50 PM In reply to

    Re: GUIs, guys

    Some of these are scary, but here's mine: I used to just have a ordinary solution, but had time to hack up a weirder one.  This one borrows inspiration from Mathematica (emphasis theirs) in creating a notebook-like interface, except that you can't interact with mine (95% of the text is tagged as uneditable).  The input palette is structured like the number pad on my keyboard minus one little button arrangement bug when I was making a mock-up.

    As a side note, no "configuration" is done, it just uses uname() and getenv() when it boots up.
     

     
     

  • 05-16-2007 2:01 PM In reply to

    Re: GUIs, guys

    I considered making one like Dasher, but this was also due at the exact same time as my semester OS project we decided to implement a completely different way a week and a half ago, so I didn't get anything in.

     

     It's actually a lot more intuitive and easier to use then you might think.
     

  • 05-16-2007 2:22 PM In reply to

    Re: GUIs, guys


    Yes, that's an "accuracy" slider at the bottom.  And the top brown box, if you can't tell, is a progress bar.  Neither has any actual function in this iteration of the code, but they were both used in an earlier version, as was the random-number generator.
  • 05-16-2007 3:02 PM In reply to

    Re: GUIs, guys

    My GUI was pretty much standard, but I'm sharing this screenshot from development:

    220 Documents 13.2 MB 

    Briefcase is Lord!
  • 05-16-2007 3:22 PM In reply to

    • IMil
    • Not Ranked
    • Joined on 05-26-2006
    • Posts 30

    Re: GUIs, guys

    phaedrus:
    Wow, Dude.  That makes mine look polished.  Very nice.

    Well, I was going to make the GUI a little more intuitive, perhaps add a few labels or something, but the deadline came unexpectedly, as always.

  • 05-16-2007 3:46 PM In reply to

    Re: GUIs, guys

    I decided to stick with the skeleton Windows GUI.  I used a combination of DirectInput and WindowFromPoint() to handle the button clicks, though.
  • 05-16-2007 4:07 PM In reply to

    • buggy
    • Not Ranked
    • Joined on 05-09-2007
    • Posts 5

    Re: GUIs, guys

    This one goes to eleven. 

  • 05-16-2007 5:45 PM In reply to

    Re: GUIs, guys

    No screenshot here, but I did the simplest (and most annoying) GUI I could think of in GTK.  The window only has a text box.  It starts out with a 0 in it, and to cycle through the numbers and operators you right-click on the text box (it originally was done by middle-click, but I felt ready to break something after just trying to enter 1+1= a few times, so I thought I'd spare the testers).  It goes quickly and occasionally will skip a number or two, to add to the annoying-ness.  To insert the number/operator/whatever, you then minimize the window.  It automatically calculates it when you enter an '=' by getting the result from the server program, which uses a hardcoded list of strings for the test cases...but that's a different story.