| « Prev | Page 1 | Page 2 | Page 3 | Next » |
|
2.5000 is the new 2.500?
|
|
So TRWTF is that Andy can't handle fixed-point math?
|
|
Once the sales manager cleared the scene, he rounded his desk, gathered up the invoices, and reached for his nearest resume.
FTFY |
|
I'm personally curious how he managed to store 2.5 in a 16 bit int.
|
|
The sales manager had a row with his boss & then he took the sales managers word on it without speaking to his boss directly?
That really is stupid |
|
Aaah, the good old days of 6502 assembly. I still have a C64 hidden somewhere in my house for sentimental reasons. Ofc in those days i didn't have to worry about invoice printing. I was just a kid trying his hands on this new thing called personal computers and programming. Which meant playing Fort Apocalypse, Impossible Mission and Aztec Challenge a lot. Until the boredom set in and i wanted to make my own games. That is how it all started for me. In the end there was no great games programming career for me, but now there a customers complaining about the layout of their invoices. I should get back to work.
|
I was also wondering about that. People who think that nothing's impossible if you yell loud enough and for long enough generally are also more than willing to lie when it suits their purposes. |
|
He's obviously not very smart, all he had to do was write a single line to the invoice 'all tonnage values must be multiplied by 1000 for actual values'
|
|
"Figure it out, and give my customers a readable print-out!"
I only hope that all the sales manager's personal customers are clearly marked in the database. Otherwise that feature request is impossible to implement... |
|
This is a very sad story.
|
Or just "all values are in European standard kilotonnes" |
|
So many WTFs!
But in the article itself... I can't understand why anyone would write invoicing software for a PET 4032 in assembler, when the built-in basic handled that sort of task perfectly well. Writing assembler for a PET was not trivial - machine code directly entered in hex was not uncommon for speed, but assembler generally required a whole load of messing around. Also, I wrote accounting software at about this time and I never saw anyone print invoices on green-lined paper! On top of all of this - thinking that "adding three zeroes" to the number would give the correct answer makes Andy TRWTF! |
|
> I'm personally curious how he managed to store 2.5 in a 16 bit int.
What's the problem? 2 in a byte, 128 in another - voilá! Ever heard of fixed-point math? |
Re: Wordy Invoice
2012-11-06 08:38
•
by
the beholder
(unregistered)
|
I was thinking the same thing. I guess I've been close to sneaky bastards long enough to learn not to trust customers or cow-orkers on spoken words alone. Also TRWTF is that Andy can't handle fixed point math. The least he should do is check how many zeroes actually must be appended for a correct conversion. |
Re: Wordy Invoice
2012-11-06 08:40
•
by
Doo-doo Facial Hair
(unregistered)
|
|
TRWTF is someone writing that kind of software in the early 1980s for an 8-bit computer in something other than Basic.
And the only kind of green-, blue-, or brown-lined paper I remember from back in the day was used to print out source code or listings, not documents for customers, but maybe such a thing was done somewhere vOv. |
|
The easiest option, is multiply the quantity by 10 and convert to int, then add 2 0's hard coded into the printout.
|
|
When I was your age, everything was greenbar and we liked it!
Then some weenie invented 8 1/2 x 11 white paper, with perforated strips along the edges that you could tear off. Which was all fine and dandy, except the printer was wide enough for greenbar and the white stuff didn't fit. Then you needed adjustable roller thingies. Then someone would spool a job without realizing there was white paper in the printer, and it would print right off the edge. Devil spawn, I tell you! Give me back my greenbar! You young 'uns missed out. Why you could walk around with a wad of greenbar tucked under your arm, and it was as good as a roll of hundred dollar bills. Chicks instantly realized that you were in the big-money computer business, a rising star! |
|
I call shenanigans! Anyone who was there knows that every report had as much info as possible crammed into the inflexible limit of 132 columns. There's no way you could add three zeros, or even one, to anything without running out of room.
Basically any requirements session boiled down to "if we cut off the last name at 8 characters we can add four digits to the zip code -- is that what you really want?" |
Hardly. Sales guys tend to have higher turnover than most. Should be, "Gathered up the invoices, shredded them, restored the code to the original form, and then went home for the day. Later that week, the sales guy tried to get Andy fired, but ended up having his ears thumped by management. Everyone else was happy!" |
|
The easiest option is to multiply by 1000!
|
|
Sorry, but Andy is in the wrong here. Maybe the guy was as much as a dick as his story says, but he did nothing to explain the problem. And on top of that, his solution was wrong.
|
|
This is why nothing should be changed without getting people to sign off in writing. Also having a nice three week minimum turn around for change requests typically reduces the amount of issues that really need to be worked. Didn't review the changes in our test environment? Guess you will have to live with it for a few weeks.
|
|
This is why nothing should be changed without getting people to sign off in writing. Also having a nice three week minimum turn around for change requests typically reduces the amount of issues that really need to be worked. Didn't review the changes in our test environment? Guess you will have to live with it for a few weeks.
|
|
So, without the decimal place, 2 becomes 2000 but 2.5 becomes 25000, that there is the REAL WTF!
|
Very true. Just appending three zeroes in order to make a decimal value appear as though it's multiplied by 1000? Any idiot should know that this does not work, so he can only have done this in order to piss off this manager. Whether or not he deserved it, 5 minutes of decent coding would have had this sales manager out of his hair for the rest of the day. Instead he chose to ignore his wishes, rush the job, be cheeky and lie about it and ended up using whiteout on a stack of invoices, costing him time that he could and should have spent doing his actual job. |
|
I take it the WTF is how poorly Andy handled this situation?
Slap on an extra three 0's, really? |
Umm... I think you might have missed something... |
|
Waidaminute...
Doesn't an invoice usually take the form of: Item A Qty of A x Unit Price of A = Amount of A Item A Qty of B x Unit Price of B = Amount of B Item A Qty of C x Unit Price of C = Amount of C Grand total Presumably the unit prices were all in kilotons before, so if Andy just changed the way the quantities were display without also changing the unit prices, the invoice would be all kinds of messed up. TRWTF is that the company let Andy anywhere near any sort of maths. Maybe he should have been fired. |
|
What the hell were they selling hundreds of thousands of tons of?
|
|
Is it really that hard?
; Assuming Val is 16-bit Qty / 100 |
Re: Wordy Invoice
2012-11-06 09:37
•
by
Pluvius
(unregistered)
|
Toenails. |
|
Just got done loading two new boxes of greenbar into our ancient beast, so I am getting a kick out of this.
|
Re: Wordy Invoice
2012-11-06 09:45
•
by
OldCoder
(unregistered)
|
Don't get out much, do you? Grain? Coal? Steel? Fertilizer? Fish? Cement? I could go on, but I have a website to read. |
|
you obviously didn't ever hear about fixed point decimals.
|
|
The first 5 comments are good comments!
What has happenned to this site? |
|
The Real WTF is Andy.
Uses hack, creates inconsistent output that is confusing and makes the problem worse than before. Acts like a bit of an arse to boot. Should have said it wasn't possible, and explained why. |
Re: Wordy Invoice
2012-11-06 10:13
•
by
fanguad
(unregistered)
|
You certainly could do fixed point math, but this specifies that the largest value he could store in his 16 bit word is 65536 - which means he's using unsigned integers. In reality, they probably did use fixed point math and "TRWTF" is all the errors introduced during the re-writing of submissions. |
|
Pretty story, but TRWTF is Andy being to lazy to do its actual job, or being able to stand his ground (who changes customers invoices snapping his fingers ?).
Whatever... |
LOL - in the UK we only have Tipp-Ex and i've never heard of whiteout. Until I read NMe's comment, I assumed whiteout was some kind of strong cider and he was just going to get hammered :-) (oh - and just to add to the confusion, cider is different in the UK too) |
|
As well as tipp-ex we used to have liquid paper.
Pretty-printing of numbers is tricky. Anyone want to try it in their favourite language? My guess is that they were storing "fixed point" numbers if they allowed 2.5 |
|
This sounds like a fairly trivial problem to solve, even in 6502 assembly, I get the impression this guy is just lazy. If the same invoice printing code is in 600 different places, write a set of find/replace expressions? Original submitter, please feel free to chime in on how the editor messed up your story.
|
Re: Wordy Invoice
2012-11-06 11:01
•
by
Publius
(unregistered)
|
I can confirm that to this day Walmart still prints out accounting totals on green-lined paper on dot matrix printers. |
Yes, but accounting totals are NOT invoices! |
Re: Wordy Invoice
2012-11-06 11:09
•
by
Captcha:appellatio
(unregistered)
|
It got fascist mods. You fascists! |
|
Wite-Out, no h.
https://en.wikipedia.org/wiki/Wite-Out |
|
I miss greenbar; I miss making little springs out of the perforated edges *sigh*
|
Non-pertinent but interesting information here: https://en.wikipedia.org/wiki/Correction_fluid |
|
So, he didn't get confirmation from his boss, his solution was laughably wrong and terrible, he acted like even more of an ass than the sales guy at the end, and then decided to use wite-out instead of fix the code properly and leave for the day? TRWTF is Andy. Also someone needs to teach the new writers that we like our HTML comments.
Speaking of writers... "Because he wanted to knock off at 3:02, obviously." Knock off...? As an American, the only thing that means to me (when it doesn't take an object, i.e. "knock it off") is to copy something (possibly cheaply), so what is the author trying to say here? |
|
The real problem is that 2.5000 is wrong. He added three 000 to both 2 and 2.5 which gets you 2 thousand and 25 thousand. Also, if this was for Europe it should have been a comma in the abbreviated version. TRWTF is the fail programmer.
|
| « Prev | Page 1 | Page 2 | Page 3 | Next » |