« first day (3302 days earlier)      last day (59 days later) » 

2:56 AM
2nd looks better. But you can always write a better solution. Try more and learn more :) About what is good code. Here is a link. stackoverflow.com/questions/366588/…Marcus.Aurelianus 25 secs ago
 
 
3 hours later…
5:37 AM
This sounds like a homework assignment. It might not be, but it sounds like one. "3. Questions asking for homework help must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it.". The current state of your question doesn't fulfill these requirements. Please edit the question to improve it. Please, also read this Open letter to students with homework problems. — Makyen 52 secs ago
 
6:06 AM
you may want to try softwareengineering.stackexchange.com instead, that is more suited to generic questions like this. — zaitsman 52 secs ago
 
 
9 hours later…
 
3 hours later…
6:01 PM
You seem to have inherited code from a maniac, but if the code works reliably, you may be well-advised to leave it as it is. The alternative would be fully refactoring it, rather than just cleaning up the odd idiom while leaving the essential horror in full bloom. If you'll be expected to add substantial chunks of functionality going forward, I would certainly write much better code than the old guy did. Maybe the refactoring would be a suitable question for s/w engineering. Here, it would be off topic. — Ed Plunkett 29 secs ago
 
 
3 hours later…
9:12 PM
Welcome to Stack Overflow! I think this question is more suited for Stack Exchange's Software Engineering site. — PerpetualJ 29 secs ago
 

« first day (3302 days earlier)      last day (59 days later) »