on software
Latest blog articles:

Spense.app v0.2

Spense.app is under active development and is not available for public use.
This article is a translation and adaptation of my article in Russian.

Hey everyone! I've finished working on the next version of Spense with a bunch of improvements and as per tradition I'm sharing the most interesting parts.

Accounts and Wallets Page

In the app interface, you can now manage your wallets and view the current balance:

Read more

Under the Hood of Spense.app: The Code.

This article is a translation and adaptation of my article in Russian.

While Spense v0.2 is under development, I want to talk about the internal organization of the application from a technical perspective. This article is mainly for web developers, and it's written in the corresponding language, so if you're reading and don't understand anything, that's okay, you can just skip it.

In a Nutshell

Backend on Django (Python), frontend on Django templates and Bootstrap, with a pinch of JavaScript and some htmx (not anymore).

Why So Boring?

Sounds not very hype, right. But remember that Spense in its current state is not a full-fledged product. It's more of a prototype, in which I often need to change things and test ideas. If the ideas work, I'll throw this code away and write another; if they don't, I'll just keep it for memory.

So, I chose Django not because I love it (actually, I hate it), but because I've gotten used to it over the last year, and it allows me to prototype the application easily and quickly.

Read more

Spense.app v0.1

Spense.app is under active development and is not available for public use.
This article is a translation and adaptation of my article in Russian.

I've rolled out version 0.1 of my app for tracking finances and decided to report on the progress. To be honest, it's not an actual mobile app, but a Progressive Web App - essentially a website that you can open on your phone, add to the Home Screen, and it will launch in full screen without browser panels. I don't yet know how to make real apps, but even in its current form, it works quite well.

By the way, there's even an icon already, which I created in ChatGPT/DALL-E:

As you've already guessed, I named it Spense. I came up with this name a long time ago by trimming the word "expense", and I bought the domain back then, which I'm only now starting to use more or less.

Currently, I'm the only user, there's no registration, and I think at least until version 1.0 everything will remain closed, but I'm happy to show you what's going on there now and what has changed.

Read more

I started making a personal finance app. Why?

This article is a translation and adaptation of my article in Russian.

Since around 2014, I've been keeping track of my finances in Google Spreadsheets. It always went like this: 2-3 times a week, I'd sit down at the computer, gather receipts, go through the transaction history in banking apps, recall expenses from memory, and record them in a spreadsheet.

The spreadsheet had one row for each day, and columns for accounts, wallets, and a couple of calculated fields. There was also a "Notes" field where I would describe in almost free form where the money went.

An example from 2016. I have converted the original prices from Russian roubles to euros for clarity.

As you can see, I didn't exactly have a lot of money. Probably because I mostly ate and drank coffee instead of working, but the point is that I didn't want to economize on these daily things at all. Saving on everyday items and cutting back is fundamentally unnatural for me, and I've always tried to avoid it. Therefore, the question "Where does the money go?" didn't concern me at that moment, but more interesting questions did:

  • How much money do I have right now?
  • How much did I have a month/six months/a year ago? Have I become richer or poorer?
  • Can I afford to spend on a vacation/buy a new phone/go to a private clinic right now? Will I go into the red by the next paycheck?
  • What should my income be so that with my current spending, I start saving any money at all?
  • How soon will I start starving if I lose my job?
Read more

Abstractions and Inheritance in C - Elegant Foot-Shooting

TL;DR https://github.com/ddoroshev/c-inheritance

Sometimes you want to abstract and generalize something in C code. For example, if you want to print the contents of a structure multiple times, you end up writing printf("%s %d %f\n", foo->bar, foo->baz, foo->boom) everywhere like a fool, and it intuitively seems that there should be a way to do foo->print(foo), and not just with foo, but with any structure.

Let's take an example: there is a guy with a first name and a last name, and there is a bird that has a name and an owner.

typedef struct Person Person;
struct Person {
    char *first_name;
    char *last_name;

typedef struct Bird Bird;
struct Bird {
    char *name;
    Person *owner;

To print information about these animals, a cunning C programmer would simply write two functions:

void Person_Print(Person *p) {
    printf("%s %s\n", p->first_name, p->last_name);

void Bird_Print(Bird *b) {
    printf("%s of %s %s\n", b->name, b->owner->first_name, b->owner->last_name);

And they would be right! But what if we have many such structures and our brains are corrupted by OOP?

Read more