The Short And Tragic Story Of Life On The Moon

The Moon is a desolate rock, completely incapable of harboring life as we know it. Despite being our closest celestial neighbor, conditions on the surface couldn’t be more different from the warm and wet world we call home. Variations in surface temperature are so extreme, from a blistering 106 C (223 F) during the lunar day to a frigid -183 C (-297 F) at night, that even robotic probes struggle to survive. The Moon’s atmosphere, if one is willing to call the wispy collection of oddball gasses including argon, helium, and neon at nearly negligible concentrations an atmosphere, does nothing to protect the lunar surface from being bombarded with cosmic radiation.

Von Kármán Crater

Yet for a brief time, very recently, life flourished on the Moon. Of course, it did have a little help. China’s Chang’e 4 lander, which made a historic touchdown in the Von Kármán crater on January 3rd, brought with it an experiment designed to test if plants could actually grow on the lunar surface. The device, known as the Lunar Micro Ecosystem (LME), contained air, soil, water, and a collection of seeds. When it received the appropriate signal, LME watered the seeds and carefully monitored their response. Not long after, Chinese media proudly announced that the cotton seeds within the LME had sprouted and were doing well.

Unfortunately, the success was exceptionally short-lived. Just a few days after announcing the success of the LME experiment, it was revealed that all the plants which sprouted had died. The timeline here is a bit hazy. It was not even immediately clear if the abrupt end of the LME experiment was intentional, or due to some hardware failure.

So what exactly do we know about Chang’e 4’s Lunar Micro Ecosystem, and the lifeforms it held? Why did the plants die? But perhaps most importantly, what does all this have to do with potential future human missions to that inhospitable rock floating just a few hundred thousand kilometers away from us?

Continue reading “The Short And Tragic Story Of Life On The Moon”

Crash Your Code – Lessons Learned From Debugging Things That Should Never Happen™

Let’s be honest, no one likes to see their program crash. It’s a clear sign that something is wrong with our code, and that’s a truth we don’t like to see. We try our best to avoid such a situation, and we’ve seen how compiler warnings and other static code analysis tools can help us to detect and prevent possible flaws in our code, which could otherwise lead to its demise. But what if I told you that crashing your program is actually a great way to improve its overall quality? Now, this obviously sounds a bit counterintuitive, after all we are talking about preventing our code from misbehaving, so why would we want to purposely break it?

Wandering around in an environment of ones and zeroes makes it easy to forget that reality is usually a lot less black and white. Yes, a program crash is bad — it hurts the ego, makes us look bad, and most of all, it is simply annoying. But is it really the worst that could happen? What if, say, some bad pointer handling doesn’t cause an instant segmentation fault, but instead happily introduces some garbage data to the system, widely opening the gates to virtually any outcome imaginable, from minor glitches to severe security vulnerabilities. Is this really a better option? And it doesn’t have to be pointers, or anything of C’s shortcomings in particular, we can end up with invalid data and unforeseen scenarios in virtually any language.

It doesn’t matter how often we hear that every piece of software is too complex to ever fully understand it, or how everything that can go wrong will go wrong. We are fully aware of all the wisdom and cliches, and completely ignore them or weasel our way out of it every time we put a /* this should never happen */ comment in our code.

So today, we are going to look into our options to deal with such unanticipated situations, how we can utilize a deliberate crash to improve our code in the future, and why the average error message is mostly useless.

Continue reading “Crash Your Code – Lessons Learned From Debugging Things That Should Never Happen™”

Anatomy Of A Cloned Piece Of Hardware

What would you think if you saw a bootleg of a product you design, manufacture, and sell pop up on eBay? For those of us who don’t make our livelihood this way, we might secretly hope our blinkenlight project ends up being so awesome that clones on AliExpress or TaoBao end up selling in the thousands . But of course anyone selling electronics as their business is going to be upset and wonder how this happened? It’s easy to fall into the trap of automatically assigning blame; if the legit boards were made in China would you assume that’s where the design was snagged to produce the bootlegs? There’s a saying about assumptions that applies to this tale.

