a tumblelog

Finding the version number of VirtualBox Guest Additions

On a Linux VirtualBox guest use:

modinfo vboxguest

to find the version (and more info) of the Guest Additions installed.

Lessons learned from rewriting code

The reason that the old code might look messy to us and that it has to be rewritten from scratch isn’t actually because of the code but rather of a cardinal, fundamental law of programming:

It’s harder to read code than to write it.

Source: Lessons learned from rewriting code in my 10+ years as a developer by Huseyin Polat Yuruk.

Children of Time: a good read

In the afternoon I finished Adrian Tchaikovsky's Children of Time. The story reminded me quite a bit of A Deepness in the Sky, a science fiction novel by American writer Vernor Vinge. If you have read his Zone of Thought series you most likely will enjoy Children of Time and vice versa.

The Zone of Thought series consists of the following books:

Children of Ruin

In the evening I started in Children of Ruin by Adrian Tchaikovsky, the sequel to Children of Time.

How to Design for the Web in 2019

Let's break down and go through the most important design principles of designing for the modern web in 2019.

Source: How to Design for the Web in 2019 an article by Casper Beyer.

The surprising benefits of talking to strangers

Most people spend part of every day surrounded by strangers, whether on their daily commute, sitting in a park or cafe, or visiting the supermarket.

Yet many of us remain in self-imposed isolation, believing that reaching out to a stranger would make you both feel uncomfortable.

These beliefs may be unwarranted. In fact, our research suggests we may often underestimate the positive impact of connecting with others for both our own and others' wellbeing.

Source: The surprising benefits of talking to strangers.

IP address of the first network interface on MacOS

To get the IP address of the first network interface on MacOS use:

ipconfig getifaddr en0

Disable screenshot drop shadows on MacOS

To disable screenshot drop shadows on MacOS use:

defaults write \ \
   disable-shadow -bool TRUE
killall SystemUIServer

Replace TRUE with FALSE to revert back to the default.

Night owls: Simple sleep tweaks boost wellbeing

Tweaking sleeping habits can shift people's body clocks and improve their wellbeing, say scientists in the UK and Australia.

In the evening I read Night owls: Simple sleep tweaks boost wellbeing by James Gallagher on the BBC website. While not an extreme night owl I would like to shift my body clock an hour or so.

Access denied for user 'root'@'localhost'

In the afternoon I installed MySQL according to notes I had taken the previous time. When I ran


I discovered I had to use sudo. I thought I had forgotten to write this down. Next I tried to connect to the MySQL server as follows:

mysql -uroot -p

But I got an error: "ERROR 1698 (28000): Access denied for user 'root'@'localhost'". After some Googling I learnt that the security model in MySQL 5.7 has changed and that sudo is required if you want to login as user root.

The shy calico cat

In the evening my mother spotted a calico cat. I took my iPhone 5 and tried to take a few photos but the cat was very shy.

A shy calico cat The shy calico cat playing peek-a-boo.

Finding a user's ID on MacOS

If you want to know a users uid on MacOS or OS X you can use the directory service command line utility as follows:

dscl . -read /Users/john UniqueID

Which reports in my case:

UniqueID: 501

Another option is to use:

ls -n /Users | grep john

Which, reports in my case

drwxr-xr-x+ 46 501  20   1564 May 31 21:26 john

Another way to show PATH entries one per line

An alternative to the method I showed the first of June to show PATH entries one per line is:

echo -e ${PATH//:/\\n}

In bash this replaces all occurrences of : in the variable PATH with a newline character. For more information see Shell Parameter Expansion in the Bash Reference Manual.

Did Time Have A Beginning?

Did the Universe have a beginning, or a time before which nothing existed? Or did the Universe exist for an eternity, like an infinite line extending in both directions? Or, quite possibly, is our Universe cyclic like the circumference of a circle, where it repeats over and over indefinitely?

In the evening I read Did Time Have a Beginning by Ethan Siegel.

Relearning Matrices as Linear Functions

Many of us have probably encountered matrices at some point in math. They’re these tables with seemingly byzantine rules for combining them. Take the first element of the first row, first element of the first column, multiply them together, then add, then spin three times fast… And this is to say nothing for the rules of inverting.

Source: Relearning Matrices as Linear Functions by Dhruv Parthasarathy.

The Complete CSS Flex Box Tutorial

Last week I used flex box in a project. This evening I read The Complete CSS Flex Box Tutorial by Greg Sidelnikov to learn more about this useful CSS feature.

On Graveyard Hill

In the afternoon I listened to a new Pixies track, On Graveyard Hill, from their upcoming album "Beneath the Eyrie" out September 13, 2019.

WWDC Apple Special Event

In the evening I watched the Apple special event. From what I've heard and seen I like where iOS, now iPadOS, on the iPad is going; features like desktop being the default in Safari for sites, Files app with access to USB flash drives, multiple windows of the same app, etc.

Now I just have to save up for a new iPad as my iPad Air 2 got stolen nearly a year ago while living in Mexico.