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

Win32 Skeleton Solution Uploaded

Last post 04-27-2007 5:55 PM by JasonHise. 18 replies.
Page 1 of 1 (19 items)
Sort Posts: Previous Next
  • 04-24-2007 4:18 PM

    Win32 Skeleton Solution Uploaded

    Just a quick note to let you know that I've updated the Win32 Skeleton Solution; this represents my first (and hopefully) last attempt at Win32 C++ (well, technically C) programming. Kudos to those who actually can do this stuff. The GTK solution is coming soon.

    UPDATE: Link Fixed

  • 04-24-2007 4:57 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    The url given goes to a 404.
     

  • 04-24-2007 6:18 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    The win32 framework does not compile in VS2005 (I'm using the express version.)

     This is because 'user32.lib' is not automatically linked to projects as it was in earlier version of visual studio. The simple solution is to add this library to your project dependancies.

     Dropping the line '#pragma comment( lib, "user32.lib" )' into any cpp file in the project will also take care of it.

     

  • 04-24-2007 6:32 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Also, the WTFs found in the framework should not be counted towards a persons final WTFery! Geez. I've got to fix this thing just so I could stand to fuck it up.
  • 04-24-2007 8:03 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Not related to the GUI but.... If those are the only test cases... I could hard code the values and just have one mamoth if else for these test cases and anyting else could throw a file_not_found error...

     

    Im not going to do this, but if someone does and wins I want 1/2 a laptop...

  • 04-24-2007 8:43 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Isuwen:

    The win32 framework does not compile in VS2005 (I'm using the express version.)

     This is because 'user32.lib' is not automatically linked to projects as it was in earlier version of visual studio. The simple solution is to add this library to your project dependancies.

     Dropping the line '#pragma comment( lib, "user32.lib" )' into any cpp file in the project will also take care of it.

     

     

    On the Getting Started page, there's a link to the MSDN article that explains how to use EXpress editition for Win32 development. This is how I set it up for the skeleton solution.

  • 04-24-2007 8:59 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Would I be allowed to use c++/cli for this, so that the UI is in .NET instead of Win32?  I'd really prefer to spend time making the arithmetic functions obscene rather than spend time learning how to make an antiquated user interface work.  Plus, with cli I could abuse the tracking handles by getting pointers to their values while forgetting to pin them first :)
     

  • 04-24-2007 11:36 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Are we allowed multiple entries? DO we need to use a GUI? Is command line okay?
  • 04-25-2007 1:36 AM In reply to

    • mudyc
    • Not Ranked
    • Joined on 04-25-2007
    • Posts 1

    Re: Win32 Skeleton Solution Uploaded

    Only "=" button needs any code and that sets the display to next value. The values are of course a vector of expected display values.
  • 04-25-2007 10:17 AM In reply to

    Re: Win32 Skeleton Solution Uploaded

    wonkoTheSane:
    Not related to the GUI but.... If those are the only test cases... I could hard code the values and just have one mamoth if else for these test cases and anyting else could throw a file_not_found error...
    I'm sure you're not the only one who had this idea, but so far you're the only one to have spoiled it.
  • 04-25-2007 10:43 AM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Thuktun:
    wonkoTheSane:
    Not related to the GUI but.... If those are the only test cases... I could hard code the values and just have one mamoth if else for these test cases and anyting else could throw a file_not_found error...
    I'm sure you're not the only one who had this idea, but so far you're the only one to have spoiled it.

    Here, here.

    And even if it wasn't a spoiler against those who had thought of it, you've just given away a crucial design idea to those people who hadn't. Now everyone will use this idea, and work on a backup WTFey design that may or may not do anything.

    I know you were just trying to be clever, Wonko... and kudos on you for that... but please, please, please keep your design ideas to yourself. You'll never know who you just screwed out of a laptop by doing it; including yourself.

    "There are 10 kinds of people in this world: Those who can count in binary, and those who can't." -- What? I have to tell you who wrote it? Bah... um... let's say... Socrates. Yeah, that sounds ok.
  • 04-25-2007 1:31 PM In reply to

    • mr_ed
    • Not Ranked
    • Joined on 04-25-2007
    • Posts 1

    Re: Win32 Skeleton Solution Uploaded

    CodeReaper:
    You'll never know who you just screwed out of a laptop by doing it; including yourself.

    Laptop!??!  I want the high-resolution JPEG!!!
     

  • 04-25-2007 1:33 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Thuktun:
    wonkoTheSane:
    Not related to the GUI but.... If those are the only test cases... I could hard code the values and just have one mamoth if else for these test cases and anyting else could throw a file_not_found error...
    I'm sure you're not the only one who had this idea, but so far you're the only one to have spoiled it.

     

     

    That's a pretty poor WTF in my opinion. Not hidden enough. 

  • 04-25-2007 2:00 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Kiasyn:
    Are we allowed multiple entries? DO we need to use a GUI? Is command line okay?

    We really should've answered these questions somewhere.  Like, perhaps a rules page.  For example, the rules page that's linked on every page of the contest site.

    The Rules:
    You may enter as many times as you want, but you can only win one prize (the best prize you’re deemed worthy of).

    Your submission must use a GUI. You can use the one we built or be creative and make the most horrible, hard-to-use calculator you can imagine. But if you need more than a mouse to use the calculator, you should go back to the drawing board. Check the interface requirements page for more information.

  • 04-25-2007 11:41 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    After looking at the rules, I realized that my idea for a solution will probably take too long to run for some of the test cases.  I was planning to make add and subtract O(n) operations (n being the sum of the two operands) that could only work right with integers (yay for the ++ operator), and multiply and divide would be implemented in terms of add, making them O(n^2) at least.  Granted, this would be a blatant rip off of Sheena's Work, so since it is unoriginal and probably not valid to use I thought I'd share.
  • 04-26-2007 4:47 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Maybe i'm a rubbish programmer, but shouldn't the "int *isErr" argument read "int &isErr" instead? That should make it by-reference without opening the pointer can-o-worms.

    Just my $.02 

  • 04-26-2007 7:42 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    well yeah, if you want non-wtf code ;)

    I suspect the framework was written with more of a C mentality, and C doesn't have references. 

  • 04-27-2007 7:29 AM In reply to

    Re: Win32 Skeleton Solution Uploaded

    Pointers aren't wtfs. WTF is wrong with you?
  • 04-27-2007 5:55 PM In reply to

    Re: Win32 Skeleton Solution Uploaded

    They are when 'null' isn't a valid value for the variable to hold.  In C++, mandatory out parameters should be specified as references, not as pointers.
Page 1 of 1 (19 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems