Journaling Coding a Journal | Part 1

I got my first ever computer in 1990, an IBM-PC clone that my dad and grandfather bought me for my birthday that year. One or both of them recognized, with no small amount of foresight, that these things were the future, and that it was important for me to get in on them early. My maternal grandfather, meanwhile, was an electrical engineer working for various telcos, so I got no small amount of exposure there as well.

It was actually him that first introduced me to programming, showing me some basics of BASIC (heh). I never really got past this, though, since I was rubbish at system-oriented thinking. (This would make a lot of sense when I was diagnosed with ADHD in my 30s). My next real foray was burgeoning web design in the late 1990s, including ActionScript, which was the primary language behind Flash. This was my first introduction to C-style syntax, and I continued chipping away (including a summer C++ class during law school). But I continued to struggle with being unable to see past the piece that was immediately in front of me.

Once I had the revelation that was prescription stimulants, I decided to give it another shot, and it is amazing how much more sense this stuff makes.

Meanwhile, I've started using Linux almost exclusively over the last 6 months or so, after being half-and-half for the previous year. (I now use Windows exclusively for gaming.) I found myself really enjoying the modern generation of console apps, basically programs that work in a terminal window (think a DOS prompt if you're on Windows). Around the same time I decided to start journaling again, and so set out to look for a good console-based journal.

I did find jrnl, which serves, but which is a little too minimalist for me. On the other end of the spectrum is org mode for emacs, which didn't quite work the way I wanted it to.

So, these things came together, and I decided to write one.

Finding a Language

This section may occupy a weird space of being too technical for non-programmers, and too naive for the coders. It's a skill.

Of course, I needed a language to use. I wanted to use something lower-level than python, in the hopes that I could grow into the greater control. Plus there's a performance hit to it compared to something else, which would matter down the line (but obviously not for a text-based journal). On the other hand, I decided that C++ was a little too steep of a learning curve right now, although it's something I'd like to revisit in the future.

I also looked at Rust, which is a relatively new language maintained by the Mozilla Foundation. There are a lot of things that I find intriguing: the way it handles asynchronous I/O (basically the way you set up one part of the code to wait for something while other parts keep going) seems to make a lot of sense to me, and I like that it's really conscious of memory usage and referencing.

On the other hand, its relative youth was also a hindrance. It was only released in 2010; by comparison, C++ was first released in 1985. The documentation isn't the greatest, and as of right now there aren't any particularly good ways to do GUIs. There are a couple projects involving creating bindings for existing frameworks like GTK, but it all felt very piecemeal. (I found the same thing with Go.)

Meanwhile, I had been working on a website redesign for my martial arts school. My cohort in this process is a full-time developer, and so we're using Angular. This has a core written in C#, and I was reminded that this was a thing. I'd previously only seen it as the language the underlies the Unity game engine, but I hadn't used it very much.

What really raised my interest, though, was the discovery that Microsoft had ported the core libraries for C#, the .Net Core, to other platforms. C# could already work as a cross-platform language, but this would make it a lot easier.

In terms of my IDE (the actual program in which I'm writing the code), I had already been using Visual Studio Code to do web-based project I'm working on, and really like it. It's extensible enough, cross-platform (so I can work on my Windows machine too without changing environment), helpful without taking too much control out of the way, and visually enjoyable. I do also use good ol' emacs on my laptop on occasion.

This was my starting point. Next time will be the overall design I'm going for, and my early progress (and wall-hitting).

#coding #journalApp