Nano-Blog : April 27, 2025
Nano-Blog for the week of April 27, 2025.
§ May 2, 2025 ![[QR Code]](IM/qr.png)
-
Classic References for Test-Driven Development
In the heyday of the 1990s, before unit tests were mandated by our development methodology, eXtreme Programming teams often practiced "Test-First." At the time it was considered counter-intuitive and controversial. Even within teams who wrote unit tests, questions remained: What should be tested first? What actually is a "unit", anyway?
This was the state of affairs when Kent Beck wrote Test-Driven Development by Example. It describes the theory and philosophy of "test-first" and steps the reader through a few examples. By the end of the text, the reader will have been exposed to examples of how a unit-testing mentality helps development teams avoid common problems.
We also recommend another text, Test-Driven Development: A Practical Guide by Dave Astels. This text picks up where Beck's book ends. It works the reader through several examples using Java. Programming pitfalls are demonstrated through the lens of gradually revealed requirements and code refactoring.
Both texts are well worth the read and should available at your local academic library.
-
There's an old adage now called Wirth's Law:
Software is getting slower faster than hardware is getting faster.
In the article A Plea for Lean Software [PDF], Wirth attributes the concept to two earlier aphorisms: Parkinson's Law (work expands so as to fill the time available for its completion) and Martin Reiser's observation (software is getting slower more rapidly than hardware becomes faster.)
But the article listed above does more than just bemoan the state of the world, it offers an framework for why Code Bloat is a thing. It's a short article and well worth a read.
§ May 1, 2025 ![[QR Code]](IM/qr.png)
-
Lazy Evaluation is something you typically hear Lisp or Haskell programmers yammering on about. But Dan Tao's lazy.js lets JavaScript programmers join in the conversation.
And lazy.js' overview page is a great introduction to why you may be interested in emulating lazy evaluation in languages (like JavaScript) that do not directly support it. The discussion is brief, but informative. You can easily read the text (and understand it) in a few minutes. Examples are provided for people who, like most of us, like to see programming features in use. Well worth the time it takes to read.
#dynamic #functional #javascript #lazy-evaluation #programming
§ April 30, 2025 ![[QR Code]](IM/qr.png)
-
Threaded Interpretive Languages
Threaded Interpretive Languages by R. G. Loeliger does a very good job explaining what's going on "under the hood" in threaded interpreters like FORTH or PostScript. Published in 1981 by BYTE Books, it remains a great resource for understanding threaded code. And now it is available on the Internet Archive. There are definitely worse things you could read and we recommend it to anyone interested in the FORTH, PostScript or Joy programming languages.
R. G. Loeliger - Threaded Interpretive Languages (1981)
-
Ungar & Smith's Self Talk From HOPL III
The History of Programming Languages (HOPL) III conference was held in June 2007 in San Diego. David Ungar & Randy Smith gave a presentation on the motivations for and history of the Self programming language. The ACM has archived artifacts from the conference and from their page you can download the video and slides of this presentation. It's well worth your time to hear David & Randy discuss their motivation to develop prototypal inheritance. You can find the ACM's HOPL III proceedings on Self at:
§ April 29, 2025 ![[QR Code]](IM/qr.png)
-
Behind the scenes, we've been updating the Nano-Blog software. It's not quite ready for publication, but we made one change you should know about.
If you type the word "trade" into the browser while you're on any of the nano-blog pages, it will toggle between "trade paperback" and "mass-market paperback" widths. To persist your preference, we store a session-only, secure same-site cookie. Because it's a change to each of the nano-blog's static pages, you may have to manually reload a page if it seems like it's not working. You can do this with CTRL-R in most (all?) browsers. We also put a notice in the Design Notes section of the About This Site page as a more persistent notice.
We believe the ramifications of this change are minimal, but we wanted to tell you about it in case you have a different opinion. For starters, we're now storing cookies. They're as secure as we can make them, and there shouldn't be a way for other sites to read them, but we wanted to let you know about it in the interests of transparency. We're also now listening to your keystrokes. The only thing we do with your keystrokes is to see if you're typing commands like "trade". Keystroke monitoring and cookie-setting are done with client-side scripts, so if you disable JavaScript for this site, it should eliminate the risks (even if they are already fairly minor.) The site should work perfectly fine without JavaScript.
-
Self and the Origins of NewtonScript
If you dive deep enough down the programming language history rabbit-hole, you eventually find NewtonScript. Designed at Apple in the 1990s explicitly to support the Apple Newton portable device, it is an interesting branch on the programming language family tree.
NewtonScript used prototypal inheritance like Self, but added multiple prototype references. It supported a mode of live-programming which made it as easy to construct release software as it was to create prototypes. But the same features made it difficult to debug. One wonders what the web would be like today if it started with "Web-Soups" instead of JavaScript(tm) files.
Several interesting reads about NewtonScript have been saved at the Internet Archive. The most polished is this one from Walter Smith's site, Newton. But this short article from the same site describes how a programming language was created for a specific commercial product. When was the last time someone tried that?
#NewtonScript #prototypes #self
-
Another interesting development from Xerox PARC alumnus Dan Ingalls, Lively Kernel targets the browser with a Squeak-Like programming environment. The Wikipedia page implies the project is abandoned, but the log at the Lively4 Core GitHub Repo shows recent activity. Though the reader should be warned the current version of Lively seems to be sensitive to the vagaries JavaScript(tm) package and browser versions. If it doesn't work for you, maybe the answer is to wait for the whack-a-mole process of bug-fixes or try on a different browser / operating system combo.
Still, the concept is an interesting and this presentation by Dan Ingalls and Krzysztof Palacz is worth a watch:
#live-coding #programming #video
-
Self : The Programming Language
People who have heard of the Self programming language probably know it for its influence on early versions of JavaScipt(tm). And while its role in the history of the web's most mis-understood programming language is important, the language itself is well worth study. The wikipedia link above provides a decent overview, but you'll probably also want to read Self : The Power of Simplicity [pdf] by the language's authors. And this video, from Stanford's EE 380 archive is a delightful tour through the languge, its history and motivations:
The number of innovative ideas expressed in Self is remarkable: prototypal inheritance, Just-In-Time compilation, live coding. And the list goes on. That more people don't know more about this language is almost criminal.
The most recent version of the Self environment was released in the fall of 2024. And while the release cadence is slow related to languages like Python or Rust, it is far from dead. Reading about Self and Playing with it is well worth your time if you're a software professional.