Header logo.
Small Hallucinations
HomeArchiveTagsAboutFeed

Notes published in Q1, 2023

Learning fun but irrelevant things

Last week, my friend Joe asked me what's the best way to learn a programming language.

I replied: Go through the basics as quickly as possible. Then begin building things with it. This is how I learn Golang.

I had been curious about Rust for a while. And a coworker talked about how Rust was his favorite language with a lot of exuberance. I thought to myself, maybe I could do the same with Rust.

I was intimidated by “the Rust book”. It's a huge book of I don't know how many pages. And I never got past hello world and the curious exclamation mark after println. ⋯

Bug report: Linter doesn't run in SourceTree

Description of bug: Using SourceTree on React project running on Node. When committing, linter fails to run with a complaint saying something like “node not found”.

Investigation: Googled a bit, the problem might have been caused by nvm`` or it's something aboutzsh`. Good people on StackOverflow also shared how they solved their similar bugs on their system.

But... Somehow I was using Volta to manage different versions of Node. Can't think of a good reason why I decided to do so.

Conclusion: Decided not to pursue a non-hacky solution. Followed my precious friend Elad Silver's post: ⋯

#19

I went through my finances using beancount. Double-entry bookkeeping seemed boring at first. But with the help of VSCode extensions for beancount that enable syntax highlighting and formatting, it became somewhat enjoyable.

I ran into problems over different currencies. I have a few transactions in USD and EUR. I wrote a Python script to convert bank statement formats to that of beancount.

Did you know you could use calc in Tailwind CSS? I was first mind-blown then felt it wrong. One should not choose to use the dark magic that is calc() unless it is her last option. Besides, by using Tailwind, we are telling ourselves now we are one step removed from the nuts and bolts of CSS. Using arbitrary numbers in brackets already feels “unidiomatic” in Tailwind. Last week when I found myself resorting to something like h-[calc(100%-20rem)] I grimaced very hard.

I created huge mess while trying to resolve a merge conflict. I was using GitHub Desktop. It was ill-equipped to compare and switch between different branches on GitHub Desktop. (And I was ill-equipped to use the commandline.) Thankfully, the web interface is quite advanced by now. Usually, small conflicts that do not involve files being deleted or moved around could be resolved by a few clicks in the browser. This time, though, it did involve files being moved around. That was a huge mess. ⋯

Gothenburg

I moved to Gothenburg from Stockholm. And I like Gothenburg better.

Stockkholm feels like an archipelago of settlements connected by highways, subways and pendeltåg. In the middle of the city, we have touristy areas in Gamla Stan, commercial areas in Norrmalm and Södermalm. And really fancy areas in Östermalm. Beyond these quarters, the city feels more like non-contiguous dots of inhabited areas separated by woods. Some of these dots are bustling urban areas in their own right, such as Solna and other centers of communes in Greater Stockholm Area. But at the same time, a lot of them feel like villages.

Gothenburg as a city is held together more closely. The downtown area of Gothenburg is more walkable than that of Stockholm. I live in Hisingen and I love the lively messiness around here.

Yet it's not just the lively messiness. A few bus stops away from the down-to-earth supermarkets, shopping malls, and a Taiwanese-owned hotpot restaurant, lies a campus of Gothenburg University and Chalmers, a science park and a bunch of tech companies. ⋯