1

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)

closed as unclear what you're asking by gnat, user40980, jwenting, david.pfx, GlenH7 Aug 14 '14 at 15:22

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    Maybe I have not had enough caffeine today, but I am having a difficult time following your question -- maybe editing it for brevity (efficiency?) would help. – user22815 Aug 13 '14 at 20:44
  • @man of I apologize for some of the other members' comments. This site is evolving into more of a high in tech low in human values environment. – dbza Aug 14 '14 at 8:18
  • @DominicMcDonnell could you please also look up the meta post about how unfriendly and judgemental stackexchange is becoming of late? Would you post the same comment if your facebook account was linked here and this op guy's pic was there in the question? – dbza Aug 14 '14 at 8:54
  • 3
    @dbza: SO is supposed to be respectful and professional, but primarily it is a place for high quality questions and answers. Bad questions need to be closed, politely if possible. Ask a question on meta if you need further clarification. – david.pfx Aug 14 '14 at 11:25
  • 1
    My appologies for potentally abusing the forum system, maybe this is not the style of question I should have put on stack exchange - just I'm not sure where else I could seek such advice? Didn't quite realise this might not be an appropriate approach, as homer simpson said "it's my first day..." ; ) – man of Aug 17 '14 at 17:11
9

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.

  • Don't forget profiling, and Knuth's quote about "premature optimization is the root of all evil." – user22815 Aug 13 '14 at 21:04
  • @Snowman - I suppose, though maybe 75% of professionals I've worked with had never run a profiler. Though that's a good point on Knuth. – Telastyn Aug 13 '14 at 21:15
  • 2
    On a side note I think we could be a bit more friendly and keep SE a warm welcoming place for newbies. "And now I'm nearly dead sure that you have no idea." is rude. whatever Ks your reputation here is. – dbza Aug 14 '14 at 0:49
  • There are plenty of approaches to use formal specifications in OO systems, I used to know an analyst who used them to produce OO designs that were very good. Just because most developers bang stuff together that mostly works doesn't mean there isn't better ways of doing it (if much less fun!). I recall being taught formal analysis stuff, and it was dull. – gbjbaanb Aug 14 '14 at 15:42
  • Can you explain what you mean by "OOD isn't something you can approach systematically"? – Dunk Aug 18 '14 at 14:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.