Using Valgrind To Track Down Known And Unknown Bugs In Your Code

We all know what bugs in code are. We don’t like them when they are in programs we use, and they’re even worse when they are in code which we have written. Clearly, the best code is bug-free, but how do we get there?

This isn’t a new question, of course, just one that has become ever more important as the total number of lines of code (LoC) that run modern day society keeps increasing and which is affecting even hobbyists more and more often now that everything has a microcontroller inside.

Although many of us know the smug satisfaction of watching a full row of green result markers light up across the board after running the unit tests for a project, the painful reality is that you don’t know whether the code really is functionally correct until it runs in an environment that is akin to the production environment.  Yet how can one test an application in this situation?

This is where tools like those contained in the Valgrind suite come into play, allowing us to profile, analyze and otherwise nitpick every single opcode and memory read or write. Let’s take a look, shall we?

Continue reading “Using Valgrind To Track Down Known And Unknown Bugs In Your Code” →

NASA Readies New Electric X-Plane For First Flight

Since 1951, NASA (known in those pre-space days as NACA) and the United States Air Force have used the “X” designation for experimental aircraft that push technological boundaries. The best known of these vehicles, such as the X-1 and X-15, were used to study flight at extreme altitude and speed. Several fighter jets got their start as X-planes over the decades, and a number of hypersonic scramjet vehicles have flown under the banner. As such, the X-planes are often thought of as the epitome of speed and maneuverability.

So the X-57 Maxwell, NASA’s first piloted X-plane in two decades, might seem like something of a departure from the blistering performance of its predecessors. It’s not going to fly very fast, it won’t be making any high-G turns, and it certainly won’t be clawing its way through the upper atmosphere. The crew’s flight gear won’t even be anything more exotic than a polo and a pair of shorts. As far as cutting-edge experimental aircraft go, the X-57 is about as laid back as it gets.

But like previous X-planes, the Maxwell will one day be looked back on as a technological milestone of its own. Just as the X-1 helped usher in the era of supersonic flight, the X-57 has been developed so engineers can better understand the unique challenges of piloted electric aircraft. Before they can operate in the public airspace, the performance characteristics and limitations of electric planes must be explored in real-world scenarios. The experiments performed with the X-57 will help guide certification programs and government rule making that needs to be in place before such aircraft can operate on a large scale.

Continue reading “NASA Readies New Electric X-Plane For First Flight” →

Greatest Keycaps And Where To Find Them

Look at your keyboard. Do the keycaps excite you? That’s what we thought. You pound on that thing day in and day out. Shouldn’t it at least be attractive? Or even happiness-inducing? You don’t necessarily have to replace every single keycap to spark joy. When it comes to artisan keycaps, the point is to have something that stands out.

How about an Escape key that looks like a tall stack of flapjacks or a tiny, intricate cream puff? From a practical standpoint, how about a spiky Escape key that makes you think twice about rage quitting?

If you’re into games or anime, chances are good that there are more than enough artisan keycaps out there to keep you cash-poor for a while. The same goes for scrumptious foodstuffs with Cherry MX-compatible stems.

In this day and age, you can get just about any type of keycap you want, especially those encapsulating pop culture phenomena and fads. Yes there’s a fidget spinner keycap, and it’s adorable.

Continue reading “Greatest Keycaps And Where To Find Them” →

ReactOS: Dipping A Toe In A Millennium-era Open Source Dream

Do you remember when trying a new OS meant burning a CD? Not merely downloading an ISO and mounting it on a USB drive, but taking a circle of polycarbonate and hoping you didn’t get a buffer underrun as the file you’d spent an entire day downloading was burned onto it. A couple of decades ago that was how we’d take a look at a new Linux distro, and at the time we considered it to be nothing short of incredible that such a thing was possible. One of the ISOs I remember downloading back then was an early version of ReactOS, a project with the lofty aim of creating an open-source equivalent of Windows NT. You might think that in the nearly two decades since then it would have become an irrelevance and its contributors moved on to other work, but no. ReactOS is very much still with us, and indeed has just seen a new release. Version 0.4.13 is the latest in a long line of incremental updates, and remembering those early ReactOS ISOs when I saw their announcement, I thought I’d give it a spin. The result was both a peek at the current state of the project, and a chance to think about the place of a Windows clone in 2020. Continue reading “ReactOS: Dipping A Toe In A Millennium-era Open Source Dream” →

Core Devs Say A Fond But Firm Farewell To Python 2

Saying that it was finally time for the community to bid a “fond but firm farewell to Python 2”, core developer Benjamin Peterson marked the release of Python 2.7.18 on April 20th; officially ending support for the 2.x branch of the popular programming language. It was hardly a snap decision. Python 3.0 was released all the way back in December 2008, and it was never a secret that the newer branch was not only incompatible with the earlier version, but that it would eventually superseded it to become the standard.

But migrating the incredible amount of Python code in the wild over to the latest and greatest was easier said than done. Millions upon millions of lines of code used in everything from Linux distributions to virtually every major web service needed to be reviewed and migrated over to Python 3. In many cases the changes were relatively minor, but when code is being used in mission critical applications, even the smallest of changes are often avoided unless it’s absolutely necessary. The voluntary migration took far longer than expected, and the end-of-life (EOL) for Python 2 was pushed back by years to accommodate developers who hadn’t made the necessary changes yet.

Given the somewhat fluid nature of the Python 2 EOL date, it seems fitting that this last final release would come several months after the “official” January 2020 deadline. The intention was for it to coincide with PyCon 2020, but just like so many of the events planned for the first half of the year, the in-person conference had to be canceled in favor of a virtual one due to the COVID-19 epidemic. That might have stymied the celebration somewhat, but the release of Python 2.7.18 will still be looked on as a special moment for everyone involved.

Continue reading “Core Devs Say A Fond But Firm Farewell To Python 2” →

The Back And Forth Of Windshield Wipers And Patent Lawsuits

Who among us hasn’t dreamed of having some brainstorm idea, prototyping it, and then have some huge company put it into worldwide production? The problem is, that’s not really as easy as it sounds in most cases. Take the case of Robert Kearns. Never heard of him? You use the result of one of his patents pretty often; Kearns invented the intermittent windshield wiper.

If he had sold the patent to one of the big carmakers, this would be a short article. Not that he didn’t try. But it didn’t go very well and while, in the end, he prevailed, it was a very expensive victory.

Continue reading “The Back And Forth Of Windshield Wipers And Patent Lawsuits” →

Limiting Factor Submersible Is In A League Of Its Own

Space may be the final frontier, but there are still Earthly frontiers that a select few have visited — the deepest depths of the high seas. Victor Vescovo, a Texas businessman and former Naval officer, is one of those few. Last spring, Vescovo realized his dream of becoming the first person to scrape the bottoms of all five oceans.

Vescovo descended alone in Limiting Factor, a $37 million two-seater submersible he commissioned from Triton, a private manufacturer who made this feat of engineering come to life. Vescovo and the crew discovered over 40 new species of aquatic lifeforms throughout the course of their Five Deeps expedition. But the attention-getting takeaway came when Vescovo visited the absolute lowest point on Earth. In the Challenger Deep portion of the Marianas Trench, seven miles below sea level, he saw a plastic bag drift by in the abyss.

One normal-sounding quirk sets this sub apart from others: it’s made to be reusable. You read that right, most super-deep divers never manage to dive over and over again.

Continue reading “Limiting Factor Submersible Is In A League Of Its Own” →