Header logo.
Small Hallucinations
HomeArchiveTagsAboutFeed

Notes published in Q2, 2023

Untracking files in Git

Normally you can avoid tracking files in Git by adding files to .gitignore.

But if files have been previously added for tracking, they will still be tracked even after appending them to .gitignore.

We need to first remove tracked files from cache. And add back all the files – including .gitignore – in the current directory. Now .gitignore will take effect.

Using Readwise

I realized I read quite a lot on the web. I spend a lot of time browsing answers on StackOverflow and reading documentation.

For the most part, such information is only useful once and it's OK to forget it. But occasionally, I'd come across a new bug that reminds me of an older problem I had seen before. At that time, I'd wish I could remember how I solved that problem earlier.

I take notes in Obsidian when I try to seriously learn something new. In the meantime, I'd create flashcards in Anki if I find what I'm learning really useful.

The downside of this is, when you are in the middle of debugging, it feels costly to pause and change the mode from debugging to note-taking. (To reduce the friction while collecting information in Obsidian, I've enabled global hotkeys. Hope this can be helpful.) ⋯

ts2322

A moment ago I got an error that reads like this:

I was really confused for a moment. Then I realized (() => void) | null means: Either a) a function that neither takes any argument nor returns any value; or b) null.

And () => void | null means a function that does not take any argument. And there are two possibilities when this function returns: Either it doesn't return anything or it returns a null.

Here's blog post explaining why the void keyword is useful while devving. ⋯