Industry


Ads by TechWords

See your link here


Sharky's picture
Sharky

Shark Tank

For once, credit where it's due

Flashback to 1979, when this student pilot fish really wants to be working as a programming intern at an electronic cash register company.

Instead, he's been assigned to put parts in little plastic bags for the people who solder the circuit boards.

All except for four hours a week.

"The computer we used in the parts cage had to run weekly inventory reports," explains fish. "The reports took about four hours to run every Friday, and pretty much shut the parts cage down because we were not allowed to kit components without first entering them into the computer, and the PDP-11 couldn't multitask."

But why should one report take all afternoon? Fish talks his boss into letting him look at the inventory software -- which, it turns out is written in interpreted Basic.

Fish inserts a few "got here at HH:MM:SS" debug lines to tell him how the run is progressing, and he quickly determines that, for all but five minutes of the four-hour run, the program is re-sorting the transaction history file.

And with tens of thousands of records, the bubble-sort algorithm that the program uses is, well, slow. A few dozen lines of code later, fish has implemented a more elegant sort.

"That Friday, when my boss kicked off the usual report at noon, the printer started dumping the report at 12:10 instead of approximately 4 p.m.," fish says.

"Of course, she thought I broke the inventory software and was in a panic mode. But after she went over the report and realized it was correct, she did something I will never forget."

First, fish's boss gives him a big hug and congratulates him. Then she walks him down to management row, where she gives fish full credit for his initiative and success in fixing the program -- and especially the fact that the manufacturing line would no longer have a partial shutdown on Fridays.

Then she tells the big bosses that, while she'll be sad to see fish leave her department, he belongs in software development.

Finally, she explains the real reason she has come to management row: the fact that fish has just earned a bonus that's larger than she's allowed to grant.

"The best part of the day, I think, was getting escorted to HR," says fish, "and having the same woman who said I wasn't qualified to be a programmer cut me a big fat check that was no doubt more than she made all summer, and doing the paperwork that put me into firmware development with my own office."

Sharky loves a happy ending. But send me your true tale of IT life, happy or not, at sharky@computerworld.com. You'll score a sharp Shark shirt if I use it. Add your comments below, and read some great old tales in the Sharkives.

Now you can post your own stories of IT ridiculousness at Shark Bait. Join today and vent your IT frustrations to people who've been there, done that.

What People Are Saying

What is this VM whitepaper audio/video pop-up that won't stop

What is this audio/video pop-up on the Shark Tank page that keeps coming back after I close it? It's a Virtual Machine presentation advertisement. ComputerWorld needs to get its act together and drop invasive advertising. I've closed it four times now.

Don't See Them

I don't see them, but that's probably because I run NoScript in Firefox. AdBlock is probably better still.

A bit about sorts

When I was working on my masters in Computer Science in the early 1980s, I decided to look into sorts. I tried various sorting algorithms on files of varying length and complexity (reasonably well sorted already, inverse order and random order) on a Vax 11/780 running Unix System III.

I discovered that for files of less than 5000 records, the algorithm makes no difference. For files larger than that, bubble sort may well be superior. Yes, algorithms such as quicksort may have fewer record switches than bubble sort, but the overhead for all those recursive subroutine calls ate up any savings from the more efficient algorithm.

I also found that on both quicksort and heapsort on that system -- which was fairly typical for 1983 -- died when the file was more than about 1 million records because they ran out of stack space.

Merge Sort

Who says he used quicksort? Merge Sort is also O(log(n)/log(2))

Incredible!

All those highly-educated computer science experts have been lying to us! It must be some sort of conspiracy to make us use their more complex sort algorithms when we could be using the good ol' bubble sort! Damn them!!

Wow!!

One in a million. This type of corporate behavior could not possible have survived 30 years to be working today at the same company. Too bad.

Snark

Ho Hum. Nothing to snark about today.

Would you believe...

I am reminded of the time my newest acquisition was assigned to the sorting room of a large client. Herit's only job was to ensure that the orange, star-like objects which made up approximately three percent of the client's throughput did not go through the left-hand thermal reducer, but was gently guided to the right-hand thermal reducer. The person-in-question protested that sheit was far more qualified to build the thermal reducers and demanded to know why sheit was being assigned to such scut-work (sheit used a different word, but I am given to understand that this is a family publication so I cleaned up herit's language). I just glared at her and pointed at herit's contract of indenture.

So, because sheit was bound by law to obey my orders, sheit did as sheit was told. And in the process discovered that the left-hand thermal reducer was about to melt down and that would have caused a rather large explosion, and that would have put a serious crimp in production. Sheit brought it to herit's supervisor's attention; the thermal reducer was replaced and production continued apace.

It wasn't until later that I explained to herit while providing herit a large bonus that I put all of my new acquisitions through such a test to see whether they were worth the indenture. Shortly thereafter I promoted herit to thermal reducer design, where sheit worked herit's indenture off in a record three klodia (equal to about two decades of your own time) through sheer genius. I understand that sheit is now living in the Dynalus Cluster, monitoring Kaluza-Kline interactions and making so much money that sheit is thinking of trying herit's tentacle at pseudo-star formation.

Hey, Doc!

Okay, this is just getting silly.

"Orange, star-like objects." indeed. Stop talking to us like we're hatchlings barely out of the hivemind nursery field.

Sheesh!

If I had a nickel

If I had a nickel for every time I've heard a story about how some young wet-behind-the-ears programmer saved the day by converting a bubblesort to a quicksort, I would own my own island.

I've seen variations on this story many a time on the Tank, but this is the only one I've seen with the poorly tacked on happy ending (which is pure fiction).

Fact is, I think the part about the parts bag and circuit boards was lifted from another story, about a color blind worker who was causing problems because they couldn't read the color codes on resistors when sorting the parts, but wouldn't admit to the handicap.