NireBryce

reality is the battlefield

the first line goes in Cohost embeds

🐥 I am not embroiled in any legal battle
🐦 other than battles that are legal 🎮

I speak to the universe and it speaks back, in it's own way.

mastodon

email: contact at breadthcharge dot net

I live on the northeast coast of the US.

'non-functional programmer'. 'far left'.

conceptual midwife.

https://cohost.org/NireBryce/post/4929459-here-s-my-five-minut

If you can see the "show contact info" dropdown below, I follow you. If you want me to, ask and I'll think about it.


fullmoon
@fullmoon
lynndotpy
@lynndotpy asked:

how did you get started with haskell and nix? how did you get to the Expert^tm status you're at now?

so the way i got really into haskell and nix was a little different, both of them somewhat interesting in their own way. however the common thread between both of them is that writing had the most profound impact on achieving my expert status within both of those programming communities, as I'll explain below the fold:


haskell

Alright, so my first encounter with Haskell was Reddit, specifically the /r/programming subreddit. However, when I first stumbled across Haskell the first 3 or 4 times I thought of the language as the butt end of a joke and didn't take it seriously. For example, I remember that before I got infatuated with Haskell there was an open vote on which logo the Haskell community should use from the selection of logos on this page and the logo I voted for was this one:

Haskell logo depicting a Narwhal saying "haskell YEEAAAAHH"

Fortunately, that logo did not win (it only came in second place 👀) and more serious voters prevailed to vote for the Haskell logo we know and love today:

Haskell logo

Then one day for some reason I suddenly took interest in Haskell when I stumbled across the Gentle Introduction to Haskell and specifically the section on Function. In that section they showed how you could simplify this:

inc :: Int -> Int
inc x = x + 1

… to this:

-- no type signature required
inc = (+ 1)

… and for whatever reason that just blew my fucking mind at the time, so I suddenly took an interest in the language and started browsing the /r/haskell subreddit.

However, the next step in my programming journey was the crucial bit: for whatever reason in graduate school I decided to go on a social media "diet" because I was browsing reddit too much overall, so I decided that I would restrict myself to only browsing two subreddits: /r/programming and /r/haskell (whereas previously I would browse the reddit frontpage very heavily). I reasoned that browsing these two subreddits were more "productive" uses of my time because they were about ostensibly useful things which is why I kept them.

This social media diet also happened at a time in my life where I was pretty isolated (I had just moved across the country so I was separated from my old friends and family) and I was not doing well at my PhD at the time (so I was even further isolated), so those two subreddits were the majority of my socialization. That caused my brain to suddenly get extremely haskell-pilled and I went off the deep end into all things Haskell-related.

As you might guess, the social media "diet" didn't actually result in me using social media less. Rather what happened is that I'd start running out of content to browse on the /r/haskell subreddit, so when I ran out of posts to read rather than logging off I began spending a lot of time commenting on posts instead. These comments got progressively longer and longer. After a while I started making "self-posts" to the /r/haskell subreddit (all text submissions without a link to anything) and then after doing that for a bit I realized "holy shit, I'm basically writing blog posts, why don't I create my own blog?", so I did:

I wasn't sure whether or not to self-host my blog or to use a hosted solution so at the time I asked myself, empirically, which bloggers were more productive/prolific. The answer was those who used a hosted solution tended to blog more so I went with that (specifically: Blogger) and then created a few blog posts.

At first, I tried to see if anybody would discover my blog if I just posted without advertising it anywhere (spoiler: nobody came). So when that didn't work I began shamelessly submitting my own blog posts to the /r/haskell subreddit. Generally these posts were pretty topical to the subreddit, not just because they were about Haskell stuff but also because they were about discussion topics that had recently come up on those subreddits so they were subjects that were fresh on people's minds. This wasn't really intentional on my part; I just tended to get nerd-sniped by these recent discussion topics in the comments into writing blog posts.

People started to really like my blog posts so that motivated me to continue blogging and my blog was essentially what catapulted my Haskell career, in a few ways:

  • It greatly promoted my personal brand

  • It helped improve my understanding of Haskell

    Teaching other people something via a blog post greatly solidified my own understanding of that same thing

  • It was extremely high leverage

    Blog posts reach a far wider audience than almost anything you can do for a similar expenditure of effort.

  • My blog posts made me "legible" to employers

    In other words, my blog posts made me a known quantity to prospective employers because they could understand what they were getting pretty clearly before the interview process even began.

Keep in mind that everything I've mentioned so far was all taking place during my graduate school PhD in Biochemistry. In other words, I had never had a tech job, yet, but I was blogging very prolifically about Haskell because I had gone so far off the deep end into Haskell, functional programming, and computer science in my free time.

My blog had such a large impact on my career that even as someone who literally had never had a tech job I was being recruited like crazy. As a concrete example, I would literally get cold emails from companies saying stuff like "We'll pay you $100,000 / year to join our Haskell company right now No interview necessary". It was wild how in demand I was despite having literally no professional experience in tech and that was 100% because of my blog.

Funnily enough, the job I did end up taking was not a Haskell job, but actually a Scala job (at Twitter). I was offered a Haskell position at multiple companies (including Facebook), but at the time Twitter gave me the best vibes so I worked there. (I wouldn't work there today, though, obviously). After a few years I switched to a Haskell job and continued doing Haskell full-time professionally ever since then, which is another thing that contributed to me refining my Haskell expertise.

Throughout all of this I was also making substantial contributions to the Haskell open source ecosystem (which is a long story in its own right), but suffice to say that out all three of (A) blogging, (B) full-time Haskell job, and (C) open source contributions I would still say that (A) blogging is what really had the biggest impact on improving my Haskell expertise and advancing my career.

If you're wondering where I got the time for all of this, the answer is: probably my neurodivergence. I just completely went off the deep end and sunk basically all of my free time into this stuff (literally, almost ALL of it). For example, this is one of many reasons I strongly suspect that I'm autistic because I tend to have very persistent monotropic interests (see: haskell and nix) that I can spend thousands of hours on very easily. I had a very unhealthy and unbalanced lifestyle back then, although I went to therapy and made other big life changes and I think I'm in a better place now (and I'm still pretty autistic).

nix

The way I got into Nix was actually from my first full-time Haskell job. I worked at a cybersecurity startup called Awake Security (which was later acquired by Arista Networks and rebranded as Arista NDR) that was, like, a 50% Haskell company (and that subsidiary of Arista Networks still has a huge chunk of Haskell code and full-time Haskell devs).

Anyway, we didn't use Nix at all at this job; rather we used a mix of Ansible and Docker for deploying our product, although at the time I joined we still didn't have a sellable product; we only deployed it for internal end-to-end testing of the prototype that would eventually become our product.

However, it was a royal pain to actually incorporate our work into this fully functional end-to-end setup. I had been hired to work on Awake Security's deep packet inspection service (which was written in Haskell, no joke!) but I found it increasingly difficult to actually do the job I had been hired to do because the sort of stuff I wanted to test required a functioning end-to-end system which was a pain in the ass to deploy. Part of the reason it was difficult to work with is that it had been slapped together by someone in their spare time who wasn't really interested in "owning" it.

So I complained to the founders and they were like (paraphrasing) "if you hate it so much you can fix it, especially since the original author isn't too keen to own this setup; this is a startup and we're more than happy to let you increase your responsibilities if you want to".

So I took a stab at replacing Ansible and Docker with NixOS and got a working prototype but even then some conservative voices opposed the change but then one event in particular tipped management over the edge to side with me to make the switch to NixOS.

What happened is that we were preparing the first demo of our fully operational product to the board of directors, and we were very anxious to do a good presentation. About an hour before the demo we do a practice run of the deployment (still using Ansible and Docker at that time) to make sure everything was working. This test run succeeded so we were feeling pretty good! Then we did one last run as a precaution to verify that it would succeed idempotently with a no-op

… except it didn't! Ansible failed in the worst possible way; not only did the deploy fail but it did so in such a way that locked us out of the system we were trying to deploy with only 30 minutes before the demo to the board.

We were sweating bullets and did manage to successfully get the demo working in time, but afterwards I explained to management that if this had been deployed using NixOS we could have just rolled back to the last known working deploy (and I already had a working prototype). Then a 💡 went off in their head and they understood the value of NixOS and pressured the remaining holdouts to accept the switchover to NixOS and the rest was history.

After that I continued to build out the rest of our Nix-centric infrastructure including CI and CD and formed a team around that, which is how I got really good at Nix.

You also have to keep in mind that all of this was back when Nix was version 1.6 (VERY BUGGY, let me tell you!) so I accumulated a lot of scars from debugging all sorts of early issues with Nix. Despite Nix/NixOS's advantages it was really a trial by fire and I have lots of war stories from those days.

Probably the most notable contribution I made to the Nix ecosystem (back at that time) was nix-diff which automated a lot of the debugging that I was doing by hand in those early days of adopting Nix. The other notable contributions I made were various recorded presentations (like Nix: Under the hood) and various blog posts.

I no longer work at Awake Security / Arista Networks and these days I work at Mercury Technologies where I'm fortunate enough to be able to continue to use both Haskell and Nix full-time (what are the odds?!?!?!). I also continue to write about Nix and NixOS, with my most recent work-in-progress book being my largest contribution to the Nix ecosystem:

Just like with Haskell, the thing that had the biggest impact on my Nix career and proficiency was my writing, whether it was my blog or, later, my book. Writing has consistently been the secret to my career success because it makes me legible to employers and also is high leverage (having a very high power-to-weight ratio).

I'm not the only person who feels this way. I've compared notes with a lot of other people with similar meteoric rises in their respective programming communities and they often report the same phenomenon where writing did more to propel their career than anything else.


You must log in to comment.

in reply to @fullmoon's post: