In 2022 I started building an application for creating Customs declarations. After evaluating some options and writing code in various programming lan

Rewrite it in Rails | old man rambling

submited by
Style Pass
2024-11-01 08:30:04

In 2022 I started building an application for creating Customs declarations. After evaluating some options and writing code in various programming languages and frameworks such as .NET/F#, Go, Rust, React, I eventually decided to write it in Ruby on Rails. Why? Because I was already familiar with Rails and because of that I could literally go 10x faster than I was with any of the aforementioned options that were quite new to me. I told myself that this was temporary, a proof of concept and that later on, I would rewrite it in a different language that wouldn't let me shoot myself in the foot as easily as I tend to do with Ruby. The Rails application however quickly grew in functionality and my colleagues really liked the application. I could quickly build features that would make them more productive and prevent a ton of things that could go wrong (and often did initially go wrong, until I wrote some code to prevent it).

Meanwhile, I started building "version 2" of the application. I chose Rust as the language for the backend and SvelteKit for the frontend. Initially, the new version looked great, was blazing fast, but only had about 10% of the required features. As Rust doesn't really have anything comparable to Rails, I ended up having to do a lot of plumbing instead of writing business code. After a while, it became obvious that I could never write a feature complete version 2 without completely freezing version 1. So version 2 got thrown in the bin. Maybe this experience taught me something: rewriting something seems to take about as long as writing the original thing in the first place.

Leave a Comment