- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Yes, if they automated trivial tasks, then you'd no longer have a job posting comments on TDWTF.
Admin
Yes but automating trivial tasks should be (and usually is) trivial. And an automated task is a task you don't have to spend time out of your day screwing around with.
More code now = less code in the long run(And less of a lot of other shit too).
Admin
$array_by_year[($year - 3) % 7 + 2005]
would be correct
Admin
Obviously written by the Mayans. Since the world ends in 2012, why bother adding it to the code?
Admin
what the ... ?
you bastards. i KNEW i should not have logged in to look at this crap. now i won't be able to get the Things out of my head all night.
Admin
Actually the end of the world is upon is, which is probably why they didn't bother dealing with time beyond that point.
Admin
Well said, you cunt!
It's these trivial tasks on the shoulders of which, you eventually become indispensable at your workplace.
Admin
Admin
Fixed. Was it so hard?!
Admin
Didn't read it.
Admin
Admin
OMG, OMG, OMG - has anyone mentioned that the world will en in 2012....how prophetic is this code!!!
Admin
The /end/ of 2012 - get your facts straight!
Admin
Somebody missed that doomsday is in the END of of 2012?
Admin
I propose to extend the code like this:
'2012' => array( 'jan' => array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31), 'feb' => array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29), 'mar' => array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31),
.... SNIP ... );
The nice thing is that it's easy to check for anni bissexti and even implement February 30th, which will occur in a few years.
Admin
TRWTF is that almost every single comment here provides more content than it's related "article".
Admin
FTFY
Admin
I like going South as well (more than about 3 miles or so) - it means I'm going on holiday.
Admin
There's your mistake.
"Hey, we have to get this bug fixed right now don't give me all that "long run" rubbish, or I'll long-run you right out of the door!"
Admin
I was once given the job of improving efficiency on one of the projects which was costing nearly as much to maintain and operate as we were earning revenue. By the time I'd finished (a couple of weeks later) I had automated three people's entire time.
Their jobs consisted of: "Extract this data into a file, replace all the undisplayable characters, save it as a CSV, open it in Excel, sort in order of whichever-field, count the top however-many, cut and paste these into another spreadsheet, save as a CSV then copy and paste each line into ..." etc. etc.
So automation of trivial tasks becomes a two-edged sword. Some are of the opinion that it's always wrong to automate someone else's job, however tedious and pointless. Others take the view that those people may be offered the opportunity to be trained for something more interesting, challenging and productive. On the other hand, in many cases, perhaps not.
Admin
War and Peace is for wimps. If you really want to bury yourself in a thousand pages of political polemic, read Atlas Shrugged. Or better still, one of the more recent works by Neal Stephenson (advert.)
Admin
Now, seriously, is it only me that is getting bored of all the "look, this guy copy and pasted stuff" articles? It's been seen a million times before and it takes a fraction of a second to realize that and skip the rest (and even if I didn't it would take less then 3 seconds as the article is basically empty anyway). Post some actual content (as in >>a featured article<<) god damn it. It's been a week since the last one.
Admin
Admin
Admin
Admin
Awesome Troll dear Nagesh.
For the lesser folks, nagesh is dead wrong because leap whatever_time_unit's are details only used for the presentation of the data to 'dumb' humans who can't process absolute time.
Admin
Meh .. I got my birthday on 12/12/12 next year . prolly the biggest birthday party for me to date . god bless the end of the world . twice.
Admin
How about some sensitivity . no laughing matter and stuff ?
Who gives a f*ck if those humans want to steal the work of robots ? I say they don't deserve it if they can't do it faster and cheaper.
Admin
Admin
Admin
Admin
With the added benefit that it is slow as f*ck right ?
Admin
Admin
Oh, now look what you've done! You've mucked up the formatting for 2007! It'll never work properly now!
Admin
This is soo wrong . You'll have to rewrite everything if the number of months changes .. and your month variables carry the to-be old names, how will anyone maintain that when the months are named oneuary,twouary,threeuary and so forth ?
$years=array('2005','2006','2007','2008','2009','2010','2011','2012','2013'); $monthsperyear=array('12','12','12','12','12','12','12','12','12'); $months=array('January','February','Marchary','Aprilary','Mayary','Juneary','Julyary','Augustary','Septemberary','Octoberary','Novemberary','Decemberary','Mysteriousthirteenthary');
And then you loop for victory.
So much cleaner AND you can extend it to any number of months, years as strings (like '2012','Year that the world ended','PotatoFestival') ... This is how you make good bad code !
Admin
That's the lie they sell to wean you off from the task's teat. Throughout the history of mankind, man has been intent on making other men redundant. That's bloody capitalism for you, old chap!
Admin
Obviously :-)
Admin
That mysterious thirteenth month? It's called Undecimber(ary).
Admin
echo $MemeReference[23];
Admin
Admin
Admin
That said, I admit fully that my code has hardcoded dates of when Chinese New Year is through 2020, and after that if that code is still used, someone will have to add some more. But, in my defense, Chinese New Year is bloody difficult to determine the date of.
Admin
Obviously there will be no 2012, not only is our programmer efficient, the programmer is also psychic.
Admin
Admin
Admin
You'll stop laughing at this enterprisey code when in 2012, President Obama signs an EO to add a few months in between October and November to give him extra time to "fix the economy."
Admin
Admin
Admin
I agree, some people are just jerks.
Admin