Comment On The WET Cart

The WET Cart [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: The WET Cart

2011-12-08 09:03 • by brodie (unregistered)
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?

Re: The WET Cart

2011-12-08 09:08 • by sehe (unregistered)
368962 in reply to 368961
brodie:
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?


You forgot the FRIST!

Re: The WET Cart

2011-12-08 09:10 • by Peter (unregistered)
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

Re: The WET Cart

2011-12-08 09:10 • by sehe (unregistered)
368964 in reply to 368961
brodie:
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?


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]

Re: The WET Cart

2011-12-08 09:11 • by Lost (unregistered)
By only working on enterprisy software ?

ooh, and thrid!!!

Re: The WET Cart

2011-12-08 09:17 • by cguy (unregistered)
All about the loop unrolling. Efficent code!

Re: The WET Cart

2011-12-08 09:18 • by Anketam
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.

Re: The WET Cart

2011-12-08 09:22 • by TheRon (unregistered)
Item value as float? WTF?

Re: The WET Cart

2011-12-08 09:22 • by anonymous (unregistered)
368969 in reply to 368962
sehe:
brodie:
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?


You forgot the FRIST!


That's why he's not at a senior level.

Re: The WET Cart

2011-12-08 09:28 • by Aris (unregistered)
+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.

Re: The WET Cart

2011-12-08 09:29 • by frits
What's all this nonsense about DRY? Each of those lines is clearly unique.

Re: The WET Cart

2011-12-08 09:31 • by Zapp Brannigan (unregistered)
You need both loops and arrays. This explains why 4 out my 80 nieces and nephews were disappointed last Xmas.

Re: The WET Cart

2011-12-08 09:38 • by Bill (unregistered)
Thirteenth comment!

Fourteenth comment!

Fifteenth comment!

Re: The WET Cart

2011-12-08 09:39 • by DonaldK (unregistered)
The programmer was obviously paid by lines of code written.

After 6 months at Amazon he never had to work again.

Re: The WET Cart

2011-12-08 09:40 • by Larry (unregistered)
OK... this is finally my chance to learn something on TDWTF... and since my computer doesn't have google installed...

What are "DRY principles"?

* Do it yourself
* Run Ycursively?

Re: The WET Cart

2011-12-08 09:42 • by frits
Inb4 thread degenerates into a discussion about trolling...

Re: The WET Cart

2011-12-08 09:44 • by DRY (unregistered)
368979 in reply to 368976
"don't repeat yourself" is what he's going for.

Re: The WET Cart

2011-12-08 09:48 • by Brendan (unregistered)
368980 in reply to 368976
Larry:
OK... this is finally my chance to learn something on TDWTF... and since my computer doesn't have google installed...

What are "DRY principles"?


Probably just an acronym a project manager made up, to make it easy to remember something instead of understanding it.

Re: The WET Cart

2011-12-08 09:53 • by J. (unregistered)
... The prices are in the form?

Re: The WET Cart

2011-12-08 09:59 • by foo (unregistered)
368984 in reply to 368979
Google:
"don't repeat yourself" is what he's going for.
FTFY

Re: The WET Cart

2011-12-08 09:59 • by boog
Is anyone else bothered that the item names are form field names?

It's just... It's just wrong... So wrong.

Re: The WET Cart

