Click here to Skip to main content
15,179,476 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I've just discovered that the FedEx tracking site lets you "name" each package it tracks. Pin
Nelek13-Jan-21 9:31
protectorNelek13-Jan-21 9:31 
GeneralThought of the Day Pin
OriginalGriff13-Jan-21 5:33
mveOriginalGriff13-Jan-21 5:33 
GeneralRe: Thought of the Day Pin
Richard Deeming13-Jan-21 5:43
mveRichard Deeming13-Jan-21 5:43 
GeneralRe: Thought of the Day Pin
OriginalGriff13-Jan-21 6:05
mveOriginalGriff13-Jan-21 6:05 
GeneralRe: Thought of the Day Pin
W Balboos, GHB13-Jan-21 6:17
mveW Balboos, GHB13-Jan-21 6:17 
GeneralRe: Thought of the Day Pin
dandy7213-Jan-21 5:57
Memberdandy7213-Jan-21 5:57 
GeneralRe: Thought of the Day Pin
W Balboos, GHB13-Jan-21 6:12
mveW Balboos, GHB13-Jan-21 6:12 
GeneralOO Software design epiphany - it might not matter PinPopular
charlieg13-Jan-21 5:09
Membercharlieg13-Jan-21 5:09 
My version of a survey - I'm interested in actual experience. I'd post this in SO, but there are so many anal retentive ivory tower type there... I digress. FWIW, this is a little bit of soul searching, so take it as an honest question/statement/search and hell, suggest a book for me to read?

I live mostly in the embedded world where things are tightly bound to hardware. It might be the problem. It might be that I'm trying to apply OOD to something that just doesn't warrant it. That said, i've been developing software (of all types) for 40 years, and at the application level, I have *yet* to see any significant code re-use other than copy/paste.

I'm a (was?) big believer in OO design. I believe in Abstraction, Encapsulation, Inheritance, and (not)Polymorphism has (had) hope. But I believe that it suffers badly from being too general for what we do as developers. In no particular order:

Abstraction - I like it. Hide the details. So far so good. The problem is that most make analogies to objects that don't have an elephanting to do with reality software development. It sounds good, it just doesn't work.

Encapsulation - I love it. Hide the details, avoid spaghetti code, methods work with a blob of data.

Inheritance - a plague, a virus, useless. Most examples are trivial. Give me one complex application example, and it all falls down.

Polymorphism - meh. It's cute. Sure, I can create multiple methods to work with different parameters, but at the application level it is not that groundbreaking.

----------------------------------------------------------

So, in my project I've just spent 3 days (and some nights) trying to make some code generic and OOD and what not, and it's not going to happen. The more I try to make the class behave in a couple of different situations, it's just a boondoggle - which triggered me at 4 am - just copy the code to another function and hard code everything. Hence the question.

fwiw, the code I am modifying has not changed in 10 years. So, why bother making it general? I spend a lot of time trying to make code flexible (thinking long term support, etc), and I think I'm wasting my time.

Sort of rambling here, I'd like some practical, pragmatic feedback.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...

"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

GeneralRe: OO Software design epiphany - it might not matter Pin
PIEBALDconsult13-Jan-21 5:17
professionalPIEBALDconsult13-Jan-21 5:17 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 5:35
Membercharlieg13-Jan-21 5:35 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage13-Jan-21 5:59
professionalRage13-Jan-21 5:59 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 18:12
Membercharlieg13-Jan-21 18:12 
GeneralRe: OO Software design epiphany - it might not matter Pin
Roger Wright14-Jan-21 20:10
professionalRoger Wright14-Jan-21 20:10 
GeneralRe: OO Software design epiphany - it might not matter Pin
Greg Utas13-Jan-21 5:58
mveGreg Utas13-Jan-21 5:58 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8813-Jan-21 5:19
professionalden2k8813-Jan-21 5:19 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 5:32
Membercharlieg13-Jan-21 5:32 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage13-Jan-21 6:00
professionalRage13-Jan-21 6:00 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8813-Jan-21 6:14
professionalden2k8813-Jan-21 6:14 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage14-Jan-21 1:05
professionalRage14-Jan-21 1:05 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8814-Jan-21 4:47
professionalden2k8814-Jan-21 4:47 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage14-Jan-21 4:53
professionalRage14-Jan-21 4:53 
GeneralRe: OO Software design epiphany - it might not matter Pin
Nelek13-Jan-21 9:23
protectorNelek13-Jan-21 9:23 
GeneralRe: OO Software design epiphany - it might not matter Pin
OriginalGriff13-Jan-21 5:20
mveOriginalGriff13-Jan-21 5:20 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8813-Jan-21 5:26
professionalden2k8813-Jan-21 5:26 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 5:38
Membercharlieg13-Jan-21 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.