Fast machines, slow machines

Well, that was unexpected. I recorded a couple of crappy videos in 5 minutes, posted them on a Twitter thread, and went viral with 8.8K likes at this point. I really could not have predicted that, given that I’ve been posting what-I-believe-is interesting content for years and… nothing, almost-zero interest. Now that things have cooled down, it’s time to stir the pot and elaborate on those thoughts a bit more rationally. To summarize, the Twitter thread shows two videos: one of an old computer running Windows NT 3.51 and one of a new computer running Windows 11. In each video, I opened and closed a command prompt, File Explorer, Notepad, and Paint. You can clearly see how apps on the old computer open up instantly whereas apps on the new computer show significant lag as they load. I questioned how computers are actually getting better when trivial things like this have regressed. And boom, the likes and reshares started coming in. Obviously some people had issues with my claims, but there seems to be an overwhelming majority of people that agree we have a problem. To open up, I’ll stand my ground: latency in modern computer interfaces, with modern OSes and modern applications, is terrible and getting worse. This applies to smartphones as well. At the same time, while UIs were much more responsible on computers of the past, those computers were also awful in many ways: new systems have changed our lives substantially. So, what gives?

June 27, 2023 · Tags: featured, opinion, twitter-thread
Continue reading (about 16 minutes)

EndBASIC 0.10: Core language, evolved

After three months of early-morning hacking, I’m pleased to announce that EndBASIC 0.10 is now available—right on time for some holiday-time experimentation! This release marks a huge milestone because it makes the language usable for real-world development. You see, when I started this project over two years ago, I wrote a rudimentary interpreter for something that resembled BASIC and then launched EndBASIC 0.1. Since then, I have been piling onto those insufficient foundations by adding flashy features such as a web interface, a cloud file sharing service, and a hybrid text/graphics console. These features have been well-received in every demo I’ve given but… the feedback that always came back was the same: “Give me some sort of functions or subroutines!”, or “This is no BASIC without GOTO!”. And these criticisms were right. Trying to write any sort of non-trivial program in EndBASIC was a daunting and frustrating experience. I had tried to simplify coding to the foundations of structured programming, but without a way to perform unstructured jumps (aka go-tos) or define custom functions… it was impossible to factor out common code, which is a need for the vast majority of programs that exceed a screenful of text. There were also usability deficits such as the lack of line numbers in error messages, which made it incredibly difficult to debug any failing program. The situation had to change, and change it has in EndBASIC 0.10.

December 27, 2022 · Tags: endbasic, featured
Continue reading (about 5 minutes)

Farewell, Microsoft; hello, Snowflake!

After two years, it’s time for a change: I left Microsoft last week and I’m starting at Snowflake today. Read on for details on my stint in Azure Storage, why I ended up looking for a new role, and how I landed at this new company.

October 31, 2022 · Tags: featured, microsoft, personal-story, snowflake
Continue reading (about 10 minutes)

Rust is hard, yes, but does it matter?

Rust is infamous for having a steep learning curve. The borrow checker is the first boss you must defeat, but with a good mental model of how memory works, how objects move, and the rules that the borrow checker enforces, it becomes second nature rather quickly. These rules may sound complicated, but really, they are about understanding the fundamentals of how a computer works. That said… the difficulties don’t stop there. Oh no. As you continue to learn about the language and start dealing with things like concurrency—or, God forbid, Unix signals—things can get tricky very quickly. To make matters worse, mastering idiomatic Rust and the purpose of core traits takes a lot of time. I’ve had to throw my arms up in frustration a few times so far and, while I’ve emerged from those exercises as a better programmer, I have to concede that they were exhausting experiences. And I am certainly not an expert yet. So, yes, there is no denying in saying that Rust is harder than other languages. But… does it matter in practical terms? Betteridge’s law of headlines says that we should conclude the post right here with a “no”—and I think that’s the right answer. But let’s see why.

May 6, 2022 · Tags: featured, opinion, rust
Continue reading (about 4 minutes)

Rust traits and dependency injection

