• (cs) in reply to Satanicpuppy
Satanicpuppy:
TopCod3r:
It is obvious the submitter of this story is not a PE (Professional Engineer). There is a major liability (legal) with the program recommending beam choices for a bridge. The only way to avoid this is to make the engineer suggest the beam, and only have the program tell whether it meets specifications or not.

I don't see how that follows. If the engineer wants a list of beams that meet X criteria, and the program spits out an accurate list, then all is well. If the program cannot be trusted to accurately judge whether or not a beam meets specified criteria, then it's just as invalid whether its talking about one beam, or one-hundred beams.

That's like saying it's the calculator's fault that the engineer made a math error. Regardless of the tools he uses, it's still his responsibility. I remember a case where the engineer was held responsible for a design decision that the contractors made without consulting him: the court decided that he should damn well have supervised.

Absolutely correct. I AM a PE, albeit computer not mechanical or civil which would be most appropriate to comment on this. Having said that the principles are the same; I have a stamp, and though I've never been required to, had I had the occasion to actually approve and stamp an electrical drawing, its my understanding that I would have used any and all tools and techniques available and appropriate to, correctly, to ensure the validity of the design satisfying any requirements and perhaps utmost, safety and reliability criteria. Regardless of the tool, be it a slide rule or super computer, approval of any engineering design is the responsibility of the engineer.

From what I recall of my P.Eng lic. studies (which is really an ethics and responsibility test), had you claimed "Its not my fault the bridge collapsed, the program said beam Qx45 would be strong enough!" any court would be perfectly within its rights to nail you to a tree.

• (cs) in reply to Zap Brannigan
Zap Brannigan:
SomeCoder:
Global Warmer:
Graham Stewart:
Hmm... the javascript root finder doesn't do so well with finding the root of negative numbers. :)

Why don't you tell me what the square root of -25 is?

5i? :)

5j?

e^{j\pi} + 1 = 0 </div></BLOCKQUOTE>


5k!

http://en.wikipedia.org/wiki/Quaternion

• CG (unregistered) in reply to Marc B

As he'd be paying to get a solution they'd already written?

So, the root problem solved like this would be:
function rootGuess()
{ ... }
Brillant!

You could probably find this algorithm pattern to find new large prime numbers as well.

• xtremezone (unregistered) in reply to SomeCoder
SomeCoder:
The university I attended had a professor who not only wrote part of the STL for C++ but was a math major. As such, he offered a down to the metal, C++, math course. It was applying mathematical equations to programming, basically. We dealt with round off errors, IEEE floating point specs (we had to write a version of the entire IEEE spec for one assignment and had to actually manipulate the bits to do it) as well as applying Newton's method to get accurate roots, etc.

Sounds like you guys might have enjoyed it. It had more direct application to programmers than a typical math class. It was one of the best classes I ever took there :)

That does sound good. :D <serious/>

• Crabs (unregistered) in reply to Gabe (OP)

<quote>You know you're right - I'm not a PE - thats a US term and I work exclusively in Europe</quote>

No one uses the term "PE" for professional engineer over here. "PE" is a different title, a "Paper Engineer". Maybe you've heard of them, they are new grads that just run around the company campus getting real engineers to sign off on things.

Congratulations, you've been trolled.

• Graham Stewart (unregistered) in reply to El Bartho
• tbrown (unregistered) in reply to Global Warmer
Global Warmer:
Graham Stewart:
Hmm... the javascript root finder doesn't do so well with finding the root of negative numbers. :)

Why don't you tell me what the square root of -25 is?

5i, of course!

• EMan (unregistered) in reply to Marc B

It's not always that easy to script a GUI...

• (cs) in reply to Marc B
Marc B:
Why didn't he just write a script wrapped around the vendor's program to iteratively feed in each beam size and have it print out the ones that passed the test?

That doesn't even make sense. Why have to write a wrapper script for what is obviously a flawed application when they have tools which already handle that?

Unless, of course, I've completely missed the facetious nature of your comment in which case I'm a tool myself. ;)

For those not already familiar with it, this is the correct way to approximate an inverse square root on a float:

float InvSqrt(float x){ float xhalf=.5fx; int i=(int*)&x; i=0x5f3759df-(i>>1); x=(float)&i; x=x*(1.5f-xhalfxx); return x; }

Some people claim that 1.0f/InvSqrt(x) is faster than sqrt(x).

• Anon (unregistered) in reply to Marc B

