Starting afresh but because of a twist

Wheat on a calm green fieldPhoto from Unsplash

Hello guys, its been a while since I am hosting my blog on my own site.

I have been using Substack for a while and I hope to continue to interleave stuff between here and there.

So what happened?

A drastic incident, some dependency issues and some time to kill in the middle of my exams led to this.

The twist

Well, it was a fine day, I was studying for my exams on my computer and did not even go near the folder where I essentially keep all my code. (Shhhh.., its just a folder named code in the home directory! Surprising wasn't it?) Yes all of my code, you'll quickly see why I am focusing this in a second. So I had PDFs open and browsers and all the other stuff open as usual but I had'nt gone to my code folder, I keep my documents in a different folder and had opened the PDF from there. So nothing should happen to the code folder right?

In the evening, I plan to write some code and type z code. (I use zoxide to jump directories.) And I see this:

zoxide: no match found

I am partially in disbelief. Well? I haven't seen that anytime. Its where I keep everything. And I was not doing anything to it? What do you mean no match found?

I manually traverse the home directory and do an ls. No sign of code. Really. It really wasn't there. I opened my gui file manager just to check again. Nothing. In fact what happened was, I observed, all directories starting with c was missing. Particularly that letter.

Now I had in mind for a few days that I wanted to tidy up my code folder and organise and remove things I no longer want locally but this was a baffling way to do it.

Frantic search

I was in awe. I did a lot of searching of the filesystem.

fd -t d "code"
# Apart from all the internal installed packages having directories named code, nothing.

find -type d -iname "code"
# Well this is the same but with the GNU tool find, still nothing.

sudo find / -type d -iname "code"
# I mean the whole file system. Bunch of directories spewed, all unrelated, not my one.

I searched my shell history. Did I somehow removed it unknowingly? But that should have been trashed as I have aliased rm to trash. (I use trash-cli). Nothing in that either.

The realisation

Now that it was all gone, I began my options. I have a backup from a few days before I think and I could restore from there but obviously that would not have the data I was working on yesterday.

I finally decided, that I didn't want to restore. I still have the backup but if I was going to start over anyway, I might as well. I git cloned some of the important repositories I had from Github and began again.

One thing I was missing was my folder where I had assignments and notes for learning Machine Learning. A few setbacks. But let us push through. I setup a new folder and virtualenv again. And for starters on a fresh folder, I implemented some linear regression code in a Jupyter notebook. Here is how it works under the hood. Yes its just math.

W (weights)=(XTX)−1XTYW\,(weights) = (X^T X)^{-1} X^T Y

Dependency issues (again)

NextUI which I was using for my previous website, was updated to be heroui and led to a lot of warnings when installing. Instead of updating, I thought of trying something new and landed on using daisy-ui which is a tailwindcss plugin. I am not a designer but I am trying to make it look good and I was satisfied.

So whats included in this site?

  • Portfolio with NextJS 15 and TailwindCSS 4 at the time of writing.
  • I am writing posts with MDX which let's me use React components in markdown. Really handy for custom stuff.
  • Remark and Rehype plugins to add a few nice things to the markdown such as the support for Github Flavored Markdown, and Math rendering with KaTeX\KaTeX.
    • remark-gfm, remark-math, rehype-katex
  • Code components with syntax highlighting using bright

As usual I am using Vercel for hosting and Github for version control.


I hope you enjoy the new site and the new posts. I am planning to write more often and share more of my experiences.

More reads