Dependency injection is one of my favorite design patterns to develop highly-testable and modular code. Unfortunately, applying this pattern by taking Rust traits as arguments to public functions has unintended consequences on the visibility of private symbols. If you are not careful, most of your crate-internal APIs might need to become public just because you needed to parameterize a function with a trait. Let’s look at why this happens and what we can do about it.

April 22, 2022 · Tags: featured, rust
Continue reading (about 9 minutes)

A year on Windows: Introduction

2022-03-07: Introduction 2022-03-08: Keyboard shortcuts 2022-03-09: Input methods 2022-03-10: Look'n'feel 2022-03-11: Window switching 2022-03-12: PowerToys 2022-03-13: Miscellaneous tools 2022-03-14: Development experience 2022-03-15: PowerShell 2022-03-16: Networked file systems 2022-03-17: System debugging 2022-03-18: Software installation 2022-03-19: Finale A bit over a week ago, I narrated my decades-long love and hate relationship with Windows. Today, it’s time to start covering my impressions of this platform after spending a year on it as my primary OS. This is noteworthy because I had been a Unix-only person for about 25 years and spent the last 15 on macOS alone. Switching to Windows 10 and 11 has been quite a change and… for the most part, a positive one. I like what I’ve seen.

March 7, 2022 · Tags: featured, windows
Continue reading (about 4 minutes)

Always be quitting

A good philosophy to live by at work is to “always be quitting”. No, don’t be constantly thinking of leaving your job 😱. But act as if you might leave on short notice 😎. Counterintuitively, this will make you a better engineer and open up growth opportunities. A thread 👇.

April 12, 2021 · Tags: featured, opinion, twitter-thread
Continue reading (about 4 minutes)

How does Google keep build times low?

Monorepos are an interesting beast. If mended properly, they enable a level of uniformity and code quality that is hard to achieve otherwise. If left unattended, however, they become unmanageable monsters of tangled dependencies, slow builds, and frustrating developer experiences. Whether you have a good or bad experience directly depends on the level of engineering support behind the monorepo. Simply put, monorepos require dedicated teams and tools to run nicely. In this post, I will look at how almost-perfect caching plays a key role in keeping build times manageable under such an environment.

February 26, 2021 · Tags: bazel, featured, monorepo, opinion
Continue reading (about 11 minutes)

How does Google avoid clean builds?

During my 11 years at Google, I can confidently count the number of times I had to do a “clean build” with one hand: their build system is so robust that incremental builds always work. Phrases like “clean everything and try building from scratch” are unheard of. So… you can color me skeptical when someone says that incremental build problems are due to bugs in the build files and not due to a suboptimal build system. The answer lies in having a robust build system, and in this post I’ll examine the common causes behind incremental build breakages, what the build system can do to avoid them, and how Bazel accomplishes most of them.

December 31, 2020 · Tags: bazel, featured, google, monorepo, opinion
Continue reading (about 20 minutes)

Unit-testing a console app (a text editor)

The most notable feature in EndBASIC 0.3 is its new full-screen console-based text editor. In this post, I describe why it is important and useful to unit-test a console app like this, and I will dive into how to implement unit tests that catch regressions and inefficiencies. Code samples are in Rust, but the concepts presented here are applicable to any language with minimal data abstraction facilities.

December 8, 2020 · Tags: endbasic, featured, programming, rust
Continue reading (about 16 minutes)

Windows Subsystem for Linux: The lost potential

If you have followed Windows 10 at all during the last few years, you know that the Windows Subsystem for Linux, or WSL for short, is the hot topic among developers. You can finally run your Linux tooling on Windows as a first class citizen, which means you no longer have to learn PowerShell or, god forbid, suffer through the ancient CMD.EXE console. Unfortunately, not everything is as rosy as it sounds. I now have to do development on Windows for Windows as part of my new role within Azure… and the fact that WSL continues to be separate from the native Windows environment shows. Even though I was quite hopeful, I cannot use WSL as my daily driver because I need to interact with “native” Windows tooling. I believe things needn’t be this way, but with the recent push for WSL 2, I think that the potential of an alternate world is now gone. But what do I mean with this? For that, we must first understand the differences between WSL 1 and WSL 2 and how the push for WSL 2 may shut some interesting paths.

