Blog

Spread of Terrible Programming Languages

Abstract—The English-like business programming language COBOL saw widespread use from its introduction in 1960 well into the 1980s, despite being disdained by computer science academics. This article traces out decisions made during COBOL’s development, and argues that its English-like appearance was a rhetorical move designed to make the concept of code itself more legible to non-programming management at computer-using companies.

I found some of the references much more interesting than the paper, which is a pretty high-level history avoiding the actual boots on the ground details.

COBOL was designed (and fought over very hard on this point) so that unskilled managers could "read" it, but in my view that had little to do with its spread. Middle management where that would matter has no buying power, and executives won't read more than a sentence on a slideshow.

Ubiquity made much more of a difference; no two computer installations were compatible until the late '60s, so the alternatives were COBOL, FORTRAN, LISP, and a hundred weird languages invented at each facility. Given those choices, I'd pick FORTRAN or LISP, but even COBOL would beat rewriting on every machine. A bunch of companies and government agencies ended up clustered on that choice, so it became widespread, not on any merits but because programmers could move code semi-automatically.

I know this because it happened at least five more times that I can think of, and only once with unskilled readability as a goal:

  1. BASIC is a tutorial language for children, very poor for large programs, very slow compared to C or ASM, grossly inferior to Pascal or Logo for any role. BASIC became ubiquitous because it can be implemented in a few K of RAM and worked nearly the same on hundreds of incompatible timesharing and microcomputer systems.
  2. Java is a mediocre Objective-C/Smalltalk replacement, applets turned out to be too heavyweight for the web and insecure, but cross-platform on servers turned out to be very valuable; cross-compiling C++ is a total crapshoot. Developers can have nice Macs and still compile Java code that runs on non-Mac servers.
  3. Linux (not a language, I know, but same pattern) is hot garbage, the product of a drunk, belligerent Finn student putting a kernel that'd get him a failing grade in an OS class on his 386. But because it's so quarter-assed and has no device driver support, it runs on anything like a virus. So now UNIX is all but dead, killed by a nematode parasite that fills the niche.
  4. PHP is a cruel joke, a gross hack to put server-side script in HTML instead of generating HTML in code or templating. But it was easily installed in Apache, runs everywhere with no setup. So half the web runs on this shit, from WordPress to Facebook.
  5. JavaScript started life as a six week hack to get LISP & Self-like programming, with C-like syntax for marketing reasons, in a web browser. And until early 2000s, it wasn't portable enough for anything useful. But when IE died and the other browsers implemented ECMAScript consistently, it became the universal language. It's still weird and fragile; I don't dare write it without eslint. But it may be the language of the century.

There's the similar case of IBM PC/DOS/Windows vs microcomputers and Macintosh, which were better tools but fragmented, but that's more about central authorities imposing Nazi-supporting IBM, and convicted criminal organization Microsoft bribing and extorting to kill competition. Common languages would likely have been enough to keep competition and diversity going if IBM & MS had been burned to the ground and their scatterlings shot as they ran back in the '70s.

The author of the paper sort of slouches in this direction but doesn't quite get it, when pointing out how science and technical culture has standardized on English. We are all incompatible machines, but a common language lets us argue.

I hate when papers list references without URLs:

  1. 10 PRINT CHR$(205.5+RND(1)):GOTO 10: Fun little book, not at all relevant to the paper.
  2. N. Wardrip-Fruin, Expressive Processing
  3. M.C. Marino, Critical Code Studies
  4. B. Schneiderman, The Relationship Between Cobol And Computer Science
  5. J. McCarthy, "Memo To P. M. Morse: A Proposal For A Compiler" Memo CC-56
  6. D. Nofre , M. Priestley , and G. Alberts, "When Technology Became Language: The Origins Of The Linguistic Conception Of Computer Programming, 1950–1960"
  7. M.D. Gordin , Scientific Babel: How Science Was Done Before And After Global English

Debugging in C

I've spent a horribly long time tonight staring at nested stack manipulation code now to get algebraic expression parsing (mostly?) working. I hate unary minus; life is pretty good except for that ugly little weiner with its binary operator twin, and then BAM weird compromises in your code.

