The Merits Of Comment-Driven Development As Counterweight To TDD

The world of software has seen many paradigms come and go, all of which were supposed to revolutionize its development. Still, one of the basic tenets in engineering of there being no shortcuts to just doing the work properly also rings true in the field of software engineering: trying to skip ‘nice to haves’ like proper documentation, code formatting, and proper testing inevitably results in developers nervously trying to ignore the looming avalanche of technical and other project debts as they keep piling up.

While Test-Driven Development (TDD) once got praised as the silver bullet, the principle of writing tests before writing code merely postpones the inevitable project collapse. The elephant in the room is that you cannot pass on the basics in engineering and expect to come out fine on the other end. There’s a reason why phrases like “all tests green, successfully failed in production” have become common.

This is where the concept of Comment-Driven Development (CDD) comes into play. What started as a bit of a joke many years ago stuck in my mind and led me to my current approach in software development that tries to effectively mirror solid engineering principles.

Continue reading “The Merits Of Comment-Driven Development As Counterweight To TDD”

The Winners Of The 2025 Obfuscated C Code Contest

One of the most exciting challenges available to any software developer is that of writing brilliantly working code that’s so obtuse, so indecipherable, and opaque, that even its own author would struggle to grasp its inner workings after returning to it a year later. While for some this is just how they naturally write code, for others it’s part of the International Obfuscated C Coding Challenge (IOCCC), with 2025’s entrants once again showing their mettle.

The IOCCC judges entries among a range of categories, as it can be hard to otherwise quantify what is the ‘best’ entry, with ground rules limiting what the entry can entail. Generally as long as your code adheres to the C11 standard with a source size of 4,993 bytes or less and final binary size of under 2,503, is accompanied by a GNU-style Makefile and doesn’t turn a judge’s computer into a raging inferno — it should qualify.

Among the winning entries we got fun ones like ‘Most likely to shock’ by [Yusuke Endoh] which generates a Lichtenberg figure in ASCII in the terminal. There are also quite practical ones, such as the ‘Best real emulator’ winner by [Nick Craig-Wood], whose entry is a functional Game Boy emulator. Although not full-featured, it can play a range of real GB ROMs, just do not expect to get any sounds or fancy terminal-based graphics.

Automatic Tutorial Generator Is Perhaps The Best-Case For Vibe Coding

Quick question: how did you learn to code? It probably wasn’t bribing someone a year or two ahead of you in CS to finish all your homework, but that’s exactly what ‘vibe coders’ are doing — even in class. Odds are, you learned by working through exercises, following tutorials, and doing it yourself. Finding good tutorials isn’t getting any easier in the age of LLMs, and that’s where [Deven Jarvis]’s Lathe comes in: it’s a project to get an LLM to make the tutorial for you. Instead of doing the work for you, it gets the clanker to show you how to do it yourself.

Everyone’s different, so this may not apply to you, but it’s a journey/destination sort of problem. Some people just want a piece of software, and they can vibe code until the oceans dry up and will have no interest in this project. Other people take great joy in learning how to do things; [Deven] is one of those. A good tutorial is a great way to learn, since it artificially softens the learning curve compared to just jumping into a project with a man page or a datasheet.

Of course you’re still faced with the hallucination problem, something [Deven] admits in his excellent write-up. As he points out, the advantage is that you can call whatever model you plug into Lathe on its BS, and try and get a correct answer. Try that on Reddit, or most other places online. Sure, the tutorials aren’t going to match the best human-generated content, and [Deven] admits that. He’s using it for topics (like slicer design) that don’t have easy tutorials online — and sadly, his prediction that nobody is going to bother making good learning resources like they used to when they’ll just be scraped by LLMs is very likely true. It’s not that your options are vibe code or vibe-generated tutorial, but if that’s the direction the world is going, we’ll take the tutorial, thanks.