November 13, 2020 · Tags: featured, opinion, windows
Continue reading (about 8 minutes)

Farewell, Google; hello, Microsoft!

After a little over 11 years, it’s time for a much longed change: I’m leaving Google and I’m joining Microsoft as a Principal Software Engineer for Azure. These job changes are effective as of this week, but my family and I already moved from New York City to Redmond, WA about three weeks ago. Read on for a recap on my tenure at Google, the whys behind my departure, and how I ended up choosing the position in Microsoft Azure after mulling over offers from Facebook, Twitter, and Microsoft.

October 19, 2020 · Tags: featured, google, microsoft, personal-story
Continue reading (about 13 minutes)

Configuration files and .d directories

Have you ever wondered why an increasing number of programs are configured by placing small files in .d directories instead of by just editing a single file? Have you ever wondered why these .d directories seem to proliferate in Linux installations? Read on to understand what these are and why they are useful.

August 17, 2020 · Tags: debian, featured, netbsd, unix
Continue reading (about 9 minutes)

Hello, EndBASIC!

Introducing EndBASIC, a new interpreter for a BASIC-like language that is inspired by Amstrad’s Locomotive BASIC 1.1 and Microsoft’s QuickBASIC 4.5. Like the former, EndBASIC intends to provide an interactive environment that seamlessly merges coding with immediate visual feedback. Like the latter, EndBASIC offers higher-level programming constructs and strong typing. The main idea behind EndBASIC is to provide a playground for learning the foundations of programming in a simplified environment.

April 22, 2020 · Tags: endbasic, featured, programming, release, rust
Continue reading (about 3 minutes)

Ensuring system rewrites are truly necessary

You probably know that software rewrites, while very tempting, are expensive and can be the mistake that kills a project or a company. Yet they are routinely proposed as the solution to all problems. Is there anything you can do to minimize the risk? In this post, I propose that you actively improve the old system to ensure the new system cannot make progress in a haphazard way. This forces the new system to be designed in such a way that delivers breakthrough improvements and not just incremental improvements.

January 24, 2020 · Tags: bazel, essay, featured, sre
Continue reading (about 7 minutes)

Sample REST interface in Rust and Go

Over the summer, I prototyped a bunch of web apps whose ideas had been floating in my mind for a long time. I spent some time reading through REST API documentation pages and, as part of these exercises, implemented sample RESTful web services in both Go and Rust. (Just for context, the last time I wrote a web app was in high school… and it involved PHP, MySQL, and I think IE6?

September 27, 2019 · Tags: featured, programming, rust, webapp
Continue reading (about 16 minutes)

Darwin's QoS service classes and performance

Since the publication of Bazel a few years ago, users have reported (and I myself have experienced) general slowdowns when Bazel is running on Macs: things like the window manager stutter and others like the web browser cannot load new pages. Similarly, after the introduction of the dynamic spawn scheduler, some users reported slower builds than pure remote or pure local builds, which made no sense. All along we guessed that these problems were caused by Bazel’s abuse of system threads, as it used to spawn 200 runnable threads during analysis and used to run 200 concurrent compiler subprocesses.

March 6, 2019 · Tags: bazel, featured, macos, performance
Continue reading (about 6 minutes)

Hello, sandboxfs 0.1.0

I am pleased to announce that the first release of sandboxfs, 0.1.0, is finally here! You can download the sources and prebuilt binaries from the 0.1.0 release page and you can read the installation instructions for more details. The journey to this first release has been a long one. sandboxfs was first conceived over two years ago, was first announced in August 2017, showed its first promising results in April 2018, and has been undergoing a rewrite from Go to Rust.

February 5, 2019 · Tags: bazel, featured, pkg_comp, sandboxctl, sandboxfs, software
Continue reading (about 7 minutes)

Rust vs. Go

There is no good answer to this question: people tend to put Go and Rust in the same bucket because they were released at around the same time, because Rust’s release felt like a response to Go’s, and because they are marketed to similar audiences. They are, however, vastly different. So let’s give in and compare them anyway.

July 13, 2018 · Tags: featured, go, programming, rust, sandboxfs
Continue reading (about 13 minutes)

Stick to your project's core language in your tests

This post is a short, generalized summary of the preceeding two. I believe those two posts put readers off due to their massive length and the fact that they were seemingly tied to Bazel and Java, thus failing to communicate the larger point I wanted to make. Let’s try to distill their key points here in a language- and project-agnostic manner.

March 27, 2018 · Tags: bazel, featured, google, software
Continue reading (about 3 minutes)

Shell readability: strict mode

Some programming languages have a feature known as strict mode: a setting that makes the language interpreter disallow certain obviously-broken code that would otherwise work. The simplest examples are JavaScript and Perl but, as it turns out, the shell also has something akin to this feature. The “strict mode” name, however, is unofficial, so you won’t find many references to it online. You can enable the shell’s strict mode by doing one of the following:

March 9, 2018 · Tags: featured, readability, shell
Continue reading (about 6 minutes)

Introducing pkg_comp 2.0 (and sandboxctl 1.0)

Announcing the launch of pkg_comp 2.0, how this differs from the 1.x series, why there was a rewrite, what sandboxctl 1.0 is, and more.

February 17, 2017 · Tags: featured, pkg_comp, sandboxctl, software
Continue reading (about 7 minutes)

#! /usr/bin/env considered harmful

Many programming guides recommend to begin scripts with the #! /usr/bin/env shebang in order to to automatically locate the necessary interpreter. For example, for a Python script you would use #! /usr/bin/env python, and then the saying goes, the script would “just work” on any machine with Python installed. The reason for this recommendation is that /usr/bin/env python will search the PATH for a program called python and execute the first one found… and that usually works fine on one’s own machine.

September 14, 2016 · Tags: featured, portability, programming, scripts, unix
Continue reading (about 5 minutes)

A look at Go from a newbie's perspective

I confess I am late to the game: the Go programming language came out in 2009 and I had not had the chance to go all in for a real project until two weeks ago. Here is a summary of my experience. Spoiler alert: I’m truly pleased. The project What I set out to build is a read-only caching file system to try to solve the problems I presented in my previous analysis of large builds on SSHFS.

March 22, 2016 · Tags: featured, go, software
Continue reading (about 10 minutes)

Compilers in the (BSD) base system

A commonly held axiom in the BSD community is that the C compiler belongs in the base system. “This is how things have been since the beginning of time and they define the way BSD systems are”, the proposition goes. But why is that? What makes “having a compiler in base” a BSD system? Why is the compiler a necessary part of the base system? Hold on, is it? Could we take it out?

October 23, 2015 · Tags: bsd, compilers, essay, featured, software
Continue reading (about 5 minutes)

"Your English is pretty good!", they said

As I spend September in Seoul and attend an intensive Korean language course, my story with English comes to mind. This is a story I have told a bunch of times to friends and coworkers and it’s time to write it down for posterity’s sake. In the title of this post is a verbatim quote of something I have been told many times throughout the years: Your English is pretty good!

September 20, 2015 · Tags: english, essay, featured, personal-story, writing
Continue reading (about 9 minutes)

My coding workflow

How would you best organize your work environment for maximum productivity if you were tasked to develop a type of application you had never developed before? Wouldn’t it be nice if you could witness how an experienced developer manages the tools of the craft so that you could draw ideas and incorporate them into your own workflow? This post aims to answer the above for the type of work I do by sharing how my workflow looks like. I want to compel you to share your own story in the comments section, and by doing so, create a collection of stories so that others can benefit from them.

September 7, 2015 · Tags: best-practices, development, essay, featured, workflow
Continue reading (about 11 minutes)

How to commit a code hack and not perish along the way

You are the developer in charge to resolve a problem and have prepared a changelist to fix the bug. You need the changelist to be reviewed by someone else before checkin. Your changelist is an ugly hack. What kind of response are you gonna get from your reviewer? Well as with everything: it depends! (Cover image courtesy of http://www.startupstockphotos.com/.) If you have: clearly stated upfront that the changelist is a hack, explained how it is a hack, justified that the hack is the right thing to do at this moment, and outlined what the real solution to get rid of the hack would be then your reviewer will most likely just accept the change without fuss (!

June 19, 2015 · Tags: best-practices, development, essay, featured, software
Continue reading (about 6 minutes)

Get a handle on email subscriptions

Do you have any idea which online services and stores have you given your email address to? Are you able to quantify the effort it would take to fully migrate to a different email account if you ever wanted to? (Cover image courtesy of http://www.startupstockphotos.com/) Three years ago, I was not able to answer these two simple questions when I decided to move my email account to our new family-owned domain.

June 6, 2015 · Tags: best-practices, email, essay, featured, workflow
Continue reading (about 8 minutes)

Six years at Google

Mission: Site Reliability Engineer for the Storage Infrastructure at Google D-Day: May 25th, 2009 Location: Dublin, Ireland Duration: Unspecified Six years have passed. Six years since I dropped out of a Ph.D. program, left home, and took a plane to Dublin, Ireland, to start my work life adventure by joining Google. Two years later, I moved to New York City and I am still here without any specific plans to leave.

May 26, 2015 · Tags: essay, featured, google, personal-story, work
Continue reading (about 9 minutes)

Hello, Medium!

In search for a new home to personal essays. 11 years. Next month will mark 11 years since the creation of The Julipedia, the personal blog that got me started into this writing journey. 11 years that have brought 690 posts (yeah, yeah, not that many for such a long time). And after all this time, it finally hit me: personal blogs have lost their original appeal. It is time for a change.

May 24, 2015 · Tags: essay, featured, writing
Continue reading (about 9 minutes)

On Bazel and Open Source

This is a rare post because I don’t usually talk about Google stuff here, and this post is about Bazel: a tool recently published by Google. Why? Because I love its internal counterpart, Blaze, and believe that Bazel has the potential to be one of the best build tools if it is not already. However, Bazel currently has some shortcomings to cater to a certain kind of important projects in the open source ecosystem: the projects that form the foundation of open source operating systems.

April 14, 2015 · Tags: bazel, featured, google, software
Continue reading (about 17 minutes)

Task tracking and the Bullet Journal

iGTD, Things, Org mode, OmniFocus, Google Tasks, Trello, Google Keep… All of them. All of them I have tried over the last few years and all of them have failed me in some way — or, rather, I have failed to adjust to their idiosyncrasies. Part of it is because the overwhelming feeling that builds up after days of continuous use due to how easy it is to end up with never-ending piles of open tasks.

November 20, 2014 · Tags: featured, productivity
Continue reading (about 7 minutes)

Code review culture meets FreeBSD

One of the things that often shocks new engineers at Google is the fact that every change to the source tree must be reviewed before commit. It is hard to internalize such a workflow if you have never been exposed to it, but given enough time —O(weeks) is my estimation—, the formal pre-commit code review process becomes a habit and, soon after, something you take for granted. To me, code reviews have become invaluable and, actually, I feel “naked” when I work on open source projects where this process is not standard practice.

May 31, 2014 · Tags: featured, freebsd, google
Continue reading (about 9 minutes)

How to merge multiple Git repositories into one

Are you looking for a method to merge multiple Git repositories into a single one? If so, you have reached the right tutorial! Please bear with me for a second while I provide you with background information and introduce the subject of our experiments. We’ll get to the actual procedure soon and you will be able to apply it to any repository of your choice. In the Kyua project, and with the introduction of the kyua-atf-compat component in the Summer of 2012, I decided to create independent Git repositories for each component.

February 15, 2014 · Tags: featured, git, kyua
Continue reading (about 4 minutes)

Introducing the FreeBSD Test Suite

I joined the FreeBSD committer ranks a couple of months ago with the intention to equip FreeBSD with an out-of-the-box test suite and with a testing infrastructure. The time until now has been quite fruitful and I have been rushing to get something ready for you before the year end. With that, I am very pleased to announce that the first mockup of the FreeBSD testing cluster is up and running!

December 31, 2013 · Tags: featured, freebsd, kyua, testing
Continue reading (about 4 minutes)

Putting a PowerMac G5 to good use

A few months ago I bought an old PowerMac G5 off of Craigslist and since then I have been experimenting with various operating systems and configurations. Before I tell you more about these, let me briefly explain why I got such a machine. <img src="/images/2013-07-15-Power_Mac_G5_open.jpg" alt=“Power Mac G5 open case” class=“float-right” width=“250px” /> I had always wanted one of these beasts. They look gorgeous (to me) and, to convince myself to get it, I thought that I would play with the PPC64 architecture.

July 15, 2013 · Tags: featured, mac, powerpc, review
Continue reading (about 6 minutes)

Self-interview after leaving the NetBSD board

The decision to not renew my NetBSD board membership was bittersweet. Let me put aside the Readability series posts for a moment while I recap how the two years serving the NetBSD Board of Directors have been. My term just finished a couple of weeks ago, so it is better to post this while it is still relevant. First, let me backtrack a little bit. A couple of years ago, I was nominated to serve the NetBSD Board of Directors.

June 20, 2013 · Tags: featured, netbsd
Continue reading (about 14 minutes)

Making NetBSD Multiboot-Compatible

This article first appeared on this date in O’Reilly’s ONLamp.com online publication. The content was deleted sometime in 2019 but I was lucky enough to find a copy in the WayBack Machine. I reformatted the text to fit the style of this site and fixed broken links, but otherwise the content is a verbatim reproduction of what was originally published. The i386 architecture is full of cruft required to maintain compatibility with old machines that go back as far as the 8086 series.

March 1, 2007 · Tags: featured, netbsd, onlamp, os, programming
Continue reading (about 13 minutes)

Smart Pointers in C++

This article first appeared on this date in O’Reilly’s ONLamp.com online publication. The content was deleted sometime in 2019 but I was lucky enough to find a copy in the WayBack Machine. I reformatted the text to fit the style of this site and fixed broken links, but otherwise the content is a verbatim reproduction of what was originally published. C++, with its complex and complete syntax, is a very versatile language.

May 4, 2006 · Tags: cxx, featured, onlamp, programming
Continue reading (about 17 minutes)

Lightweight Web Serving With thttpd

This article first appeared on this date in O’Reilly’s ONLamp.com online publication. The content was deleted sometime in 2019 but I was lucky enough to find a copy in the WayBack Machine. I reformatted the text to fit the style of this site and fixed broken links, but otherwise the content is a verbatim reproduction of what was originally published. The Apache HTTP Server is the most popular web server due to its functionality, stability, and maturity.

October 13, 2005 · Tags: featured, onlamp, unix, web
Continue reading (about 11 minutes)

Making Packager-Friendly Software (part 2)

This article first appeared on this date in O’Reilly’s ONLamp.com online publication. The content was deleted sometime in 2019 but I was lucky enough to find a copy in the WayBack Machine. I reformatted the text to fit the style of this site and fixed broken links, but otherwise the content is a verbatim reproduction of what was originally published. My previous article, Making Packager-Friendly Software (part 1), explains why software packaging is sometimes problematic due to real problems in the mainstream sources.

April 28, 2005 · Tags: featured, netbsd, onlamp, programming, unix
Continue reading (about 15 minutes)

Making Packager-Friendly Software (part 1)

This article first appeared on this date in O’Reilly’s ONLamp.com online publication. The content was deleted sometime in 2019 but I was lucky enough to find a copy in the WayBack Machine. I reformatted the text to fit the style of this site and fixed broken links, but otherwise the content is a verbatim reproduction of what was originally published. A package maintainer, or packager, is a person who creates packages for software projects.

March 31, 2005 · Tags: featured, netbsd, onlamp, programming, unix
Continue reading (about 20 minutes)