News for hackers. Stuff that matters.
Re:Back in 1993, I was taking a number theory class by a3n on Monday May 03, 2021 @06:59PM (#27032000)
In 19 and 82 or 3, I worked at Lockheed Shipyard in Seattle, in a sort of tech writing capacity on a Navy ship building project, based on my recent experience in the Navy. The business closed with completion of the ships.

We had to fill out lots of forms that documented what we called "analysis," and we'd often have to change them based on some factor changing. One change could cascade through the whole form.

Paper forms. Green see-through plastic letter guides. Whiteout. Lots of whiteout.

We had access to a department mini computer, don't remember what it was. The language might have been Basic-like, but I didn't know enough to recognize it as such.

I figured out how to write and run programs, someone showed me how to print, and I wrote a program that would accept values for all a form's fundamental values, and cascade those through calculations for the dependent values, and print out the filled in form. You could save it, update a new value, re-cascade, and print it out again. No more whiteout.

Part of the calculation involved sorting. I didn't know anything about sorting, so I implemented what I later learned was bubble sort. Because that's obviously how you'd do that.

The system administer noticed more load when people ran my program. He found me, and told me not to do that again.

I learned that there was a thing called a system administrator. He might have given me a better canned sort, don't remember.

I eventually thought it would be a good idea to quit and go to school, so I did.

(I took a number theory class, but had to drop it. I don't have the math nature.)

Re:Back in 1993, I was taking a number theory class by WalterBright on Monday May 03, 2021 @07:51PM (#27032395)
In the same time frame, I worked at Boeing doing design work on the 757. I didn't know how to do complex numbers using drafting tools, but I knew how to use a computer. The only computer in the building was an '11 in a special locked room with raised floor and A/C. It was under the control of Boeing Computer Services, a totally separate division from Boeing Commercial Airplane Company, which I worked for.

Anyhow, I befriended the sysadmin and he on the sly gave me an account and the code for the door. I wrote a bunch of numerical integration matrix programs, and showed the results to my lead, who told me computer results were all bullshit (he'd gotten bad numbers from them before) and called over his best draftsman, and told him to show me up (all in a friendly way, he was a great fellow).

The draftsman worked for two days, and came up with a sheet full of numbers to 3 significant digits. Mine were to 6. We compared, and one was wrong. He said my number was wrong. I knew it wasn't, because continuous functions don't have anomalous behavior. He good naturedly agreed to redo that one, and in a while came back and said my numbers were right. After that, my lead trusted my work, and I got all the math work in his group.

Eventually, some manager in BCS discovered I was making unauthorized use of the '11, and went several management levels over my head to demand I be censured. My lead (one of the engineering treasures at Boeing) went to bat for me. That went many levels up, and the BCS manager got a smackdown and was ordered to legitimize my usage.

In another incident, I got the job of writing some test plan specifications. The usual technique was to hand write them and hand them off to the secretary pool to type up. I get writer's cramps after handwriting 5 or 6 words. The secretary pool was in a special doored room full of Wang word processors. All women, and the supervisor was a woman. I asked for access to a Wang, as it was faster for me to type than hand write. She said ok, but I'd have to take the 2 week Wang course first. I asked if I could just have a look at the manual. She laughed and said sure. She was sure I'd fail.

I looked through it for a few moments, fired up the Wang and started editing. It was, after all, just a text editor. The supervisor was annoyed, but she kept her word.

If I'd stayed at Boeing I'd have likely been the first engineer to bring in my own PC for my desk, at my own expense.

Re:Back in 1993, I was taking a number theory class by eitland on Tuesday May 04, 2021 @01:24AM (#27034313)
A friend of mine did something similar, although in a tax office.

Ploughed through weeks of works in days (he is really fast at typing too).

When he came back with his work the manager of course wouldn't belive him, set two men to verify it for weeks and they concluded it wasn't only correct but even had less errors.

After that he was "promoted" to a customer facing job (since he was "unqualified" to program).

My dad told me this story when I was a kid. It's how I ended up as a developer and why I still am.

Delighting customer by making weeks of boring work vanish into empty air is still fantastic.

Edit: I've been luckier than him. It is not always that people can be helped but I was never punished.

Re:Back in 1993, I was taking a number theory class by a3n on Monday May 03, 2021 @08:06PM (#27032523)
> In the same time frame, I worked at Boeing doing design work on the 757.

After I graduated I worked at Boeing in a test group, and wrote control software for test rigs, mainly to test Fuel Quantity Indicating Systems on the 57 and 67, 47-400, and 77.

That was in Les Carpenter's group, and they still had some test rigs lying around built with relays mounted on wooden boards.

Re:Back in 1993, I was taking a number theory class by bane on Monday May 03, 2021 @11:43PM (#27033861)
I just came to say I'm really enjoying this trip down memory road. Please keep the great stories coming!
Re:Back in 1993, I was taking a number theory class by dreamcompiler on Tuesday May 04, 2021 @10:08AM (#27037745)
> hand them off to the secretary pool to type up

This brought back a memory. In the late 80s I got a job at a very high-tech science and engineering firm. A colleague told me to be careful about writing code. His supervisor had walked by his office one day and saw him writing code on a terminal. He chewed him out for "typing" because "typing is for secretaries." Apparently the correct procedure was to hand-write your code onto a paper form and hand it to a secretary for entry into the computer. I assumed my colleague was joking but checked out the official procedure and it was true.

After that, I shut my door when I wrote code.

Re:Back in 1993, I was taking a number theory class by WalterBright on Tuesday May 04, 2021 @02:44PM (#27041235)
When I started using the Wang, I did get a bit of ribbing for doing "women's work". I laughed at that, and it didn't happen again.

Heck, I'd been using a computer to write my papers in college (using DECUS' runoff program, similar to Unix's man formatting program).

I can't remember the last time I hand wrote more than a few words.

Re:Back in 1993, I was taking a number theory class by seg_lol on Tuesday May 04, 2021 @04:30PM (#27042513)
I wonder how many of those women had to learn to code to fix the typos?

The level of structural sexism back then was off the charts, at least it was overt. Now we just tell people there is no glass ceiling and it must be their problem.

Re:Back in 1993, I was taking a number theory class by WalterBright on Tuesday May 04, 2021 @04:51PM (#27042728)
The Wang didn't allow for any coding.
Re:Back in 1993, I was taking a number theory class by seg_lol on Wednesday May 05, 2021 @09:14AM (#27049420)
Neither does paper.

I am wondering about error rates, human -> paper, paper -> file, file -> execution.

Those feedback loops are enormous. It would be interesting to interview woman from the computer code typing pool.

Re:Back in 1993, I was taking a number theory class by plausibledeny on Tuesday May 04, 2021 @06:46PM (#27043802)
Worked for a medium-size software company in the 90s. When our company got a new CEO someone at an all-hands asked him to describe his experience with computers. He was very clear that he didn't use them, wouldn't have one in his office and that he had an executive assistant for that sort of thing.
Re:Back in 1993, I was taking a number theory class by WalterBright on Tuesday May 04, 2021 @09:03PM (#27044876)
Probably the last of his kind!
Re:Back in 1993, I was taking a number theory class by ngcc_hk on Wednesday May 05, 2021 @03:47AM (#27047245)
I were tasked to migrate a pool of wang ladies to wang pc. It was horror (as the wang pc is not as good as their wang processor). The meeting turned into a nightmare for me. As some of these are also typist for all the top guys in the group the wang pc does not end up well. I survived. But still have dark feeling of a room full of wang ladies.
Re:Back in 1993, I was taking a number theory class by WalterBright on Wednesday May 05, 2021 @03:36PM (#27054612)
> But still have dark feeling of a room full of wang ladies.

They all either ignored me or were nice to me.

The interesting thing is the supervisor, who sat facing the workers like a teacher in a classroom. When she found I could use the Wang as well as anyone by just looking at the manual for a few minutes, she realized that her fiefdom was doomed. Her moat had been the 2 week training course.

I kind of felt sorry for her.

Re:Back in 1993, I was taking a number theory class by yumraj on Monday May 03, 2021 @08:51PM (#27032843)
And now you’re a semi truck driver.. how did that happen from soft developer to semi truck driver?
Re:Back in 1993, I was taking a number theory class by a3n on Monday May 03, 2021 @09:07PM (#27032951)
Anger and poor impulse control led me to rage quit a job. And I wasn't the best developer. I don't think any job was ever sorry to see me go.
Re:Back in 1993, I was taking a number theory class by chris_wot on Monday May 03, 2021 @11:23PM (#27033739)
How do you deal with idiot drivers though?
Re:Back in 1993, I was taking a number theory class by a3n on Tuesday May 04, 2021 @04:37AM (#27035284)
I put my finger on the protective cover over the laser turret switch, and usually that's enough. I've never actually lifted the cover.
Re:Back in 1993, I was taking a number theory class by mxcrossb on Monday May 03, 2021 @08:38PM (#27032753)
Great story. I wonder if somewhere on a site like the daily wtf you can find the sys admin’s retelling where he relays in horror how a bubble sort almost brought down the system!
Re:Back in 1993, I was taking a number theory class by kqr on Tuesday May 04, 2021 @02:54AM (#27034722)
It sounds like you essentially invented the spreadsheet. Nice work!

> Part of the calculation involved sorting. I didn't know anything about sorting, so I implemented what I later learned was bubble sort. Because that's obviously how you'd do that.

I would like to politely contest the authenticity of this specific detail. In my fairly strong collection of evidence, people just do not bubble sort without being told how to do that.

People's natural mental sorting algorithm is most often insertion sort. That's what you use when you hold a hand of playing cards, for example. Sometimes something else (radix sort with monopoly money, for example), but I've never seen anyone invent bubble sort without first being told about it one way or another.

(Which is a good thing because bubble sort is just such a stupid idea I don't know why we teach it. In my life, I've only ever been notified of one single good use case for it: you need to slowly converge on an order but the minimum amount of computation is necessary for each step of the convergence.)

Re:Back in 1993, I was taking a number theory class by gsliepen on Tuesday May 04, 2021 @03:57AM (#27035024)
> I would like to politely contest the authenticity of this specific detail. In my fairly strong collection of evidence, people just do not bubble sort without being told how to do that.

I taught a C programming class for first-year students for a few years at the end of the 90s, where one of the tasks was to sort an array of words, with no hints given as to what kind of algorithm they should implement. Most students came up with bubble sort. Insertion sort was much less prevalent, and the few students who did typically did a kind of out-of-place insertion sort. (I also saw a O(N^4) algorithm once.)

Re:Back in 1993, I was taking a number theory class by BlueTemplar on Tuesday May 04, 2021 @03:51PM (#27042083)
I "trolled" the professor by doing a random sort...
Re:Back in 1993, I was taking a number theory class by tragomaskhalos on Tuesday May 04, 2021 @05:13PM (#27042982)
A better troll would have been Sleep Sort :)
Re:Back in 1993, I was taking a number theory class by someguyorother on Tuesday May 04, 2021 @05:20AM (#27035517)
> I would like to politely contest the authenticity of this specific detail. In my fairly strong collection of evidence, people just do not bubble sort without being told how to do that.

FWIW, my first sort was selection sort. "Find the smallest element, place it at the start, repeat" seems like the obvious way to do it, without the fussing about with shuffling already sorted elements out of the way that insertion sort requires.

Perhaps it's a thinking top-down vs bottom-up kind of thing? People who think bottom-up stumble on bubble sort, people who think top-down stumble on selection or insertion.

Re:Back in 1993, I was taking a number theory class by kqr on Tuesday May 04, 2021 @05:34AM (#27035576)
I just now realised that when I talked about insertion sort I really meant selection sort. How embarrassing of me to lecture others and then go on to make such a basic mistake myself!
Re:Back in 1993, I was taking a number theory class by a3n on Tuesday May 04, 2021 @05:04AM (#27035444)
> I would like to politely contest the authenticity of this specific detail.

> People's natural mental sorting algorithm is most often insertion sort.

[embarrassed panic]

[trip down wikipedia lane]

No, it was bubble sort. Data and loop management for insertion sort wouldn't have been something I would have thought of back then.

Re:Back in 1993, I was taking a number theory class by kqr on Tuesday May 04, 2021 @05:22AM (#27035528)
What confuses me is that isn't the data and loop management for bubble sort even more complicated?

Insertion sort is literally just "keep track of the index beyond the last sorted element, then scan for the next smallest element and swap it in, repeat until you have gone through the entire array." This is about as simple as a comparison sort gets. (And it's what literally everyone I've watched does when they get dealt a few playing cards.)

Bubble sort, on the other hand, requires you to reason about consecutive adjacent swaps, keep track of whether the current iteration dirtied the array, and so on. (Just the idea of bubble sorting playing cards gets me sweaty. It would take long, be cumbersome, and hard to keep track of.)

Edit: who is embarrassed now? What I'm describing is apparently not insertion sort but selection sort.

Re:Back in 1993, I was taking a number theory class by a3n on Tuesday May 04, 2021 @05:29AM (#27035556)
But you're speaking from knowledge and analysis. I only had the perspective at the time of looking at the world through a paper towel roll. Anyway, it was the first idea that bubbled up for me.
Re:Back in 1993, I was taking a number theory class by tzs on Tuesday May 04, 2021 @10:46AM (#27038163)
> Bubble sort, on the other hand, requires you to reason about consecutive adjacent swaps, keep track of whether the current iteration dirtied the array, and so on.

You only need to keep track of whether or not the current iteration dirtied the array if you want to stop as soon as a pass leaves the array sorted. If you don't want to do that (or don't think of it) then it is just something like:

  for pass = 1 to n
    for index = 1 to n-1
      if array[index-1] > array[index]
        tmp = array[index]
        array[index-1] = array[index]
        array[index] = tmp
There is less extra to keep track of then in insertion or selection sort.
Re:Back in 1993, I was taking a number theory class by jacobolus on Tuesday May 04, 2021 @03:39AM (#27034900)
Re:Back in 1993, I was taking a number theory class by kqr on Tuesday May 04, 2021 @03:46AM (#27034946)
I did not expect that, but sure enough, makes sense when I look at it. Thanks!
Re:Back in 1993, I was taking a number theory class by louisvgchi on Tuesday May 04, 2021 @04:19AM (#27035162)
Bubble sort was perfectly natural to me before I learned about algorithms. I think your “fairly strong collection of evidence” is weak. We teach it because it’s a study in how not to sort, most of the time.
Re:Back in 1993, I was taking a number theory class by eru on Tuesday May 04, 2021 @04:05AM (#27035075)
> People's natural mental sorting algorithm is most often insertion sort. That's what you use when you hold a hand of playing cards, [...]

I agree about the playing cards. But bubble sort was the natural sorting algorithm for me to come up with, too, when I was dealing with qbasic back in the 1990s.

Re:Back in 1993, I was taking a number theory class by DonHopkins on Tuesday May 04, 2021 @06:45AM (#27036063)
Bubble sort is just fine if you're sure you'll only have a few items, or if it's likely that it might already be sorted, but it's still embarrassing admitting implementing it. Even Barack Obama knows that!

https://en.wikipedia.org/wiki/Bubble_sort#Performance

>The only significant advantage that bubble sort has over most other algorithms, even quicksort, but not insertion sort, is that the ability to detect that the list is sorted efficiently is built into the algorithm. When the list is already sorted (best-case), the complexity of bubble sort is only O(n). By contrast, most other algorithms, even those with better average-case complexity, perform their entire sorting process on the set and thus are more complex. However, not only does insertion sort share this advantage, but it also performs better on a list that is substantially sorted (having a small number of inversions). Additionally, if this behavior is desired, it can be trivially added to any other algorithm by checking the list before the algorithm runs.

>In popular culture: In 2007, former Google CEO Eric Schmidt asked then-presidential candidate Barack Obama during an interview about the best way to sort one million integers; Obama paused for a moment and replied "I think the bubble sort would be the wrong way to go."

Here's an implementation of bubble sort written in PostScript by Sam Leffler, renowned BSD/Lucasfilm/Pixar/SGI/Alias/Softimage/VMWare hacker, which he sent me and gave me permission to distribute in 1988, but which he was too embarrassed to sign his own name to, so he used the pseudonym "Bobo Leffler".

https://donhopkins.com/home/archive/psiber/cyber/bubblesort....

https://en.wikipedia.org/wiki/Samuel_J._Leffler

Also here's a PostScript heap sort by Owen Densmore of Sun, and a PostScript insertion sort by John Warnock of Adobe, both of whom used their real names:

https://donhopkins.com/home/archive/psiber/cyber/heapsort.ps

https://donhopkins.com/home/archive/psiber/cyber/insertion-s...

Re:Back in 1993, I was taking a number theory class by kqr on Tuesday May 04, 2021 @07:15AM (#27036297)
What is so revealing about that Obama quote, the way I see it, is how dangerous it can be to "teach what not to do". There's a significant risk the student ends up just remembering the wrong way and none of the right ways.
Re:Back in 1993, I was taking a number theory class by DonHopkins on Tuesday May 04, 2021 @07:38AM (#27036469)
https://en.wikipedia.org/wiki/Wikipedia:BEANS

Do NOT click on the red button.