Getting the LLM to hold your hand through a tutorial might not appeal to the most Butlerian among us, but it’s a big step from that to the full cognitive surrender some people worry about.

How To Let Everyone Keep A Secret

Someone calls you at work and says, “Don’t tell anyone, but…” If you are like most people, there are one or two people you will pass it along to with the same admonishment. In fact, they are probably repeating it from someone else, and you are on their list of two people. So for really big secrets, you need a way to spread the secret out so that no one has any real information about the secret, but a certain number of people together can decode it. As [neeaj] explains in a recent post about Shamir’s Secret Sharing, [Adi Shamir] (the S in RSA encryption) devised a way to do this very well in 1979, and the core concept is very easy to understand.

The explanation works with geometry. The equation for a line is y=mx+b, where m is the slope and b is the y-intercept (that is, where the line touches the y-axis when X is 0. An infinite number of lines cross the Y axis at, for example, 10. The line y=3x+10 does, and so does the line y=-1.41x+10. You can’t guess the b value from just the slope, because any slope will satisfy the equation.

Continue reading “How To Let Everyone Keep A Secret”

Linux Distributions And Who Is Responsible For The Software

The topic of downstream and upstream is an important one in the Linux ecosystem, where from one base distribution you can go many layers of distros deep before even looking at all the other base distributions. Within that veritable jungle you get questions about who is responsible for packaging software, where to report bugs found with a specific application, as well as what ‘LTS’ truly means in a consumer context. These and other points are raised in a recent video by [Brodie Robertson], with many examples of things going tragically wrong.

There’s a good argument to be made that ultimately it is the distro that is responsible for the software that they provide via their repositories. As [Brodie] shows in the video, there are a few cases where an ‘LTS’ distro uses an old version of some software that contains a bug that has been fixed a while ago, so reporting it to the developer is rather pointless, while the distro maintainers should fix it with backporting of patches or updating the version.

From an end user experience this also makes the most sense, as in the end they just want to have the Windows experience of downloading a proverbial installer, clicking through whatever dialogs pop and have working software. If the software is provided via the distro, it is their responsibility, the same way that you contact the developer if you get a DEB or RPM from a GitHub project page and it doesn’t work.

This current Linux Chaos Vortex can be called a major issue when e.g. FreeBSD has no such upstream/downstream issues, with cross-platform installers being basically impossible on Linux ever since the Linux Standard Base effort died.

Perhaps Linux will get a distroless future, however, which may finally herald that Year of the Linux Desktop.

Continue reading “Linux Distributions And Who Is Responsible For The Software”

Prolog Via Pokémon

Like many people who read Hackaday, we are fairly fluent in a number of computer languages, but we have to admit it is easier to pick up languages that look like they group with things like Fortran. Sure, modern languages have all sorts of features, but the idea that you have a text file that executes in some order, variables, statements, and so on runs through most popular languages, but not all of them. Lisp and its variants are a different way of looking at things. And then there’s Prolog. [Alexander Petros] has an interesting way of explaining Prolog as a Pokémon game.

Prolog was “the next big thing” when AI meant expert systems. It is more of a specialized database where you define facts and rules that the computer can infer answers to queries. For example, if the facts say that Paul and Anna both have Mary as a parent, and a rule says that people with the same parent are siblings, then a query asking whether Paul and Anna are siblings will indicate that they are.

Continue reading “Prolog Via Pokémon”

Learn Programming Without A Computer

Presumably aimed at children, NHK World’s Texico program teaches the main ideas about programming without actually using a computer. Instead, it uses items like a toy train, playing cards, and other gadgets to teach concepts such as analysis, combination, simulation, abstraction, and more.

There are ten episodes in English and French. Some of them are more about critical thinking, which, admittedly, is important for solving problems in general with or without a computer. For example, a “magic” trick relies on the observation that tearing a sheet of paper into nine rectangular pieces will mean each piece has at least one perfectly straight edge except for the center piece.

Continue reading “Learn Programming Without A Computer”