file system entry can be either a directory or a file. Therefore I have FSEntry class that can represent both. I also added Dir class to represent a directory in a different context but that is redundant with FSEntry representing a directory. Therefore I removed Dir class.
lesson: you’ll see this lesson over and over again: software is never perfect and is never done. The code I had before worked. I refactored it because I think the new version is slightly better.
refactor Account and adding more type information
JavaScript is dynamically typed. Static types help to spot coding mistakes early, which is good. One option to get static types in JavaScript is to use TypeScript. Another one is to use JSDoc and add type information in comments. I went with JSDoc. This is the first time using JSDoc. It’s too early to say if the effort of adding types is worth it
experimenting with Telegram bot
I got a Telegram account and it turns out that it’s very easy to create bots to send myself notifications. I’ve added a notification to know when someone uses the app.
lesson: it’s good to know if and how people are using your software. I’m a fan of very targeted analytics. By targeted I mean: not just using a service like Google Analytics. They tend to evolve into providing firehose of data: lots of data you don’t want and missing the exact thing you do want. Targeted analytics measure only very small number of things and you actually pay attention to it.
I’ve added a way to count lines of code. Here’s what it is today: