Programming Ada: First Steps On The Desktop

Who doesn’t want to use a programming language that is designed to be reliable, straightforward to learn and also happens to be certified for everything from avionics to rockets and ICBMs? Despite Ada’s strong roots and impressive legacy, it has the reputation among the average hobbyist of being ‘complicated’ and ‘obscure’, yet this couldn’t be further from the truth, as previously explained. In fact, anyone who has some or even no programming experience can learn Ada, as the very premise of Ada is that it removes complexity and ambiguity from programming.

In this first part of a series, we will be looking at getting up and running with a basic desktop development environment on Windows and Linux, and run through some Ada code that gets one familiarized with the syntax and basic principles of the Ada syntax. As for the used Ada version, we will be targeting Ada 2012, as the newer Ada 2022 standard was only just approved in 2023 and doesn’t change anything significant for our purposes.

Continue reading “Programming Ada: First Steps On The Desktop”

Reduction of a physical map to a graph.

Where Graph Theory Meets The Road: The Algorithms Behind Route Planning

Back in the hazy olden days of the pre-2000s, navigating between two locations generally required someone to whip out a paper map and painstakingly figure out the most optimal route between those depending on the chosen methods of transport. For today’s generations no such contrivances are required, with technology having obliterated even the a need to splurge good money on a GPS navigation device and annual map updates.

These days, you get out a computing device, open Google Maps or equivalent, ask it how you should travel somewhere, and most of the time the provided route will be the correct one, including the fine details such as train platform and departure times. Yet how does all of this seemingly magical route planning technology work? It’s often assumed that Dijkstra’s algorithm, or the A* graph traversal algorithm is used, but the reality is that although these pure graph theory algorithms are decidedly influential, they cannot be applied verbatim to the reality of graph traversal between destinations in the physical world.

Continue reading “Where Graph Theory Meets The Road: The Algorithms Behind Route Planning”

Mining And Refining: Tungsten

Our metallurgical history is a little bit like a game of Rock, Paper, Scissors, only without the paper; we’re always looking for something hard enough to cut whatever the current hardest metal is. We started with copper, the first metal to be mined and refined. But then we needed something to cut copper, so we ended up with alloys like bronze, which demanded harder metals like iron, and eventually this arms race of cutting led us to steel, the king of metals.

But even a king needs someone to keep him in check, and while steel can be used to make tools hard enough to cut itself, there’s something even better for the job: tungsten, or more specifically tungsten carbide. We produced almost 120,000 tonnes of tungsten in 2022, much of which was directed to the manufacture of tungsten carbide tooling. Tungsten has the highest melting point known, 3,422 °C, and is an extremely dense, hard, and tough metal. Its properties make it an indispensible industrial metal, and it’s next up in our “Mining and Refining” series.

Continue reading “Mining And Refining: Tungsten”

How Does Time Work On The Moon?

We’re looking to go back to the Moon. Not just with robots this time, but with astronauts, too! They’ll be doing all kinds of interesting things when they get there. Maybe they’ll even work towards establishing a more permanent presence for humanity on the lunar surface, in which case they’ll have to get up in the morning, eat breakfast, and get to work.

This raises the question—how does time work on the Moon? As simple as they can be down here, Earthly days and years have little meaning up there, after all. So what’s going on up there?

Continue reading “How Does Time Work On The Moon?”

Why X86 Needs To Die

As I’m sure many of you know, x86 architecture has been around for quite some time. It has its roots in Intel’s early 8086 processor, the first in the family. Indeed, even the original 8086 inherits a small amount of architectural structure from Intel’s 8-bit predecessors, dating all the way back to the 8008. But the 8086 evolved into the 186, 286, 386, 486, and then they got names: Pentium would have been the 586.

Along the way, new instructions were added, but the core of the x86 instruction set was retained. And a lot of effort was spent making the same instructions faster and faster. This has become so extreme that, even though the 8086 and modern Xeon processors can both run a common subset of code, the two CPUs architecturally look about as far apart as they possibly could.

So here we are today, with even the highest-end x86 CPUs still supporting the archaic 8086 real mode, where the CPU can address memory directly, without any redirection. Having this level of backwards compatibility can cause problems, especially with respect to multitasking and memory protection, but it was a feature of previous chips, so it’s a feature of current x86 designs. And there’s more!

I think it’s time to put a lot of the legacy of the 8086 to rest, and let the modern processors run free. Continue reading “Why X86 Needs To Die”

The Greenhouse Effect Isn’t For Greenhouses

Think of a greenhouse. It’s a structure with glass walls that lets light in and traps heat, all for the benefit of the plants inside. As for how it works, that’s elementary! It’s all down to the greenhouse effect… right?

Alas, no. So many of us have been mislead. Let’s rexamine how we think greenhouses work, and then explore what’s actually going on.
Continue reading “The Greenhouse Effect Isn’t For Greenhouses”

The F Number On A Lens Means Something? Who Knew!

The Raspberry Pi has provided experimenters with many channels of enquiry, and for me perhaps the furthest into uncharted waters it has led me has come through its camera interface. At a superficial level I can plug in one of the ready-made modules with a built-in tiny lens, but as I experiment with the naked sensors of the HD module and a deconstructed Chinese miniature sensor it’s taken me further into camera design than I’d expected.

I’m using them with extra lenses to make full-frame captures of vintage film cameras, in the first instance 8 mm movie cameras but as I experiment more, even 35 mm still cameras. As I’m now channeling the light-gathering ability of a relatively huge area of 1970s glass into a tiny sensor designed for a miniature lens, I’m discovering that maybe too much light is not a good thing. At this point instead of winging it I found it was maybe a good idea to learn a bit about lenses, and that’s how I started to understand what those F-numbers mean.

More Than The Ring You Twiddle To Get The Exposure Right

lose-up of the end of a lens, showing the F-number range
The F-number range of a 1990s Sigma consumer-grade zoom lens.

I’m not a photographer, instead I’m an engineer who likes tinkering with cameras and who takes photographs as part of her work but using the camera as a tool. Thus the f-stop ring has always been for me simply the thing you twiddle when you want to bring the exposure into range, and which has an effect on depth of field.

The numbers were always just numbers, until suddenly I had to understand them for my projects to work. So the first number I had to learn about was the F-number of the lens itself. It’s usually printed on the front next to the focal length and expressed as a ratio of the diameter of the light entrance to the lens focal length. Looking around my bench I see numbers ranging from 1:1 for a Canon 8mm camera to 1:2.8 for a 1950s Braun Paxette 35 mm camera, but it seems that around 1:1.2 is where most 8 mm cameras sit and 1:2 is around where I’m seeing 35 mm kit lenses. The F-stop ring controls an adjustable aperture, and the numbers correspond to that ratio. So that 1:2 kit lens is only 1:2 at the F2 setting, and becomes 1:16 at the F16 setting.

Continue reading “The F Number On A Lens Means Something? Who Knew!”