Jacobo Cordova

Posted on 28th July 2023

Clojure Corner with Michiel Borkent

news-paper Interviews |

Allow us to corner the creater of babashka, Michiel Borkent, a.k.a. Borkdude. Babashka is the native Clojure interpreter for scripting with fast startup.

Ela: First of all, I would like to thank Michiel for accepting on having a talk with us.

Here we have Jiri Knesl our cool CEO, and Jacobo Cordova our developer who is going to lead this talk ^_^ To begin with I would like to ask the first question, How was the bb conference?

Michiel: The babashka conference in Berlin was awesome. We had 7 talks by international speakers, lightning talks, workshops, and vegan snacks. All with the welcoming warm atmosphere I’m used to from other conferences. It was more than I could have hoped for. You can find all the talks on youtube.

Jacobo: Hello everyone! nice to meet you Michiel

Jiri: Hi everyone, great having you here!

Michiel: :wave:

Jacobo: let me introduce myself briefly before we begin. I’m a Clojure developer at Flexiana, and it is a true honor to conduct this interview. This interview series provides us with the privilege of speaking with influential figures in the world of Clojure, and undoubtedly, you can be considered one of the superstars of the Clojure community.

Now, turning to your work, there are many remarkable achievements to highlight. You are widely known as the creator and maintainer of several popular Clojure libraries and tools. One such notable contribution is the development of the CLJ-Kondo tool. This fast and customizable linter for Clojure code has greatly helped developers identify potential issues and maintain code quality in their Clojure projects.

In addition to clj-kondo, you have written and contributed to a number of other significant Clojure libraries. Notable is Babashka, a Clojure native scripting tool that has provided developers with an efficient and versatile way to run Clojure scripts. You have also created SCI, a Clojure interpreter written in ClojureScript that extends Clojure’s capabilities beyond its traditional runtime environment.

Considering your extensive contributions, I am curious to know which development you feel defines your contribution to the Clojure ecosystem the most. While all of your contributions are impressive, is there one particular achievement that you believe has had a significant impact or holds special meaning to you?

Michiel: Thanks a lot, it’s a pleasure to speak with you all!

I would say both clj-kondo and babashka are both equally important and useful. Clj-kondo makes me more productive while developing all of my other tools. Writing scripts in babashka helps me manage my projects. Both enhance my experience of using Clojure and I hope this resonates with many other Clojurians as well.

SCI is the interpreter library which is used in babashka and even in clj-kondo (for running macro hooks): it runs in the JVM, GraalVM native-image as well as in ClojureScript. So it’s a more low-level component in a user-facing project like clj-kondo and babashka. 

Jacobo: I appreciate you sharing your thoughts, Michiel. It’s impressive to see how both CLJ-Kondo and Babashka have had a significant impact on your productivity and the Clojure community as a whole. As someone who has created innovative tools to address existing needs, I’m curious to know, based on your experience and observations, what kind of tool or utility you think would be necessary and exciting to exist in the Clojure ecosystem today. Is there any specific area or functionality that you believe could benefit from a new tool or library?

Michiel: Tooling-wise I think we already have a lot although existing tools can always be improved and this is mostly how I spend my time. I’m working on an improved lightweight CLJS compiler that has a better performance compared to SCI (cherry and squint).

Sometimes an idea appears for a tool that you didn’t know you needed, it’s hard to predict that but I’m pretty sure the Clojure community will continue to deliver in ways we did not anticipate. I’m looking forward to what Nathan Marz and his company Red Planet are coming up with in August. I’ve had a peek behind the scenes, but I can’t tell anyone about it because of a NDA :). 

One thing I’m pretty sure that we need as a community is more materials and workshops for drawing in people from outside of the Clojure community.

Curricula that appeal to specific audiences, e.g. for scientists that didn’t know they needed Clojure until they saw what you could do with it. I’d love to see the material to teach kids Clojure too, even if it was just a subset without any host interop. Similarly materials for high-school kids, perhaps to help them with their other subjects like math or physics.

Any Clojurian can contribute to that. Blogging about how you’re using Clojure for work or data science could be a good start.

To get back to the tooling though: I like how clj-kondo and babashka make Clojure more approachable for beginners and I didn’t have to change any underlying tooling for that: it’s all built-in user-space, a testament to how powerful and flexible Clojure is. But even babashka needs a good beginner tutorial, of which Babashka Babooka is a good example.

Jacobo: Michiel, as someone who has been actively involved in the Clojure community for a significant period of time, could you share your experience of growing alongside the ecosystem and the language? What are some of the notable changes you have witnessed in the community from when you first entered it until now?

