A Word of Wisdom

This is a discussion on A Word of Wisdom within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Word of Wisdom: Never create an infinite loop which writes data to a file. Reasons: Within 5 seconds it fills ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    A Word of Wisdom

    Word of Wisdom: Never create an infinite loop which writes data to a file.

    Reasons:

    Within 5 seconds it fills up 30 MB of HD space...
    Within a couple hours or less your entire HD will be full.

    Yeah....i had a fun experience with that today...huge 30 MB files just by letting my program run for 5 seconds...totally by accident too. I was just trying to get a guy to ANIMATE walking!!!! Stupid DirectX....#&#%^%^....on the other side...i have accidentally created a small type of trojan/virus....wow....good thing i changed the code so it doesnt do that anymore...it could have given me some problems...heh heh.
    My Website

    "Circular logic is good because it is."

  2. #2
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    Ouch. That happened to me before too.

  3. #3
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    never put pixel plotting into an infinite loop either, it quickly shut down the computer I was working on, playing with directx. (forgot to check for screen bounds)
    I'm pretty sure I ran through all the video memory in no time.
    Luckily it wasn't my computer.
    he he.

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    There's loads more like this waiting for you to fall into. That is what makes a good programmer!
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Registered User EvenFlow's Avatar
    Join Date
    Oct 2001
    Posts
    422
    Words of Wisdom: mixing curry powder in milk is not a good idea.
    Ramble on...

  6. #6
    Registered User shark_boy's Avatar
    Join Date
    Sep 2001
    Posts
    13
    *laughing* I pulled one of those the other day. It wrote a whole gigabyte in about 8 seconds. Woops.
    Something's fishy here.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. please help with binary tree, urgent.
    By slickestting in forum C Programming
    Replies: 2
    Last Post: 07-22-2007, 07:55 PM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Wrong Output
    By egomaster69 in forum C Programming
    Replies: 7
    Last Post: 01-28-2005, 05:44 PM
  4. Using 'if' with char arrays or string objects
    By c++_n00b in forum C++ Programming
    Replies: 36
    Last Post: 06-06-2002, 09:04 PM
  5. Another Word of Wisdom from DavidP
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 05-30-2002, 06:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21