|
|
|
| Hurry! Enter The Daily WTF's OMGWTF2 Contest by June 28th! - Prizes! Fame! Trophies! Do your worst: http://omg2.thedailywtf.com/ |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |
Re: Epoch Billing System
2012-05-10 12:01
•
by
Ozz
(unregistered)
|
S o m e c o d e r s a r e p a i d b y t h e l i n e . |
Does your 3 inch monitor have a scroll bar? |
Re: Epoch Billing System
2012-05-10 12:26
•
by
Anon
(unregistered)
|
Hey! Your mom didn't have any problems monitoring my 3 inches with her scroll bar. |
Re: Epoch Billing System
2012-05-10 12:29
•
by
ike
(unregistered)
|
|
The customer *is* always right. Not everyone is a customer, that's all :)
|
Wow dude... you have just taken offense to everything i've said, and you are taking all of it way too seriously. Do they not have medical marijuana where you live yet? If I was a doctor I would prescribe you some for stress. It looks like you really need it. |
They may be unreasonable, ignorant, clueless, stubborn, unrealistic, foolish, short-sighted and/or idiotic, but they are always right! |
Re: Epoch Billing System
2012-05-10 12:49
•
by
Hmmmm
(unregistered)
|
FTFY |
|
Oh, fun. I've also dealt with people who think that it's only a defect if it makes the product violate specs. Anything else is an enhancement. Apparently "functioning" isn't considered an implicit design spec....
That said, if this *doesn't* violate a spec, then the specs aren't as extensive as they're claiming, since this function will not work as advertised. Or working correctly is considered an optional extra. |
Re: Epoch Billing System
2012-05-10 12:54
•
by
Herr Otto Flick
(unregistered)
|
This is the second person to claim this. First off, its nonsense. The problem will happen much sooner, as they are using int (31 bits), and not unsigned int (32 bits). Secondly, there is only a year 2038 problem if you are using int as your time type. All real OS have time_t type, which is/will be at least 64bit by 2038, if it isn't already. Finally, there is not enough context for determining whether this is a WTF or not. If the only goal of the code is to say how many days ago a request was opened, and requests are never opened longer than a year, then this may be 'good enough'. You might want to consider why some developers are doing 2nd line support and maintenance, and why some are designing and specifying the project. TRWTF would be a junior developer seeing something minor and jumping all over it like a pre-teen on Bieber, and then bitching on the internet when his wailing is deemed irrelevant. |
Re: Epoch Billing System
2012-05-10 12:56
•
by
Herr Otto Flick
(unregistered)
|
78 characters or less, bitch. TBH, this isn't really even formatting. This is just what you get when you set up vim right, and just type C style code. |
Re: Epoch Billing System
2012-05-10 12:58
•
by
LANMind
(unregistered)
|
Welcome to teh interwebs! |
Re: Epoch Billing System
2012-05-10 12:59
•
by
Ralph
(unregistered)
|
If the front end is pretty enough, it doesn't have to work "right" or even at all. MS proved this decades ago. This is because most people have a fundamental inability to evaluate software quality. So they assume "wow if they put that much work into making it look so good, it must be good." |
Re: Epoch Billing System
2012-05-10 13:02
•
by
djeidot
(unregistered)
|
I honestly think that the "If it ain't broke, don't fix it" quote is absolutely right. But it should be followed by Seth Godin's quote: "If you think it's broken, then it's broken". |
Re: Epoch Billing System
2012-05-10 13:12
•
by
just me
(unregistered)
|
FTFY |
|
"If it ain't broke, fix it until it is."
|
|
A bicycle repair shop when I was kid had a sign that read:
"If we can't fix it we'll fix it so nobody can!" |
Re: Epoch Billing System
2012-05-10 13:38
•
by
Nagesh
(unregistered)
|
What meaning is "ain't"? |
Re: Epoch Billing System
2012-05-10 13:38
•
by
dogmatic
(unregistered)
|
|
Unfortunately in the real world there are things like "deadlines" which have to be met. Every developer should keep in mind that, when looking at another's code, they will always find things that look ugly to them, that they would do another way.
|
No, that's when the “end of time”(_t) happens if it is a 32-bit signed integer; it's 2**31 seconds after the start of 1970. Unsigned would give another 68 or so years, but would have stopped early Unix systems from referring to dates before 1970 (a more pressing need at the time that the time system was developed). Of course, there's no actual need for there to be a problem at all, provided the size of time_t itself is expanded (1970 AD+2**63 seconds is a very long time off indeed). The real issue is going to be migrating all the existing data, notably including filesystems and archives of various kinds. The lifespan of builds of programs is much shorter than that of data. |
Re: Epoch Billing System
2012-05-10 13:49
•
by
anon
(unregistered)
|
Turns out, this applies to construction as well. I've seen plenty of stuff in my home that looks great on the surface, but if you peel back the covers a bit, it's just a mess. Former owners hired some real winners to do upgrades. |
Re: Epoch Billing System
2012-05-10 13:54
•
by
gr[a/e]y goat
(unregistered)
|
Wait, have Microsoft and "looks pretty" ever really gone together? |
|
TRWTF is expecting outsourced code to work correctly in the first place. Face it, you are working with a bunch of Indian code monkeys who are 'coding to the spec', and who will freely mash whatever unholy code style and practice they are familiar with into your shiny new project, because that is what they know.
At my company, we are still maintaining an outsourced program I like to refer to as the 'Indian abomination'. After we got the final code drop, it took me another 9 months to get it into working shape, and we still find hidden gems that make us go 'huh?' every once in a while. |
Re: Epoch Billing System
2012-05-10 14:02
•
by
Nagesh
(unregistered)
|
Like any programer, Indian is not mind-reader. All we can code 4 is what customer ask for. |
Re: Epoch Billing System
2012-05-10 14:09
•
by
qwerty
(unregistered)
|
Everyone ignore this guy... low level troll here. |
Re: Epoch Billing System
2012-05-10 14:17
•
by
Anon
(unregistered)
|
A good point...except they actually did it the long-winded way instead of using the built-in functionality. |
|
TRWTF is that Jeff took ten minutes figuring this code out. It's obviously trying to calculate time since Unix epoch... it's also immediately obvious that it's buggy because the line (which is nicely separated out from the rest of the calculation for clarity) for handling leap years is based off a year that's not divisible by four (in addition to the lack of support for 2100).
|
Re: Epoch Billing System
2012-05-10 14:19
•
by
Nagesh
(unregistered)
|
Al I say is true, masterchord!!! |
Re: Epoch Billing System
2012-05-10 14:34
•
by
Jack
(unregistered)
|
Actually, there is plenty of context to determine it is a WTF. First of all, there are built-in functions that do this right. Second, the request doesn't have to be open for over a year for the bug to show up. Try February 28, 2012 to March 1, 2012. |
Re: Epoch Billing System
2012-05-10 14:41
•
by
khermitt
(unregistered)
|
I'ts a variable tah't holds only rationalnumbers |
OK, I will. int intDay1 = 1; convertDate diff: 1 TimeSpan diff: 2 Oh, it's off by a day. Go figure. The worst part is that you know that this is just the tip of the iceberg. They've probably written dozens of other buggy, poorly-documented date-handling routines for validation, converting from strings, or determining the day of the week. |
Re: Epoch Billing System
2012-05-10 14:55
•
by
sbs
(unregistered)
|
|
"ain't" is a contraction of "am not" and "have not" -- see http://en.wikipedia.org/wiki/Ain't
People use "ain't" also as a contraction of "is not" and "are not" "It ain't going to work" == "It is not going to work" "If it ain't broke, don't fix it" == "If the object or system operates satisfactorily, do not attempt to improve it in some irrelevant manner that may make things worse." In most of the United States, "ain't" is considered incorrect, and its use marks the speaker as being ignorant or uneducated. In some areas and within some groups, it is an acceptable usage, especially when speaking informally (say "ain't" to your friends, but not to the judge at your trial.) In "if it ain't broke, don't fix it" the speaker is using "ain't" and "broke" ("broken" is the standard usage) to suggest the point of view of a person who may not be highly educated, but has practical knowledge and wisdom that are more valuable than formal education, especially formal education without real-world experience. The speaker may be advising you to look for a higher-priority project to work on. Or, he may judge that the object or system that "ain't broke" is actually more complex than you can manage, and doesn't want to you to break it even more while trying to fix it. Of course, you still have to decide for yourself whether the person is actually saying something wise, or is just repeating an old saying. (The wikipedia article gives more info on "if it ain't broke, don't fix it.") |
Re: Epoch Billing System
2012-05-10 15:13
•
by
Nagesh
(unregistered)
|
Thank you kindly! I ain't will be forgeting this explaination! |
Re: Epoch Billing System
2012-05-10 15:16
•
by
Jazz
(unregistered)
|
Does anyone know if this guy is for real or a troll? He posts things like this on nearly every post thread. |
You must be new here. Nagesh is the generic "Indian" coder made up by a bunch of white people and faked by various other users to amplify negative stereotypes about indian programmers. So no, he is not for real, and there is a minimum of 2^64 "nagesh" posts per wtf thread on this site. You get used to it and sometimes laugh, but never ever reply to it (directly). |
DONT! ACCUSE!! ME!!! OF!!!! BEING!!!!! !!!!! STRESSED !!!!! |
Re: Epoch Billing System
2012-05-10 15:54
•
by
Anon
(unregistered)
|
Don't know man. You seem to be the one who doesn't know an obvious joke when he sees it. Maybe you're the one who's stressed? |
Jeff must be kinda slow. You can guess this from the previous line int strElapsedDays = ( So it's substracting two "converted" dates, and dividing by a constant DAY to get days. Conclusion: convertDate converts to some absolute time format. This is probably the best approach if you have to write your own time-handling library, and it makes sense to reuse Unix time as a standard(instead of, say, half-minutes since 2002). Of course it's still very bad coding: never write your own time functions (or input sanitizing functions, or XML parser, or GUI toolkit, or...). You won't get them right. Spend five minutes checking if your language has them instead. 90% of the WTF code in this site is noobs not knowing that the language has functions for that. Maybe C has made people too used to writing boring parts again and again. |
Re: Epoch Billing System
2012-05-10 15:58
•
by
Nick V.
(unregistered)
|
Exactly. If it was just reinventing the wheel, it would raise the issue of either the programmers being unaware of the builtin functions in C# (or even how to find them on the fly) or them overcharging the company. But on top of that it is inaccurate. What about pre-1970 dates? Pre-1852 (Gregorian Reform)? |
Re: Epoch Billing System
2012-05-10 16:02
•
by
Nagesh
(unregistered)
|
This kind of feke accusations are being offensive. I am always having believed that registered Nagesh is real indian from south Hyderabad. |
|
have fun with your libraries, you five-figure salaried peons, we'll be out building a new world
|
Re: Epoch Billing System
2012-05-10 16:05
•
by
n_slash_a
(unregistered)
|
Part of our coding standard is that no line can be over 80 characters. This allows 1) the code to be printed out and 2) the ability to have other windows or tool-bars open next to the code. |
Re: Epoch Billing System
2012-05-10 16:05
•
by
emaN ruoY ekaf
(unregistered)
|
WONTFIX |
Re: Epoch Billing System
2012-05-10 16:16
•
by
s73v3r
(unregistered)
|
|
How long do you think it would have taken you to write the program from scratch and get it into working shape?
|
Re: Epoch Billing System
2012-05-10 16:18
•
by
s73v3r
(unregistered)
|
We're not mind readers either. But you know what we do? We ask. |
If it's not broken you can't fix it. You could make it prettier. Or you could make it faster. Or you could make it easier to maintain. But you couldn't fix it. |
Re: Epoch Billing System
2012-05-10 16:22
•
by
Nagesh
(unregistered)
|
Spec is given and folowed. Ain't is there to ask? |
Maybe you're right. I always considered the your mama style retort an "end all because i'm frustrated and don't have a good comeback" kinda response. Maybe I'll go and [censored for drug references] and that will solve my stress problems ^__i_^ |
Re: Epoch Billing System
2012-05-10 16:27
•
by
Sannois
(unregistered)
|
Help! Help! I've fallen through a wormhole and ended up in 1996! |
Good luck collecting on your 1851 invoice when you send it out. This is for a billing system after all. |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |