RSSAmplifier

Blog

Taxo Rubio's blog

Computer stuff and geeky things, sprinkled with general sillyness!

taxorubio.comRSS feed ↗21 posts

Latest posts

Quick private constructors in Python

Private constructors can be very convenient. Sometimes we want the users of a class to use functions with explicit names to construct them, which can also return null or error objects in case of failure instead of throwing an exception. However, Python doesn't have private constructors, so they are a pattern we can't write in this language... Or can we? TL;DR: Use a guard object to make private…

Short thoughts

In contrast to long entries, these are more direct and much less reviewed entries. As a halfway point between writing articles and microblogging, these short thoughts are where I express feelings and short updates I want to leave here for posterity. As always, these posts have an RSS feed .

Work with me!

TL;DR: Email me with a project proposal at [Email protected] . Unfortunately, you'll need to run some lightweight but non-trivially readable JavaScript code to read my email address. However, if you're smart about it, you can infer the address from the domain name. Try a couple of addresses just in case I blocked one already ;-) Who am I? I'm a systems, low-level and back-end engineer with 4+…

Type definitions to retrieve objects from localStorage

If you have ever written an object into localStorage , you most likely have had the nasty surprise that reading it back didn't instantly return a full object with its associated methods. As with all bugs, you swore that it wouldn't happen again, but how many times do we trip over the same stone? I recently decided that the last bug occurrence was one too many and that I would solve this once and…

Enterprise-grade FizzBuzz is actually genius

Ok, I'll bite: I have a blog where I write about programming, so I must write some post about FizzBuzz. It's the law and I have to abide by it, sorry. Today, I want to show you what I believe is the most maintainable way to write the FizzBuzz algorithm, which I have never seen before in the wild. We're going to be writing in C, not because C is a particularly good language for this exercise, but…

Periodicity is not a virtue

I have to remind myself of this sometimes, so here I am writing it in stone... Silicon stone. We're so bombarded with productivistic discourses telling us that we MUST strive to be the best a whatever we're doing and that keeping a steady streak is REQUIRED to do so that it's easy to forget that our time is ours to enjoy. I keep a list of films I've watched, roughly dated by year and month, and I…

A quick script to write short entries

In the interest of writing more short form entries, I've written a short script to do just that. It turns out that writing the frontmatter by hand is too much of a hassle when you just want to write a couple of lines. Maybe the true benefit of automation is not how much absolute time it solves, but how much required effort it lifts from us. In this case, it does lift a lot of effort relative to…

Updates in a low-tech site

One of my goals with this blog is to keep a personal website running with as little tech as possible. This means that I don't want to spin up a custom server, use a WRS , deploy a database or what have you. Instead, I'm determined to extend and automate this site purely through basic git and shell workflow. Today, I want to tell you how I update the site so you can replicate my system! The build…

About me

Hi! I'm Taxo Rubio I'm a software engineer from Granada, Spain. I am a systems and web software engineer, applying the term "full stack" in the most literal way possible. On the systems side, I work on real-time systems mainly in C99, Modern C++ (>=11) and Rust. On the web side, I do vanilla TypeScript front-ends and Python, PHP and Rust back-ends, sprinkled with some light frameworks such as…

Shared links

When I read things I enjoy online, I like to share them with my friends. May they be articles, webcomics or fun websites, I like it when they consolidate, change or offer a new view of the world. Sometimes they're thoughtful texts, sometimes they're just silly ideas half-coherently put together that make me meditate on them for some time. Whatever they may be, I'd like to share these pieces of…

Give it five minutes

Long term refactors

Vim Kōans

These parody kōans , were my introduction to Zen philosophy through the usual long walk of Wikipedia pages. Even though they are written as humorous facsimiles of real Buddhist texts, they propose good ideas about the nature of Vim. There's one kōan I can't stop thinking about: Mastery of Vimscript A student enquired of Master Wq, “When will I know I have mastered Vimscript?” Master Wq answered,…

I just blocked my blog email

When I opened this page, I made the email address blog@taxorubio.com public. After getting a few spam emails more than a year ago I decided to remove it, as I figured out bots would have an easy time scrapping my page for an email address. A couple of weeks ago I started getting a massive influx of spam where my address was BCC'd into fake customer support threads (kudos for the originality), so I…

How I manage my shopping lists with Org Mode

And on the terminal these words appear: "My name is Orgzlymandias, King of Kings: Look on my notes, ye Mighty, and despair!" Why I went into this rabbit hole Shopping lists are a nightmare. They are a necessary evil you must deal with every week in order to survive. They are required for the daunting task of shopping that repeats itself every few days. Supermarkets are a mess by design, as they'd…

Software release: test.h

I don't know why, but I love writing small test frameworks. The first serious one I wrote was for my bachelor thesis a couple of years ago, but I've used them as an exercise to play with languages many times before. This time, it was was different: test.h is a header-only testing framework for C that was born out of necessity. Why do I find myself writing test frameworks? For one, they're a nice…

As long as we don't harm anyone

There's this adage we as a society have adopted and like to remind each other in many moral discussions: People can do what they want as long as they don't harm anyone. On its surface, it sounds like a sensible point, but I've lately been getting a wrong feeling about it. With your indulgence (or without it, as I write what I want in my blog) I would like to explore this feeling in some depth…

A one-line JavaScript string formatter

Once again, I find myself on a quest to write a piece of code that's been repeated since time immemorial. This time, I want to solve the timeless problem of taking a string with some formatting markers and filling it with some data. This should have been a no-brainer, but I think I have come up with a novelty, which I want to share with you. I believe this is very simple stuff. However, I haven't…

The frequency game

This week, my brother-in-law and his girlfriend have come visit for a couple of days and they've teached us a nice, simple game to play in small groups, which they call frequency . I want to teach it to you in this short entry. Introducing the rules Let's say you're a group of four people. One of you, the guesser , closes their eyes while the rest agree on a number from 1 to 10, which the guesser…

Moving my package tests from Docker to systemd-nspawn

I recently moved my pkgbuilds testing environment from using Docker to plain systemd-nspawn containers. To me, this switch has definitely been an upgrade. I now have a simple, concrete tool to start local containers whose file systems live in the pkgbuilds directory. My decision to ditch Docker is a very personal one and I understand if you believe that what follows is a lot of work for very…

Finding the narrowest integer

Hello internet! I'd like to inaugurate my blog with a topic that's very dear to me: metaprogramming ! In particular, I want to guide you through an introduction to this fascinating discipline in a way that's easy to follow and that gives you the building blocks to write your own tools. Being completely honest, this is an advanced programming topic, but the tools we're going to use are mostly…