- 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
I work for one of Beaglesoft's little competitors, and we do use WHERE clauses and client-side caching of the patient list.
The funny thing is that another of Beaglesoft's competitors (actually the one with the greatest market share) had exactly the same type of problem with their "Enterprisy" product in 2004. It seems that both of these companies developed and tested their distributed solutions with all of the computers on the same 100MB LAN. It was slow, but not any slower than their original version, so no one noticed.
Four years later, and although their have been some improvements it is still not technically client/server. Once a patient is selected, all of that patient's data gets shoved through the pipe with all the processing done at the client.
But hey, if the had figured out how to do it right I wouldn't have a job!
Admin
The doctors link in the footer of the home page is broken, and then gives the nice "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
Admin
Great article.
The Beaglesoft name reminds me of the Beagle Bros from the Apple II days...
Admin
I think you've outdone yourself this time, Alex and Aaron B. This is the most entertaining writeup, and most outrageous WTF, that I've seen in a very long time. Pretty much made my day.
Admin
Mind you, it can be argued that it's so far short of fast, this counts as a double failure and cancels the correctness. Ye flipping gods, full table scans, full result sets and no client caching.
Admin
Seriously, though, what are you suggesting, that PHP programmers have better database management skills, or just that every business product needs a DBA?
Working with sequentially-accessed instance-based class hierarchies and working with set-based relational data are two very different skills, I grant you that, but there's no reason a person can't have both skills. Being a C++ or Java programmer is hardly an excuse for sloppy architecture.
Admin
Oi! I've come along behind those guys (or at least it seems like it) - Lots of unhappy campers and then I said "must be something wrong with your sproc calls..." only to be asked, "what's a stored procedure....?" Apparently, of the 10 "programmers" working on the project, only one actually knew how anything worked other than the GUI and he wasn't familiar with stored procs (on a SQL Server no less!!!). 15 minutes later (took a while to browbeat the "programmer" into letting me see the "code") what was taking, literally, 60-90 minutes to run was returning results in < 1 second.
Admin
Idiot programmers are too clever for you. They'll just add "WHERE 1=1" at the bottom of every query.
Admin
If I'd designed SQL, I would have made sure that WHERE clauses were mandatory. Making them optional has made a handful of lucky queries marginally shorter... at the expense of producing some truly horrible systems.
And I know plenty of inexperienced developers who've had an "accident" with their data by forgetting the WHERE clause on a delete statement. It's not a mistake (m)any of them make twice, but they always wish it'd thrown an error rather than just deleting the entire customer table.
Admin
The real WTF: (1) Where was the test servers, capacity planing, and load tests performed before the actual migration? (2) Where was the user acceptance testing and system load testing after migration before go-live?
The article made is sound like the first time for migration was that weekend, and they just crossed their fingers and hoped it worked. I understand it's 4 dentists and small offices, but the consultant should have been able to avoid a lot of unhappy clients with some planning and prep work. If you trust the vendor alone, you will get burned.
Admin
Admin
I'll see your dentists and raise you some cab drivers...
Admin
Admin
Having worked in the practice management software arena, I guess I'm not too surprised. By the time I landed in the industry at one particular company, much had already been cleaned up.
But I did see queries that many *'s in them (nobody has ever convinced me that it's a good idea), nested cursors, transactions that included SELECT statements, and a host of other performance killing code.
Admin
So it's Capitalism?
You seperate dentists (or nurses, etc) from patients, and use an xref table to link them, allowing for any kind of combination. Patients can see more than one actor (dentist, nurse, lab) and actors can have more than one patient. Beautiful world we live in.
Admin
There is some benefit to writing a business app in a language that makes it extremely simple to create windows and controls (VB .NET/C# .NET) versus MFC C++ or <shudder> pre-MFC C++. You can spend more time on business logic and less time on the interface.
Admin
I'm pretty sure I've seen this or a very very similar dentistry practice management software in action at a dentist office that I only visited twice on the "rich" side of town. They charged a shitload for all of their various services, and tried to upsell their clients on teeth whitening and such, but the real gem was their software system when I first saw it in action.
The first time I went there, it was Windows 2000 machines, and the assistants had to speak into a mic to record a number to rate the dirtiness of every tooth in your mouth. This was around 2004 as well, and the voice recognition was of course horrible. The assistant kept getting pissed at the computer, even rebooted it once while explaining to me that they were all having "real problems" with their machines that day. Well no shit, sherlock! You're using Windows to run a medical practice - and not just for the billing stuff! The next time I went back, which wasn't until this past spring, they were no longer using the voice recognition, but they were now running Windows XP, streaming audio off of Live365, and the receptionists all had their fancy little headsets like the floor sales people at Best Buy and similar retail stores now have.
I realized then that my money was being wasted. I won't be going back to that dentist.
Admin
Admin
BTW, this particular WTF is an awfully good incentive for Enterprisey (dentists? Enterprise?) companies like Beaglesoft to outsource their technical work to <pick subcontinent of choice>. At least for brain-numbing "skillz" such as SQL. They couldn't do much worse, could they?
Hah! Take that, C/C++/Java haters!
Mind you, a decent C/C++/Java compiler would of course reject this silly "1=1" crap. Even if it was spelled correctly, as "1==1", you'd still get a warning. Or, presumably, in Java's case, a "PossibleAbuseOfAliasedBooleanWouldYouLikeToCheckThisWithAnAdultSupervisorException..."
Java is so much more advanced that way.
Admin
What do you care? As long as the price is ok and your teeth are clean.
Well, yeah. They don't all need a full DBA, but a consult from one would catch a whole lot of these problems early.
Admin
Bah! Only losers go for the low hanging fruit. I'm sure the code that parsed the thousands of results for each query was highly optimized. There was probably some inline asm in there.
God, I love it when programmers get obsessed with trying to pluck the highest fruit on tree... while passing up the big juicy ones right near the bottom. Oh, wait, no, I hate that.
Admin
Oh, come on. Any programmer worth his weight in salt knows how to use a where clause and probably even JOIN a few tables. Many even know how to apply indexes. Maybe they're not going to always write the most optimal queries, but it is generally enough for a programmer to go by the "make the database do as much of the work as possible" principle. Even if the programmer doesn't know a lot about SQL at first, he'll learn pretty quick just by keeping to that principle.
If you have to call in a DBA "consultant" to get basic queries right... something is wrong with the programmers.
-matthew
Admin
It's amazing how much database software development gets done on LANs and never tested across wide area or on wimpy computers. I work for a telecom company, and a lot of my customers have had applications that worked just fine when they did everything at their main office or using Citrix to do remote screens, but when tried to do a distributed helpdesk with one office in California and one in Asia or Europe, they'd find that their application software did a dozen little SQL queries per screen, and they were hauling all the data back and forth across the Pacific, 250ms latency, and trying to fit it onto a < 1Mbps connection. If things go well, that's only a few extra seconds per screen, but sometimes applications fail badly and turn into minutes per screen.
Admin
No, that's a clue that you have a decent process. The DBA is there, in part, to tell you to actually use indexes and in part to tell you why your query isn't going to use that index. He should be around to review your schema and queries during the design phase so you don't have to redo the schema when there's already customer data in there.
Admin
I agree that programmers should know the basics of SQL. And by basics, I mean knowing about indexes, keys, foreign keys, etc.
But I would also say that any non-trivial database app needs a DBA. Your programmers shouldn't be expected to write all the code + all the SQL stuff needed for the app.
We didn't have a (dedicated) DBA at my last job and it was rather painful.
Admin
ummmm... there actually IS a BeagleSoft
http://www.beaglesoft.com/index.htm
they specialize in time synch software
maybe check your faux names via this newfangled thing we call Google?
Admin
if it's sql server 2005, that's an excellent chance to get some serious bookmark lookups, however from the article, that is the least of their concerns... Probably need to index the tables first. :P
I'd really love to see the DDL for this sucker.. Just earlier today I had the joy of looking at a database that only had clustered indexes on identity columns as primary keys, and no other non clustered indexes whatsoever, nor were there any foreign key constraints to help you determine how the hell the relations were interconnected... Seriously, no fk constraints, and no indexes on what I'm guessing were the fks? :P
waiting for someone to push the red button that says on it "I believe fk constraints are a boon to performance and thus do not implement them!"........ :P
Admin
lol... I think he just stated it backwards so it just needs to be flipped around, WHICH, after rutherford, price, atkinson, strickland merged together, would still be wrong and would probably need to be M:N relationship. :P
Although it is funny and ironic that he follows up his explanation with the line "Good relational skills make it easy to extend SQL databases." :P
Admin
Admin
The real WTF is that this is not unusual at all. On a project I had the misfortune of working for, they did exactly the same thing:
SELECT * from person
Over a WAN.
And wondered why it didn't work. The project took years to develop and less than 1 hour to crash and burn. I could have fixed it in five minutes with that magical WHERE clause. Thats not the only one. On another project, I noticed a lot of full tablescans on a multi-million row table. Looking at the query, the developer had actually managed to use a WHERE clause, but forgot to create an index on the column. When I asked him why he didn't create an index, he basically said: "Its too complex".
Admin
Favorite quote from a computer class (from the instructor for Oracle CASE 5.1)
"These case tools help you write bad code faster."
Admin
I would have to agree with you. Consider the following: In Oracle, there is a special table called DUAL owned by SYS which contains exactly one row. It never queried directly, as the only column (DUMMY) contains the value 'X'. It is used entirely to return the value of an expression in a query, ie:
SELECT sysdate-1 into yesterday from dual;
SELECT round(1048576*1024/1000) into KB_ROUNDED from dual;
If you use Oracle, you will see code like this everywhere. On day years ago, a client called saying they where having major problems and nothing worked with their database. After troubleshooting with Oracle support for hours, I discovered someone had inserted an extra record into DUAL, breaking every SELECT INTO involving it.
Admin
It made Beaglesoft $7,000 + more than half the cost of the camera. That is the Beaglesoft sold the hardware, for a jacked up fee, plus the software for another jacked up fee.
Admin
I'd argue that it should be especially required for DELETE statements. Make people actually work to blow away all their data.
Compared to what, PHP? You could argue the greater overlap of PHP "programmers" with SQL in fact makes WTFs more likely. (Dave Bowman:"Oh my god! It's full of injection attacks!")
It's not about the language they use, but about whether they deserve to be called a "programmer".
Admin
http://patterson.eaglesoft.net/
Perhaps even more interesting?
Admin
Agree 100%. I've seen many projects fail badly because it was ASSUMED that the software performed well over a wide area network. The programmers AND the consultant should be shot.
The consultant might have an excuse if he was brought in at the last minute, but that was not the case here.
Who the hell codes these monstrosities any more? The mid-nineties were littered with the crappy two-tier designs. There was little excuse for them then and no excuse for them now.
Admin
That is an absolute gem of a quote!
Admin
Wow, all this client/server side talk, running MS SQL over networks, makes me think how hard it must be for you guys trying to do this using MS products.
May I make a suggestion, try using something that is inheritly scalable. Like JADE
www.jadeworld.com www.jader.co.nz (my crappy example site)
p.s. patterson.eaglesoft.net has way too many faulty links.
Admin
Too late to add meaningful commentary to this wtf, but the Google ad for http://www.HorrorDentalSurgery.com is... er... interesting... thanks Google.
Admin
Hey, the guys at BeagleSoft are professionals. Of course, they do not work with the entire dataset:
Admin
I work for a company where we basically do the same thing but for doctors...
I can't imagine a company not using WHERE clauses, that's a huge WTF.
Admin
These boards often look funny, because it's the crowded "standard" motherboard with an added area that's void of any chips short of the ISA-bridge and connector.
Admin
This is a classic MS Office Access upsizing conversion. The original local network Access application applies client side filters: the application upsizes to SQL Server without any changes.
Worse still, anything that you would implement as a stored procedure converts to a client side filter even if the original application did not have it that way. So the original application, which was probably using ISAM indexes to find matching records, gets converted to entirely client-side filters.
Admin
so they are on top of technology. justy 10 years too late.
Admin
you sure are a hero, and you sure are a voll_mensch
Admin
I didn't know you can do that.
CAPTCHA: nulla, yeah, that's what it is
Admin
Doesn't work in your area is all I get.
Admin
Years ago one of the first exercises in a telcom class was how to calculate the size of the circuit needed to handle your data. As this was back in the day of “Big Iron”, and only sending screens to terminals it was very simple. You looked at bits per screens, screens per day, etc. Then install a 9.6 circuit to your remote locations. I was working for a semi-major Main Frame software company in the Voice/Data area of the IT Department and you could go to the developers and actually get real numbers on this. Later with the advent of Client/Server and distributed computing all you would get from the programmers were blank stares. They had no idea what amount of data was sent.
The PC became the norm with 10 baseT to connect them it was easy for the developers to test there applications. The only problem was what worked nice and fast locally would slow to a crawl when used remotely. To combat this we would set up a Lab with 2 routers and CSU/DSUs and simulate a T1 between sites. By controlling the number of channels turned on we could vary the bandwidth from 56Kb 1.544Mb. and monitor the bandwidth utilization.
With the increase in bandwidth availability I suspect that now they just throw more bandwidth at the problem.
Admin
realistic db size is VERY important because the explain thing will yield different results for different table contents. the statistics will be different according to the data. and query optimizer uses the statistics to see if a given index is selective or not.
Admin
After reading this, I now feel much less ashamed about my first contact with DBMSs, a PHP-based hobby database of fanfiction where I merely faked a JOIN (which I didn't know) by doing an unqualified SELECT on one table and then for each result a SELECT WHERE on the other...