Fighting Food Poisoning With A Patch

Food poisoning is never a fun experience. Sometimes, if you’re lucky, you’ll bite into something bad and realize soon enough to spit it out. Other times, you’ll only realize your mistake much later. Once the tainted food gets far enough into the digestive system, it’s too late. Your only option is to strap in for the ride as the body voids the toxins or pathogens by every means available, perhaps for several consecutive days.

Proper food storage and preparation are the key ways we avoid food poisoning today. However, a new development could give us a further tool in the fight—with scientists finding a way to actively hunt down and destroy angry little pathogens before they can spoil a good meal.

Continue reading “Fighting Food Poisoning With A Patch”

NPAPI And The Hot-Pluggable World Wide Web

In today’s Chromed-up world it can be hard to remember an era where browsers could be extended with not just extensions, but also with plugins. Although for those of us who use traditional Netscape-based browsers like Pale Moon the use of plugins has never gone away, for the rest of the WWW’s users their choice has been limited to increasingly more restrictive browser extensions, with Google’s Manifest V3 taking the cake.

Although most browsers stopped supporting plugins due to “security concerns”, this did nothing to address the need for executing code in the browser faster than the sedate snail’s pace possible with JavaScript, or the convenience of not having to port native code to JavaScript in the first place. This led to various approaches that ultimately have culminated in the WebAssembly (WASM) standard, which comes with its own set of issues and security criticisms.

Other than Netscape’s Plugin API (NPAPI) being great for making even 1990s browsers ready for 2026, there are also very practical reasons why WASM and JavaScript-based approaches simply cannot do certain basic things.

Continue reading “NPAPI And The Hot-Pluggable World Wide Web”

The Time Clock Has Stood The Test Of Time

No matter the item on my list of childhood occupational dreams, one constant ran throughout: I saw myself using an old-fashioned punch clock with the longish time cards and everything. I now realize that I have some trouble with the daily transitions of life. In my childish wisdom, I somehow knew that doing this one thing would be enough to signify the beginning and end of work for the day, effectively putting me in the mood, and then pulling me back out of it.

But that day never came. Well, it sort of did this year. I realized a slightly newer dream of working at a thrift store, and they use something that I feel like I see everywhere now that I’ve left the place — a system called UKG that uses mag-stripe cards to handle punches. No it was not the same as a real punch clock, not that I have experience with a one. And now I just want to use one even more, to track my Hackaday work and other projects. At the moment, I’m torn between wanting to make one that uses mag-stripe cards or something, and just buying an old punch clock from eBay.

I keep calling it a ‘punch clock’, but it has a proper name, and that is the Bundy clock. I soon began to wonder how these things could both keep exact time mechanically, but also create a literal inked stamp of said time and date. I pictured a giant date stamper, not giant in all proportions, but generally larger than your average handheld one because of all the mechanisms that surely must be inside the Bundy clock. So, how do these things work? Let’s find out.

Continue reading “The Time Clock Has Stood The Test Of Time”

How Do PAL And NTSC Really Work?

Many projects on these pages do clever things with video. Whether it’s digital or analogue, it’s certain our community can push a humble microcontroller to the limit of its capability. But sometimes the terminology is a little casually applied, and in particular with video there’s an obvious example. We say “PAL”, or “NTSC” to refer to any composite video signal, and perhaps it’s time to delve beyond that into the colour systems those letters convey.

Know Your Sub-carriers From Your Sync Pulses

A close-up on a single line of composite video from a Raspberry Pi.
A close-up on a single line of composite video from a Raspberry Pi.

A video system of the type we’re used to is dot-sequential. It splits an image into pixels and transmits them sequentially, pixel by pixel and line by line. This is the same for an analogue video system as it is for many digital bitmap formats. In the case of a fully analogue TV system there is no individual pixel counting, instead the camera scans across each line in a continuous movement to generate an analogue waveform representing the intensity of light. If you add in a synchronisation pulse at the end of each line and another at the end of each frame you have a video signal.

But crucially it’s not a composite video signal, because it contains only luminance information. It’s a black-and-white image. The first broadcast TV systems as for example the British 405 line and American 525 line systems worked in exactly this way, with the addition of a separate carrier for their accompanying sound. Continue reading “How Do PAL And NTSC Really Work?”

The Rise And Fall Of The In-Car Fax Machines

Once upon a time, a car phone was a great way to signal to the world that you were better than everybody else. It was a clear sign that you had money to burn, and implied that other people might actually consider it valuable to talk to you from time to time.

There was, however, a way to look even more important than the boastful car phone user. You just had to rock up to the parking lot with your very own in-car fax machine.

Continue reading “The Rise And Fall Of The In-Car Fax Machines”

Linux Fu: Yet Another Shell Script Trick

I’m going to go ahead and admit it: I really have too many tray icons. You know the ones. They sit on your taskbar, perhaps doing something in the background or, at least, giving you fingertip access to some service. You’d think that creating a custom tray icon would be hard, but on Linux, it can be surprisingly simple. Part of the reason is that the Freedesktop people created standards, so you don’t typically have to worry about how it works on KDE vs. GNOME or any of the other desktop environments. That’s a big win.

In fact, it is simple enough that you can even make your own tray icons with a lowly shell script. Well, of course, like most interesting shell scripts, you need some helper programs and, in this case, we’ll use YAD — which is “yet another dialog,” a derivative of Zenity. It’s a GTK program that may cause minor issues if you primarily use KDE, but they are nothing insurmountable.

The program is somewhat of a Swiss army knife. You can use it to make dialogs, file pickers, color selectors, printer dialogs, and even — in some versions — simple web browsers. We’ve seen plenty of tools to make pretty scripts, of course. However, the ability to quickly make good-looking taskbar icons is a big win compared to many other tools.

Docs

Depending on what you want to do, YAD will read things from a command line, a file, or standard input. There are dozens of options, and it is, honestly, fairly confusing. Luckily, [Ingemar Karlsson] wrote the Yad Guide, which is very digestible and full of examples.

Exactly what you need will depend on what you want to do. In my case, I want a tray icon that picks up the latest posts from my favorite website. You know. Hackaday?

Continue reading “Linux Fu: Yet Another Shell Script Trick”

How Advanced Autopilots Make Airplanes Safer When Humans Go AWOL

It’s a cliché in movies that whenever an airplane’s pilots are incapacitated, some distraught crew member queries the self-loading freight if any of them know how to fly a plane. For small airplanes we picture a hapless passenger taking over the controls so that a heroic traffic controller can talk them through the landing procedure and save the day.

Back in reality, there have been zero cases of large airliners being controlled by passengers in this fashion, while it has happened a few times in small craft, but with variable results. And in each of these cases, another person in the two- to six-seater aircraft was present to take over from the pilot, which may not always be the case.

To provide a more reliable backup, a range of automated systems have been proposed and implemented. Recently, the Garmin Emergency Autoland system got  its first real use: the Beechcraft B200 Super King Air landed safely with two conscious pilots on board, but they let the Autoland do it’s thing due to the “complexity” of the situation.

Continue reading “How Advanced Autopilots Make Airplanes Safer When Humans Go AWOL”