Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Books Programming

Cheeky New Book Identifies 26 Lines of Code That Changed the World (thenewstack.io) 48

Long-time Slashdot reader destinyland writes: A new book identifies "26 Lines of Code That Changed the World." But its cheeky title also incorporates a comment from Unix's source code — "You are Not Expected to Understand This". From a new interview with the book's editor:

With chapter titles like "Wear this code, go to jail" and "the code that launched a million cat videos," each chapter offers appreciations for programmers, gathering up stories about not just their famous lives but their sometimes infamous works. (In Chapter 10 — "The Accidental Felon" — journalist Katie Hafner reveals whatever happened to that Harvard undergraduate who went on to inadvertently create one of the first malware programs in 1988...) The book quickly jumps from milestones like the Jacquard Loom and the invention of COBOL to bitcoin and our thought-provoking present, acknowledging both the code that guided the Apollo 11 moon landing and the code behind the 1962 videogame Spacewar. The Smithsonian Institution's director for their Center for the Study of Invention and Innovation writes in Chapter 4 that the game "symbolized a shift from computing being in the hands of priest-like technicians operating massive computers to enthusiasts programming and hacking, sometimes for the sheer joy of it."

I contributed chapter 9, about a 1975 comment in some Unix code that became "an accidental icon" commemorating a "momentary glow of humanity in a world of unforgiving logic." This chapter provided the book with its title. (And I'm also responsible for the book's index entry for "Linux, expletives in source code of".) In a preface, the book's editor describes the book's 29 different authors as "technologists, historians, journalists, academics, and sometimes the coders themselves," explaining "how code works — or how, sometimes, it doesn't work — owing in no small way to the people behind it."

"I've been really interested over the past several years to watch the power of the tech activists and tech labor movements," the editor says in this interview. "I think they've shown really immense power to effect change, and power to say, 'I'm not going to work on something that doesn't align with what I want for the future.' That's really something to admire.

"But of course, people are up against really big forces...."

This discussion has been archived. No new comments can be posted.

Cheeky New Book Identifies 26 Lines of Code That Changed the World

Comments Filter:
  • by drinkypoo ( 153816 ) <drink@hyperlogos.org> on Monday November 28, 2022 @07:04AM (#63084770) Homepage Journal

    I wore that shirt on multiple plane trips and didn't go to jail.

    • Nobody did ... it was done to highlight the absurdity of export laws in a digitial age

  • by ei4anb ( 625481 ) on Monday November 28, 2022 @07:21AM (#63084794)
    • by alien-alien ( 471416 ) on Monday November 28, 2022 @11:39AM (#63085188) Homepage

      Ahh the old days, where the hardware designers rarely talked to the system designers and programming magic had to be performed to get PDP-11s to run anything multi-user at all.

      A related story (where I was just a fly on the wall), was how to implement paging in UNIX (Series 6, I think the days before Bourne Shell, the days where /bin/sh had only one prompt (“% “, unless you were root ‘# ’), and “do-done loops” were a gleam in someone’s eye but I digress).

      George Coulouris (QMC London University) employed an IT person (before the term was invented) who was a real UNIX Guru. I *really* wish I could remember his name - he taught me the basics of how to treat impatient students (of which I was one), who would nag while we waited for him to magically key-in disk i/o block-rewrites, from the 11/40 switches (before the days of microcode-handled consoles that could run fsck in single-user mode). The toggle-magic he would work in his sleep was essentially fsdb from some notes he made in machine code on paper. F***ing Brilliant!.

      Back to the story This “Mr. Guru” had much more complicated things to do in his spare time. He was one of the contributors to fixing the “Instruction Backup Problem” on PDP-11/40s. The early days of trying to get paging to work reliably on PDP-11s. There was a piece of kernel assembler code that would be invoked whenever a page-fault was hit. The job of this code was to reverse out the partially executed machine code instruction that caused the fault, load (from disk, or some other cache in memory) the not-currently-available block of instructions or data, subtract the correct number of bytes from the user’s PC (program counter), and do an RTI (return from interrupt) to get the user’s program to blissfully continue from where it was rudely interrupted. It was actually a huge switch statement in assembler - a piece of code to handle each instruction, with their combination of (possibly) indirected 2-address arguments.

      The major wrinkle here was that while it worked properly on an PDP-11/70 (for those who could afford that beauty), the rest of us had to make do on a PDP-11/40 (for which we grew fond and had to speak softly and kindly in its presence, in case it failed to properly write all the bits on a disk block and threw a block-checksum error and bring the whole machine down (again) and make the Mr. Guru dance over the toggle switches for an hour or so).

      From time to time a user’s “a.out” would throw a core dump for no good reason. I’ve no idea how Mr. Guru figured this out, but the problem was occurring in the Page-Fault interrupt service function. There was one instruction type for which enough information was not salvageable unambiguously - to backup the instruction to a point it could be rerun on RTI. I’m sorry but I do not know what the actual instruction was. The fix was to change the assembler to not generate that particular instruction (with its ambiguous indirected arguments) on a PDP-11/40. Ever again!

      Hats off to George C and Mr. Guru. Those *were* the days.

      • by rlwinm ( 6158720 ) on Monday November 28, 2022 @01:48PM (#63085578)
        IIRC, the PDP-11 did not have paging. It had a fixed number of segments (mainly like the 8086 did, for address bus extension). While segments could be swapped in/out you couldn't really do paging until the VAX-11 architecture. There are other reasons for restarting an instruction on a PDP-11 but the machine (as I knew it) didn't have a page fault interrupt.
  • 1988 must be years after the SKA virus on the Commodore 64.
  • by JasterBobaMereel ( 1102861 ) on Monday November 28, 2022 @08:24AM (#63084838)

    .....as neither did the authors ... It worked on a PDP-11 but was severely not portable as it relied on the way the compiler interacted with the machine ...

  • Connections (Score:4, Insightful)

    by rlwinm ( 6158720 ) on Monday November 28, 2022 @01:42PM (#63085556)
    This sounds like it's an entire book about an episode of "Connections" by James Burke. If you haven't seen that show (all of it, and Connections 2/3) then you are doing yourself an injustice.

If you have a procedure with 10 parameters, you probably missed some.

Working...