Page 2 of 8
Posted: Wed Apr 05, 2006 10:35 pm
by dracflamloc
Code: Select all
If Me.Idiot() And You.Idiot()
Me.Marry(You)
You.ThrowPotAt(Me)
Me.Buy(WidescreenTV)
If Me.GetMarriageStatus()=Typical
You.Divorce(Me)
You.Marry(SomeSexyOtherDudeWithLotsOfMoneyFromPyramidScheme)
Endif
Me.Suicide()
Endif
Console.Print(Life.Dump())
End
Ah... the OOL... Object Oriented Lifestyle
Posted: Wed Apr 05, 2006 10:36 pm
by srod
Posted: Wed Apr 05, 2006 10:44 pm
by dracflamloc
Code: Select all
If IsIdiot(Me) And IsIdiot(You)
Marry(Me,You)
ThrowPot(You,Me)
Buy(Me,WidescreenTV)
If GetMarriageStatus(Me,You)=Typical
Divorce(Me,You)
Marry(SomeSexyOtherDudeWithLotsOfMoneyFromPyramidScheme,You)
Endif
Suicide(Me)
Endif
Print(Dump(Life))
End
Procedural Lifestyle
Posted: Wed Apr 05, 2006 10:49 pm
by dracflamloc
The way I view OOP vs Procedural:
They are like two languages. Sorta like French vs English. You have OOP which works in a form of:
Source - Action - Target
And then theres Procedural:
Action - Source - Target
In the end it really doesnt matter much, except that in the computer world theres less overhead to manage code in the Action, source, target method.
Posted: Wed Apr 05, 2006 11:09 pm
by Dare2
Posted: Wed Apr 05, 2006 11:30 pm
by dmoc
And of course "OOP" spelt backwards is...

Posted: Wed Apr 05, 2006 11:33 pm
by dracflamloc
OOPs! POO!
Posted: Thu Apr 06, 2006 11:35 pm
by jack
Posted: Thu Apr 06, 2006 11:58 pm
by Dare2
LOL.
+10
Posted: Sat Apr 08, 2006 1:16 am
by utopiomania
OOPs, or rather eew, have a look at this:
Stroustrup: Well, it's been long enough, now, and I believe most people have figured out for themselves that C++ is a waste of time but, I must say, it's taken them a lot longer than I thought it would..
Interviewer: So how exactly did you do it?
Stroustrup: It was only supposed to be a joke, I never thought people would take the book seriously. Anyone with half a brain can see that object-oriented programming is counter-intuitive, illogical and inefficient..
Interviewer: What?
Stroustrup: And as for 're-useable code' - when did you ever hear of a company re-using its code?
Check it out. Is this for real ??
http://www.nsbasic.com/desktop/info/interview.shtml
Priceless.....
http://public.research.att.com/~bs/ieee_interview.html
My 5 cents
Posted: Sat May 13, 2006 3:57 pm
by u9
USCode has posted an interesting link regarding OOP here... I thought I'd give my comments. I have many years experience using procedural, functional and object-oriented languages and I have a BSc in software engineering.
Let me start by saying that "OOP models the real world better" is a fact. Research has actually shown that children are much faster to learn programming using OOP techniques than procedural, precisely because it represents the real world better. It is much easier to abstract as software classes can coincide with real world objects. (Sorry I don't have a reference, as I don't remember what university did this research)
It is also a fact that OOP scales better. OOP is a virtually necessity for large projects, as both GedB and USCode also stated. But it needs good design and modeling. Just using objects doesn’t make sense without some form of design process with artifacts such as sequence-, system- and class-diagrams. That said, it is easy to see that OOP does create overhead on small single-person projects.
Still, for small projects, things such as
inheritance and
polymorphism are excellent concepts to use even for small programs. The idea is that data, and the functions that work on that data should stay together. The fact that pure basic doesn't support OOP is a great shame, however I think it is possible to add functions to structures in effect creating a class (though not with encapsulation... I haven't tried this though. I'm new to PureBasic)
Wikipedia also has some interesting critique, though it seems more objective then USCode’s link.
The reason for my reply here is that I think many of you will think "great, I don't have to learn OOP" when reading that post. I assure you, OOP is a VERY important skill if you want to work as a software engineer.
Re: My 5 cents
Posted: Sat May 13, 2006 4:32 pm
by Trond
u9 wrote:It is also a fact that OOP scales better. OOP is a virtually necessity for large projects, as both GedB and USCode also stated.
How funny it is that you're probably using Windows or Linux to write this. How object oriented is the Linux kernel? Is it not a large project? Does it not scale well?
u9 wrote:The idea is that data, and the functions that work on that data should stay together.
Which is also fundamental in procedural programming. Ever heard of units? That's how pascal does it. It's not object oriented. It has data hiding.
That said, it is easy to see that OOP does create overhead on small single-person projects.
...
Still, for small projects, things such as inheritance and polymorphism are excellent concepts to use even for small programs.
Yeah, it's excellent to indtroduce overhead, right? That being said, inheritance and polymorphism are not exclusive to object oriented programming, it's just another way of thinking of the same things. When I look at wikipedia it lists a few key points of object oriented programming and no point but the objects themselves are exclusive to object oriented programming.
Let me start by saying that "OOP models the real world better" is a fact.
It is a fact that inside my computer there is no "car" that can car.drive. There is a collection of numbers that looks like a car. I don't know if you call my computer unreal, but I think it's pretty heavy, and there's no car.drive inside it, only data, which is why procedural programming that manipulates data models the real world better. (Now I'm not saying whether that is a good thing or not.)
Re: My 5 cents
Posted: Sat May 13, 2006 4:32 pm
by Dare2
u9's sig wrote:The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents. (Nathaniel Borenstein)
I like it.
Posted: Tue May 16, 2006 9:00 pm
by SFSxOI
The .NET bloat...don't forget the .NET bloat!

Re: My 5 cents
Posted: Wed Jun 14, 2006 2:09 am
by u9
Trond wrote:...
It is a fact that inside my computer there is no "car" that can car.drive. There is a collection of numbers that looks like a car. I don't know if you call my computer unreal, but I think it's pretty heavy, and there's no car.drive inside it, only data, which is why procedural programming that manipulates data models the real world better. (Now I'm not saying whether that is a good thing or not.)
This is exactly what OOP is about.
abstraction ! Abstracting from the data inside your poor computer. I didn't say the real world was inside your computer. I said it models the real world, the real world of e.g. cars which, yes, can drive(). You don't think of your data as a bunch of semi-conductive material powered by electron flow do you? You don't think of your data as small latches set to one of two possible positions do you? You don't generally think of your data as a long row of ones and zeros do you? You abstract from this fact (i hope)
I just wrote here, because I thought that a beginner might read this thread and consider OOP obsolete or useless. I just want to say it is considered very important by many employers.