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.

1) I will be creating the jobs, lessons, and free time activities the same way I am doing now with attributes. Instead of manually creating each entity on the html, javascript will generate all based on the attributes object.
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.