HACKER Q&A
📣 livinglist

Should I refactor/rewrite my personal project(that barely anybody uses)


I wrote a app for learning Japanese kanji when I was in college learning Flutter, I didn’t have any experience working on real world projects and barely have any knowledge of design pattern, architecture, clean code etc… I was young and naive, but had passion, so I started collecting data using scrappers I wrote in Python, organized them into a SQLite database, put a lot of example sentences and vocabulary on Firebase, then made an app using Flutter. I gradually added more features into the app after I released the first version, things like handwritten kanji recognition using Tensorflow lite and image text extraction using Google OCR api… I learned a lot, and by a lot, I mean a lot lot of stuff from making this app. The app is functioning just fine but the code is ugly as hell…for example attributes in data model classes are not final, doesn’t support dependency injection, etc….

After I started working, I learned a lot about how to write clean code and I always wanted to refactor/rewrite the whole app which gonna take a lot of effort and time of course. But every time I sat down, opened the old codebase, I hesitated, thought about it and told myself that it wasn’t worth it then continued my life.

do you have any personal project you always wanted to refactor/rewrite but still haven’t done or probably never will do so?

if you are interested, you can come see and compare the code of the kanji app and a new app I wrote recently:

https://github.com/Livinglist/Manji https://github.com/Livinglist/Hacki


  👤 GianFabien Accepted Answer ✓
When you are learning, you write a lot of code that with experience you no longer admire. That just proves how far you have progressed.

The "second system effect" suggests that the rewrite will take a great deal of effort and for very little gain.

If I were in your position, I would direct my energies to new projects. There is far greater potential for expanding your experience and knowledge than by reworking something that you will shudder to look into too deeply.

As for my experience. I have shelved my early systems. For systems I wrote in the past 10 years, I have been refactoring every time I add a new feature or fix some edge case. By maintaining clean separation of concerns it has even been possible to swap out one module implementation with another.


👤 Klaster_1
Several of my projects brought me to similar thoughts. I decided to spend my time on something else unless I use the project in question often and it would really benefit from an occasional refactoring and update. Right now, I've only got a single such project (https://github.com/Klaster1/timer-5), the readme links to several previous iterations. During rewrites, I focused on learning new techniques and tools, but surprisingly, a select few places remained relatively stable throughout the years - either I didn't learn anything new in the area or got it pretty good the first time.

👤 jjice
It definitely depends on a few things. Most importantly: do you want to? If you don't want to, then don't do it, this isn't a business critical application that hundreds of other engineers will work on.

Another consideration is: how much more work on this will you do? If you think that a rewrite will be good because you (and potentially others) will be modifying the code quite a bit in the future, then maybe it's worth while.

If it's a project you consider finished and would rather work on other things, then do that! If you really want to, you can always clarify design decisions (or lack there of) at the top of the README.


👤 Isammoc
I have a graveyard full of such personal projects.

In another hand, if you are still maintaining this project, it can be interesting to refactor it and show your process doing it. It can be a great way to show actual useful skills for a future interview or, at least, train to do so before actually using it in a real production project.

Refactoring to a state of the art state while the project is still under development and shipped can be a valuable skill to train and show.