Thread: Wanna see a magic trick... instructions inside

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    73

    Exclamation Wanna see a magic trick... instructions inside

    I call it the magical dissapearing file trick. Heres how it works.

    1. Spends days writing source code.
    2. Work on it, compile it, build it about 50 times.
    3. Save it atleast 25 times.
    4. Post a question regarding it on a forum (Cprogramming.com will suffice).
    5. Close your compiler.
    6. Leave computer for 3 mins to get some food. (Note no-one can go near your computer during this step)
    7. Come back to computer.
    8. Open project and receive a "Could not load all files" error.
    9. Double-click on "Main.cpp" to continue working.
    10. Receive "File not found. Would you like to create it" error.
    11. Scratch head and wonder WTF.
    12. Look in directory and notice it is nowhere to be found.
    13. Search all directories and notice it is nowhere to be found.
    14. Search recycle bin and notice it is nowhere to be found.
    (optional) 15. Cry.
    16. Finnally, say the magic words (Bit#$, A$$, FU%$, DAM$) and wave your magic wand (middle finger).

    Tada! Enjoy!


    I've been programming for 6-7 years and never had such athing happen.. what the hell? I didn't delete it.. I was just working on it but 5 mins ago.. recycle bin empty.. where did it go? WHY! and WHY! the main.cpp of all files... CRUEL!!
    Last edited by Deo; 06-11-2005 at 11:55 AM.

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    I ate it.

  3. #3
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    if im not mistaken this is a known bug in MSVC 6, when the file saves theres an error(silent) and the file(as far as i know ONLY main.cpp) just "magically" disappears... happened to me before... TUNS of FUNS!!!
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  4. #4
    He's trying.
    Join Date
    Apr 2005
    Location
    Missouri, US
    Posts
    70
    That seems like kind of a sick thing to do as a magic trick.

    (Sorry man...Hope you didn't lose too much.)

  5. #5
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Its punishment for using windows as a development platform

  6. #6
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    It's punishment for not using a source control system and backing up properly. I recommend the book "Programmer to Developer" by Mike Gunderloy, it covers everything from picking a source control system and using it effectively, to nightly builds, planning, creating installers and tracking bugs. The stuff you won't just learn in school.

    For a source control system I recommend SourceGear Vault (http://www.sourcegear.com, commercial but free for single users, requires SQL Server, but you can use the 70MB MSDE free version of SQL Server), or if you want something open source, I recommend Subversion (http://subversion.tigris.org).

    I personally use Vault at home on my developer machine, and every night my vault database is exported, zipped and uploaded to a remote server. The best thing is, when something breaks and I don't know why, I can just roll back or compare versions to see what's changed.

    If you're doing anything over 3,000 lines of code and not using a source control system, you deserve to lose it

    Edit: If you're using Visual Studio, you'll see it comes with Visual Sourcesafe, which is decent for small projects (although not preferred).
    Last edited by nickname_changed; 06-11-2005 at 12:16 PM.

  7. #7
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    >>I recommend Subversion

    Subversion is a great tool, I currently use cvs but if ever get the time and motivation Ill switch to svn.

  8. #8
    Registered User
    Join Date
    May 2005
    Posts
    73
    source control system ?? never heard of such a thing.. uh oh

    edit:

    Went to those product sites but after looking around I still didn't understand what these products were.. found a nice url that talks about source control at the following link.. now I get it

    http://odetocode.com/Articles/337.aspx

    Gonna go back and look at those products yah listed.. thnx..

    Why have I never heard of source control before? All the programming classes and nothing....quite odd.. I can't be the only one..
    Last edited by Deo; 06-11-2005 at 01:25 PM.

  9. #9
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986
    Its one of those things they don't teach you in classes, more 'on the job'. That's why I recommend that book. It'll learn you about Unit Testing, properly tracking bugs, Source Control, organising your projects properly, coding defensivly, code generation (anytime you find yourself mindlessly copying and changing code, especially for database access, is a candidate for custom code generation), writing documentation, logging, writing EULA's, and creating the final installer.

    Thus the name "Coder to Developer". A lot of people can write code, not many people can turn it into a working product at the end of the day.

  10. #10
    Registered User
    Join Date
    May 2005
    Posts
    73
    gave the Subversion a go... kinda weird but with a nice GUI frontend (tortoiseSVN) its golden..
    Damn.. wish I knew about this stuff before.. so much easier to code and experiment.

    Damn life and its blessings in disguise... someone should make Source Control a sticky on this forum or something.. no programmer should go without..

    thnx for the product links... couldn't be happier..

  11. #11
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Turn off auto-save feature in MSVC and this won't happen. It auto-saved while you were away and the error happened, thus erasing main.cpp.

    Note that if you develop MFC apps using MSVC 6, I highly recommend tons of backups as the class wizard, the IDE - especially when help is open, and MFC itself have tons of bugs in them.

    Have fun.

  12. #12
    Registered User
    Join Date
    May 2005
    Posts
    73
    I'm gonna have to leave MSVC 6... too much hastle even though I have come to like it... sending me on a wild goose chase just to try and get something simple such as direct input to work... days wasted... so soon this won't be a problem..

    hopefully i can find a free alternative.. (MICROSOFT U WILL GET UR COME-UP-INS!)

  13. #13
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    DirectInput works fine if you use it correctly.

    You must define the version before you include the header or it won't compile correctly and it will then state that LPDIRECTINPUT8 is not a valid identifier. Essentially LPDIRECTINPUT8 has not been defined as a user data type so it cannot create an object of that type, if it does not know what the object looks like.

  14. #14
    hacker in training AdamLAN's Avatar
    Join Date
    Sep 2004
    Posts
    56

    Cool

    Quote Originally Posted by Perspective
    Its punishment for using windows as a development platform

    I've been trying to used linux but i can't get it to work. After downloading the image files, and burning them to disks, and using rawrite to write the bootdisk image, I still can't make it work.

  15. #15
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Quote Originally Posted by AdamLAN
    I've been trying to used linux but i can't get it to work. After downloading the image files, and burning them to disks, and using rawrite to write the bootdisk image, I still can't make it work.
    You can just burn them to disk with Nero or your favorite tool. I've never had a problem with it (and I've burned 20+ Linux CDs).
    Away.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. variables when declared inside or outside a function
    By jas_atwal in forum C Programming
    Replies: 6
    Last Post: 12-14-2007, 02:42 PM
  2. Still battling with Copy Control
    By Mario F. in forum C++ Programming
    Replies: 9
    Last Post: 06-23-2006, 08:04 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. help on magic square
    By katway in forum C Programming
    Replies: 2
    Last Post: 03-07-2005, 06:44 PM