Refactoring to maintainability

Focusing My Effort

One of the things that I have always liked from software is the ability to learn a new language and have a new way of expressing ideas. I found it cathartic when learning a new language allows me to discover new ways of thinking about development. Sometimes they are small things (how to order your code) sometimes is a complete breakdown of your previous conceptions (like learning FP after OOP).

The Setup

When I started my career, back in Spain, my first job was on C++. My second on Delphi 5. And my last job in Spain was on VB6. Each one taught me different things (power, structure, quick development). Maybe because of that experience I have never understood why people like to work on a single language. A single language ostracizes the mind, it is a stream that is being held in course by an iron riverbed.

The C# years

After finishing my degree at City University I started working on C#. I remember passing the written C# test mostly on the fact that it was similar enough to Java, which I studied at uni, and a bit of guessing. And then for the next 10 years I worked professionaly on it (ok, with a bit of JS and TS added at different points). By around year 5 I started to wonder, if I wasn’t loosing on new ideas. Oh I read about other languages (Lisp languages, script languages, …), but did not try them. And then slowly I started to get investigate them. Not in a very systematic way, I must say. I tried Python, went to Go, and then …

Well, I think I have inkling idea about maybe 15/20 languages (some of them a bit more, some just the basics). Doesn’t help that I’m like a Goldfish and I forget specific things way too easily. But I retained ideas from each language, and also the experience makes it so much easier to just drop into a new language (as long as they provide me with some basic tooling, I am slightly lazy).

Focus Time

But I have decided that I want to put more focus for a while into a reduced set of languages, instead of going like a moth to any new light that appears on my view (Oh, Racket, nice, let’s see how it goes). I want to go deeper into the tooling, the ecosystem and the idiomatic ways of developing on those languages.

We are talking here about my personal time, of course, as at work (a Consultancy) I will just use whatever is required by the client or internally.

So I needed to have a list of areas that I wanted to make sure I cover. So here is my list:

  • .Net. This is the bulk of my experience, but also .Net is used a lot on Enterprise clients, so I need to make sure that one of the languages allows me to be on top of the ecosytem
  • JVM. Basically same reason, other than it not being the bulk of my experience.
  • A dynamic language.
  • A static language.
  • An OOP language.
  • An FP language.
  • A structure language.
  • A systems language.
  • A Lisp family language.
  • A language suited for network backends.
  • Macro systems.
  • Emacs!!! (Is my preferred IDE/Editor/Awesome thing, so well yeah)

As you can see here, there are going to be multiple languages involved. I can’t imagine the monster language that would happen if someone covered all this on a single language.

The Selection

Most languages on my selection touch multiple points. And there is a skew towards functional languages, because immutability by default is great. I have already played (or even written production code) for all the languages selected.

So the six are:

  • Clojure. One of my current favourite languages. Just pure awesomeness. And great interoperability.
  • F#. Another favourite language. And also great interoperability.
  • Elixir. Main reason to choose is the BEAM, which I consider a marvel of software engineering. Chosen over Erlang because the Macro system is awesome.
  • Rust. The memory model is refreshing. And the power is there. And ain’t bloated.
  • Ruby. Maybe I am slightly more partial to Python, but so many tools have DSLs created on Ruby (including Jekyll, which this site uses) that makes more sense for me to work on it.
  • Elisp. I mean … Emacs. It is with Rust, the language on this list with which I have the less experience.

Each dev has their own preferences in languages, but these touch all the points that I wanted to cover, and I have enjoyed working in all of them.

The Plan

I need to make sure that I keep practicing all of them and learn as much as I can. So this is a three pronged strategy:

  1. exercism.io. Probably the best tool/website of its kind there is. Katrina Owen cannot have enough Kudos for this tool. Here I want to do one exercise of each language a week. That puts me in a two year course to finish the tracks for each language.
  2. Katas. I have an decent collection of Katas. So I hope to get one done a week. Only one a week, you ask. Well, I want to screencast me working on them, or stumbling in most cases, at least for a while. Maybe I can record two a week? Who knows.
  3. Projects. I want to have a decent sized project for each. I have already ideas for four of them, still trying to decide what I will do with Rust and Ruby.

This all sprinkled with reading, lots of reading. (Wait, that will make it a four pronged strategy!!)

That is a lot, now that I think about it. Maybe I will founder halfway through. Who knows. But I think it could be an interesting voyage.

The Elephant in the room

There is no frontend area described above. I’m not that interested on it, though I will need to do thing around it on my projects. But I dislike JS the language and very much like dislike Node/NPM the ecosystem.

ClojureScript and Fable will be the ones that I will use for any such project, trying to avoid touching JS as much as possible (and looking longingly to Wasm as the future saviour of all)

The Aftermath

Well, that probably will be on two years time. Hopefully by then I will have really good knowledge of all and I will have some completed projects. Then I will be able to go ahead and nip into other language ponds.