Building language learning software
My latest project is called Trunk. It's a tool inspired by an application called "Learning with Texts". Rather than go into what it is (see the wiki page), I'll talk a bit about the technical aspects of the project and why I decided to pursue it.
I like to think of projects as mountains that are to be climbed. It's a metaphor. For… challenges. How relatable (I have not climbed a mountain)!
So let's start by describing the mountain.
Context. I started teaching myself french about two years ago. (J'ai toujours voulu d'apprendre une nouveau langue, et j'especialment sembler prendre par le francais. Ben, si tu es francais, tu sais que j'ai besoin de practique encore. M'envoyer une message!)
There are some really cool tools for learning new languages. One of them is called "Learning with Texts". It has been around for a while, and it helps you with reading comprehension and vocabulary. It is very neat, but also a bit difficult to setup on your own without some technical know how.
LWT can do quite a bit, but I only really want to be able to use one portion of it: the ability to import an article in a new language, break apart sentences into words, and identify and categorize words by how well I know them.
Over time, a tool like this would grow a database of words (and phrases) in a foreign language, contain metadata about how well a user knows that word, as well as what the word's user-decided stored translation is.
What tech are we using? Why?
Electron
I want this program to be installable on desktop computers. I don't want to maintain a running web server with user accounts, or any of that greasy maintenance. It's greasy! I don't want it!
Electron is great for building installable desktop programs that work on linux, mac and windows. And, it's pretty easy to use whatever front end tooling to build the front end of the application.
Let's talk about the (cons …)! (<--- lisp joke!)
A lot of computer wizards, witches, necromancers and spellcasters don't like electron. In fact, I see a lot of people complain about how much memory it uses, how it builds applications that take up a lot of space, etc etc. Thankfully, I'm not building this tool to impress technomancers and crusty compsci grads. This is a simple tool that is for folks who are learning a language.
And besides, in my own use case of this tool, I would only really need to use it for ten to twenty minutes a day for daily practice of a language.
Clojure
I'll be using clojurescript for this application. Woah! A niche language appears!
I like clojure for a number of reasons. I'm fairly quick with it, it makes rapid prototyping fun, and the language has all kinds of tools for thinking and building that just fit with me like a happy little puzzle piece.
Some cons with Clojure is that it's less likely that I might find contributors to the project as their are less people that use it, than say, Javascript. I'm not exactly looking for contributors at this time so this doesn't bother me though.
Tailwindcss
I'm trying out TailwindCSS for the first time in a real project. It's going great so far. I think that the application has less or my "personality" to it, and may be a bit more "default" in its appearance compared to doing css by hand. I'm fine with that - I'll make customizations when I'm confident the project will continue and the core functionality is there. For now, I'm able to get something looking half decent (at least to have to stare at again and again) in a very short time.
Challenges
So far I've struggled a bit with some of the scaffolding, although things are humming along now. Pretty much most of things have been a delight to work with so far. I think the only challenges when working with a language like Clojure is that there are fewer resources to seek out when I get stuck. So far I've only gotten hung up on trying to get core.async to work, but all it took was one post on clojureverse and a helpful kind stranger to guide me right back on track.
One non-technical challenge is that I can see this project growing in scope quite a bit. I can see folks using this (at least more than some of my other projects) and that means there might be future requests for changes / ux improvements, etc. That's fine - but I'll need to draw a line where it's "done" (or "done enough") so that I can move onto the next project and feel confident that this at least serves a concrete and understandable purpose.
What's next?
I've just hacked into place the ability to load Google Translate dynamically in the article-view. This was easier than I thought (and just as hacky as I thought it would be). Next up will probably be building out a "settings" view along with the ability for a user to:
- a) export their words / back up their database
- b) add / use multiple languages (this might be challenge, as each language might have different regexes to choose from for splititng up articles.)
- c) get things properly packaged with the electron bundler.
- d) maybe write some tests. maybe.