Browsed by
Category: Programming

Maze-solving mice

Maze-solving mice

Veritasium does a great overview of maze-solving robots. He goes over the different algorithms as well as optimizations that weren’t optimal, but were faster because the mechanics of the path made it faster for the physics of the robots. There were also unique optimizations that take advantage of diagonals, gyroscopes, suction to make 6G turns, and other ideas.

It’s a reminder that even when something seems solved, there is likely huge optimizations still waiting to be discovered.

But then again, you can go the other direction and try to build the most unskilled robot. Hebocon celebrates unskilled robot builders – even penalizing those who try too hard or using proper technology.

Write your own NES emulator

Write your own NES emulator


“There is almost no reason to re-write a huge software codebase from scratch. If anything, evaluate wrapping it with an emulator that can filter for the things you want to change before a re-write.”

-Me (inspired by Joel Spolsky)

javidx9 walks us through his 3 month adventure writing a NES emulator in C++. He does a great job walking through the topics with beginner friendly explanations and good production values of diagrams and coding.

Other resources:

The Story of Mel

The Story of Mel

Are you a programmer’s programmer? A man among men? Have people written epic poems about your coding? If not, maybe you should be as cool as ‘The Story of Mel‘.

The stories of Melvin Kaye have become part of programming folklore. Little is actually known of him beyond the fact he did lots of interesting programming with a very early Royal McBee LGP-30. He eschewed optimizing compilers and hand-crafted his code to take advantage of the most esoteric hardware quirks – such as using the LGP-30’s drum memory rotation speed to write delay loops in his code.

Maybe give one of his be-fabled stories a read. Or perhaps one of his other stories.

RAII: Resource Acquisition is Initialization

RAII: Resource Acquisition is Initialization

This is a great little video from the Back to Basics series offered by CppCon. They even have their slides and code on github.

CppCon has a bunch of other great ‘Back to Basics’ videos that cover a whole host of great topics: safe exception handling, move semantics, type erasure, lambdas, and a bunch of other critical but oft misunderstood elements of C++

In this video, you get a refresher on RAII.

“Resource Allocation is Initialization is one of the cornerstones of C++. What is it, why is it important, and how do we use it in our own code?”

Biggest discoveries of the year

Biggest discoveries of the year

Quanta Magazine makes a wonderful set of videos on mathematics, computer science, physics, biology, cosmology, and science fields. They distill amazing discoveries down to quick videos that often include interviews with the very scientists involved. One series I really like is their yearly summary videos that sum up some of the biggest breakthroughs of the year.

The 2021 video has a really great interview on how we’re starting to formalize and start really understanding how neural nets used in AI algorithms work. They used a clever idea of starting with how these networks worked if the net width was infinite.

It’s a great part of my effort to move away from emptier forms of social media consumption and more intentionally spend my time/energy on creative, positive, constructive, uniting, uplifting, and educational efforts.

The 2020 video has a really good segment on the LEAN mathematical proof assistant that is building up a library of theorems and assist in proving them.

You are a CIA agent!

You are a CIA agent!

Back in the day, people learned programming by typing in BASIC programs from books and magazines. Besides the books that came with my TSR-80, if there was one book that got my programming bug off the ground, it had to be this one: Basic Fun with Adventure Games. A book I bought for $0.75 at an school book sale when I was around 5th grade.

Basic Fun with Adventure Games by Susan Drake Lipscomb and Margaret Ann Zuanich

What made this book so amazing is that it not only contains a full text adventure game you can type in, but it also teaches you how to write your own adventure game – from concept to implementation. I remember being blown away at how good this book was. Even today it holds up to teach the requirements and skills needed to program your first game. It certainly worked well enough for me as a 10-12 year old to completely write my own game about finding the deed to a castle after your rich uncle died. Highly recommend checking it out.

It was the most amazing 75 cents I spent in my entire childhood and still holds a special place in my heart. My copy still sits on my bookshelf next to the college programming textbooks.

Resources:

Links:

Fast, tiny, lossless image compression

Fast, tiny, lossless image compression

There are countless image compression formats, and the world likely doesn’t need more. However, Dominic Szablewski was tinkering around with compressing RGB images and came up with his own lossless, super-fast, super-tiny compression algorithm called the Quite Ok Image compression algorithm.

While this is somewhat interesting in itself, the comments have a great discussion of how image compression has gone through a whole history of developments.