Programming Ugly

Pages: 123... 5
The amount of self satisfaction I'm feeling with my code is at an all-time low for my short 5-year experience with hobby programming. Don't mind that, it would require a very boring and depressing session of writing for me to elaborate my seeming failures.

I'm just going to hit the books and forget any real programming projects. I must reapproach the theory and technique of programming which I once thought I understood. I need to really grasp the art of C++ programming.

Now to realize: I really only understand C! But, don't be mistaken. I can actually write fairly as good and full featured classes as you can; not a problem.

So then how am I challenged? My problem isn't about writing a good class, it's about how my classes stand together; designing class ensembles and frameworks.

So now... Do you know of any high-regarded internet lituratures about C++ programming which can help me look beyond the techniques of execution-and-procedure?

If you don't really understand what I'm ranting about, just ask please.

Thanks,
Ben
http://crypto.stanford.edu/~blynn/c/index.html#_a_c_odyssey

The main idea is this: OOP is just another paradigm, which changes the form but not the substance.
If it doesn't help you, it harms you. If it slows you down, maybe it's inappropriate for your project.

If you fail, try and try again, but remember to let it go at some point if it doesn't work out.
the secret should be never give up
Do you know of any high-regarded internet lituratures about C++ programming ...

How about Jim Coplien's thesis?

http://www.netobjectives.com/resources/links/jim-coplien-thesis-multi-paradigm-design-patterns

(Or his book, Multi-paradigm design for C++)

Andy
@Catfish
*read most of it*

The main idea is this: OOP is just another paradigm, which changes the form but not the substance.
If it doesn't help you, it harms you. If it slows you down, maybe it's inappropriate for your project.

If you fail, try and try again, but remember to let it go at some point if it doesn't work out.

That was already on my hunch. But actually, I tried to give C++ another chance with this topic.

Screw this.
I'm going to strip down into my super hero suit and go back to saving the world.

@goichionline
Okay, I will never give up! Oh Santa Clause, I believe in you! I believe, I believe! Oh boy, now the holiday spirit is arising! Yay!

@andywestken
Meh. The dumb website won't let me read it without some kind of registeration. Corrupt bastards keep abusing the marvel of the internet for selfish reasons.
Last edited on
The dumb website won't let me read it without some kind of registeration.

Try clicking on the link "Go to Multi-Paradigm Design".
Oh my bad.
Hi, all,

Just responding to Ben's inference of me being a corrupt bastard. Fond greetings to the rest of you.

As is the case with misunderstanding how to use the basics of the internet, most people have missed the basics of OOP. It is true that the way most people use it is grounded in just form and not substance. Ignorance abounds.

Regarding the inquiry about good books and web sites about C++ and OOP, I suggest fulloo.info and the new Lean Architecture book. We've come quite a ways since the MPD research, which goes back 20 years. What's in that book is still mostly right, but there's much more to the story. OOP is much more about dynamics than the relatively static view you find in the MPD book (which is more or less DDD several years before DDD).

Most people (especially C++ and Java people) do class-oriented programming instead of object-oriented programming, largely because programming languages encourage that thinking model. In fact, you actually can do OOP in most modern programming languages — with one remarkable exception. But it requires a much different way of thinking. I've been working with some of the original OO people — mainly Trygve Reenskaug, but have also interacted a bit with Kristin Nygaard — to get to the root of things. And most contemporary programmers have missed the boat.

Trygve has communicated the vision of object-oriented programming in a paradigm we call DCI for Data, Context, and Interaction. Much of our articulation explains how to achieve it using modern programming languages. We are currently working to get the C++ examples uploaded to fulloo.info.

So I'm sure you're all good professionals here and know how to search the literature, and I'm sure you all spend time keeping current on developments like this. Sure, read the 20-year-old stuff, but also have a look at the new stuff. For those who find their professional growth in readings from the Internet, we even have a Wikipedia article. Just be warned that you'll have to let go of even deeper prejudices than thinking that I am a corrupt bastard, and will need to work a little harder than clicking on the right link.

Geez, good luck, Ben.
Last edited on
...
Last edited on
That's just syntactic sugar.

This has nothing to do with UML.

To code the above, you need to know the class of he in either case. That creates architectural coupling, encourages static instead of dynamic thinking, and puts you inside the compiler mental model instead of the end-user mental model. Object-orientation has little to do with polymorphism or encapsulation: it has to do with mental models, and the relationship between human users and how the concept of a machine can augment their cognition and volition. To get to that end you need to be able to reason about the dynamics of the code. Class-oriented programming took away our ability to do that.

I suggest you have a look at some of the talks on the web by Trygve. Start with http://www.leansoftwarearchitecture.com/home/dci-tutorials. Read the wikipedia article. Do some good old-fashioned reading. Follow the references and examples on fulloo.info. Download some of the code examples on the web and try them out. Read the article at artima.com. Watch some of the conference videos available on the web. They're all free (just trying to avoid again being accused by Ben of being a selfish bastard). But it will take you some time and work. Sorry. There's usually some kind of price to be paid.

I have tried to tutor people in DCI over E-mail, and haven't found it either to be successful for them or rewarding for me. I can help you fine-tune some code once you make some progress under your own steam, but I won't use this mailing list as an online technical school. Instead of quickly going to the keyboard when a question pops into your mind, take some time to do some deep thinking and research before coming back — a few days, rather than an hour and fourteen minutes :-)
Wait a minute, this thread is about OOP in C++. Is DCI applicable to plain C++?
Wait a minute, this thread is about OOP in C++.

Right, I can read.

Is DCI applicable to plain C++?

Yes.

Last edited on
Cool could you please write a simple example I can compile with my trusty G++?
There is code in the book and several places on the web. I am working to get more such code on the web. Please take some professional research initiative and seek out the examples that have already been published. It wouldn't hurt you to read the papers that go with them first. You are going to have to understand the mental models behind the code to appreciate why the code is the way that it is, anyhow. As I said, I will not appear here as a tutor to run a class on DCI programming.
Oh I see. You can't, I mean don't want to provide a simple example because it's too hard to understand without prior study.
closed account (1vRz3TCk)
Catfish, please stop being antagonistic.
Lol @
Ben Bowen wrote:
Meh. The dumb website won't let me read it without some kind of registeration. Corrupt bastards keep abusing the marvel of the internet for selfish reasons.


This thread is kind of a fail...
hey, cope, since you seem to be an authority on the subject of DCI (relative to those in this conversatioN) is there any chance you can link me to some (or just one) paper published on the matter? I'd actually never heard of it before this, and I'd rather not have to dig through google to find a gold nugget when there is a chance you already know where it is at.
Well, the Wikipedia article

http://en.wikipedia.org/wiki/Data,_Context_and_Interaction

has a number of references, and also leads to

"The DCI Architecture: A New Vision of Object-Oriented Programming"
by Trygve Reenskaug and James O. Coplien
http://www.artima.com/articles/dci_vision.html

and (indirectly) to these forum threads

"One object, many roles... identifier naming"
http://groups.google.com/group/object-composition/browse_thread/thread/fad1242c44a82d3c

"the Context object"
http://groups.google.com/group/object-composition/browse_thread/thread/28a36b1665d06024

[via http://groups.google.com/group/object-composition/]

Andy
...
Last edited on
Pages: 123... 5