My applogies for probably the worst written body of text I have produced in my life and many thanks to those willing to plough through it all.
I was (and still am) not able to clearly express what I was asking for, since by the nature of my question I cannot be clear about what exactly it is I am after. Fundementally I strongly suspect something in my knowledge of software development is missing, but because “I don’t know, what I don’t know”, I cannot specify what exactly I am looking for (and indeed can’t be sure whether such a thing exists) – hence I suppose I am asking for some direction in this matter. I kind of thought if proffessional developers did not know of/ did not use such a thing in the process of desingin code – then there is nothing to know in this respect (and I can stop worrying).
Essentially I fear something akin to having learned to program, but having remained unaware of the subject of proper OO software design. I have studied standard data strucutres and algorithms (to the extent of coverage found in typical undergraduate text books), but can’t help feeling that there should be something more. I hence can’t help feeling like I’ve learned the very basics, but not become aware of the data structures and algs. equivelant of OO design. In essence I sort of imagine there is some “process” to solution design (in the context of the d.s.s and algs. side of programming – like there is to the OO design side of coding software – I see them both as being part of the same whole in programming) that informs one about how to go about the task of writing “good” code (in the d.s. and algs aspect of the program code written). I fear in absence of knowledge of such a process/ subject, I would be incompetent as a graduate developer (rather like I would consider a new employee, if his code turned out to be uninformed by the OO design process/ principles). I would consider the code produduced by someone lacking in knowledge of OO design principles/ processes to be “bad code” – and hence him to be incompetent. At the moment I fear my knwolege with respect to the d.s. + algs. side of coding puts me in a similar position. Thus, can anyone tell me what I might yet need to be aware of in this respect?
(Another way of putting my question might be if I were to say: “Object Oriented design principles and patterns, is to programming, what “…”, is to data strucutres and algorithms”. Could anyone tell me what one might complete this sentence with, or whether there is nothing to consider here)
10
First things first, OOD isn’t something you can approach systematically. There’s no checkboxes for something that will vary based on who is doing it and what environment you’re in. So your assumption that efficiency will follow a similar path is flawed.
In practice, very few companies care very much about efficient code. Those blurbs are (very often) put in by HR people or middle managers who have no idea what it means. Companies want your software to work. They want it to keep working. And unless your company actually has hard requirements on performance and scalability, you have a lot of leeway about how your solutions are implemented.
But let’s for a moment consider what it does actually mean in the minority of jobs where it matters. You are right that “efficient code” is focused primarily on the time and space complexity of the algorithms and data structures in your books. Unfortunately, it is seldom clear cut what your inputs will look like, or what metric you’re optimizing for (can you take up more memory in exchange for faster performance? Can you sacrifice accuracy for disk space?). In practice, the choices you face (both in efficiency and OOD) will be a series of trade-offs. There will be no check boxes to mark off. There is very often no single correct answer.
You’ll need to make some assumptions about what your input looks like, and will eventually look like. You’ll need to make some assumptions about what is important to (most of) your users. And then you’ll need to make your best guess about the appropriate solution to balance meeting all of your demands while using as little of your resources.
9