Dave Curran from Tynemouth Software had one of his products cloned, and since he has been good enough to share all the details with us we’ve been able to take a look at the evidence. Dave’s detective work is top notch. What he found was surprising, his overseas manufacturer was blameless, and the bootleg board came from an entirely different source. Continue reading “Anatomy Of A Cloned Piece Of Hardware”

Oreo Construction: Hiding Your Components Inside The PCB

In recent months, the ability to hide components inside a circuit board has become an item of interest. We could trace this to the burgeoning badgelife movement, where engineers create beautiful works of electronic art. We can also attribute this interest to Bloomberg’s Big Hack, where Jordan Robertson and Michael Riley asserted Apple was the target of Chinese spying using components embedded inside a motherboard. The Big Hack story had legs, but so far no evidence of this hack’s existence has come to light, and the companies and governments involved have all issued denials that anything like this exists.

That said, embedding components inside a PCB is an interesting topic of discussion, and thanks to the dropping prices of PCB fabrication (this entire project cost $15 for the circuit boards), it’s now possible for hobbyists to experiment with the technique.

But first, it’s important to define what ‘stuffing components inside a piece of fiberglass’ is actually called. My research keeps coming back to the term ’embedded components’ which is utterly ungooglable, and a truly terrible name because ’embedded’ means something else entirely. You cannot call a PCB fabrication technique ’embedded components’ and expect people to find it on the Internet. For lack of a better term, I’m calling this ‘Oreo construction’, because of my predilection towards ‘stuf’, and because it needs to be called something. We’re all calling it ‘Oreo construction’ now, because the stuf is in the middle. This is how you do it with standard PCB design tools and cheap Chinese board houses.

Continue reading “Oreo Construction: Hiding Your Components Inside The PCB”

Hack Your Gmail: A Quick Start For Google App Scripting

For many people, Gmail is synonymous with e-mail. Some people like having cloud access to everything and some people hate having any personal data in the cloud. However you feel about it, one thing that was nice about having desktop software is that you could hack it relatively easily. If you didn’t like how your desktop mail client worked, you had a lot of options: use a different program, write your own, hack the executable of your current program, or in the case of open source just fork it and make any changes you are smart enough to make.

Google provides a lot of features with all of its products, but however you slice it, all the code runs on their servers out of your reach. Sort of. If you know JavaScript, you can use Google Apps Script to add features to many Google products including Gmail. If you’ve used Office scripting, the idea is the same, although obviously the implementation is very different.

With scripting you can make sophisticated filters that would be very hard to do otherwise. For example,  monitor for suspicious messages like those with more than 4 attachments, or that appear to come from a contact between the hours of 2AM and 5AM.

For our example today, I’m going to show you something that is easy but also highly useful.

Continue reading “Hack Your Gmail: A Quick Start For Google App Scripting”

Sharpest Color CRT Display Is Monochrome Plus A Trick

I recently came across the most peculiar way to make a color CRT monitor. More than a few oscilloscopes have found their way on to my bench over the years, but I was particularly struck with a find from eBay. A quick look at the display reveals something a little alien. The sharpness is fantastic: each pixel is a perfect, uniform-colored little dot, a feat unequaled even by today’s best LCDs. The designers seem to have chosen a somewhat odd set of pastels for the UI though, and if you move your head just right, you can catch flashes of pure red, green, and blue. It turns out, this Tektronix TDS-754D sports a very peculiar display technology called NuColor — an evolutionary dead-end that was once touted as a superior alternative to traditional color CRTs.

Join me for a look inside to figure out what’s different from those old, heavy TVs that have gone the way of the dodo.

Continue reading “Sharpest Color CRT Display Is Monochrome Plus A Trick”

Plastics: Acrylic

If anything ends up on the beds of hobbyist-grade laser cutters more often than birch plywood, it’s probably sheets of acrylic. There’s something strangely satisfying about watching a laser beam trace over a sheet of the crystal-clear stuff, vaporizing a hairs-breadth line while it goes, and (hopefully) leaving a flame-polished cut in its wake.

Acrylic, more properly known as poly(methyl methacrylate) or PMMA, is a wonder material that helped win a war before being developed for peacetime use. It has some interesting chemistry and properties that position it well for use in the home shop as everything from simple enclosures to laser-cut parts like gears and sprockets.

Continue reading “Plastics: Acrylic”