2011-12-08 10:02 • by foo (unregistered)
368986 in reply to 368971
frits:
What's all this nonsense about DRY? Each of those lines is clearly unique.
The braces lines are not. (Since this is a nit-picking forum, why haven't 10 others pointed this out already?)

Re: The WET Cart

2011-12-08 10:04 • by LegacyCrono
368987 in reply to 368976
Larry:
OK... this is finally my chance to learn something on TDWTF... and since my computer doesn't have google installed...

What are "DRY principles"?

* Do it yourself
* Run Ycursively?

what.

Re: The WET Cart

2011-12-08 10:06 • by Lex Luther (unregistered)
368989 in reply to 368985
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.

Re: The WET Cart

2011-12-08 10:06 • by boog
368990 in reply to 368981
J.:
... The prices are in the form?
Sure. How else will Javascript access the prices in order to compute the subtotal in the cart? It's only a problem if the site POSTs the WTF-computed subtotal (instead of computing it on the back end with the real prices). Which wouldn't surprise me.

Re: The WET Cart

2011-12-08 10:07 • by boog
368991 in reply to 368989
Lex Luther:
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.
Stitches, FirstAidKit, and Wristband aren't item names?
I'm not talking about the values they store.

Re: The WET Cart

2011-12-08 10:11 • by Nick (unregistered)
368993 in reply to 368963
What website uses this? You'd get some really great discounts with a little bit of source dabbling...

Re: The WET Cart

2011-12-08 10:13 • by StJohn (unregistered)
Could be this site

PMH Foundation

http://www.pmhfoundation.com/shop/default.aspx

Re: The WET Cart

2011-12-08 10:21 • by My Name Is Missing (unregistered)
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".

Re: The WET Cart

2011-12-08 10:23 • by foo (unregistered)
368997 in reply to 368994
StJohn:
Could be this site

PMH Foundation

http://www.pmhfoundation.com/shop/default.aspx

Seems Josiah put in a loop now. What a fool! Don't break what's working, amirite? (But at least he kept the original code, commented out, in case we want it back instead of his ivory tower fancy loops.)

Re: The WET Cart

2011-12-08 10:25 • by boog
368998 in reply to 368994
StJohn:
Could be this site

PMH Foundation

http://www.pmhfoundation.com/shop/default.aspx
Wow. With the same form field names and everything. I thought they anonymized stuff around here.

Re: The WET Cart

2011-12-08 10:25 • by Ken B. (unregistered)
368999 in reply to 368987
LegacyCrono:
Larry:
OK... this is finally my chance to learn something on TDWTF... and since my computer doesn't have google installed...

What are "DRY principles"?

* Do it yourself
* Run Ycursively?
what.
Google has a virus, so they uninstalled it. Didn't you know that?

http://clientsfromhell.net/post/13880316592/

Re: The WET Cart

2011-12-08 10:30 • by Ken B. (unregistered)
369001 in reply to 368967
Anketam:
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.
Ergo, this was written by a 9th grader.

Nothing more to see here.

Re: The WET Cart

2011-12-08 10:42 • by mikedjames
Is the other WTF is that you can buy e.g. -1.337 FirstAidKits ?
(ParseFloat ...)

Re: The WET Cart

2011-12-08 10:46 • by WTFStalker (unregistered)
369007 in reply to 368997
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.

Re: The WET Cart

2011-12-08 10:48 • by PedanticCurmudgeon
Jack Strikes Back:
Is there any chance that we might make these articles a daily occurrence?
No, but if you go to the "Side Bar WTF", you'll see 2-3 WTFs per day on average, normally of better (or worse, if you prefer) quality than the front page articles.

Re: The WET Cart

2011-12-08 10:54 • by Andrew (unregistered)
369009 in reply to 368994
StJohn:
Could be this site

PMH Foundation

http://www.pmhfoundation.com/shop/default.aspx
I think I just puked in my mouth a little bit.

Re: The WET Cart

2011-12-08 10:59 • by airdrik (unregistered)
369010 in reply to 369007
WTFStalker:
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.

Or as a warning, kind of like mounting human sculls on posts.
Warning: dangerous code lives in these parts!

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."

Re: The WET Cart

2011-12-08 11:06 • by Mister E. (unregistered)
369011 in reply to 368994
StJohn:
Could be this site

PMH Foundation

http://www.pmhfoundation.com/shop/default.aspx

Awww... That baby is saddened by the code.


Re: The WET Cart

2011-12-08 11:33 • by Jack Strikes Back (unregistered)
369012 in reply to 369011
Mister E.:
StJohn:
Could be this site

PMH Foundation

http://www.pmhfoundation.com/shop/default.aspx

Awww... That baby is saddened by this article.



FTFY. BTW, when does the site change its name to "thewheneverthecrapifeellikeitwtf.com?"

Re: The WET Cart

2011-12-08 11:51 • by Up Down (unregistered)
369013 in reply to 368994
StJohn:
Could be this site

PMH Foundation

http://www.pmhfoundation.com/shop/default.aspx


Yes, hello? I'd like to know why my order of .01 of everything didn't go through.

Re: The WET Cart

2011-12-08 11:59 • by Some damn Yank (unregistered)
369014 in reply to 368976
Larry:
since my computer doesn't have google installed...
Well, google is easy to install, you don't even need Administrator or Root access. It's a simple, two step process:
1) Point your browser of choice to www.google.com
2) Bookmark/Favorite the page

(it would be a three step process except step 3) Profit! is for Google, not you)

Re: The WET Cart

2011-12-08 12:01 • by Larry (unregistered)
369015 in reply to 369014
Some damn Yank:
Larry:
since my computer doesn't have google installed...
Well, google is easy to install, you don't even need Administrator or Root access. It's a simple, two step process:
1) Point your browser of choice to www.google.com
2) Bookmark/Favorite the page

(it would be a three step process except step 3) Profit! is for Google, not you)
What's a "browser"? And which end should I point with?

Re: The WET Cart

2011-12-08 12:04 • by Fred (unregistered)
369016 in reply to 369015
Larry:
What's a "browser"? And which end should I point with?
If you have a good sturdy pen on your desk, that can be a browser. Hold the sharp end pointing toward your chest, near your heart. Then run down the hall until you collide with the wall at the end.

Re: The WET Cart

2011-12-08 12:13 • by c (unregistered)
369017 in reply to 368999
Ken B.:
Google has a virus, so they uninstalled it. Didn't you know that?

http://clientsfromhell.net/post/13880316592/

I thought some idiot had ignored all the warnings and typed "Google" into the search.

Re: The WET Cart

2011-12-08 12:42 • by Maurits
76? What do they sell, gas or boys' bands?

Re: The WET Cart

2011-12-08 13:25 • by Jay (unregistered)
369022 in reply to 368976
Larry:
... and since my computer doesn't have google installed...


I'd like to go get some food, but my car didn't come with grocery stores.

Re: The WET Cart

2011-12-08 13:26 • by ThatCruftyGuyOverThere (unregistered)
369023 in reply to 369005
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

Re: The WET Cart

2011-12-08 13:48 • by Nag-geoff (unregistered)
369025 in reply to 368961
brodie:
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?


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.

Re: The WET Cart

2011-12-08 13:49 • by Nag-geoff (unregistered)
369026 in reply to 369025
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.
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment