Never hard code anything

Oct. 11, 2017, 9:59 a.m.

I am quite sure that this is quite obvious to everyone except me.

I mean I did know that before but yet I just had to learn it the hard way. When I made Makro I made a decision to hard code six different meals and names for them. I did not think that it's that big of a deal back then. I remember thinking "I'll just change them when I get this working" and "It's easy to fix".

As it turns out it is quite a big deal and not that easy to fix. In order to fix my awesome decision I have had to recode stuff way more than I ever imagined. And the funny thing is that I'll have to do something to fix stuff saved in database as well (I will probably fix it on the client side when needed - lets see if this decision is going to bite me in the ass later).

On the front end I have 10 components and I have had to change/fix/redo 5 of them already and I'm not even done yet. Of those 5 components 4 are major parts of the website. At the moment it looks like that this fixing is going to take at least better part of this week before everything is ready. And after that there is still testing left before I can even dream of uploading it for my users to use. Silver lining here is though that hopefully I will never make that mistake again.