For most errors, I rely on testing (even if just firing a test script through the language, as I'm doing with tbasic) and debug mode with verbose stderr logging. But this is C, where the slightest mistake can be EXC_BAD_ACCESS with no clue where. So then I need a debugger…

% make && lldb -o run -- tbasic -d test1.bas

[update: Forgot the -- before the program, which prevents lldb from reading those params. Command lines without parens are easy to get wrong!]

I don't really do much serious with lldb, I just need to see where an error occurred, backtrace (bt), and sometimes print some variables, to usually be able to solve a crash. It's a little frustrating that the lldb environment is so primitive, though, doesn't even have stdout, stderr (weirdly \<stdio.h> is callable), so how do I call utility functions? Had to rewrite some functions to take default NULL values.

Anyway, let and print (and error, my idiosyncratic stderr print) work, there's not a lot left in BASIC then I can get back to more serious things.

What I'm Watching: Struggle: The Life and Lost Art of Szukalski

A Netflix documentary on a largely-forgotten sculptor and artist from the early 20th C. I've seen a few of his pieces in underground comics and books, and had heard his Yeti conspiracy in SubGenius tracts but hadn't connected them previously. This film takes as primary source his bragging which exaggerates his influence, which in reality largely ended in WWII.

George DiCaprio, Leonardo's father, knew him, and both do narration and interviews and are making this film public on Netflix. So, take a vanity project for what it is.

His temper tantrums at museums and galleries are part of why he is "lost", but his really noxious antisemitism and Polish nationalism are the "we don't want you here" part. Like many European and English writers and artists of the time, even those who were in different countries and didn't like Hitler, he still loved fascism and inciting murder of Jews. He wasn't just obscure because he lost his Polish studio, but because he made himself untouchable. The film keeps touching on that and then startling away, and making apologies for him.

His later derangement and conspiracy theories of a deluge and Yeti-people are… well, charming by comparison, but claiming that many people right among us are subhuman corrupters isn't any better, and leads to the same atrocities if you get enough crazy people, and we're full up on crazy people these days. While the film spends some time on it, reading about his views online shows they really soft-pedalled it in the film.

At first I felt this was a bit of an American Movie clone, Stas' focused but low-class craziness and the long downward slide. But no, it turns out he's a very different kind of monster turned failure.

★★★½☆

Programming in C

On tbasic, I've been doing all my C coding in BBEdit, not fucking Xcode, and it is fantastic. Doesn't crash. Syntax highlighting works, and by "works" I mean doesn't replace my text with Cyrillic as Xcode is wont to do (I do not like the new BBEdit color theme editor, but it's a far cry from stabbing me in the face like Xcode does). BBedit's window stays where I fucking put it, and sidebar shows clearly which files are open and modified. Running make from iTerm2 works fine, if you aren't an idiot and each compile produces less than a handful of errors. I can't really use BBEdit for JavaScript which needs more tool support, but for simpler languages, it's fine.

OS X Mojave no longer has C man pages visible anywhere I can find, so Dash is the only way to look anything up:

To use it from the shell, create dashman: (hashtag command-line integration, I couldn't find this in any search, and Dash has no AppleScript which is my usual solution to o'erweening GUIs)

#!/bin/zsh
open "dash://$*"

Hm. So, I've worked with people who don't learn their languages, they just rely on autocomplete in an IDE, snippets, and StackOverflow. If this is you, if you can't code without an Internet connection, you can't code. Please stop programming, go away, and read a book until you know the syntax and fundamental APIs, because right now you do more harm than good.

