Linked by Thom Holwerda on Mon 3rd Sep 2012 20:46 UTC, submitted by MOS6510
General Development I like this one: "By definition, a program is an entity that is run by the computer. It talks directly to the CPU and the OS. Code that does not talk directly to the CPU and the OS, but is instead run by some other program that does talk directly to the CPU and the OS, is not a program; it's a script." Here's the other eleven.
Thread beginning with comment 533736
To read all comments associated with this story, please click here.
by kwan_e on Tue 4th Sep 2012 00:56 UTC
Member since:

8. Object Oriented Programming is absolutely the worst thing that's ever happened to the field of software engineering. (+34/-14) by Breton

The primary problem with OOP is the total lack of a rigorous definition that everyone can agree on. This easily leads to implementations that have logical holes in them, or language like Java that adhere to this bizarre religious dogma about what OOP means, while forcing the programmer into doing all these contortions and "design patterns" just to work around the limitations of a particular OOP system.

Lack of rigorous definition is not a problem with OO. It is the fact that the real world does not play nice with neat concepts and principles. The real world does what it wants and you have to adapt.

OO is just one of many ways to adapt. Design patterns are another. OO and design patterns are almost orthogonal to each other, and are orthogonal to other concerns like performance or parallelism.

The design patterns a lot of Java frameworks go for is not because of getting around the limitations of its OO implementation, but because a few zealots spread the meme that everything needed a design pattern for every little thing. Java just happened to be co-opted for it because, in a way, it was designed with design patterns in mind.

Reply Score: 4

by satsujinka on Tue 4th Sep 2012 01:23 in reply to "OOPs"
satsujinka Member since:

There's an oft ignored fact that design patterns are really just missing features. Each and every single GoF design pattern is just a language feature. For example, the Command pattern is completely pointless if you have first class functions. Composite and Decorator are just recursive unions (of differing multiplicity.) Adapter, Bridge, and Facade are just use cases for composition.

I can do this all day, I did a semester project on cross-language implementation comparisons using design patterns as a goal.

I should probably mention that all languages have "design patterns," it's completely insane to include every single possible feature in a language (such that you'd have a feature for every macro-structure you can concieve of.)

Reply Parent Score: 1

by ndrw on Tue 4th Sep 2012 01:49 in reply to "OOPs"
ndrw Member since:

I remember being utterly confused after reading books on OOP back in '90s. Authors often bundled other concepts with OOP, making it almost impossible to figure out what all the fuss is about.

In particular, OOP has nothing to do with:
- types or access modifiers - that's encapsulation,
- inheritance/mixins - that's code reuse,
- any particular coding style - that's plumbing,
- patterns - that's cooking recipes.
They are all useful techniques, it's just they have nothing to do with OOP.

Object oriented programming is really about having a bunch of objects (separable entities "living their own lives") communicating with each other. It's really as simple as that, yet very few OO programs or frameworks fit this definition.

For example, in another post I mentioned Kay's "setters are evil" rule. Why? For the same reason any mutation is evil. Calling a setter means taking control out of a target object and placing it in the calling one. So the target object is no longer a separate entity and becomes just a dumb storage of fields others may fiddle with - a data structure. This puts the calling object in business of coordinating changes and ensuring consistency of the target object state, which requires a lot more knowledge than just the API.

Reply Parent Score: 6

RE[2]: OOPs
by kwan_e on Tue 4th Sep 2012 02:08 in reply to "RE: OOPs"
kwan_e Member since:

One of the worst confusion is that UML and OO are interchangeable. It makes it way too easy to over-design a solution to any problem.

Reply Parent Score: 3