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”

A boiling flask is mounted in a heating manted, with a tube leading from it to a U-shaped tube. From here, the tube continues to a bottle of yellow fluid, from which another tube emerges. A flame is emitted from this last tube.

Building A Desktop Catalytic Cracker

Although crude oil contains a vast diversity of hydrocarbons, a comparatively small number of these make up the bulk of demand for oil. Cracking solves this mismatch: most of the demand is for light, short-carbon-chain molecules, so a cracker breaks down long-chain hydrocarbons into lighter, more commercially-valuable chemicals. This is usually done in massive industrial plants, but as [Markus Bindhammer] showed, it’s possible even in a tabletop apparatus.

There are several methods of cracking, but [Markus] used catalytic fluid cracking: a feedstock high in alkanes (hydrocarbons containing fully saturated carbon-carbon bonds) is heated in the presence of a catalyst, whereupon its long alkane chains split to form alkenes (hydrocarbons with a carbon-carbon double bond) with the loss of a hydrogen molecule. In [Markus]’s setup, a heating mantle heated a boiling flask containing paraffin oil and an amorphous silica-alumina catalyst. Vapors from this flask passed through a condenser tube and a bottle of bromine water, then escaped through a flashback arrestor. Bromine reacts far more readily with alkenes than with alkanes, so the disappearance of its characteristic yellow color would visually indicate the production of alkenes.

To avoid unwanted oxidation, [Markus] purged the cracker with argon before using it. While running the cracker, a flammable mixture of light hydrocarbons and hydrogen escaped from the flask of bromine water. The yellow color of bromine disappeared, and two phases formed: one aqueous, and a lighter phase of hydrocarbons and brominated hydrocarbons. The hot side of the reactor did not survive well; the catalyst turned black with coke, and the heating mantel’s cover fused to the boiling flask. However, the reaction undoubtedly succeeded: while a pool of normal paraffin oil wouldn’t ignite, the cracked oil lit easily.

To go the other way, from small molecules to larger hydrocarbon chains, [Markus] has also used the Fischer-Tropsch process.

Continue reading “Building A Desktop Catalytic Cracker”

AI The Truly Environmentally Friendly Way

A common complaint about the rise of commercial AI services is that they are power-hungry and thus damage the environment. If this concerns you then [Squeezlabs] has the solution, in the form of an AI powered by a handcrank.

The guts of the system is a Raspberry Pi 5 running llama.cpp and appropriate speech conversions, but it and the Large Language Model (LLM) side are not the most interesting part of this system. The power comes from a hand crank charger of the type you’ll see for sale on the likes of AliExpress, designed for USB charging. That in itself is not enough to power the Pi though, as upticks in the processing can cause brownouts that crash the machine. Thus there’s a custom-made capacitor board to take up the strain, and even with that the handle resistance varies significantly depending on the computing load.

We can see that this is not the ideal way to experience an LLM, but maybe that’s not the point. It does however point towards a future in which the power demands of processing decrease and less effort is required. Meanwhile, this is by no means the first hand cranked project we’ve seen.

Process 4 Billion Pixels Per Second From 16 DIY Cameras For The Best V-Tubing Rig Ever

[Dennis] is on YouTube with his channel “Made By Dennis,” but for the record he is a maker, not a V-tuber. On the other hand, his latest project– creating a profesisonal-level tracking rig with DIY IR cameras and a whole lot of moxie–does mean he’s now equipped to make the move to the prestigious, high-status world of pretending to be an anime girl.

That is of course not why he did it. Like most projects around here, the motivation was more a case of “I wonder if I can…”– in this case [Dennis] wondered what it would take for him to pull off the same sort of optical motion capture, or MoCap, that is used in Hollywood studios. Optical mocap has the advantage of being very precise, able to track things at high speeds, and not being in any way limited to the human form like the slew of AI-assisted methods hitting the market right now. The disatvantage is that you need to place markers on any part of your subject you want tracked, film them from all angles, and process a whole lot of pixels. In [Dennis]’s case, it ended up being about four billion. Keeping in mind that actually locating those points in 3D space is dependent on knowing exactly where your cameras are: if you want sub-millimeter precision, your cameras need to be fixed with sub-millimeter tolerance. It’s a big project, hence a long video, which is embedded below.

The DIY cameras use a AR0234 MIPI camera on a custom PCB with M12 lenses and IR filters. To improve the signal-to-noise ratio on optical MoCap, it’s standard to use near-IR light. The camera boards, as you might expect given the MIPI interface, hook into Raspberry Pi compute modules– the cheapest CM4 should work, though he’s using CM5s. The compute modules sit on custom boards that provide PoE, and some other niceties– like a small microcontroller driven by the pulse-per-second pin to help trigger the cameras in sync.

Each camera gets a ring light of near-IR LEDs that pulse at 160 W, which would be way more than PoE is specced to provide, but since the LEDs are only on when the camera is taking a frame, the average power is well within allowable limits. With 16 cameras each having their own ring light, that’s a lot of near-IR photons. Don’t forget your safety squints!

