Update, October 2026: going back to this program, I found it was wrong in several ways. Its “historical medians” were one made-up number per gage for the whole year, so the percentages below (the Merced at 206%, Big Creek at 38%) don’t mean what they say; after sorting it compared each river with another river’s median; and its trend could never read falling. Big Creek is near Groveland, not Hetch Hetchy, and isn’t the only gage without a dam above it. Version 3 builds real normals from 30 years of USGS data, in COBOL. The write-up is here.
On April 1, 2026, at 6:35 p.m. EDT, four humans left Earth's orbit for the first time since Apollo 17 in 1972. Artemis II β Reid Wiseman, Victor Glover, Christina Koch, Jeremy Hansen β riding a 322-foot rocket on a 10-day slingshot around the Moon.
At roughly the same hour, a COBOL program on my laptop fetched live streamflow data from eight Sierra Nevada rivers, computed percent-of-normal against historical medians, sorted stations by mean discharge, rolled up watershed basin totals, and printed a 132-column formatted report.
Both terminated normally. Both did exactly what they were designed to do.
1959 meets 2026. Punch cards meet REST APIs. Grace Hopper meets the Moon.
Why COBOL?
The honest answer: I learned COBOL in college in the late 1980s and hadn't touched it since. I was curious whether it still worked, whether I could still think in it, and whether a language designed for batch processing on mainframes the size of refrigerators had any business talking to a live government REST API in 2026.
The answer to all three turned out to be yes.
COBOL is genuinely still running in some wild places. The Federal Reserve processes daily transactions on systems that trace their lineage to the 1970s. Some state unemployment systems still run on IBM mainframes installed before I was born. During COVID, New Jersey posted emergency job listings for COBOL programmers because their unemployment system was overwhelmed and they couldn't find enough people who knew the language. An estimated $3 trillion in daily financial transactions run through COBOL code right now.
Languages don't really die. They just stop being taught. COBOL is extremely good at exactly one thing: reading records, doing math on them, and printing formatted reports. That's also what a watershed data center does.
What It Does
The project is called sierra-flow-cobol. Every morning at 7:00 AM Pacific, GitHub Actions wakes up and runs a three-step pipeline: a Python fetcher pulls 30 days of discharge data from eight USGS gages across the Sierra Nevada, a COBOL program processes that data into a 132-column formatted report, and both the CSV and the report get committed back to the repo. A plain HTML dashboard reads the CSV client-side and renders everything live β sparklines, percent-of-normal badges, basin roll-up, trend indicators. No framework. No build step. No API. One CSV file, two consumers.
The Eight Gages
Three watersheds. Eight sensors. One storm system moving through all of them in sequence β first hitting the headwaters, then the canyon reaches, then the valley floor β a pulse you can watch travel downstream over days.
The most interesting station is the one with the lowest flow: Big Creek near Hetch Hetchy, 3 CFS. Every other gage in the network sits downstream of a major reservoir, which buffers and smooths the natural flood pulse. Big Creek has nothing between it and the sky. No dams. No regulation. It responds directly and honestly to whatever the Sierra Nevada is doing. When it spikes, a storm just hit. When it drops below normal, the snowpack is struggling. The COBOL flags it. It's the canary in the watershed.
As of April 1, the Merced is running at 206% of normal. The Stanislaus is at 40%. Big Creek is at 38%. The Sierra is uneven this spring β wet in the south, dry in the north. That's a story you can read in eight numbers.
The COBOL Is Legitimately Sophisticated
This isn't Hello World. The program runs to about 850 lines and uses features that would be at home in a production government data center:
- Dual input files β
streamflow.csvandbaselines.csvread simultaneously with separate FILE-CONTROL assignments - Native SORT verb β stations ranked by mean discharge using COBOL's built-in sort, not a workaround
- Baseline cache pattern β historical medians load before station data registers, applied after processing to avoid file ordering dependencies
- Percent-of-normal computation β
COMPUTE ST-PCT-NORMAL = (ST-MEAN / ST-MEDIAN) * 100 - Day-over-day trend accumulation β 30 readings of delta β β² RISING / βΌ FALLING / β STABLE
- Watershed basin roll-up β EVALUATE assigns each gage to Tuolumne / Merced / Stanislaus, accumulates basin totals
- Four-section 132-column report β matching classic mainframe report standards
Debugging was instructive. COBOL is fixed-format β column positions matter, a trailing character in column 73 is a fatal error, and the compiler will tell you exactly which line broke and why. After three decades away from it, the muscle memory came back faster than expected. The language is verbose by design. It reads almost like English. That was Grace Hopper's original insight: make it readable enough that a business analyst could understand it, not just a programmer.
Zero Dependencies, End to End
The Python fetcher uses nothing but the standard library. The COBOL program has no external libraries. The dashboard is plain HTML, CSS, and vanilla JavaScript. No npm. No pip installs. No frameworks. No cloud bills. The entire stack runs on free infrastructure.
The USGS Water Services API is free, requires no key, and has 135 years of public hydrological data behind it. The GitHub Actions free tier handles the daily CI run in about four minutes. The dashboard is a static file served from GitHub Pages. Total monthly cost: $0.00.
The Artemis Detail
I didn't plan the timing. I was deep in a debugging session when someone mentioned the launch. By the time I had the COBOL running cleanly against live USGS data, the crew was already outbound.
There's something fitting about it. The Apollo program ran on FORTRAN and assembly, on computers with less processing power than a modern wristwatch. The engineering culture of that era β precise, documented, obsessive about correctness β is exactly the culture COBOL was designed for. Grace Hopper and Margaret Hamilton were contemporaries. The language and the Moon program grew up together.
Sixty-seven years later, a COBOL program is fetching live telemetry from rivers in the Sierra Nevada, running in a cloud CI/CD pipeline, and feeding a modern web dashboard. On the same day four humans left low Earth orbit for the first time since 1972.
SIERRA-FLOW V2.0: NORMAL TERMINATION. RETURN CODE: 0.
Not a bad detail. The live dashboard is here. The source is on GitHub. It updates every morning at 7AM Pacific. The Sierra rivers are running high. Big Creek is watching.
Go deeper
Grace Hopper, The ‘Queen Of Code,’ Would Have Hated That Title — All Things Considered (NPR), 7 March 2015, about 3 min. Gillian Jacobs on her short film about Hopper, the Mark I and COBOL — and how funny Hopper was.
Decades-old unemployment systems can’t handle record demand — PBS NewsHour Weekend, 19 April 2020, about 5 min video. Christopher Booker on the spring the COBOL Cowboys got called back to work.
Sammet, J.E. (2000). The real creators of Cobol. IEEE Software 17(2), 30–32. A CODASYL committee member gently sets the record straight on who actually designed the language.
Grace Hopper and the Invention of the Information Age — Kurt W. Beyer, MIT Press, 2009; a warm, careful biography of the woman behind the idea of readable code.
Built to Last — Mar Hicks, Logic Issue 11, August 2020; why the 2020 unemployment meltdown wasn’t really COBOL’s fault.
Federal Agencies Need to Address Aging Legacy Systems — GAO-16-468, May 2016; the federal inventory of COBOL still holding up Social Security and the VA.
Stewart, I.T., Cayan, D.R. & Dettinger, M.D. (2005). Changes toward earlier streamflow timing across western North America. Journal of Climate 18(8), 1136–1155.
User Guide to EGRET and dataRetrieval — Hirsch & De Cicco, USGS Techniques and Methods 4-A10, 2015; the free guide to pulling and charting the same gage records.
USGS Water Services — the keyless REST API the fetcher called that April morning, retiring in early 2027. · USGS Water Data for the Nation — 135 years of gage records and their new home.
GnuCOBOL — the free compiler that still speaks 1959. · GitHub Actions — the free nightly batch window. · Artemis II launch — NASA’s photo of the other thing that ran cleanly that evening.
SIERRA-FLOW — the live dashboard. · bdgroves/sierra-flow-cobol — the code.
