• she/her

Principal engineer at Mercury. I've authored the Dhall configuration language, the Haskell for all blog, and countless packages and keynote presentations.

I'm a midwife to the hidden beauty in everything.

💖 @wiredaemon


discord
Gabriella439
discord server
discord.gg/XS5ZDZ8nnp
location
bay area
private page
cohost.org/newmoon

filenine
@filenine asked:

Haskell and Rust in Vim?? With no plugins??? Is it possible to learn this power

(speaking as a beginner CS student)

I was surprised at the strong reaction to my previous response about using an (essentially) stock vim for my development because from my perspective it hasn't really been a big deal, but I'll use this ask to expand upon the context behind that.

So from my point of view there are two questions here:

  • (Implicit question) Why am I doing this to myself?
  • (Explicit question) How do I make this work while still being productive?

… and I'll answer both of those questions below the fold:


Why am I doing this to myself?

There are a few things that factor into why I tend to work with a fairly uncustomized setup:

  • For a long time I had to program this way

    The language server protocol was created in 2015 and by that time I was already 30 years old and well into my programming career. Yeah, there were IDEs before the language server protocol but they were either expensive or for languages that I wasn't interested in programming in. In particular, my favorite language (Haskell) didn't have a great IDE.

  • I often code or examine code in environments where I can't (easily) use an IDE

    The most notable cases where I don't have access to an IDE are:

    • Code review

    • when I ssh into a machine and code on that machine

      … which is way more common than you think, especially when debugging stuff

  • I try not to get too attached to my development environment

    If I invest too much in my development environment I'm more likely to get too attached to it and be less likely to leave my comfort zone and do ambitious new things. Even though I'm pretty well known for Haskell being my "golden hammer" what you'll actually find is that I actually work in a ton of other languages (albeit reluctantly) in the course of my work and open source contributions, including languages like Rust, Scala, C, C++, Elixir, Python, Go, Perl, and Ruby. If you're not too attached to language servers like I am it's a much lower barrier of entry to these languages, which is why I'm a highly versatile developer.

  • I'm a late adopter when it comes to development tooling

    … including editors and language servers. This is partly due to the fact that I tend to prefer working with bleeding edge programming languages (e.g. Haskell and Nix) and I spend a huge amount of my personal "innovation budget" there, leaving less innovation budget for improving my development environment. Having a stable, reliable, and snappy editor (and just an editor) has been a godsend for me in my developer journey because I believe pretty strongly in "only learn one new thing at a time".

  • It's improved the quality of the code that I write

    In my experience, subjecting yourself to a more restricted/impoverished development environment tends to improve the quality/clarity of the code you write, which has helped me not just for my own projects, but also for my technical writing, presentations, and tech evangelism.

    The reason why this happens is that when you program in such a restricted environment you (A) cultivate a much greater empathy for the code reader and (B) you have to keep your code simpler due to the constraints of that environment. Whereas if you have a much more supercharged development environment it's pretty easy to crank out a lot of confused/complicated code because it's easier to do so, but now only a person with a powerful development environment can understand and/or maintain that code.

  • Coding is usually not the bottleneck for what I do

    Especially as I progress through my tech career the amount of code I write per day starts to diminish so it's even less of an issue than before.

That's not to say that I think people should stop using language servers or better development environments, but I guess what I'm trying to say that there are pros and cons of using a better development environment and it's more of a tradeoff. I just happen to be on a different side of that tradeoff than a lot of people.

How do I make this work while still being productive?

You'd be surprised at what your mind can do if you give it the chance to shine!

Yeah, once you're used to a supercharged dev environment it can be hard to wean yourself off of it or imagine what it's like to not use it, but if you actually try to work without it it's not as bad as you think. Obviously certain mental skills/habits can deteriorate as we rely more on external aids, but with regular use they go right back to improving again.

For example, even though I use ghcid these days for type-checking Haskell code for the longest time in my career there was no ghcid (or good Haskell IDE) and all I had was cabal build and cabal repl, which were much slower feedback loops. As a consequence of that, I just ended up learning how to type-check and understand Haskell code much better in my head and now my mental type-checker is extremely good.

And once you cultivate that mental skill it not only improves your coding proficiency but it improves everything you do related to that language, such as API design, design discussions, code review, support, and education/training.

And again, to reiterate, it's not as bad as people make it out to be. Just try it 🤷🏻‍♀️

(❤️ the karma avatar btw)


You must log in to comment.

in reply to @fullmoon's post:

For what it's worth, I agree with a lot of this. I spent 4 years programming Clojure without any LSP or static linting (they hadn't been built yet), and while I use them now, I learned a lot just by forcing myself to learn the language manually like that.

I am legitimately surprised to hear you don't use things like line numbers. Unless those replies were just leaning into the bit, lol.

i really don't enable line numbers. i was deadass serious. i don't even know what i'd use line numbers for since i navigate locally by searching for text (e.g. / and ?) rather than going up or down by a number of lines

Thank you for answering my question with such a kind, considerate and thought-out response! It makes perfect sense why you're using a setup like this.

I personally want to try something like this out, so I taught myself proper touch-typing technique over the last four days, and now I'm learning to use Vim! It's so nice not having to constantly depend upon the arrow keys and the mouse.

Learning to better understand programming languages is something I'll have to solve in the most direct manner possible: by writing (and reading) more programs.

And yeah, Karma's one of my favourite characters! I both enjoy and admire his style, personality, and character arc.