Spontaneous Publicity
blogs are the new phone book

Code I Almost Wrote

January 23, 2009 12:17 by Luke

The only thing scarier than the code I actually write is the code I thought of and decided not to write. Actually, that is not true. The code I write is always perfect. Until I decide to change it later and make it more perfect.

duh Today I was writing a small console app which I wanted to run indefinitely until the user decides they would like to close it. This posed quite a challenge. Should I stop every 1000 iterations and check if the user has indicated they would like to stop processing? Should this be a windows app so I can have a stop button?

No, I should just run indefinitely and if they user wants the program to terminate, they will close the console window. So simple. My mind really wanted to complicate this one.


Currently rated 3.0 by 2 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories:
Actions: E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading