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 533744
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: OOPs
by ndrw on Tue 4th Sep 2012 01:49 UTC in reply to "OOPs"
ndrw
Member since:
2009-06-30

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:
2007-02-18

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

RE[3]: OOPs
by lucas_maximus on Tue 4th Sep 2012 20:59 in reply to "RE[2]: OOPs"
lucas_maximus Member since:
2009-08-18

The only UML diagram I think any one uses regularly is the UML class diagram. That is where the confusion lies.

I haven't really used UML except for class diagrams since university.

We were told not to use Flow Diagrams at University, but they are pretty good for non-developers to see a high level flow of logic and developers can just follow it through in a debugger if need be (Our codebase is very bad).

Edited 2012-09-04 20:59 UTC

Reply Parent Score: 2