You are browsing as a guest. Sign up (or log in) to start making projects!

9h 11m 36s logged

devlog 3, this is why you write clean code early

ok so the dreaded day has finally come…

The largest class in this program, RElementValue is finally being cleaned up. It is the thing you see when changing your settings, or when editing ANY element… it automatically changes depending on the type of the variable its targeting… but the code i wrote for it was SO BAD! 🥀

3 giant if statements, checking through each possible implemented type, making the class over 1300+ lines long.

However, I finally decided to redo the whole thing to continue my “code cleaning quest”

So now different types get their own classes, e. g, strings get; REStringValue booleans get; REBoolValue (not actually implemented yet), etc.

And as usual, this has NO effect on the user experience, which is… great to be putting so much effort into… but it has to be done before it gets to out of hand. (I promise im gonna start doing fun stuff soon 😅)

This is why you write clean code from the start.

0
19

Comments 0

No comments yet. Be the first!