How To Use LLMs For Programming Tasks

[Simon Willison] has put together a list of how, exactly, one goes about using a large language models (LLM) to help write code. If you have wondered just what the workflow and techniques look like, give it a read. It’s full of examples, strategies, and useful tips for effectively using AI assistants like ChatGPT, Claude, and others to do useful programming work.

It’s a very practical document, with [Simon] emphasizing realistic expectations and the importance of managing context (both in terms of giving the LLM direction, as well as the model’s context in terms of being mindful of how much the LLM can fit in its ‘head’ at once.) It is useful to picture an LLM as a capable and obedient but over-confident programming intern or assistant, albeit one that never gets bored or annoyed. Useful work can be done, but testing is crucial and human oversight simply cannot be automated away.

Even if one has no interest in using LLMs to help in writing production code, there’s still a lot of useful work they can do to speed up the process of software development in general, especially when learning. They can help research options, interactively explore unfamiliar codebases, or prototype ideas quickly. [Simon] provides useful strategies for all these, and more.

If you have wondered how exactly glorified chatbots can meaningfully help with software development, [Simon]’s writeup hopefully gives you some new ideas. And if this is is all leaving you curious about how exactly LLMs work, in the time it takes to enjoy a warm coffee you can learn how they do what they do, no math required.

A Magic Eye Tube Does All The Work In This Kit

We’re used to low cost parts and a diversity of electronic functions to choose from in our projects, to the extent that our antecedents would be green with envy. Back when tubes were king, electronics was a much more expensive pursuit with new parts, so designers had to be much more clever in their work. [Thomas Scherrer OZ2CPU] has just such a design on his bench, it’s a Heathkit Capaci-Tester designed in 1959, and we love it for the clever tricks it uses.

It’s typical of Heathkits of this era, with a sturdy chassis and components mounted on tag strips. As the name suggests, it’s a capacitor tester, and it uses a magic eye tube as its display. It’s looking for short circuits, open circuits, and low equivalent resistance, and it achieves this by looking at the loading the device under test places on a 19 MHz oscillator. But here comes that economy of parts; there’s no rectifier so the circuit runs on an AC HT voltage from a transformer, and that magic eye tube performs the task of oscillator as well as display.

He finds it to be in good condition in the video below the break, though he removes a capacitor placed from one of the mains input lines to chassis. It runs, and confirms his test capacitor is still good. It can’t measure the capacitance, but we’re guessing the resourceful engineer would also have constructed a bridge for that.

Continue reading “A Magic Eye Tube Does All The Work In This Kit”

Canon Arc Form Drive exploded. Credit: Markus Kohlpaintner

A Deep Dive Into Canon Autofocus Lenses

Credit: Markus Kohlpaintner

Although taken for granted these days, autofocus (AF) used to be a premium feature on film- and digital cameras, with [Markus Kohlpaintner] taking us through an exhaustive overview of Canon’s AF systems and how they work. On Canon cameras AF became a standard feature with the introduction of its EF lenses in 1987, which are found on its EOS SLR (single-lens reflex) series of professional and prosumer cameras.

Over the decades, Canon has used many different AF drive mechanisms within these lenses, all with their own pros and cons. The article goes through each of them, starting with the original Arc-Form Drive (AFD) and ending with the newest Voice Coil Motor (VCM), showing their internal construction.  Of note are the USM (ultrasonic motor) types of AF systems that use a piezoelectric motor, the functioning of which using a traveling wave across the stator is also detailed, including the integrated feedback control system.

Ultimately the end user is mostly concerned with how well the AF works, of course. Here the biggest difference is probably whether manual adjustment is possible, with not all AF systems supporting full-time manual adjustment. With the newer AF systems this manual adjustment is now performed digitally rather than with a direct coupling. Although few people probably give AF much thought, it’s fascinating to see how much engineering went into these complex systems before even touching upon the algorithms that decide what to focus on in a scene.

Illustrated Kristina with an IBM Model M keyboard floating between her hands.

Keebin’ With Kristina: The One With The Batwing Typewriter

[Alex] of YouTube channel [EastMakes] wrote into tell me about his fantastic QWERTY ‘hexpansion’ board for the 2024 EMF Tildagon badge, and [Alex], I’m super glad you did. The system works!

Let’s back up a bit. Essentially, the idea is to have a badge that can be used beyond a single camp, with the creation of expansion boards being the other main attraction. Our own [Jenny List] covered the badge in detail back in June 2024 when she got her hands on one.

A pair of hands holds the 2024 EMF Tildagon badge with a QWERTY keyboard Hexpansion built by [EastMakes].
Image by [EastMakes] via YouTube
[Alex] started by importing the Tildagon into Fusion360 and designing a way for the keyboard to attach to it physically. He then modeled the keyboard after the Blackberry types that can be found on Ali using the official EMF buttons established in earlier badges.

