Hackaday Podcast 165: Old Printers, Dark Towers, 3DP Gaskets, And Wavy Traces

Join Hackaday Editor-in-Chief Elliot Williams and Assignments Editor Kristina Panos as we gab about the most interesting hacks and stories of the previous week. This time, we start off by marveling over everything happening this weekend. Most urgently, it’s your last chance to enter the 2022 Sci-Fi contest, which closes Monday, April 25th at 8:30 AM Pacific Time sharp. Already got your hat in the ring? If you’re anywhere in the neighborhood of New Jersey, don’t miss the VCF’s Vintage Computer Festival East. Don’t want to leave the house? Then check out all the talks that start approximately right now, assuming you get your Hackaday Podcasts hot off the server.

In this episode, we’ll fawn over a KiCAD plug-in that gives your PCBs that old-timey look, discuss ancient telephone exchanges and the finest in 70s-era custom telephones, and dream about building a wall of sound out of Raspberry Pis. Then we’ll talk about awesome old printers and the elegance of RSS feeds, developing your own digital film, and a really cool line follower robot that works without a brain. Stay with us to find out where Kristina likes her taskbar, and we’ll tell you the cool-kid name for the the Commodore key.

Direct download!

Check out the links below if you want to follow along, and as always, tell us what you think about this episode in the comments below!

Continue reading “Hackaday Podcast 165: Old Printers, Dark Towers, 3DP Gaskets, And Wavy Traces”

This Week In Security: Java’s Psychic Signatures, AWS Escape, And A Nasty Windows Bug

Java versions 15, 16, 17, and 18 (and maybe some older versions) have a big problem, ECDSA signature verification is totally broken. The story is a prime example of the dangers of unintended consequences, the pitfall of rolling your own crypto, and why to build a test suite for important code. In Java 15, the ECDSA verification code was re-written, moving the code from C++ to a Java-native implementation. The new code misses an important check, that the initialization and proof values are both non-zero.

Continue reading “This Week In Security: Java’s Psychic Signatures, AWS Escape, And A Nasty Windows Bug”

Linux Fu: An Odd Use For Fork()

If you are a Star Trek fan, you’ll probably remember the phrase “You have to learn why things work on a starship.” The truth is, in most episodes, knowing how to override another ship’s console or make gunpowder didn’t come in very handy, but boy when it did, it really saved the day. Linux is a lot like that. There are a few things you probably don’t need to know very often, but when you do need to know, it makes a huge difference. In this particular post, I want to look at an odd use of the fork system call. For many purposes, you’ll never need to know this particular irregular use. But when you need it, you are really going to need it.

This is actually based on an old client of mine who used Unix to run a massive and very critical report every day.  The report had a lot of math since they were trying to optimize something and then generate a lot of reports. In those days, the output of the report was on old green-bar paper on a line printer. The problem was that the report took something like 14 hours to run including the printouts. If someone discovered something wrong, there was no time to run the report again because the next day’s report would have to start before the second run would finish.

The client had a bunch of Windows programmers and — at that time — there wasn’t anything really analogous to a real fork call in Windows. I looked at the code and realized that probably most of the code was spending time waiting to print the output. The computer had multiple CPUs and there were multiple printers, but that one program was hanging on the one printer. There was a lot of data, so writing it to a database and then running different reports against it wasn’t a great option. The answer was to use the power of fork. With a change in the code that took less than 30 minutes, the report ran in five hours. They were very pleased.

So how did I do it? The answer lies in how fork works. Just about every time you see a fork, you see some sort of exec call to start a new program. So if you think about fork at all, you probably think it is part of how you start a new program and, most of the time, that’s true. Continue reading “Linux Fu: An Odd Use For Fork()”

A Rotary Encoder: How Hard Can It Be?

As you may have noticed, I’ve been working with an STM32 ARM CPU using Mbed. There was a time when Mbed was pretty simple, but a lot has changed since it has morphed into Mbed OS. Unfortunately, that means that a lot of libraries and examples you can find don’t work with the newer system.

I needed a rotary encoder — I pulled a cheap one out of one of those “49 boards for Arduino” kits you see around. Not the finest encoder in the land, I’m sure, but it should do the job. Unfortunately, Mbed OS doesn’t have a driver for an encoder and the first few third-party libraries I found either worked via polling or wouldn’t compile with the latest Mbed. Of course, reading an encoder isn’t a mysterious process. How hard can it be to write the code yourself? How hard, indeed. I thought I’d share my code and the process of how I got there.

