One of the noticing things when working for a startup is the amount of technologies you run into. We at Manetos started out with a minimal tech stack mostly for keeping things simple and easy to fix.
But sooner or later we realised that having a small developer team we needed new technologies that give a lot of goodies out for free, so you don’t have to soak your time into writing stuff from scratch.
The need to switch context when working on different projects was a coginitive load that one can do without. I didn’t like switching between different IDEs and different packages and working on the best editor for a current language / environment.
This is my emacs setup to solve these kind of problems. This sort of invest in your tool to help you increase your producitivity is the kind of brocolli diet every programmer could deal with.
- Create desktop environment for projects, use hooks to configure on every load of a desktop the services to start. For example we use a kappa architecture pattern where every service reads / writes to a kafka stream. So it could be helpful to have kafka, zookeeper, and kafka-consumer (console), startup as processes when you load your desktop environment.
- This promotes a development that’s quite similar in spirit to REPL , the code you write can be easily tested by loading it in a interpretor and running it against a local kafka environment.
- Learn to use and write a comint mode in emacs, this is helpful to learn how emacs talks to subprocesses that you run in your editor.
- Load virtual environments through startup hooks of desktops.
- So all this helps to quickly context switch between development projects where everything loads unloads including the shell and virtual environments.
- Started working on a project to write a magit-popup like helper for kafka, this helps me to create/delete kafka topics from my emacs.
- Use directory variables in emacs to configure modes, and use your imagination on how to autoload things when a program enters a directory. (eg shell).
- Use helm for getting a global view of everything you have under your emacs-roof, this really changed the way I used emacs, because for a person with right brain dominance, who learns by seeing the bigger picture this tool really helped me get a oversight onto things. It’s like my mind only wants to learn after seeing the bigger picture.
- Use magit, it removes the context switching out of the picture, and helps work with git however you want it.
- Use ParEdit to work on your code this is built in the spirit of emacs which builds abstractions over the heterogenous nature of our development projects. Paredit or S-expressions gives us abstractions that helps us treat language native expressions as a common expression forward. Helps you navigate / delete / and work through code respecting the very nature of the code itself. More on this later!
- Using AceJump helps with easy navigation. Bind ace-jump-to-char-mode to C-; this makes your finger navigation very minimal movement from the qwerty typing zone dock. Try this you might like it! .
- Using bookmark . Althought I haven’t really found them to be life changing.
- Associate minor modes with the comint processes you write, for example a json-mode for a kafka consumer output would highlight json structured messages. This is much better than dealing with unhighlighted, unstructured messages from the shell.
- Write skeleton to automatically generate code . This was useful for me in lisp linting to automatically generate file header/footer comments. Update update this with more usecases later.
- In emacs every editor command is a lisp function, this is a great realization for programmers who then sense their options to extend this further for example you can spot frequently used command and clump them together. Use advice to do things before and after command, this can greatly simplify the need to wrap a function inside another function.
So in short languages that can be heavily pushed towards the REPL nature of code development benefit from this setup. So environments that use these languages like Ember, Django, Kafka, could also be brought “closer” to the instant feedback cycle that greatly keeps us interested in coding more.
I think in the end it’s about getting a faster feedback, where things end up being a type of play around stuff, rather than drudgery.
“Emacs is the ground. We run around and act silly on top of it, and when we die, may our remnants grace its ongoing incrementation.” – Thien-Thi Nguyen, comp.emacs.