What causes Ruby memory bloat?
Ruby apps can use a lot of memory. But why? Various people in the community attribute it to memory fragmentation, and provide two “hacky” solutions. Dissatisfied by the current explanations and provided solutions, I set out on a journey to discover the deeper truth and to find better solutions.
Simpler UI Logic With Finite State Machines
A site for cataloging the many technical musing of Andy Desmarais
Reflecting on the Soul of a New Machine
Long ago as an undergraduate, I found myself back home on a break from school, bored and with eyes wandering idly across a family bookshelf. At school, I had started to find a calling in computing systems, and now in the den, an old book suddenly caught my eye: Tracy Kidder’s The Soul of a New Machine . Taking it off…
An x86 Assembler in 256 LOC (2017)
For the first “real” post in this blog, we’ll build an x86 assembler in less than 256 lines of C code. Obviously, it won’t implement every x86 instruction, but it will implement a surprisingly useful subset: data movement, control flow, integer arithmetic, bitwise operations, and function calls. We won’t be able to…
A Short Intro to Constraints
The essence of constraint is projection.
Fundamental Algorithms III
Three more fundamental algorithms in the series. Today, recursive permutations, subsets of the given set and variations with repetitions. Th...
Shipping a compiler every six weeks
This blog post is a slightly edited version of the live transcript of the talk I gave at RustFest 2019 in Barcelona on November 10th, 2019. As it's a transcript some parts of it are a bit repetitive or badly worded, but I hope the message behind the talk will be conveyed by this post anyway.
Comparisons in C++20
Now that the Cologne meeting is over and we’ve more or less finalized (at least before the NB comments come in) C++20, I wanted to take the time to describe in detail one of the new language features we can look forward to. The feature is typically referred to as operator<=> (defined in the language as “three-way…
Performance Tuning for .NET Core
Some of you may know I've been spending whatever time I can scrounge together grinding away at a new serialization library for .NET. Serializers can be complicated beasts. They have to be reliable, flexible, and fast beyond reproach. I won't convince you that serialization libraries have to be quick — in this post…
A New R6RS Scheme Compiler
Some readers already know this and a few have suspected. I’ve been working on a new R6RS Scheme compiler for a while. Now I have released it as free software. Read on to learn the many wonderful drawbacks of this niche compiler.
I was a 10x engineer and I’m sorry
You probably saw the big discussion this past weekend on Twitter about 10x Engineers. It all started with a tweet about how to recognize a 10x Engineer, followed by tons of responses about how usel…
Common Mistakes and Missed Optimization Opportunities in SQL
Made by Developers and Non-Developers
Building Standalone Python Applications with PyOxidizer
Python application distribution is generally considered an unsolved problem. At their PyCon 2019 keynote talk, Russel Keith-Magee identified code distribution as a potential black swan - an existential threat for longevity - for Python. In their words, Python hasn't ever had a consistent story for how I give my code…
Why Operators Are Useful
This is something I posted on python-ideas, but I think it's interesting to a wider audience. There's been a lot of discussion recently ab...
Coding Problems from Programming Job Interviews
Java Programming tutorials and Interview Questions, book and course recommendations from Udemy, Pluralsight, Coursera, edX etc
Elegant Error Handling with the JavaScript “Either” Monad
JavaScript gives us a built-in language feature for handling exceptions: try…catch statements. And they’re better than littering our code with if-statements. But they can be problematic. And they are not the only way to handle errors. In this article, we’ll take a look at using the ‘Either monad’ as an alternative to…
2FA on the command line
OTP: One-Time Password TOTP: Time-based One-time Password algorithm 2FA: Two-factor authentication There is no shortage of OTP 2FA apps availiable for your phone, such as Google Authenticator or Duo Mobile. These apps take an initial secret code, and create a TOTP anytime you need a 2FA code for login.… …
AgileFall – When Waterfall Sneaks Back into Agile
This article previously appeared in the Harvard Business Review AgileFall is an ironic term for program management where you try to be agile and lean, but you keep using waterfall development techn…
A Quick and Easy Guide to Tmux (2015)
Become a master of tmux in a few minutes
A Thought Experiment: Using the ECS Pattern Outside of Game Engines
It’s been about 6 months since I watched Catherine West’s excellent Using Rust for Game Development sent me down the Entity-Component-System (ECS) rabbit hole, and I thought I’d share some of my findings. I’ve been meaning to write about this for quite a while now but it took a while to put my thoughts into a cohesive…
Introduction to TLA+ Model Checking in the Command Line
Otherwise known as “wait, you mean I can use the TLA toolbox from the command line?”
Catching use-after-move C++ bugs with Clang's consumed annotations
This post describes a compile-time technique for catching use-after-move bugs in modern C++. It’s currently used to prevent some mistakes in the Serenity Operating System.
Java JIT vs. Java AOT vs. Go for Small, Short-Lived Processes
Mario Macias' handcrafted blog