Why bother? Especially since their programs (shoddy though they were) worked better...

bjolling:
Actually when I did my internship at a construction firm, I had to determine the dimensions of a small concrete bridge. Off course I inputted the parameters into a "finite elements" application and got the results. Then the head engineer asked me to re-calculate it manually using the apps output so that they would have the calculation on paper, in case something should need to be reviewed afterwards. (I suppose after my bridge collapsed...) TopCod3r isn't as wrong as usual :-)

Just because you had to verify your results doesn't mean that tediously calculating everything by choosing one beam at a time is the correct way to do things. I expect they took the small list from their GWBASIC program and independently verified that. There was nothing in their story to indicate they didn't. This method would still be 100x faster than the "professional" program.

TRWTF is that it appears their program assumes you would do the calculation by hand and then run it through to check your work rather than the other way around.

• (cs)

If it's not legal to directly use computer calculations where you are, then choose a beam (or whatever) the computer suggests and hand-calculate ONCE for that item and see if it passes. You've still saved a crapton of work, and you really don't care if any other beams pass/fail, because it doesn't make any difference to you. And, even if it is legal to use the computer directly, why not do it by hand once anyways, just to be sure?

• fnord (unregistered) in reply to Jack V
Jack V:
But AFAIK almost everyone only calculates roots by hand a few times when they first learn it.

Count me as one of the odd ones out, then. Every once in a while I'll calculate the square root of a number by hand, either on a calculator (or calc app) or on a piece of paper, when I can recall the correct method for doing so.

• (cs) in reply to Marc B
Marc B:
Why didn't he just write a script wrapped around the vendor's program to iteratively feed in each beam size and have it print out the ones that passed the test?

Obviously their support wasn't up to par, so why buy the package from them?

• Manic Mailman (unregistered) in reply to Satanicpuppy
Satanicpuppy:
TopCod3r (Deleted as Troll):
...
...
Deleted as Troll?!?!?

Crap - the most entertaining thing about the dailywtf Is being blacklisted.

• John B (unregistered) in reply to Manic Mailman
Manic Mailman:
Satanicpuppy:
TopCod3r (Deleted as Troll):
...
...
Deleted as Troll?!?!?

Crap - the most entertaining thing about the dailywtf Is being blacklisted.

I second the motion.

• (cs) in reply to Atlantys
Atlantys:
5j!
I think the factorial is wrong.
• (cs) in reply to Sr Sw Eng
Sr Sw Eng:
TRWTF is thinking engineers cannot be good software developers. You know, as in Software Engineering.

The answer is "Software Engineering". The question, Alex, is "What is neither Software nor Engineering?".

• (cs)

Maybe Alex or whoever deleted my comment is trying to send me a message?

I have tried to be respectful to others and add another dimension to The Daily WTF, a dimension that I think some have enjoyed and many junior-level developers have learned from ;) And I enjoy posting and teaching others as well. Is there a reason my comment was picked on and deleted?

As for my comment, the one that was deleted, I think at least one other person agreed with my statement about potential liability.

I have seen MANY posts with abusive and offensive language (even directed at other posters) that were not deleted. What is the rule for this kind of moderation?

• Anon Ymous (unregistered) in reply to Worf
Worf:
Root finding - can't we optimize it a bit and just "guess" that the initial root is the number entered? (Or to optimize further, half the initial value, and then just test for 1).

That way we have an automated square root function.

The next challenge is figuring out what the stop condition is.

There's an initial guess so good you only need to perform 1 iteration to get within 0.1% of the square root:

http://www.codemaestro.com/reviews/9

• (cs) in reply to TopCod3r
TopCod3r:
I have seen MANY posts with abusive and offensive language (even directed at other posters) that were not deleted. What is the rule for this kind of moderation?

The first thing to remember, Neo, is that there is no rule.

• Lucio (unregistered) in reply to Marc B

because he was paying not to do any programming? that was the selling argument "don't waste your engineers in programming tasks".

• Dan (unregistered) in reply to Marc B

maybe because he's an engineer and not a programmer, and probably has no idea how to write a wrapper for a GUI application?

For extra credit...

Rewrite the script so that it calculates square roots using Roman numerals.

• Zap Brannigan (Deleted as Troll) (unregistered) in reply to KattMan

Most of my career has been spent writing customer software and then replacing it with canned software that wasn't as functional.

