|
Some people think that they are programming, simply by blindly copying/pasting working blocks of code and "search" the internet for other snippets to copy. Ask for a minor change, and they'll replace the entire block by another that has been "found".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
charlieg wrote: why encapsulation is ignored Because history repeats.
|
|
|
|
|
In my experience (~= 15 years of research about minimalistic design approaches) OOD is a flawed concept.
In theory, there's nothing wrong with it and it should lead to a better than average design, consistently.
In practice, abstraction is horrible, because people are really awful at defining, sharing and accepting the initial purpose of abstracted objects.
In part, this is because making the abstraction is rewarding in and of itself, while accepting an existing one is horrendously tedious.
The only form of OOD that seems to work consistently, is when you severely limit it to communication interfaces, DBO's and DTO's and drop polymorphism and inheritance all together.
Anything else, and people will misinterpret the abstracts made and muck it up beyond comprehension.
Also, reusability at object level is a maintenance nightmare. Reusability at API level is where it's at.
|
|
|
|
|
charlieg wrote: control c / control v must be banned No problem with that.
I use shift-delete / shift-insert.
|
|
|
|
|
I think you mean
control+insert / shift+insert
shift+delete is the same as control+X
as further evidence about MS lack of originality per a previous post.
Control + C, V, X were copied from Apple's Macintosh.
|
|
|
|
|
Actually no, I do mean shift-delete + shift-insert. (I find it easier to cut and immediately paste, then paste the copy). No need to move the right hand then. ) Also means that VS marks the "copied from" line as changed, which is a useful reminder when scrolling back to copy other code from the same area.
|
|
|
|
|
gotcha. I have a coworker that uses that pattern.
[shift+delete shift+insert] [navigate] [shift+insert]
Since I am writing this response later, I am scratching my head and wondering how we started talking about copy+paste when the subject has "OO design" in it! lol [but I am not going to go back and figure it out].
|
|
|
|
|
Everything I develop is centered around OOD/OOP as I use objects for the organizational constructs of my projects.
However, with very rare exception I do not use inheritance due to the many problems that senior software engineering analysts have found with it over the years.
This is not to say that inheritance is a bad concept but that it has to be used sparingly and carefully. Unfortunately, many developers rush into using it thinking that it is the real meaning of OOD.
When I was learning OOD many years ago I actually studied the history of its invention in Sweden (Simula-67). My conclusion was that it was created so that developers could better organize their development endeavors, not for the primary constructs that people promote.
In business applications, in general, there is little actual need for the use of inheritance and polymorphism, though there are applications that certainly could make good use of these attributes. However, here I am speaking generally.
As OOD emerged in popularity within the development community a small book was produced by a computer scientist back in the 1980s. This book went through all of the types of applications that could truly benefit from the use of OOD. None of the applications related to business development as all were from the scientific and internals communities.
In addition, the use of generic modules and the concepts of reuse were completely disproven many years ago simply from the statistical studies that were made against so many such projects.
Generic modules are nearly impossible to create as regular implementations into most applications since such modules must be relatively static in nature (ie: date validation module). The rise of popularity of generically designed modules was a direct result of incompetent technical managers who tried to foresee every possibility for any module developed. The result was terrible frustrations on the part of developers and projects that did not succeed very well if at all.
This was because, in reality, very few modules can be designed to be generic just like not every type of design can be shoe-horned into being an "Expert System" when that too was a craze in the late 1980s and early 1990s.
Object re-use failed as a direct result of organizations not setting up working repositories for re-usable modules that were designed to be used in such a manner (ie: data access layer). The result here, and which was eventually written about in our technical journals was that development teams\developers simply recreated the same modules multiple times for their own projects.
Also, the concept of reuse, when taken to the extreme as it was at NBC when I worked there in the 1980s, very easily gives rise to an environment of boredom as developers are rarely allowed to to experiment with their own creativity.
If new developers are not using OOD in a significant way than it is probably a result of the training they are receiving. However, not everything need hold to OOD through strict orthodoxy. Like everything else, OOD is a tool in our toolboxes and should be used with good understanding and care...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
One of the things that happened was CRUD. When I learned OOAD back in the 80's, we designed our objects around what they did - methods first, attributes when necessary, and properties weren't just for exposing backing variables. "Data Objects" lived only in the back tiers. Things like MVC soon moved them to the clients. Then the Web, JavaScript, and CSS (where until recently everything was global and single threaded) returned us to procedural coding. Welcome back to the 70's. When all of your objects are just data objects and everything is global and procedural, what need is there for OO design? Then,(misinterpreting) Agile - hack in circles until it (sort of) works. On top of all of that, OO design is hard. Really hard to do well. Few initial design objects make it into the final code unscathed. Finally, design is documentation. We're Agile - "Working code over comprehensive documentation..."
|
|
|
|
|
On my team of 4 programmers, I am the only one who even knows that the four pillars exist. Getting any of them to use a property is near impossible, but reflection is in almost every program. Mind you, there are utility classes for email, sFTP, etc, but the class that uses them is C code consisting of inline functions with everything forced through the same path. Special cases requires switches everywhere they differ from the rigid flow. (carp mode off).
I have 5.5 years of OOP before this job and wish OOP was appreciated. The problem is that just like 'cheapest programmers', management is 'cheapest management' and no longer has the tech savvy to use the proper techniques. It is a self-feeding trend that I do not see changing. If a programmer can write code that stumps his coworkers, he gets a raise.
|
|
|
|
|
I would argue that there are really five pillars of OOP and OOAD. Without loose-coupling, using the other four becomes spaghetti.
|
|
|
|
|
charlieg wrote: it baffles me to the point of wanting to cut myself why encapsulation is ignored. Depending on what you cut with, and where, and how, you cut, it may violate encapsulation.
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
|
If you have just under 3 hours of spare time this is once of the better renditions of the The Matthew Passion[^].
Not quite as fast as Gardiner's version but well paced enough not to wonder when the next note is coming.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
Something dark, but of course Music whise very good
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Good one!
My parents used to listen to that one, especially during Christmas.
I've always felt it had a similar vibe to some of the movements in Vivaldi's four seasons (I never remember which ones) as well as Pachelbel's Canon In D Major[^].
Very beautiful and very relaxing
|
|
|
|
|
I don't know why, but I always found it had a dubious ring about it ...
|
|
|
|
|
|
|
You are Young I'm old [Edit]er[/Edit]
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
I've had my "early" music that predates you and me by a few centuries[^] period
I find the lute particularly relaxing
Fun thing, "classical" music can be divided in roughly three era's, baroque, classical and romantic.
Before that music isn't classical, but "early", which means from the renaissance period or the (even earlier) middle ages.
After the romantic period "classical" music somehow becomes "modern"
In the grand scheme of things your Eagles and Stones are like futuristic hypermodern
|
|
|
|
|
|
I prefer the original by The Beatles from one of the best albums ever
|
|
|
|
|
Let me just reply with this gem:
Whitesnake - Blindman - YouTube
One of my all time favourites
throughout my life, my two greatest assets have been mental stability and being, like, really smart.
modified 20-Oct-19 21:02pm.
|
|
|
|
|