Click here to Skip to main content
15,868,016 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 8:31
protectorNelek13-Jan-21 8:31 
GeneralThought of the Day Pin
OriginalGriff13-Jan-21 4:33
mveOriginalGriff13-Jan-21 4:33 
GeneralRe: Thought of the Day Pin
Richard Deeming13-Jan-21 4:43
mveRichard Deeming13-Jan-21 4:43 
GeneralRe: Thought of the Day Pin
OriginalGriff13-Jan-21 5:05
mveOriginalGriff13-Jan-21 5:05 
GeneralRe: Thought of the Day Pin
W Balboos, GHB13-Jan-21 5:17
W Balboos, GHB13-Jan-21 5:17 
GeneralRe: Thought of the Day Pin
dandy7213-Jan-21 4:57
dandy7213-Jan-21 4:57 
GeneralRe: Thought of the Day Pin
W Balboos, GHB13-Jan-21 5:12
W Balboos, GHB13-Jan-21 5:12 
GeneralOO Software design epiphany - it might not matter PinPopular
charlieg13-Jan-21 4:09
charlieg13-Jan-21 4: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 4:17
mvePIEBALDconsult13-Jan-21 4:17 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 4:35
charlieg13-Jan-21 4:35 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage13-Jan-21 4:59
professionalRage13-Jan-21 4:59 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 17:12
charlieg13-Jan-21 17:12 
GeneralRe: OO Software design epiphany - it might not matter Pin
Roger Wright14-Jan-21 19:10
professionalRoger Wright14-Jan-21 19:10 
GeneralRe: OO Software design epiphany - it might not matter Pin
Greg Utas13-Jan-21 4:58
professionalGreg Utas13-Jan-21 4:58 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8813-Jan-21 4:19
professionalden2k8813-Jan-21 4:19 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 4:32
charlieg13-Jan-21 4:32 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage13-Jan-21 5:00
professionalRage13-Jan-21 5:00 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8813-Jan-21 5:14
professionalden2k8813-Jan-21 5:14 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage14-Jan-21 0:05
professionalRage14-Jan-21 0:05 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8814-Jan-21 3:47
professionalden2k8814-Jan-21 3:47 
GeneralRe: OO Software design epiphany - it might not matter Pin
Rage14-Jan-21 3:53
professionalRage14-Jan-21 3:53 
GeneralRe: OO Software design epiphany - it might not matter Pin
Nelek13-Jan-21 8:23
protectorNelek13-Jan-21 8:23 
GeneralRe: OO Software design epiphany - it might not matter Pin
OriginalGriff13-Jan-21 4:20
mveOriginalGriff13-Jan-21 4:20 
GeneralRe: OO Software design epiphany - it might not matter Pin
den2k8813-Jan-21 4:26
professionalden2k8813-Jan-21 4:26 
GeneralRe: OO Software design epiphany - it might not matter Pin
charlieg13-Jan-21 4:38
charlieg13-Jan-21 4: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.