|
I tried an agile waterfall sprint, but I tripped over the kanban, and then broke my leg in the scrum; the rest of my team now calls me: "loser."
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
You're a genius!
Jeremy Falcon
|
|
|
|
|
I know a guy who made a living doing that. Then I had to work on some of his code and it was all copy paste or libraries that he bought. Plus his his preferred framework was Visual Basic 6.
|
|
|
|
|
Marc - yup. I'm not a religious nut when it comes to OOD. I am a zealot when it comes to keeping things separate and more importantly - easily understood.
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
|
|
|
|
|
Marc Clifton wrote: encapsulation within classes (as functionality is encapsulated in plug-in
modules instead) A module has often more responsibilities than a class.
Marc Clifton wrote: Inheritance: want to change behavior, swap out the module That's a good one. If you want to change behaviour, just uninstall the current version and install the correct one.
Marc Clifton wrote: Polymorphism: it's just a different message A class is not a message.
Yes, I do love those long lists of method-signatures and global variables; at a certain point I started grouping the signatures and the globals that seemed to go together. Next, those blocks got decoupled from the app, and had to manage their own state, as opposed to having them depend on a global variable in the app.
OO is simply a structured way to set up stuff. Sometimes it gives an obvious advantage, and sometimes people just use them because they are told to and make stuff worse than without the structure.
..and while I agree that one can do without, as everything can be done in simple pieces of assembly that one calls, I still would not recommend in doing so.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
3. Polymorphism: it's just a different message
Polymorphism means you send the SAME message, but the consumer of the message performs differently.
In your jargon, plugin a different consumer module (or multiple consumer modules if you want) without changing the message producer. The message producer doesn't know and should not care.
|
|
|
|
|
englebart wrote: Polymorphism means you send the SAME message, but the consumer of the message performs differently.
Yup, my bad.
Marc
|
|
|
|
|
Marc Clifton wrote: So, the problem lies more in how poorly programmers implement the application rather than the methodology they use (globals or OOP).
To say it another way, an average programmer may be able to make a relatively decent implementation given the right tools, a good programmer will do so regardless of the tools and language and a poor programmer can make a mess of even the most structured and pristine of tools and languages. Which will you choose to be today?
|
|
|
|
|
Don't forget about...
DRY - Don't repeat yourself
SLAP - Single level of abstraction principle (single inheritance)
|
|
|
|
|
and the ever popular EMB
Eat more bacon...
|
|
|
|
|
R. Giskard Reventlov wrote: Eat more bacon.
Of course!! Even if it does not cause cancer. 
|
|
|
|
|
My singular problem with all things OOP and OOD is that nobody ever was able to truly, accurately, and adequately provide a written definition of what those words actually mean in a form that I could grasp upon first reading.
Brass tacks: you have to read a thousand pages, and ask hundreds of people, in order to grasp them. They can't put them into writing. Period.
Years later, it appears that OOP/OOD are, basically, throwing away all things structured.
There was a time when structured thought was considered to be a significant aspect of a certain branch of psychometry.
But of course, those people (psychometrists) are just bad people, trying to put labels on people to hurt them.
Yeah
Right
|
|
|
|
|
I found the OOP manual that came with Turbo Pascal 5.5 was very good. And thin too. I think I downloaded a PDF version recently.
|
|
|
|
|
OOP has only three pillars.
|
|
|
|
|
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
|
|
|
|
|
I was sure someone had pointed that out.
You have just been Sharapova'd.
|
|
|
|
|
charlieg wrote: then I get a C programmer along, and here come the globals.
That's sig material right there.
|
|
|
|
|
Well, I am not about to argue that all of this should be followed. For me, inheritance more than 1 layer deep usually means I'm leveraging something really simple, so the inheritance is just stupid. Other than graphical development objects, I've not yet run across an application that really fits the textbook case of is a and was a or whatever .
The part that I really appreciated in OOD and C++ was the concept of using a class to encapsulate data and processing together. The general concept lends itself to organizing your code into definitive, understandable chunks.
And along come the globals....
Without this, you end up coupling dissimilar portions of code together, and you don't even know how you managed to do it. Pretty soon, glue is running all over interfaces, assuming you can even ascertain what your interface is. You make an innocuous refactoring in some code and the train jumps the tracks killing all aboard.
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
|
|
|
|
|
Oh my, some people still chew on the "don't put twenty elephanting parameters in a method" principle.
it ain’t broke, it doesn’t have enough features yet.
modified 20-Oct-19 21:02pm.
|
|
|
|
|
Ummm, yes, put that in front of me, and I'm going to go look for a big stick .
I have a file - It has 6000 lines of code in it. I think sometimes Visual Studio is so good at sorting and organizing, we get lazy. All of the methods are message driven. That's just one file.
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
|
|
|
|
|
In the Fortran days, I was working for a company that had to push the release date for their new Fortran compiler ahead: A very important customer was waiting impatiently for it. You see, the old compiler could handle only 99 arguments to a function, and his code had more than that(!)
The new compiler could accept 127 arguments, satisfying this customer, but it was prepared for up to 255. I don't know if there ever was a customer requesting that.
Another company I was working for made a linker for use by the developer of the ITT System 12 telephone exchange. The S12 programmers reached an internal limit in this linker: A module could export "only" 32767 symbols. (There was no practical limit for imports; we are talking about a single module exporting 32K symbols!) Changing the index data type from signed to unsigned 16bit integer doubled the capacity.
S12 also defined the biggest struct I have ever heard of in practical use: Approx 8300 lines. Print it out 72 lines to the page, and it makes a 120 page book... (How could you possibly create an 8300 lines long type definition? It was a message type, with a common header and a large number of variant structures following. So, it wasn't quite as crazy as it at first might sound.
|
|
|
|
|
Create a class called Globals, and stick them in there with no access restrictions.
Will Rogers never met me.
|
|
|
|
|
oh that burns But I console myself with the fact they I work at an hourly rate. The more you elephant it up, the more money I bank. I love legacy code - it's never my fault.
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
|
|
|
|
|
Sounds like the Console class to me. 
|
|
|
|
|
I guess it should be called COMMON and be a byte array onto which any user might impose their own structure.
|
|
|
|