That said, while I studied K&R (and Stephen Kochan's Programming in C, my introduction back in the '80s) with the intensity of a snake-handler reading his Bible, I certainly can't remember every strcspn, strcoll, strstrn or whatever random series of 7-letter identifiers they had to use back in the '70s (even in the late '80s, I was still using C compilers which only distinguished 7-letter identifiers). C's libraries are often gibberish and searchable man pages are all we have.

Metal 2019 Tuesday Music

Gonna start this year off with some music discovery; all three of these get updated weekly, so bookmark this post and check back. In a long list of things Apple Music doesn't do well, there's no way to pin them to the For You page. And the best album of last year:

What I'm Watching: Poseidon (2006)

This Kurt Russell sinking boat show was more awful than you can really imagine. Fake-dark orange/cyan lighting constantly, everyone overacts and has the most cliché lines, which set up character that's never explored after the start. Captain's completely passive and useless; Captain Stubing would've saved more lives. Hispanics all die, and the Captain's the only black person on the boat AFAICT, but the richer and whiter you are (for fuck's sake, Richard Dreyfuss?) the more likely you are to live. Women do nothing but scream until a man can save them.

The disaster scenes are pretty nice, though. The casino flipping, and big rooms flooding, are violent and electricity and shrapnel go everywhere. That's what we pay for.

Oh, screenwriter's Mark Protosevich, the same piece of shit who wrote the Wil Smith "I Am Legend" that utterly missed the point of the book even more than the last 3 adaptations, and the ripoff "Oldboy" that discarded everything good about Chan-wook Park's amazing Oldboy (2003). I actually liked The Cell (2000), but I attribute that more to Jennifer Lopez, who looks good in a bodysuit.

I'm rooting for the ocean and the ship to eat them all, but sadly some have obvious plot immunity, especially the dumb kid and screaming useless single mom. Kurt Russell as a firefighter who became Mayor of New York is a slightly funny callback to Escape From New York and Backdraft, but the bosses would never let someone like him be elected, and he's phoned this one in.

A good terrible end to a terrible year.

★★☆☆☆

End of 2018

Let's watch Poseidon — Only available on Netflix until tomorrow! Normally I watch Strange Days, but I feel an upside-down sinking ship is a more accurate metaphor for the year than failed love and revolution and pretty Angela Bassett. Maybe for Chinese New Year (Feb 5), Gabriel Dropout's New Year/armageddon episodes.

I don't go super intimate online, but it's been a rough year. I've lost a friend and two of my last few relatives to cancer, my dad's had some close calls, and his dog died. Doing any kind of work under the stress load is… not great. And I'm not a good friend or coworker in this state. My new puppy is a terror, both looks and behavior like a jackal puppy, but the one really good thing.

State of software I touched on yesterday. This is the year a new Perilar rises from the ashes, and Learn2JS is moving along nicely, I think that's going to be a big deal, it's a sweet environment.

I goofed off yesterday and started writing tbasic, a Tiny BASIC interpreter in C, because that's a useful thing to do! I've done this before, but made a messy parser. The new one is a tiny single file and much cleaner. Might be published tomorrow morning sometime. While nobody needs BASIC, it's good C programming exercise, and I can link in SDL2 and give it cross-platform graphics and sound, which is actually kinda neat.

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
—Edsger W. Dijkstra, EWD 498: How do we tell truths that might hurt?
[mdh: In case you can't read the paper and get the joke, he's joking. Sort of.]

I got a little writing in on Delvers in Darkness, I'm thinking about more adventures for it, solo gamebooks and Refereed.

Poseidon is really terrible already. Everyone's a ridiculous caricature. Oh, this is gonna be a good shipwreck.

Game of the Year

I've decided there is no Game of the Year 2018. Everything's been mediocre sequels or ripoffs; that a shitty deathmatch shooter is the most popular makes me disrespect your species nearly as much as sportsball.

I'm still playing old games:

  • Elder Scrolls Online: Mixed bag this year. Summerset's a fantastic "chapter"/DLC they make even subs pay for. Murkmire DLC is awful, its only virtue is that Shadowfen's no longer the worst zone in the game. Mac client performance has been garbage since Murkmire, and the nerf to Sorc shields has annoyed the shit out of me. But, close to 5 years in it's still the best Elder Scrolls game.
  • Unturned: France map is fun and moderately hard, but 3.0's reaching EOL and who knows how buggy 4.0 will be. Ominous.
  • Minecraft: 1.13 update was a buggy shitshow for a while, but it's made the waters interesting. But I build bases in taiga or mountains. Very little time in it this year.
  • Animal Crossing Pocket Camp: Least bad gachapon/daily clicky-toy game in its second year. The monthly cycle of garden event, fishing event, scavenger hunt is pretty solid now. The Cabin recently added lets me save a few favorite animals outside the ever-rotating camp roster. It's OK.

This year's failed contenders:

  • EXAPUNKS: Haven't bought it yet because like TIS-100 and the rest of Zach's games, real coding is more fun than fake-coding, but maybe if I was more fun-not-GTD it'd be on the shortlist at least.
  • World of Warcraft Classic demo: The most exciting pre-release was a 10-year-old version of the most boring MMO.
  • Dragalia Lost: Good but compromised design. I loved it for a few months, the characters are fun and cute, action dungeon's great for quick play, but the gachapon store drives the game and creates too many identical heroes, dragons, and cards, and it nagged me out. This could've been GOTY if it was paid up front, earning heroes by questing instead of random pulls.

My own failure to ship is appalling. I can't justify it. Perilar gameplay is excellent roguelike tactics & resource management, but some dungeon generation's not right yet.

Delvers in Darkness, my new tabletop RPG, is getting another rewrite of the adventure and I haven't done any art direction. I think it's fun in solo tests, but still need table testing.

The State of Software

On the horrible state of software:

Me Wearing a Scruffy, Profane T-Shirt: "Yeah, man, we should just code in bare metal like back in the '70s! Programmers should control machines, not the other way around! Liberation now!"

On shiny new things:

Me Wearing a Button-Up Dress Shirt: "Superb. Slightly more secure sandboxes in my giant JavaScript application service running on a giant pile of API stacks. I'll upgrade ASAP, I'm sure it won't destroy everything it touches."