There are many ways you can read a rotary encoder. Some are probably better than my method. Also, these cheap mechanical encoders are terrible. If you were trying to do precision work, you should probably be looking at a different technology like an optical encoder. I mention this because it is nearly impossible to read one of these flawlessly.

So my goal was simple: I wanted something interrupt driven. Most of what I found required you to periodically call some function or set up a timer interrupt. Then they built a state machine to track the encoder. That’s fine, but it means you eat up a lot of processor just to check in on the encoder even if it isn’t moving. The STM32 CPU can easily interrupt with a pin changes, so that’s what I wanted.

The Catch

The problem is, of course, that mechanical switches bounce. So you have to filter that bounce either in hardware or software. I really didn’t want to put in any extra hardware more than a capacitor, so the software would have to handle it.

I also didn’t want to use any more interrupts than absolutely necessary. The Mbed system makes it easy to handle interrupts, but there is a bit of latency. Actually, after it was all over, I measured the latency and it isn’t that bad — I’ll talk about that a little later. Regardless, I had decided to try to use only a pair of interrupts.

Continue reading “A Rotary Encoder: How Hard Can It Be?”

Mobile-Focused Windows 11 Leaves Taskbar Stuck Along The Bottom

Yeah, I’ll admit it: I’m a Windows person. Two years ago this summer, I traded in an overworked Windows 7 laptop that was literally screaming in pain for a SFF Windows 10 box as my main machine. But 10 might mean the end for this scribe, who has used Windows since the late 1980s. Admittedly, it’s for a fairly petty reason — Microsoft have gotten rid of alternate-location taskbar support in Windows 11. As in, you can have the taskbar anywhere you want, as long as it’s the bottom of the screen.

Years ago, I switched my taskbar to the top for various reasons. For one, it just made more sense to me to have everything at the top, and nothing at the bottom to interrupt visual flow while reading a web page or a document. Plenty of people move it to one of the sides or hide it when not in use for the same reason. More importantly, I thought moving the taskbar to the top would help with my neck/shoulder strain issues, and I believe that it has. So oddly enough, this one little thing may be the dealbreaker that gets me to switch after thirty-something years to Linux, where top-aligned taskbars are more or less the norm.

Continue reading “Mobile-Focused Windows 11 Leaves Taskbar Stuck Along The Bottom”

Ask Hackaday: Would A Scooter Get You Back To The Office?

So we’re two plus years into the pandemic at this point. Are you still working from home in the most comfortable clothes ever sewn? We figure that of the lot of you who said goodbye to that drab, tiled carpet in 2020, most have probably heard rumblings about returning to the office. And probably a good portion have at least been forced into a hybrid schedule.

Lots of companies would love to see their employees once again milling about all those glass and steel observation tanks office buildings they pay so much for. And while some are likely just forcing employees to come back, others are offering incentives, such as Google. The tech giant recently partnered with electric scooter manufacturer Unagi to provide a “Ride Scoot” program designed to lure many of Google’s US-based employees back to those brightly-colored code playgrounds they call offices with a fun mode of private transportation. The plan is to offer a full reimbursement of the monthly subscription fee for Unagi’s Model One folding scooter, which retails for $990.

The subscription is normally $49 a month plus a one-time $50 sign-up fee, but this amount will be slightly discounted (and waived) for eligible Google employees. There is one caveat to the system: an employee must use the scooter for a minimum of nine commutes to the office per month, although Google says they’re gonna be a bro about it and use the honor system.

Continue reading “Ask Hackaday: Would A Scooter Get You Back To The Office?”

Movie Prop Electronics Hack Chat

Join us on Wednesday, April 20 at noon Pacific for the Movie Prop Electronics Hack Chat with Ben Eadie!

It wasn’t too long after the invention of cinema that the need for special effects became apparent. If you want to tell stories, especially the science fiction type of story, you need to build a plausible universe, including all the gadgets and gizmos within it. And so right from the start, propmakers and set designers have had the challenge of making things look futuristic using the technology of the present day.

join-hack-chatAll too often, the realities of budgets and time constraints have reduced this crucial world-building to an exercise in blinkenlights. But not always. Ben Eadie is a maker and inventor who works in the world of movie magic, specializing in props and practical effects. While he’s certainly as much in love with blinkenlights as any of us, there’s more than that to making a movie look good. He’ll stop by the Hack Chat to talk about how he incorporates electronics into his practical effect builds, and perhaps even reveal some of the movie magic for us.

Our Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, April 20 at 12:00 PM Pacific time. If time zones have you tied up, we have a handy time zone converter.

Continue reading “Movie Prop Electronics Hack Chat”