I've taken a course this semester at my university in Object Oriented Programming. I was a decent C and C++ procedural programmer and didn't think that object oriented programming would be that difficult. How wrong I was.
I was unable to complete the course assignment. Or rather, I completed it and spent even longer on debugging it to find out why it crashed. In the end, I was unable to locate the logical errors, but submitted the assignment anyway. Eager to get the project out of the way, I had started writing code fast, but without a good design.
What I realized was that while I understood the syntax of the language, I was not taught any code design and management skills (don't know if I should blame my Uni or myself there), which eventually led to my downfall. I rewrote large sections of the code 3 times, wasting time as the design was not completely object oriented (e.g. other classes could control the behavior of some classes, rather than each class being able to control its own behaviour and attributes). Soon, I found myself facing thousands of lines of code, over a dozen classes and over 50 to 60 different functions (some with very similar names, but in different classes!). Couldn't even figure out where the logical errors where anymore and just reading the code became hard.
What I would like to learn now is how to organize a project like this better. I am set to graduate soon and my first job ironically enough is going to be in writing software. I don't want to repeat my mistakes above.
I want to ideally be able to make the best possible design (with execution efficiency and future maintanence) once, write the code once, debug once and be done with it. I am willing to read up extra books to educate myself on this design issue.
So, kind fellow DC members, please throw some tips. How do you organize your large code? I would also like to know how much of a big deal Object Oriented Programming is. After this assignment, I've started disliking it as I wasted too much time trying to contain everything inside classes, eliminate friend functions and so on. This even led to longer lines of code and seems counter productive to me.