- 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
Downloading the database might seem like overkill in trivial scenarios, but it quite easily solves a number of problems. For example, if this is dial-up days, what if the connection drops? Here you only have one point at which the connection is needed at all, so isolating test scenarios is simple. However if you have to constantly have your application be able to compensate for a dropped connection, that's a significant amount more development and testing work. What about offline browsing of the catalogue (surely in the days of dialup, you don't want to clog your phone line the whole time you're browsing)?
I see no reason to think why this could not have been thought of as the simplest and most practical way to engineer a solution to the general problem, even if it's not optimal for more trivial cases.
Perhaps it wasn't tested on a production-size database? If so, why did the customer not do this before signing off the product as complete? The company was not even close to the main point of quality failure here.
Of course, wouldn't expect any actual knowledge about practical engineering processes here, just a snobbery of heads-down coders who assume anyone who does something a "quick and dirty" way obviously "doesn't know how to code".
No project has an unlimited budget, unlimited time to engineer, code, and test, and unlimited permission from the client to pursue things of little value. Tradeoffs happen, and the requirements are the guidelines. "Bad" tradeoffs which result in the requirements BEING MET (budget, time, functionality) are ALWAYS a problem with the requirements.
Admin
People aren't saying that this is a well-chosen solution. They are saying that it appears to be a working solution. As long as the overhead of transmitting copies of the database back and forth for every order is acceptable, there's no reason to throw this solution away. Stupidity under the hood is irrelevant as long as the user is happy.
Admin
The problem is that their product was probably highly efficient at what it did, but what it did wasn't scaleable. As long as you only copy a small database for a small number of users, you can probably conceal the problem with significant optimisation. Problem is, when you release it to 800 users on a catalogue of 60 products...
Admin
[Looks again] "15000 products". Ouch.
Admin
Admin
Admin
It depends on the size of a typical order, a fastener supplier might have individual orders of hundreds or more small parts. Entering that type of order by hand could drive a company to pay top dollar for automation.
[captcha= sagaciter] this may actually be a sagacious program.
[Jstacat= not joined yet]
Admin
It's a "working solution" for sure, but I wanted to buy that 3 piece suit I wouldn't take a copy of every 3 piece suit in the store, bring them all home with me, mark the one I wanted, go through all of them individually and send back the ones I didn't want individually, then bring the one I wanted back to store and say "I want this one" (which is a "working solution" to the problem of buying a 3 piece suit by that definition).
The reason this kinda thing gets through is that the senior manager who recommended/insisted on the Big Name Company in the first place is usually unwilling to lose face by admitting it's a crock of dog turd and ends up bullying it through. Acceptance tests be damned, we've paid $10,000,000 for this thing so we're going to USE it.
Admin
I want a...
At some point you have to scan the list of products for validation. The only real WTF is presenting them all to the user in one giant list.
Admin
Navigation was through a rigid tree style list, not a 15,000 entry list box. But that was almost worse because the categorization was such that, had it been say clothes being sold you could select by country/brand/style/size/colour but not be able to search just by size and style for example. It would have been hideously frustrating to browse.
Admin
Yesterday while investigating an nHibernate issue I came across an SQL statement containing 255 left outer joins...
[edit]Crystal Citadel? I prefer the Combine Citadel [image]
Admin
The VB front end all looked pretty enough, but functionally it was a disaster. The astonishing thing I heard later was that this was version 3, and the first 2 versions had been 'pretty rough'. Shudder.
Admin
No matter how you design it, if the user wants to browse offline (which is probably the general case when dealing with dialup), the whole catalog has to be downloaded. So there's no getting around that as the worst case. They just didn't optimize cases which don't need to be worst case to be better.
If the requirements said it needed to work on a database of size X to effect Y, and it didn't, then that is a legitimate product issue. However, the article says no such thing was the case, as the only place the author says there was a problem was "under the hood". This indicates they signed off on a requirement which they never tested if the product met, or they failed to give such as a requirement; either way that's mostly if not wholly their fault.
The article gives no information indicating performance was an actual issue (no rants about it taking forever), only the architecture.
Admin
It wasn't a web site, it was a standalone app. It was an order table though, and yes, the idea that there might be 2 orders happening at the same time was outside the possibility of reason. One order should be enough for anyone, right?
Admin
They must have gone to their local Microsoft Certified Solutions Provider to get that monstrosity...
Party on Garth...
Admin
My original submission did :-) It would have been about 15 minutes to start an order on the PII hardware typical of the time. There was also no way to update the DB short of sending out a new CD.
Admin
That would be a pretty bad problem then. :)
Admin
Something like "If any part of this project gets published on thedailywtf.com we will not pay."
Admin
Thanks mate! Now I'm guilty of child abuse.
Admin
Admin
Admin
Admin
I never feel that an article has been read until I have looked at every last comment. They are just, for the most part, so amusing, immature and un-knowledgeable :).
Admin
You almost sound serious about this, so I'll bite. If you lose your connection, then you shout downstairs for someone to put the phone back on the hook. Then you start the order over. This isn't a Mars landing, no one's gonna die if you lose contact. I'm sure people with dial-up do just fine on Amazon.
Admin
Welllll... his english is "definately" a little bit "flawwed" in places ;o)
And I'm saying this as a non-native speaker...
(Note: I re-added the italic part, which was left out by Zerbs)
But basically you have a point, Zerbs - mixing up e.g. there/their/they're or its/it's is "definately" (and somehow surprisingly) more frequently done by native speakers (as is writing "definately" instead of "definitely", at that ;o))
Admin
Excuse me, but this is hardly an issue of "optimizing", be it free or not. The copying might only take seconds now, but what if the product database multiplies in size?
In other words, this is the exact opposite of a scalable solution, which means it was incepted/planned/engineered simply plain wrong from the start, and no viable optimization will be possible later without changing the whole concept and thus major parts of the codebase.
Admin
I sure hope they were planning to run that thing on one hell of a beefy supercluster, because... I mean, holy crap, dudes! 15,000 records copied per user per order? And this company had so many orders it didn't know what to do with them all? What the f
**Error: Database server not responding.
Admin
And now please care to explain why downloading much more data (i.e. the whole 15.000+ products catalog, mind that this operation was done for each order per user!) reduces the probability of the connection to drop or the problems if it does drop?
Quite the contrary, if you only transfer the necessary data and keep track of the state on the client side, the probability of getting across the needed data in decent time increases a lot.
Moreover, a connection drop while transferring a binary and/or complex structure like a whole database is much more serious than a loss of a small and simple structure like a single product record.
Admin
Admin
TRWTF is that the photo of the building has an alternate text "Photo Credit: 'Thristian' @ Flickr" instead of some meaningful description
Admin
pls can you send me,whatdo you mean by timesheet and lmportant of timesheet,and why l will want it very fast
Admin
Hmm, this flow reminds me of a process in the application I support and maintain...
However, in our application (which shall remain nameless), there are two options: Creating a "Full" order, and creating an "Empty" order.
An empty order is basically an order header; the user creates the header, then can use a wide range of search options to add items to the order.
If you create a full order, it does pretty much what the WTF does; creates an order header, then adds every product available to the user to the order details table. The user can then select quantities in the UI, and when he saves it, any un-ordered products are removed.
However, if after saving, the user decides he wants to add more products, it just uses the logic from the Empty order - it doesn't copy the full list again.
The reason our logic isn't quite a WFT is firstly that we have a choice, and secondly the restriction that only products available to the user are included in a Full order. A fairly common retail situation is where the store has a small range, and orders at least one of almost everything (think a store placing an order from the Coca-cola supplier - there's only half a dozen products, and he wants most of them). In this case, having the full list available (so the user just types in quantities, no product codes) is a great bonus.
Of course, the WTF for our product is when users complain that creating an order takes too long. 99% of the time, it's because they've decided to create a full order from a major warehouse supplier - even though all they want is one item!
Admin
Admin
What?? They stole my design! (and they sell it overpriced too..)
Admin
So you are saying that the customer is to blame for not making clear their requirements and THEREFORE the developer is excused to deliver an implementation with serious flaws in most of the real life cases.
You are right about one thing: customer silly. But.. where's your honour? Please remind me never to let you develop any applications for me.
Admin
One of the most important official requirements (right in the Marketing Requirements Doc) on the last project I worked on was:
It was mostly in there as a jab at the so-called UI design experts who were trying to turn a simple functional application into the epitome of style, flash, and web-2.0-ness. I ended up quoting it a lot when talking to them.
On a related-yet-not-IT topic, I dabble in community theater. One director's pre-perfomance pep talk consisted of a single sentence: "Try not to suck." It worked remarkably well.
Admin
Ah, another instance of Joseph's Law, which I invented at my first out-of-college job and named for a customer after a particularly difficult project:
99% of the time, what the customer asks for and what the customer wants are two entirely different things.
In this case, they had asked for a custom report which could only be done with an O(n-cubed) algorithm. Since n was in the millions, and this was in the late 80's on slow hardware, it took a very long time to run. When we gave it to them, they said "no, that's not what we meant". Turns out that what they actually wanted could be done in O(n).
Bad on me, the analyst, and the company for not analyzing and validating the requirements. Good for me that I learned the lesson so early in my career and have applied it since. Knowing the analyst and the company, I doubt they learned much ...
Admin
What's the point of using a database in the first place if you just iterate through the records anyway? I have seen a better (more efficient, more scalable, more robust, more easily maintained) order system than this written by one guy in less than a week.
Admin
WTF this process was not in the spec in the first place? I don't get it, I would be ashamed to post this and point fingers, you let it happen.
Admin
Admin
Don't tell me that you would deliberately develop crap software for a client if the spec allowed you to.
I think from your name that you're just joking here; I hope I'm right.
Admin
Actually, the two guys from Product Marketing that I worked most closely with were remarkably clueful. They usually backed me up in "discussions" with the "design experts".
Unfortunately, after a while the above statement became the only good thing about that company, and I moved on.
Admin
The design in the article is not just "non-optimal", it is downright idiotic. It's a laughably awful design and that's why it's on this site. Why are you trying to defend it?
I would certainly not want to contract you to write any code. "Even if the code is nonsensical crap, if it fits the spec it's fine!"
Admin
whoops, forgot this
Admin
"But that was almost worse because the categorization was such that, had it been say clothes being sold you could select by country/brand/style/size/colour but not be able to search just by size and style for example. It would have been hideously frustrating to browse."
That's what I hate about clothes shopping...
Items are arranged by maker/style/color, with different sizes in one pile.
As much as the clothing makers would like to think I'm shopping for their brand, I am in fact shopping foremost for something that fits, and within that contraint sytle/colors/branding may be considered.
I would love to go to something like a shopping mall with each stall containing, for example, 'Size 34 mens pants', 'Large mens shirts'... pawing through a pile of 30, 32, 36, 38, 40... sizes does no good if I'm size 34.
Admin
"Copy the entire content of the orders ... add quantity column ..."
Ever hear of normalization?
The old adage applies: Throw hardware at a slowness issue you increase performance by 50% Throw software tuning at a slowness issue, you get 1000% increase.
A 15,000 record insert PER SESSION? Holy shiznit.
Admin
Admin
Sounds like the ordering system in place for government schools in my home state... It had no search function, items were only allowed to exist in exactly one category and there was some overlap in category names. Simply placing an order for a box of pens could take hours if you don't already know which category the ones you want are in.
Admin
You had me at "Copy the entire database".
CAPTCHA: prominantly
Admin
But hey, DigiKey recently moved from a screen-scrapped system seemingly designed by a COBOL-speaking retiree with lots of big iron experience, to... the same effing thing, this time done in ASP.NET. While I do praise them that they take it step by step towards the state of the art, their ASP.NET skills still leave something to be desired... mostly in usability department ;)
Cheers, Kuba