Michiel: When I first entered, around 2010, I was still using a Windows laptop. Since emacs was the best-supported editor for Clojure, I tried to learn that as well. It was painful. I remember spending a day to get a clojure REPL to work using SLIME. A little later leiningen was introduced and this made things a lot easier. Also, other editors and IDEs got better Clojure support. I briefly tried Counterclockwise on Eclipse since I wanted to have an alternative for my students that I wanted to teach Clojure to (I was a CS lecturer for a couple of years). I also remember switching to macOS in 2011 since the tooling on Windows for developers in general was always lagging behind. The tooling story for Clojure today is night and day compared to then. You no longer have to learn emacs or switch away to another OS although things in Windows still aren’t always as smooth as they could be. I sympathize with the Windows people since I’ve gone through that pain myself and want my tooling to just work on every OS. Since then, Clojure has grown a lot. The stability is probably its biggest achievement compared to other programming language ecosystems. ClojureScript was probably the most exciting thing that happened compared to Clojure itself with the excellent stewardship of David Nolen and Mike Fikes. I remember being pretty scared of vanilla JavaScript but when React entered the scene, I was building front-ends for the first time in my life with CLJS. Reagent + Re-frame were and are still pretty big. Datomic has been an excellent product to work with, although I’ve only ever used it a few times in a commercial project. It’s good to see that it was made free recently. There’s plenty of other stuff to be excited about in the Clojure ecosystem in the database space as well, e.g. JUXT’s XTDB, although I haven’t used it much myself yet. Also, the Clojure data science ecosystem seems to have made big leaps in recent years: scicloj, Nextjournal’s clerk, Chris Neurnberger’s stuff, etc. I remember around 2015-2018 several big names in the Clojure ecosystem had left because of the lack of static typing in Clojure or dissatisfaction with the contribution process.  I’ve had a brief stint with Scala and Haskell myself around that time to see if there was anything that would make me happier, but Clojure’s REPL always kept pulling me back. I don’t know any other programming language that lets me do stuff so quickly while having fun. Clojure.spec was a partial answer to lack of typing rigidity and Malli seems to catch on now as well. Still rooting for spec2. 

Jacobo: Just to talk a little about frontend things, lately we are seeing new approaches different from reframe and reagent, like Htmx or Electric. Do you have any impressions about this?

Michiel: Htmx: I think the pendulum swings from SPA to SSR and back every few years or so. Htmx seems to have a lot of traction and also works well with babashka (see here). Electric seems promising but I haven’t used it for anything yet. It seems like a piece of complex technology and I wonder what the best practices and perhaps caveats are. Htmx tries to take us back to the world of HATEOS which is well known, whereas Electric seems to explore uncharted territory. 

Jacobo: I’ve read that you have adopted a flexible work schedule of 4 working days and 3 days off. I’m curious to know if you still use that configuration and how it has impacted your work-life balance and overall productivity. On your days off, what activities do you typically engage in? Could you share some of your hobbies or favorite activities that you enjoy outside of programming?

Michiel: I’ve usually limited paid work (as an employee or contractor) to four days so I could have enough time for my other projects. Luckily where I live it’s pretty normal to work a four-day week. I used to be in a band when I had my first job. Later on, my open source projects took most of that available time. You could have an arrangement with your boss to have 20% time but I would rather just have less pay and more freedom to do whatever I want with my spare day.

If I didn’t have that freedom, I probably wouldn’t have had the energy to create clj-kondo and babashka. Having this degree of freedom also allowed me to expand those projects up until the point that enough people sponsored me to go more or less full-time open source.

To relax, I enjoy a walk around the park or longer walks in nature, meditation, hanging out at coffee places, and watching TV series. I recently picked up my old hobby of biblical Hebrew again. Honestly, I find coding pretty relaxing too, especially if you already did most of the thinking and exactly know what you’re creating. Figuring that out is probably the hardest part of any project. 

Jacobo: Awesome, as a Clojure programmer, you must frequently think ahead of time and maintain a functional mindset. Have you personally experienced a focused programming state known as “the zone” while programming or something similar? If this is the case, we’d love to hear about your experiences, as well as any specific techniques, routines, or habits you’ve developed to help you maintain a productive and immersive programming session.

Michiel: About getting into the zone: I’ve certainly experienced that. I think it helps to focus on the thing you want to do as the first thing you work on during the day and keep at it for a few days. It also helps to have a quiet environment or to wear noise-canceling headphones. Taking walks in between screen time often gives better results. I try to avoid (online or IRL) meetings as much as I can when I want to do a chunk of concentrated work. Getting into the zone often is preceded by a period of frustration or procrastination, I don’t think that’s avoidable.

In my talk at babashka-conf 2023 I had one slide about productivity where I mentioned

  • Always have two projects going on so you can mutually procrastinate
  • Momentum/focus: try to group issues/PRs about the same theme in the same week/month
  • Make a list of boring/easy chores so you can make progress even on bad days

Jacobo: Could you tell me about a memorable experience from your early programming days that ignited your interest in coding? It might have been a specific project, challenge, or revelation that sparked your interest and encouraged you to learn more about programming.

