- 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
This is all seeming very familiar.
Admin
Usual story.
High-ups only see the immediate cost: 1000 pounds for a pair of chimpanzees or 100000 pounds for a professional developer. Lets go with the chimps!
Any attempt to explain how a badly written pile of junk that doesn't even do what they want is going to cost the business a hundred times more over a year due to maintenance, squeezing extra features into a pile of spaghetti code, bug fixes etc is never going to work, because these same people cannot see past the end of the day let alone the end of the next year (plus they get the immediate credit for getting something done cheaply; any problems after initial roll-out will be the fault of the in-house developers of course).
Admin
The code in this article makes me feel like I am reading a Franz Kafka novel...
Admin
Yep, you're bound to get shoddy outpout from lowest-bidder contractours.
Admin
As always, you get what you pay for.
Admin
Why worrying about different data types if you can use strings for everything? IMHO this practice only makes the code more manageable.
Admin
On top of that the code is properly formatted and nicely documented. Like a pro. Pull request approved.
Admin
Same kind of idiocy that I see reviewing code where everything's a string because reasons. Why return true/false or integers when you can return a dozen variants of "success" all checked for in full case sensitivity?
Although...I have to ask what's wrong besides the conversion to string in GetIntegerValue(). I have a dozen such functions in a library, except the return and default are nullable, so that overloads that need a type to come out can just call GetValueOrDefault() on the result. Because 1) I got sick of Int32.TryParse() structures everywhere and 2) NULL and 0/blank are often functionally equivalent.
Admin
That company is just compounding its problems going with MVC and lowest bidder. Where I work, MVC is treated like a silver bullet - "if only all programs were MVC, any developer could do anything good and fast and cheap!" So they're always agitating to take programs that are well written with no/low maintenance costs and ruin them with an MVC rewrite. When you have a lousy contractor that writes a regular program, you can eventually fix it. When you get these MVC clowns doing 20 layers of JScript services over Entity with NuGet, it's all but impossible to untangle it without changing the underlying design and every place that I've been saddled with such a nightmare even suggesting such a change is a cardinal sin. When you can't spin straw into gold with one spinning wheel, they get another and another and another, because nobody wants to lose face by admitting a poor choice of design or tool is really to blame.
Admin
Good - Fast - Cheap
Choose two
Admin
I think they chose the third on it's own.
It won't work out that way, Oh God no.
Admin
From the looks of it, I'd guess that at some point their developers were shouted at for using floating point because it "wasn't accurate enough", so they decided to give themselves all the numerical accuracy they'd ever need by making all their numbers strings.
It's all obviated, of course, by the final function which converts the string-number to the decimal type, a type that was specifically designed for high precision, but there's a reason these people were the lowest bidders.
Admin
I always state it as "choose two or less." It's quite possible to pick zero out of the three.
Admin
That GetIntegerValue code is probably the most WTF'd up thing I have ever seen... and WTF is the special char that ClearSpecialChar is clearing?
Admin
Well, the function GetDecimalPlaceValue does appear to do rounding correctly as long as you are rounding to the 5th decimal place. And since that is the case that is mentioned in the comments, then the comments are in fact accurate.
I don't think that knowing those facts makes me feel better about this code though. Instead it just shows what test-driven development degrades to when done wrong.
Admin
So they should have used highly-paid consultants instead? Surely that would have resulted in excellent code quality with no maintenance problems whatsoever.
Admin
Built-in libraries are hard.
But then again, the contractors were being paid to write code, even if it means reinventing the wheel.
I'd love to see what they do with dates.
Admin
Paying out the ass for consultants works so well for the government, after all.
Admin
The public pushes for privatization because they think it's cheaper (it's not), the contractors perform terribly but slap state branding on the raging dumpster fire, and the public ignorantly blames public employees for a clusterfuck that they weren't even remotely responsible for.
Admin
Ladies & Gentleman, I give you the winner of the "Masochist of the Year" award.
Admin
Strings as general type for everything - that's what it's like with DOS/WINDOWS batch variables.
And (Apple's) HyperCard. Where we have autonymy for the [del]programmer's[/del][ins]code chimp's[/ins] convenience: if a variable name is undefined, it is replaced by the name as a string constant.
Admin
Yes, and it is quite possible to pick one, in particular 'cheap', get none of the three.
Btw, I really miss the triangle with 'cheap' at the bottom in Wikipedia's article about the Project Management Triangle. I can only guess why they removed it - maybe because too many PHBs said, 'as you clearly can see: "cheap" is the base of all three!'
Admin
Not for long. Developers will leave for green(er) pastures soon, and what remains (and what the new hires will be) are just another bunch of chimps.
Admin
Moderation held for comment.
Admin
My experience of Gubbermint contracts is that they might go find some well known consultancy firm who promises that you get best-of-breed skills for thousands per day, but all they do is farm it out to subbies, grads and outsourced partners in India. Sometimes they get lucky (like, they get me :D), but usually it's practically the same as lowest bidder stuff.
I've seen my own time getting billed out at 4 times my day rate, and I'm not exactly cheap. If they could get some poor sap with the appropriate clearances for half the price, they most certainly would, but they wouldn't reduce their rate if they did.
Admin
I just spent a large part of a development cycle ripping out a crap-ton of very similar nonsense from some WPF code written by some former WinForms programmer. His problem seemed to be thinking that since XAML textboxes display strings, then all numeric values must be converted to strings from the get-go and then manipulated in string form. I wrote a simple subclass of the Textbox control that accepted decimals and was able to get rid of a boatload of scary stuff like this.
Admin
In engineering we always say:
You think I'm an expensive engineer? Try and hire a cheap one and see what it costs you?
Admin
This reminds me of the time that one of our developers was writing his own Trim() code.
You can do it but why not use the C# library...
Admin
My co-worker wrote a Trim function using Regex because the build-in Trim function couldn't remove a certain space character at the end of a string. I took a look at the string and found that it was not the usual space character (0x32h) but another space character (0xAOh).
Admin
Sorry, it's 0x20h, not 0x32h. 32 is the decimal value of 20h.