Hello,
The links where only to show you how git can be used - I'm not finished with my refactoring but at 4am I stopped working on it to get some sleep
. The overloaded teacherName() is more common in the c++ world than getX() or setX(). But that's just personal preference. Both is better than having a public state without accessor functions
.
For the (0 == x) - I got used to this version because it prevents an accidental assignment when you typed only one equal sign because the compiler will complain about (0 = x) but not about (x = 0). But it's easy to change if you want, as its semantically the same
.
My goal is, to clean up the codebase a bit and separating the engine from the rest trough cleaner interfaces so that its easier to write a new UI or to use it as library in some other software. This should also open the possibility to write tests to prevent accidental changes in your algorithm.
Quote from: Liviu Lalescu on September 02, 2016, 11:07:52 AM
Thank you, I read some of your improvements and they are nice. I don't agree with some (0==expression, I prefer expression==0, teacherName(), I prefer getTeacherName() and setTeacherName()), there is a small mistake (the + case CONSTRAINT_TEACHER_NOT_AVAILABLE_TIMES: - you forgot to add TimeConstraintType:: before it).
The thing is that all such changes are critical and need a lot of time for checking. But I'll think about it.
The links where only to show you how git can be used - I'm not finished with my refactoring but at 4am I stopped working on it to get some sleep
. The overloaded teacherName() is more common in the c++ world than getX() or setX(). But that's just personal preference. Both is better than having a public state without accessor functions
.For the (0 == x) - I got used to this version because it prevents an accidental assignment when you typed only one equal sign because the compiler will complain about (0 = x) but not about (x = 0). But it's easy to change if you want, as its semantically the same
.My goal is, to clean up the codebase a bit and separating the engine from the rest trough cleaner interfaces so that its easier to write a new UI or to use it as library in some other software. This should also open the possibility to write tests to prevent accidental changes in your algorithm.