• (cs) in reply to NotTheDroidYou'reLookingFor
NotTheDroidYou'reLookingFor:
It's obvious the engineering firm was just too stubborn for their own good. All they needed to do was write a program to automatically input values into the forms to try every beam. When will people learn that fear of change is paralysis?

Come again? Everyone who suggest do to that seriously has got to be kidding! Please tell me you're kidding.

If I a vendor came to me with some stupidly expensive software package (safe enough to assume that specialized software such as this also carries a specialized astronomical price tag) and required me to write my own scripts and such to make it do anything actually useful I'd tell them to just please kindly fuck off and have a wonderful day. Seriously, when buying such software I better not be having to spend my time working around it's shortcomings.

I mean seriously, why is it so accepted among people to pay stupid amounts of money for shit software and then spend your own time and additional money trying to get it to work the way it should have in the first place?

• Osno (unregistered)

I have worked for several years as a Business Analyst for the financial industry, and I don't see the problem with the story. I mean, it's perfectly reasonable to have software imitate what the user is already doing in paper, so they will be comfortable with it.

For instance, in a recent assignment we had a user who will daily, in a piece of paper, have two columns: one with amounts of stocks, one with prices. He'll add them in a third column and get a total from the sum of the values.

So we designed a program for him with a grid where he has three columns: he inputs the first 2 manually and then he has the option of showing a calculator (Windows Calculator, as it's very easy to implement) and the results of his calculation will be automatically inputed in the third column. He couldn't be happier with the results, and the programmers developed it in no time.

• (cs) in reply to Osno
Osno:
For instance, in a recent assignment we had a user who will daily, in a piece of paper, have two columns: one with amounts of stocks, one with prices. He'll add them in a third column and get a total from the sum of the values.
You might get a big bonus out of it if you introduced him to multiplication.
• (cs) in reply to TopCod3r
TopCod3r:
Maybe Alex or whoever deleted my comment is trying to send me a message?

I have tried to be respectful to others and add another dimension to The Daily WTF, a dimension that I think some have enjoyed and many junior-level developers have learned from ;) And I enjoy posting and teaching others as well. Is there a reason my comment was picked on and deleted?

As for my comment, the one that was deleted, I think at least one other person agreed with my statement about potential liability.

I have seen MANY posts with abusive and offensive language (even directed at other posters) that were not deleted. What is the rule for this kind of moderation?

Don't take any notice of Alex -- he's just on a sugar-loaded attention deficit disorder high after eating that mound of candy. We love you. Besides, there's no rhyme or reason in suggesting that you're trolling when the following slips through:
Osno:
I have worked for several years as a Business Analyst for the financial industry, and I don't see the problem with the story. I mean, it's perfectly reasonable to have software imitate what the user is already doing in paper, so they will be comfortable with it.

For instance, in a recent assignment we had a user who will daily, in a piece of paper, have two columns: one with amounts of stocks, one with prices. He'll add them in a third column and get a total from the sum of the values.