Michiel: My interest in coding was ignited when I was 10 or 11. We had a 286 XT computer at home which ran DOS and had GW BASIC. I figured out how to make little interactive text games. Also, I found magazines in the library which had BASIC source code, unfortunately of a different dialect so nothing I copied from the magazine ever worked. I did have a BASIC manual, unfortunately also from a different dialect, so it was quite hard to figure out what worked for GW-BASIC on my computer specifically. Internet wasn’t a thing yet for normal people like me. After that, I didn’t code for a long time, except when I made some French language tutoring software for a teacher at high school. I studied computer science and I found different programming paradigms interesting, especially functional programming, but the coding wasn’t really something I did for fun during those years until I found Common Lisp which I used for my final project. When I graduated with a master’s degree, there were hardly any Lisp jobs out there so I defaulted to whatever was mainstream (I landed on a .NET job). It wasn’t until 2010 when I found Clojure, a Lisp that integrates functional programming and runs on the JVM, that I would really code for fun again. I have looked at other languages like Haskell, but I find Clojure by far the happiest language to work with.

Jacobo: Well, you know at Flexiana we love to be polyglots. We greet with different languages like “Buenos dias,” “dobre rano,” “Ciao tutti,” and so on. I know you appreciate different languages as well. You’ve studied Hebrew, Esperanto, English, and Clojure. I’m curious to hear your insights on how language plays a role in shaping our perceptions. Additionally, do you believe that AI poses any potential risks or dangers in this context?

Michiel: Language is a means to communicate ideas or experiences. In Zen, they say “the finger that points to the moon”. Specific languages encourage you to think in certain ways and discourage you to think in other ways. This is obviously the case with Clojure: it encourages you to program functionally and stay away from mutability. I think it was also clearly the case with calculus. Language helps to capture ideas and to explore those ideas even more. But one language will never be the end of the story since there will be other languages that can capture other ways of thinking, communicating, and creating.

When it comes to getting interesting pointers, AI can be quite good. I’ve asked ChatGPT several questions that were hard to use Google for. Based on those pointers, you can do further research. The application of ChatGTP for search engines, so you can search via dialogue is quite an innovation.

Artistically, the poems that ChatGPT generates are quite boring or even repulsive. I’ve used ChatGPT to “grammatically parse this piece of Hebrew text” or “generate a bit of boilerplate” and what it comes up with is sometimes very good and often very bad. These things are helpful if you kind of know what you’re asking for and if you are able to critically assess what comes out. One of the dangers of AI comes from blind trust in it. 

Jacobo: Taking a look into the future and the evolution of Clojure-like language, sometimes I feel, like the potential of this language to be converted into a lingua franca for the web, but some other times it looks to me like everything will continue evolving, and remain the parallelism and never converge. could you share your visions about the future in this topic?

Michiel: It’s hard to predict the future. Clojure (or lookalikes) will probably stay around for a long time and be built on different hosts, but it’ll probably always be a niche language with a loyal fanbase. For some people, it makes the most sense, but for other people, it just doesn’t click. It’s not something that will likely change, but I don’t perceive it as a problem. Some bands like Dream Theater have a loyal fan base but people outside of progressive rock and metal hardly know them. They do well because they serve a particular niche. Maybe Clojure is the Dream Theater of programming languages.

Jacobo: Thank you for your thoughts. I’d want to hear how your integration with the community went beyond virtuality, how your experience knowing individuals in person, at seminaries, and when you actually think “ok, I’m kind of famous in this community.”

Michiel: I’ve been visiting Clojure meetups and conferences since 2010 or so. My first international conference was EuroClojure in Krakow 2014. In the same year, I did my first Clojure talk at an international conference at Oredev in Sweden, I was asked to replace someone who couldn’t make it. It was on ClojureScript actually. I wasn’t very active with open source, although I did something here and there. My first project that was a community success was clj-kondo in 2019. I think that’s when people started to know me, I noticed this when I visited Heart of Clojure that year in Leuven. I also did a talk about kondo at ClojuTRE in Finland and was already working on babashka at that time. After that more people started to know me. Last month the very first Babashka Conf (2023) took place and as the creator of babashka this was a huge honour. I tried to not think of myself as a celebrity, but just a dude having fun with other friends enjoying geeking out on Clojure.

In September I’ll visit the USA for the very first time and have the pleasure to do a talk on Babashka at Strange Loop. It’s the last Strange Loop ever, so it’s a huge honor to be part of it and I’m looking forward to that.

Jacobo: Thank you so much, Borkdude, for sharing your useful views and experiences with us. Your contributions to the Clojure environment have been genuinely inspirational. Before we wrap up, I’d want to ask if you have any advice or words of wisdom for novices just starting out in the Clojure ecosystem.

Michiel: My advice would be: while learning Clojure, work on a project that solves a real problem for you, and don’t worry if you’re doing it exactly right, you’ll learn over time. Clojure is a tool for makers.

Hope you enjoyed this corner time, you can also read the Corners with Pez and Sean Corfield.