Yeah, I know...
Skipped two days again. But hey, I am still doing, right? Almost a month on it and it is working, at least!
I don't want to sacrifice my real life for this, so sometimes, it will fail. But I will always come back. Every single time.
Day TWENTY NINE - 27/07/2016
Time spent coding: 1h
Task(s) done: Princess Clicker progress
Yesterday I showed Princess Clicker to one of my friends, who is a senior developer, asking for tips to improve the code. The code works alright, but as being a beginner in all this, I tend to make quite verbose code for some more simple things. And it is fine, I will learn with time, but I wanted to already start making myself aware of this, before I create a mess myself.
So, first thing, my code is starting to get big. Which means scrolling down to actually find anything meaningful on it. So today I decided to focus on cleaning code before adding new features.
I still will need to work on this more, since this will change quite a lot of things.
2) Updating values now happen on a function. This way instead of always updating specific elements, I run the function that will update it all. If no element was changed, it will keep the same.
3) Functions are smaller, meaningful. That means that instead of a generic Stress check, I will have a function just to decide if the daughter is sick or not. It is a simple function that returns true or false based on a check.
This way my code will be reduced to a lot less elements, and will be way much more practical to code on it.
That is all for today!