So we designed a program for him with a grid where he has three columns: he inputs the first 2 manually and then he has the option of showing a calculator (Windows Calculator, as it's very easy to implement) and the results of his calculation will be automatically inputed in the third column. He couldn't be happier with the results, and the programmers developed it in no time.

At, least, I think this is meant to be serious. In my experience, Business Analysts don't know diddly-squat about business, and tend to misplace the last four letters of analysis; but they do have a deplorable habit of being serious.

• (cs) in reply to pink_fairy
pink_fairy:
At, least, I think this is meant to be serious. In my experience, Business Analysts don't know diddly-squat about business, and tend to misplace the last four letters of analysis; but they do have a deplorable habit of being serious.
Well, I'm a software developer, not a business analyst. Maybe that's why I don't know why his client would be adding the number of stocks to the price.
• Leonardo (unregistered)

As a PE in Brazil, I can tell how it works here. In civil projects, you need the signature of TWO PEs on you project. The idea is that both would calculate all the elements separately and work out any mismatchs. They both share civil and criminal responsability if something goes wrong.

Law doesn't care how you reached your results, if by divinations using tea leaves or by using a supercoputer. You signed it, it's your ass.

A former diector of the engineering school I graduated almost went to jail because he signed hydraulic project for a friend, but didn't re-calculate. Turns out that the thing exploded and killed a person. The "friend" lost his license and went to jail for a couple years. The director was reprimanded, suspended as PE for 6 months, paid his ass off in both criminal and civil suits and was sentenced 3 months in jail, commuted to community services for a year.

For extra credit...

Rewrite the script so that it calculates square roots using Roman numerals.

You beat me to it.

So, what's the square root of 69?

• (cs) in reply to Osno
Osno:
I have worked for several years as a Business Analyst for the financial industry, and I don't see the problem with the story. I mean, it's perfectly reasonable to have software imitate what the user is already doing in paper, so they will be comfortable with it.

For instance, in a recent assignment we had a user who will daily, in a piece of paper, have two columns: one with amounts of stocks, one with prices. He'll add them in a third column and get a total from the sum of the values.

So we designed a program for him with a grid where he has three columns: he inputs the first 2 manually and then he has the option of showing a calculator (Windows Calculator, as it's very easy to implement) and the results of his calculation will be automatically inputed in the third column. He couldn't be happier with the results, and the programmers developed it in no time.

Ok let me make sure I understand this correctly.

Column 1 = # of Stocks Column 2 = Price of Stocks Column 3 = Column 1 * Column 2

And by your statement he has to himself, use the windows calculator, to fill in column 3!? WHAT-THE-FUCK!? Oh and, you had to "develop" an application to do this?

Hint: It's called a spreadsheet application. You know, Excel for example?

I do seriously hope I'm just simply misinterpreting...

• mbs (unregistered) in reply to Marc B

probably annoying at best to do this. plus, why waste your time writing a wrapper for software you hate when you already have written software you like, but are just bothered that you have to maintain it? you would be then further bothered by having to maintain the stupid wrapper software.

• Sitten Spynne (unregistered) in reply to Marc B
Marc B:
Why didn't he just write a script wrapped around the vendor's program to iteratively feed in each beam size and have it print out the ones that passed the test?
So basically you're suggesting that they should throw out their custom calculation package, purchase the vendor's product, then spend time and effort writing automation scripts to make the vendor's package do what the original program did in the first place?

Could you drop some contact information for someone in your company that's authorized to make software purchases?

• (cs) in reply to Kermos
Kermos:
Ok let me make sure I understand this correctly.

Column 1 = # of Stocks Column 2 = Price of Stocks Column 3 = Column 1 * Column 2

And by your statement he has to himself, use the windows calculator, to fill in column 3!? WHAT-THE-FUCK!? Oh and, you had to "develop" an application to do this?

Hint: It's called a spreadsheet application. You know, Excel for example?

I do seriously hope I'm just simply misinterpreting...

You're wrong on one point. He's adding column 1 to column 2. Not multiplying.

• PublicLurker (unregistered) in reply to Kermos
Kermos:
Osno:
I have worked for several years as a Business Analyst for the financial industry, and I don't see the problem with the story. I mean, it's perfectly reasonable to have software imitate what the user is already doing in paper, so they will be comfortable with it.

For instance, in a recent assignment we had a user who will daily, in a piece of paper, have two columns: one with amounts of stocks, one with prices. He'll add them in a third column and get a total from the sum of the values.

So we designed a program for him with a grid where he has three columns: he inputs the first 2 manually and then he has the option of showing a calculator (Windows Calculator, as it's very easy to implement) and the results of his calculation will be automatically inputed in the third column. He couldn't be happier with the results, and the programmers developed it in no time.

Ok let me make sure I understand this correctly.

Column 1 = # of Stocks Column 2 = Price of Stocks Column 3 = Column 1 * Column 2

And by your statement he has to himself, use the windows calculator, to fill in column 3!? WHAT-THE-FUCK!? Oh and, you had to "develop" an application to do this?

Hint: It's called a spreadsheet application. You know, Excel for example?

I do seriously hope I'm just simply misinterpreting...

No, you need to use customized software for this because a spreadsheet would multiply the numbers while the customer wanted to add them.

I actually think I know this analyst. He works in the derivatives market doesn't he?

• nik (unregistered)

The calculator works neatly with negative values as well. Ha ha!

• (cs) in reply to PublicLurker
PublicLurker:
Kermos:
<snip>

Ok let me make sure I understand this correctly.

Column 1 = # of Stocks Column 2 = Price of Stocks Column 3 = Column 1 * Column 2

And by your statement he has to himself, use the windows calculator, to fill in column 3!? WHAT-THE-FUCK!? Oh and, you had to "develop" an application to do this?

Hint: It's called a spreadsheet application. You know, Excel for example?

I do seriously hope I'm just simply misinterpreting...

No, you need to use customized software for this because a spreadsheet would multiply the numbers while the customer wanted to add them.

I actually think I know this analyst. He works in the derivatives market doesn't he?

Ok my poor little head is hurting. Why the hell would someone want to add the amount of stocks to the price of stocks? That makes no sense.

If column 2 is the price of stocks already multiplied by the amount of stocks, then what is the 3rd column for? The total would go in the second column below the list of stocks...

WTF...

• (cs) in reply to Kermos
Kermos:
Ok my poor little head is hurting. Why the hell would someone want to add the amount of stocks to the price of stocks? That makes no sense.
You have still yet to ask why the spreadsheet would "multiply the numbers when the customer wanted to add them".
• /b Zap Brannigan b/ (Deleted as Troll) (unregistered) in reply to mbs
mbs:
probably annoying at best to do this. plus, why waste your time writing a wrapper for software you hate when you already have written software you like, but are just bothered that you have to maintain it? you would be then further bothered by having to maintain the stupid wrapper software.
Shhh. That kind of talk will put me out of a job.
• (cs) in reply to Code Dependent
Code Dependent:
Kermos:
Ok my poor little head is hurting. Why the hell would someone want to add the amount of stocks to the price of stocks? That makes no sense.
You have still yet to ask why the spreadsheet would "multiply the numbers when the customer wanted to add them".

I'm beginning to fear that the reason looks something like this:

# of Stocks: 10

Stock Price: 20 Column 3: 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20

• Bob (unregistered)

In other news, dogfooding is still a good idea.

Also, practically anyone posting here could do a better job. Our friend TopCod3r (even if he was completely serious) would still be less useless than the guys writing that crap application.

And I'm betting they're making a lot of cash on their "enterprise" sales.

So, we know how to write software, and even the worst of us know how to listen to our customer's actual needs and thus write software that is useful. So how do we add the extra bit called "business skills" which is persuading people to give us money in exchange for solving their problems? My biggest personal WTF is not getting that bit right.

• Calli Arcale (unregistered) in reply to EMan
EMan:
It's not always that easy to script a GUI...

Somehow, that made me think of this XKCD strip. The tooltip text has excellent advice for every interface designer, actually.

• synp (unregistered)

What's not to understand?

100 stocks + \$35 per stock = 135

Simple, no?

Laughs aside, there is a point to making an application that mimics the user current experience, streamlining their workflow rather than attempting to revolutionize it. This is a general truth, but not always true.

If the engineers were using the old paper method, this would be seen as a great improvement. IOW, if this program had come along in 83 rather than 2008 it would be great. By 2008, I would guess that any engineer is using some kind of software, so improving on that has to include a beam catalog.

I would guess that the programmers did design this with engineers, but probably with older engineers who are no longer working "in the field". Probably haven't been working in the field since the 80s. Still, any usability study should have told them that this guess-and-check method is bad. I guess that's where the real WTF is.

• Marc (unregistered) in reply to Osno

The company should have fired the fossil still working with a pen and paper in the financial industry.

• (cs) in reply to tezoatlipoca
tezoatlipoca:
From what I recall of my P.Eng lic. studies (which is really an ethics and responsibility test), had you claimed "Its not my fault the bridge collapsed, the program said beam Qx45 would be strong enough!" any court would be perfectly within its rights to nail you to a tree.

I'm not an engineer. But I've no doubt that you're right and that any competent, ethical engineer would agree with you.

The trouble is, that in a Strict Liability environment - like the US - the buck may not stop with the engineer who's stamps the design. While the court is busy nailing the engineer to the tree, the plaintiff's attorneys will be busy adding the software vendor as a co-defendant.

So it wouldn't surprise me if the question of avoiding liability for engineering decisions played into the design of the "professional app." Of course, I still don't get how saying a beam meets your requirements avoids liability while saying "here's a list of beams that may meet your requirements" doesn't.

But then, I'm not a lawyer either. (I just spend way too much time talking to them!)

• (cs) in reply to GooberMcNutly
GooberMcNutly:
Sr Sw Eng:
TRWTF is thinking engineers cannot be good software developers. You know, as in Software Engineering.

The answer is "Software Engineering". The question, Alex, is "What is neither Software nor Engineering?".

I remember a software engineering paper at University where the lecturer spent some time describing why programming wasn't totally an engineering topic. It had the formal, rogorous disciplines of engineering but also a lot of creativity. For example, "Form follows Fuction" does not hold in software.

One of my coworkers describes programming as "A bastard child of art and engineering that bites back."

B