4
Lensflare
89d

Did a big refactoring on a file/type which had about 1k loc.
Extracted some code into separate types as components with single focused responsibilities.
Extracted the generic parts into a generic component and using it in the specific component via composition.
Made the boundaries between different layers of responsibility explicit and clear.
Reduced the original file size to about 400 loc.

Ran the app to check if everything works exactly as it was before the refactoring.

It does! I fucking love my job!

Comments
  • 3
    reminds me of the internship project I got landed once. spaghetti mess of 3k lines where most features didn't work but I had to figure out how they meant for them to work. somehow managed to mostly fix it in 3 months. I was so exhausted I was sleeping immediately upon coming home

    ~~when they gave me my first pay cheque after hiring me from that internship I cried cuz it felt like an insult for the amount of work I had done lol. careened my mental health for another 6 months after that until JavaScript became easier for me to write than the English language tho~~
  • 2
    @whimsical No, where would be the fun in that?
  • 2
    Props on the optimization.
  • 2
    @D-4got10-01 I wouldn’t call it optimization but thanks ^^
  • 2
    @Lensflare Well... yes, !in the strictest sense. But file size-wise, definitely. ~~60% reduction, unless my math is failing me.
Add Comment