Happy Birthday, Zettlr!

Happy Birthday, Zettlr!

Another year has passed. Zettlr is now three years old, and a lot has happened. Time for the obligatory year-in-review-post! Read about what happened in 2020, and what will and might happen in 2021!

Happy Birthday, Zettlr!

Happy Birthday, Zettlr!

Three years ago, the first version of Zettlr has been released to the public. Since then, a lot has happened. I won’t go over all the nifty details again as I did last year, but provide a more broad overview over what has happened in this crazy year.

As so many other things, the development of Zettlr has been influenced by the year 2020 quite fundamentally. However, instead of becoming less productive, I was able to cramp more and more features and enhancements into the app than ever before. Of course, this was a mixture of different aspects – I am a much better JavaScript developer now than three years ago, so my development speed had to increase either way. But, additionally, this year I had much more time to work on Zettlr in my free time – it seems as if it does save time when you don’t go to the pub every other day ;)

The first big improvement this year was the File System Abstraction Layer that was implemented in version 1.7. While it did have quite some bugs for some time, the work did pay off, because now a lot more is possible with regard to file management (and only a few dozen lines of code divide Zettlr from a full code editor such as VS Code).

But there was an additional improvement that has done even more for Zettlr: The switch to Electron forge and the beginning TypeScript migration in 1.8. This has enabled two things: First, the size of the app was drastically reduced, and second, due to the availability of TypeScript I have managed to kill off a lot of bugs that went unnoticed so far.

Indeed, having the option to code using TypeScript was one of the biggest blessings of the year. Using types to check your code for possible logical errors is one of the most efficient ways to check, for instance, that you are indeed working with a file descriptor, or rather with just a number. TypeScript helps, in short, to detect errors before they make it into a release. I haven’t counted, but there were dozens of occasions where I discovered bugs simply by migrating a file to TypeScript.

The whole migration was a very time-consuming process, and the initial changes in the code to make it happen changed over a hundred files. This was quite the endeavour, and hence I would like to thank a special person for doing that work: Tobias Dietz of the JabRef project. Without him, Zettlr certainly would be much more error-prone than it is, and a lot of cool stuff that I was able to implement has been made possible purely due to his efforts.

Hence, I am extraordinarily thankful. For me, his engagement is one prime example for how Open Source projects can flourish, and his initiative has motivated me to perform some work for other Open Source projects as well – for instance documentation improvements to CodeMirror and a little bit help for some Zotero plugins.

Check out JabRef – it’s a good alternative to Zotero for the more STEM-oriented folks among you, and they certainly deserve praise for their work!

2021 and Zettlr

So let’s risk a look into the future – how does 2021 look like for Zettlr? Well, I have more and more the feeling that the app feels “completed” so that the development speed will possibly decrease while maintaining the same rate of feature implementations.

In the past three years, I’ve had the chance to learn from thousands of mistakes, and now that I have corrected most of them, the app has matured quite a bit. Implementing new features and improving existing ones is very easy now, and so I think that the fourth year will possibly be when Zettlr reaches 2.0 and becomes the serious competition to proprietary editors I always wanted it to be.

One of the big things planned in 2021 is the bundling of Pandoc with the app which has already begun. This will free users from installing additional programs, making the app even more user-friendly. A second chunk of work I want to implement in 2021 is a full migration to Vue.js for the graphical user interface, in the hope of making it as snappy as many other native apps. It’s one of my dream-goals to make that happen.

Some End-of-the-Year Data

As every year, let’s have a look at some data. This year I was most interested in looking at the repository for Zettlr, because a lot of history has amassed.

Unfortunately, I was unable to complete the textual analysis of the issues in time for this post, but I have found an interesting online tool that allows you to visualise the history of Zettlr. I ran it with a limit of 2,500 commits (Zettlr has a few less than that) so that it would visualise the whole history of the project over the past three years.

And indeed it’s fascinating to see how for almost two years, not much happened, while for 2020 the graph visualisation explodes – especially between April and August, when Tobias was working on the Forge migration.

I urge you to pay attention to the list of file types in the top-right corner: the files that contain the actual code of the app are JavaScript and TypeScript files (.js and .ts). I honestly did not believe my eyes, but apparently collectively the contributors have written over 400 JavaScript files (100 of which I have managed to migrate to TypeScript since August)! Until now I thought that we had about 100, maybe 150 in the app. The number has surprised me quite a bit.

Other Events in 2020

Let’s finish off with some other events that happened in 2020. In January, I was contacted by Albert Krewinkel, core member of the Pandoc team (and one reason why Zettlr works so well with Pandoc), and since then, quite the friendship has ensued. In fact, together with a bunch of other colleagues, we have started a working group dedicated to training academics in digital tooling, called HYPERUNIVERSITY.

Right now, the page is a little bit empty, because we’re still collecting more info and data. But as the project relies on crowd sourcing, it would be great if you sent us some articles and courses with regard to digital tooling that we can collect centrally there! Expect more to happen on that front in 2021.

Furthermore, after having waited for three years, I was finally able to start my PhD in Sweden. Instead of political theory, I’m now in the statistics department, and doing research in the vicinity of machine learning and methodological theory. I am very happy with this position and hope to produce a lot of insight also for Zettlr. Imagine having a real artificial intelligence-enhanced app on your computer, not just one that uses that as a marketing term? :)

I’ll get back to you in 2021. For now, I wish you all a Merry Christmas and a Happy New Year 2021 – to the next three years of Zettlr!