Rather than process the images with OpenCV, he has his own custom solution optimized for this use-case that [Dennis] reports is 300x faster. Luckily, he’s put his implementation on GitHub, along with the rest of the project. Even if you don’t have any v-tubing ambitions, this project is very impressive and worth checking out in its entirety.

Optical MoCap isn’t the only game in town, of course. If you want to do this cheap and easy, you can strap a bunch of IMU sensors to yourself– just don’t expect the same precision.

Thanks to [Dennis] for the tip!

Continue reading “Process 4 Billion Pixels Per Second From 16 DIY Cameras For The Best V-Tubing Rig Ever”

Introducing Boron Buckyballs

A buckminsterfullerene, also known as a buckyball, is typically a fullerene consisting of sixty carbon atoms (C60) arranged in a way that resembles a football-like sphere. Extending this arrangement to other types of atoms has until now however proven as elusive as finding non-carbon-based lifeforms. In a paper by [Hyun Wook Choi] et al. and published in Chemical Science the discovery of boron buckyballs is detailed. There is also a soft-paywalled article in the Chemical & Engineering News magazine for a higher-level perspective.

The discovered boron-based buckyball ups the number of atoms to eighty, forming B80 (boron fullerite) with a slightly larger diameter than C60 at 0.85 nm versus 0.71 nm. Perhaps more interesting are the claims by the authors that boron fullerite may have more practical applications than its carbon-based cousin, mostly due to it being predicted to be a semiconductor with an 0.8 eV energy gap and better electron acceptance that provides interesting doping prospects.

Producing these boron structures used laser vaporization with a helium carrier gas that was seeded with argon to increase cooling efficiency. Inside this boron cluster the reported structures were then discovered and characterized as described in the paper.

Obviously, going from a fascinating laboratory discovery to bulk production won’t be easy, and the predicted properties of boron fullerite may turn out to be incomplete or have a dark side that we aren’t aware of. Regardless, they’re bound to be more useful at least than the carbon version that’s remained mostly a curiosity despite many years of research.

4:3 screenshot? Either period-appropriate hardware or a VM.

Meshcore And Haiku: A Match Apparently Made In Italy

No, we’re not talking about cultural appropriation of Japan’s most famous form of short poem–this is the other Haiku, the open-source descendant of BeOS, which now has a fully-native meshcore chat client called Sestriere, thanks to the efforts of one [Atomozero]. Of course you’ll need a LoRa radio to act as a modem, but anything that speaks USB serial– which is any of the ESP32-based offerings on the market–should work.

This is interesting in that we don’t see many desktop applications leveraging LoRa networks– meshtastic or meshcore– so for one to appear for the relatively-obscure BeOS derivative is just neat. It’s also a nice peice of work: the chat window is full featured, organizing your contacts, and communicating not just with text but emojis and reaction GIFs. GIFs seem a bit extravagant for LoRa bandwith, but apparently it works. There are also Codec2-based voice messages, another thing that we didn’t expect to see over LoRa, since most ‘chat’ projects restrict themselves to text messaging.

The chat window. One nice thing about Haiku APIs is that look-and-feel isn’t in question.

The software will also map all the nodes with which you are in contact, both diagrammatically and geographically, overlaid on OpenStreetMap tiles. The network map conveniently colour-codes your contacts by the link quality, but what’s even more interesting is the WireShark-inspired packet sniffer built into the software to let you keep a really close eye on traffic on the mesh network.

Neither Haiku or MeshCore are to everyone’s tastes, but as an OS it is a worthy daily driver, even if you have to jump through some hoops to install it if you have a UEFI-only system.

If you need more range, try a Yagi.

Safely Using Old EV Batteries In Your Home Solar Setup

As straightforward as the concept of taking battery packs out of an old electric or hybrid car and reusing them for home power storage sounds, this thought process skips a few essential steps. As argued by [Ed] in a recent video based on his own experiences with high-voltage Nissan Leaf batteries in a home PV system, the main problem is that you’re taking a battery out of a larger system including a lot of the management hardware and software.

The referenced Battery Emulator project is an open source effort to create a suitable interface between these EV batteries, with the mentioned Nissan Leaf being just one example in the project Wiki, with the connection scheme shown in the top image. It’s also noted that the Leaf battery BMS is not designed to operate continuously, so they need to be restarted every day or so lest they become too inaccurate.

These and other things are all solid reasons why you have to be absolutely certain that you want to integrate these high-voltage battery packs into your 12 – 48V low-voltage DC system. You’re after all assuming all the responsibility of setting up a system that’s both safe and reliable, so having a good read through something like the Battery Emulator Wiki and sourcing first-hand experiences from the folk in this community would be a very wise first step.

Continue reading “Safely Using Old EV Batteries In Your Home Solar Setup”