Back

Learning to Let Go

2021-08-15 . Written by fishie

Featured Image

>Be Me

Back-story

roughly about 3 years ago while on an unhealthy substance binge i locked myself in my room and wrote my first gui(Graphic User Interface) app within 2 days and had it tested and ready for my users.


Why the fuck?

i can explain. but id rather not. long story short it was either make the app asap or have my newly started business crash into the ground.


Anyways

so now i have this app which was super rushed that looks ugly as fuck made by someone who has no idea what he was doing. regardless of all these issues it works. in fact it works really well and gets the job done fast. so what's the issue? well just cause it does its job well doesn't mean its easy to maintain.


the Story of the app

anyways as I have established at the start of the article there were substances involved when the code was first written and its generally not a good idea to code while under the influence anyhow a few months later I started to see the issue with the codebase. its impossible to upgrade. or make any changes without putting in a lot of effort and work. the whole codebase is just a mess. so what did i do? i stripped the code down to its core features and copy pasted it onto another project and started over. keep in mind that i was not laying down a fresh foundation for the app. i was still using the old foundation from the old app. at the time i had no idea how much of a horrible idea this was. but give me a break it was years ago i had just started programming. anyhow a new app was built using the old code and i have been using that codebase up until this year.


Ignorance is Bliss

over the years i have gotten better at my craft. i learned what to and what to not do when programming. i learned how to program more efficiently and write reusable code. since i first made the version 2 of the app i have made multiple other apps.

going back to the app at its current state it doesn't support async code. it doesn't support databinding. there is no code reused. the app is 20k+ lines long. every time i have to impliment a new feature i have to fight the codebase. there are times that i had rewrote the same feature thinking it didn't exist. that's how much of a mess the code was. i couldn't even find my own features that i coded in.

at this point i realized that i have to kill the app. and start over from scratch. no copy pasting code


Rebuilding

i sat down for and rewrote the whole app from scratch. i don't know how long it took. all i know is that version 3 is only 2k lines long. its much easier to maintain and update. i can easily add new features. I can easily update the app.


Looking back

i feel better. the fact that version 2 sat in my codebase for all these years did nothing but slow me down. updating it was genuinely painful. even though i had to start all over again im glad i did it. the old codebase felt like it was holding me back from progressing. ofc I'm not throwing away the codebase. it will forever sit in my archives. as a memory of a younger and naïve me and also as proof that i have grown and gotten better at what i enjoy doing. it really sucks that i had to pull the plug and start over but if i didn't i would have continued to suffer. i guess this is a lesson on the importance of foundation. build a good foundation for your apps or watch as your work slowly fall apart infront of your eyes until you have the courage to pull the plug and start over.


Conclusion

i learned alot. im glad that i didnt give into the sunk cost fallacy eventho that's a path i go down a lot.

i learned that sometimes i can take a few days to do things properly or waste alot of time on the long run.

its kinda like having a rock in your shoe. you can stop to take it out or try to ignore it until it causes irreversible damage or something idk