Simone Web Design

Hi — I’m Simone Vittori, a software developer based in London.
I have experience in web development with a variety of languages, such as Ruby, Rust and Elixir. I’m passionate about good software design and I use this blog to write about anything programming related that I find interesting. You can follow me on Twitter or subscribe to the RSS feed. Happy reading!

One request

In an era where 95% of sites are bloated with cookie banners and behavioral tracking scripts, here’s a refreshing approach to web development.

Nowadays, loading a website on your device of choice can be painful — both for the browser, which has to parse and render all that stuff, and for you, the user, which has to wait for it (and pay for that data plan).

The issue is only exacerbated by the fact that mobile devices can be slow, the network can be slow, and there’s simply too much cruft to download.

There is a better way.

Multiple Git Config For Different Folders

I wanted to have a clean separation between work-related repositories and my personal projects, as I often need to use a different email: for example, I’d like to sign git commits in the work repo with my work email, but keep using my personal email for the rest. How do you achieve this?

It’s actually pretty simple: I’ll show you how.

Inserting values of multiple types in Rust's HashMap

I was building a generic data store with Rust and I needed to implement a heterogeneous collection of keys and values. Essentially what I needed was a dictionary, but with values of dynamic type, like both strings and integers at the same time.

Rust is a statically typed language and, due to the memory safety guarantees we are given, all values of some type must have a known, fixed size at compile time, therefore we are not allowed to create a collection of multiple types. However, dynamically sized types also exist, and in this article I’ll show how to use them.

How to fix “Untracked working tree would be overwritten by merge” error

Let’s say you have two Git repositories: one on GitHub, and one on your computer.
They contain identical (or very similar) files, and what you want to do is “synchronize” them (i.e. make them look exactly the same). Maybe all you need is to download a few missing files from GitHub to your computer, or simply push some changes from your machine to GitHub.

You have tried git pull, but you’re getting this error:

error: Untracked working tree file * would be overwritten by merge.
fatal: read-tree failed

You need the changes, but obviously you don’t want to overwrite or lose any files. Don’t worry, the fix is actually straightforward!

How to enable Dark Mode on macOS with the command line

If you want to toggle between light and dark mode, it can be done with a single shell command:

osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to not dark mode'

Try it and it will switch the mode immediately. No need to restart or install anything.

Blog Archives →