This QWERTY hexpansion is based on the RP2040, which is soldered around back and visible through the 3D-printed backplate. In order for the 90°-oriented board to align with the… not-90° connector, [Alex] built a little meander into the PCB.

The default OS on the Tildagon doesn’t know natively what to do with the serial messages from the keyboard, so [Alex] wrote an application that reads them in and decodes them. Be sure to check out the build and walk-through video after the break.

Continue reading “Keebin’ With Kristina: The One With The Batwing Typewriter”

Tiny Laptop Gets A New Case And An Unlocking

Unless you’ve got an especially small lap, calling the Toshiba Libretto a laptop is a bit of a stretch. The diminutive computers from the mid-1990s had a lot of the usual laptop features, but in an especially compact and portable case that made them a great choice for anyone with an on-the-go lifestyle.

Fast-forward thirty years or so, and the remaining Librettos haven’t fared too well. Many of them have cases that crumble at the slightest touch, which is what led [polymatt] to undertake this meticulous case replacement. The effort started with a complete teardown; luckily, the lower aluminum-alloy shell was in fine shape, but the upper case parts were found to be almost too deteriorated to handle. Still, with a little patience and the judicious application of tape, [polymatt] was able to scan the case pieces on a flatbed scanner and import them into his CAD package. Great tip on the blue-tack for leveling the parts for accurate scanning, by the way.

After multiple rounds of printing and tweaking, [polymatt] had a case good enough to reassemble the Libretto. Unfortunately, the previous owner left an unwanted gift: a BIOS password. Disconnecting the CMOS battery didn’t reset it, but a little research told him that shorting a few pins on the parallel port on the machine’s dock should do the trick. It was a bit involved, requiring the design and subsequent bodging of a PCB to fit into the docking port connector, but in the end he was able to wake up a machine to all its Windows 95 glory. Better get patching.

In a time when laptops were more like lap-crushers, the Libretto was an amazing little machine, and thirty years on, they’re well worth saving from the scrap heap. Hats off to [polymatt] for the effort to save this beauty, and if he needs tips on reading data from any PCMCIA cards that may have come with it, we’ve got him covered.

Continue reading “Tiny Laptop Gets A New Case And An Unlocking”

TrapC: A C Extension For The Memory Safety Boogeyman

In the world of programming languages it often feels like being stuck in a Groundhog Day-esque loop through purgatory, as effectively the same problems are being solved over and over, with previous solutions forgotten and there’s always that one jubilant inventor stumbling out of a darkened basement with the One True Solution™ to everything that plagues this world beset by the Unspeakable Horror that is the C programming language.

As the latest entry to pledge its fealty at the altar of the Church of the Holy Memory Safety, TrapC promises to fix C, while also lambasting Rust for allowing that terrible unsafe keyword. Of course, since this is yet another loop through purgatory, the entire idea that the problem is C and some perceived issue with this nebulous ‘memory safety’ is still a red herring, as pointed out previously.

In other words, it’s time for a fun trip back to the 1970s when many of the same arguments were being rehashed already, before the early 1980s saw the Steelman language requirements condensed by renowned experts into the Ada programming language. As it turns out, memory safety is a miniscule part of a well-written program.

Continue reading “TrapC: A C Extension For The Memory Safety Boogeyman”

Josephine Cochrane Invented The Modern Dishwasher — In 1886

Popular Science has an excellent article on how Josephine Cochrane transformed how dishes are cleaned by inventing an automated dish washing machine and obtaining a patent in 1886. Dishwashers had been attempted before, but hers was the first with the revolutionary idea of using water pressure to clean dishes placed in wire racks, rather than relying on some sort of physical scrubber. The very first KitchenAid household dishwashers were based on her machines, making modern dishwashers direct descendants of her original design.

Josephine Cochrane (née Garis)

It wasn’t an overnight success. Josephine faced many hurdles. Saying it was difficult for a woman to start a venture or do business during this period of history doesn’t do justice to just how many barriers existed, even discounting the fact that her late husband was something we would today recognize as a violent alcoholic. One who left her little money and many debts upon his death, to boot.

She was nevertheless able to focus on developing her machine, and eventually hired mechanic George Butters to help create a prototype. The two of them working in near secrecy because a man being seen regularly visiting her home was simply asking for trouble. Then there were all the challenges of launching a product in a business world that had little place for a woman. One can sense the weight of it all in a quote from Josephine (shared in a write-up by the USPTO) in which she says “If I knew all I know today when I began to put the dishwasher on the market, I never would have had the courage to start.”

But Josephine persevered and her invention made a stir at the 1893 World’s Fair in Chicago, winning an award and mesmerizing onlookers. Not only was it invented by a woman, but her dishwashers were used by restaurants on-site to clean tens of thousands of dishes, day in and day out. Her marvelous machine was not yet a household device, but restaurants, hotels, colleges, and hospitals all saw the benefits and lined up to place orders.

Continue reading “Josephine Cochrane Invented The Modern Dishwasher — In 1886”