- 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
Wow.... so, I am in no way an "expert" or "senior" programmer, but this is really bad. How can anyone working on commercial, production code not understand something as simple as loops?
Admin
You forgot the FRIST!
Admin
So... and the cart logic was in Javascript? At least I hope it was just for presentation purposes... but somehow I don't think that's the case
Admin
Also, who said he didn't understand loops? He knows about them. Strange loops too. Also, he consulted the documentation for his CPU architecture and he concluded that a loop would be bad for throughput due the increased branching.
The data would be prefectched so everything is optimal.
[Sic]
Admin
By only working on enterprisy software ?
ooh, and thrid!!!
Admin
All about the loop unrolling. Efficent code!
Admin
This reminds me of code I once wrote back in the 10th grade. However in that same year I discovered something called the while loop and then I quickly learned about for loops.
Admin
Item value as float? WTF?
Admin
That's why he's not at a senior level.
Admin
+10 pts for writing business-logic and security code in client-side.
I hope the code is doubled (making it really WET) in the asp/jsp/php part.
Admin
What's all this nonsense about DRY? Each of those lines is clearly unique.
Admin
You need both loops and arrays. This explains why 4 out my 80 nieces and nephews were disappointed last Xmas.
Admin
Thirteenth comment!
Fourteenth comment!
Fifteenth comment!
Admin
The programmer was obviously paid by lines of code written.
After 6 months at Amazon he never had to work again.
Admin
OK... this is finally my chance to learn something on TDWTF... and since my computer doesn't have google installed...
What are "DRY principles"?
Admin
Inb4 thread degenerates into a discussion about trolling...
Admin
"don't repeat yourself" is what he's going for.
Admin
Probably just an acronym a project manager made up, to make it easy to remember something instead of understanding it.
Admin
... The prices are in the form?
Admin
Admin
Is anyone else bothered that the item names are form field names?
It's just... It's just wrong... So wrong.
Admin
Admin
Admin
That's not the item names, that's the value. Based on the calculations, he has two fields- quantity and price.
I need to find out what site this is and back up the truck.
Admin
Admin
Admin
What website uses this? You'd get some really great discounts with a little bit of source dabbling...
Admin
Could be this site
PMH Foundation
http://www.pmhfoundation.com/shop/default.aspx
Admin
A good job interview set of questions would be to take these examples minus the snarky commentary and see if the candidate realizes how stupid these things are.
Of course the question is how did this person get the job who wrote this? I guess they already worked there and was given the job "since all programmers are the same".
Admin
Admin
Admin
http://clientsfromhell.net/post/13880316592/
Admin
Nothing more to see here.
Admin
Is the other WTF is that you can buy e.g. -1.337 FirstAidKits ? (ParseFloat ...)
Admin
Whew. At least the old code was replaced by some jquery. Too bad the old crufty stuff was just commented out. Perhaps it was just for our amusement.
Admin
Admin
Admin
It's one thing if you temporarily leave commented code in your source that you intend to remove or uncomment later. Leaving it on the web pages for all the world to see is a whole 'nuther WTF on its own.
P.S. I like how they had commented out some of the items that were part of the original list (using different commenting styles, no less), but were "removed" before they switched to jquery and commented out the whole blocks. "We might need to re-add those, and copy+paste is so much harder than removing some comment characters, and we might misspell something and everything will blow up."
Admin
Admin
Admin
Yes, hello? I'd like to know why my order of .01 of everything didn't go through.
Admin
(it would be a three step process except step 3) Profit! is for Google, not you)
Admin
Admin
Admin
Admin
76? What do they sell, gas or boys' bands?
Admin
I'd like to go get some food, but my car didn't come with grocery stores.
Admin
It concerns me that you can checkout with negative quantities...
What are the chances they will pay me what they owe me....
caption: inhibeo - Inhibition now in gel form
Admin
Loops on their own are pretty much useless. This code needs a total revamp before it can be taken up for testing. I pity the fools who are having to maintain this code. Sadly in the 1990's any fool who could type was qualified to be a computer programmer. Apple had a test where they showed three devices and if you correctly identified the computer, you got a job. In those days' nobody wanted to work with Apple, IBM being the employer of choice.
Admin
Such a legacy of problematic programming that violates good architectural and coding practices is called "technical debt," a metaphor that is gaining broader attention.
Poor quality code, whether the result of business decisions to cut corners or weak programming skills, may be responsible for a computer system crash, a security breach, poor performance or data corruption, among other things.
Repairing each line of code has a cost, or technical debt, that accumulates.