Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Hour reports!

Name: Anonymous 2008-07-07 8:48

So, how do I program an hour-report program?!

Name: Anonymous 2008-07-07 8:48

If you have to ask, you'll never know.

Name: Anonymous 2008-07-07 8:55

You may need to use CUDDERS!

Name: Anonymous 2008-07-07 8:55

OMG, OKAY.
How do I use CDRS?!?!!

Name: Anonymous 2008-07-07 17:42

If you have to ask, you can't afford it.

Name: Anonymous 2008-07-07 18:48

while (1) {
    report();
    sleep(3600);
}

Name: Anonymous 2008-07-07 21:29

>>6
lol

Name: Anonymous 2008-07-08 1:13

>>6
Your implementation does not respect ENTERPRISE best practices.
1) You must use template programming to instantiate various OPTIMIZED functions with different sleep time, generated at compile-time. Otherwise your hard-coded value may force programmers to edit your code by hand or copy+paste which is terrible for maintainability.
2) "3600" and "1" should never be used by themselves since we don't know what they represent. Use "const int seconds_per_hour = 3600" and "const int one = 1".
3) What if report returns an exception? Needs a try/catch.
4) Where are the objects? Procedural programming is unreusable and ultimately destructive.
5) Your function may not execute report every 3600 seconds. Consider the case where report() takes 4 seconds to execute, then the loop will report() every 3604 seconds. You should consider using multithreading so that sleep and report may execute at the same time.

Overall I give this a 2/10. I would not hire you in my company.

Name: Anonymous 2008-07-08 2:15

Fuck your company, >>8.  I'll hax your anus for that.

Name: Anonymous 2008-07-08 12:47

>>8
Speaks the truth!

Name: Anonymous 2008-07-08 13:32

>>8,10
You best be joking, nigger.

Name: Anonymous 2008-07-08 19:44

>>9
Anus used a "Double checked locking pattern" counter-attack. It's super effective!

Name: Anonymous 2009-03-06 11:06


The links or the   SPECIFICATION OF THE   group than as   a solo artist   and I stress   the word artist   This is Sussudio   a great great   song a personal   army but a   tin of tuna   MY LEFT BRAIN   IS PLUGGED INTO   THE INTERNET MY.

Name: Anonymous 2010-12-22 11:04

Name: Anonymous 2011-02-03 1:10


Don't change these.
Name: Email:
Entire Thread Thread List