Sunday 30 October 2022

Organizing class functions

I have a new style to organize class member functions. Previously I organized them more or less by "theme", but now I have changed that and it goes like this: first getters (all functions are in alphabetical order), then setters and last three parts are display, debug and save/load routines. I think for some people the order of functions doesn't matter, but in a large project it's nice to have some kind of rules for that, too. Makes it easier to understand the workings of the class. It's a matter of personal preference, but I think this kind of ordering works quite nicely.

My next focus is Teemu and I have returned to the project just by re-organizing classes and also checking out private/public interfaces, I often place functions to public even they could be in the private part.

I have also an update to my health problem. When I got my blood checked they found out that I have hypothyroidism or the low function of thyroid. So I have been getting thyroxin for that and it has been interesting. It's likely that I had the condition for years, because the difference in my health has been quite dramatic. But on the flipside it has caused insomnia, although the quality of my sleep has increased so much that it hardly matters. As a result of all this I have been able to put more work on my projects without suffering from brain fog I had before. Yet I have a feeling that it's not over, that there is something else wrong with my health. But I'm not worried about something I don't know, I have enough actual problems in my life.

No comments: