Yorkshire Divers

Deep Blue Technical
Go Back   YD Scuba Diving Forums > Non-Diving Related Forums > Technology
User Name
Password

Welcome to the YD Scuba forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Technology: Discuss Question for any programmers out there in the Non-Diving Related Forums forums: Object oriented programming: do you find it reflects "natural thinking" or do you consider it to be artificial? ...

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 18-02-05, 11:21 AM
Phoenix's Avatar
Phoenix Phoenix is offline
Nefarious Activist
 

Join Date: Apr 2003
Location: Northamptonshire
Posts: 2,299
Phoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold water
Question Question for any programmers out there

Object oriented programming: do you find it reflects "natural thinking" or do you consider it to be artificial?

I'm not a programmer and I have to answer this question, it would be helpfull to have some qualified opinion.

Thanks

Ian
__________________
Oh Durr, it's all going wrong

"Vigilant, the moment a delusion appears,
Which endangers myself and others,
I shall confront and avert it
Without delay"
(Translation of part of Tibetan Buddhist chant)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 18-02-05, 11:31 AM
Conor's Avatar
Conor Conor is offline
Ginger, Irish, sometimes stroppy
 

Join Date: Jun 2003
Location: Royston (Herts)
Posts: 5,994
Conor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold water
I am not an Object Orientated Bod, but I find it artifical and in some cases limiting.
__________________
“Did I leave the gas on? No! No, I'm a f***in' squirrel!”

Mr E Izzard
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 18-02-05, 11:49 AM
cod3r's Avatar
cod3r cod3r is offline
New Member
 

Join Date: Dec 2004
Location: UK
Posts: 60
cod3r can find the seaside on a mapcod3r can find the seaside on a mapcod3r can find the seaside on a mapcod3r can find the seaside on a map
Quote:
Originally Posted by iani
Object oriented programming: do you find it reflects "natural thinking" or do you consider it to be artificial?
Iani, no computer programming technique I've seen so far comes close to "natural thinking". The former must be rigid at all times and the latter is totally abstract.

Object oriented is still imperative, which means one instruction follows another. The difference between OO and procedural is deep under the covers. It's explained well in Bertrand Meyer's "Object-Oriented Software Engineering", but without considerable experience you may find it hard going and/or simply will not understand it. I do not know of an easier way.


Quote:
Originally Posted by Conor
I am not an Object Orientated Bod, but I find it artifical and in some cases limiting.
How do you know it's "artificial" if you're not OO

Object oriented programming has a curve no doubt. In the beginning it will annoy you, because as it's imperative you will not be able to see its advantages. After a short while (1-2 yrs), well then you'll understand why OO is the way it is.


cod3r
__________________
not a new species of cod
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 18-02-05, 11:53 AM
NeilP's Avatar
NeilP NeilP is offline
Senior Member
 

Join Date: Sep 2004
Location: Falmouth, Cornwall
Posts: 1,439
NeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkeller
Quote:
Originally Posted by iani
Object oriented programming: do you find it reflects "natural thinking" or do you consider it to be artificial?

I'm not a programmer and I have to answer this question, it would be helpfull to have some qualified opinion.

Thanks

Ian
Good question!
OO is great! Well, maybe not, but it tends to make life simpler than procedural programming once you get used to it.
We're starting to use Java a fiar bit so I guess for now I am full on OO.

I suppose that I find it a 'neater' way to code.

Last edited by NeilP : 18-02-05 at 12:00 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 18-02-05, 12:05 PM
nigelH's Avatar
nigelH nigelH is offline
Duh...
 

Join Date: Aug 2004
Location: Brighton, Sussex. Near the Marina.
Posts: 4,507
nigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold waternigelH is a scuba diver - cold water
Quote:
Originally Posted by iani
Object oriented programming: do you find it reflects "natural thinking" or do you consider it to be artificial?
Natural thinking makes for bad programs.

Object Oriented stuff just tries to focus on the data structures and attach processes to manipulate them in close. It is one tool in the programmers toolbox but it can be just as easily done to death as any one-fits-all methodology. Its advantage is that you can treat the data-and-routines like a black box and not have to worry about what goes on inside. A well designed OOP lump can be reused from its description without ever 'going inside'. This can, if handled properly, save time = money.

The big problem with most OO programming is that things spend their CPU time moving numbers on and off stacks and nesting calls through layers and layers of redirection just to return a pointer.

If there are 15 of you working on a project OO make the design stage harder but the implementation easier and you probably won't notice it is slow. If I want to reuse predesigned or library stuff OO can save me time as all I am doing is stitching stuff together. However if you ask why does my 3GHz PC running XPpro run slower than the 100MHz machine I had a few years ago it is all that OO stuff burning the mill time.

I have two jobs on the desk at the moment. One involves multiple users running machine tools and tracking conforming/non-conforming materials and looks like OOP and SQL from here and the other is a test jig fixture that is going to be linear code assembler. Neither could use the other technique so I don't get much choice.

I've rambled about a bit... was that relevant?
__________________
.
nigelH
Helium - Because I'm worth it
.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 18-02-05, 12:08 PM
NeilP's Avatar
NeilP NeilP is offline
Senior Member
 

Join Date: Sep 2004
Location: Falmouth, Cornwall
Posts: 1,439
NeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkellerNeilP is a snorkeller
Quote:
Originally Posted by nigelH
It is one tool in the programmers toolbox but it can be just as easily done to death as any one-fits-all methodology. Its advantage is that you can treat the data-and-routines like a black box and not have to worry about what goes on inside.
That's why I find it makes life easier .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 18-02-05, 12:11 PM
Phoenix's Avatar
Phoenix Phoenix is offline
Nefarious Activist
 

Join Date: Apr 2003
Location: Northamptonshire
Posts: 2,299
Phoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold waterPhoenix swims in cold water
Thanks for the feedback guys, I need to start learning this stuff, currently scheduled to be doing a Java module next April but will try to start learning well before then.

Ian
__________________
Oh Durr, it's all going wrong

"Vigilant, the moment a delusion appears,
Which endangers myself and others,
I shall confront and avert it
Without delay"
(Translation of part of Tibetan Buddhist chant)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 18-02-05, 12:13 PM
cod3r's Avatar
cod3r cod3r is offline
New Member
 

Join Date: Dec 2004
Location: UK
Posts: 60
cod3r can find the seaside on a mapcod3r can find the seaside on a mapcod3r can find the seaside on a mapcod3r can find the seaside on a map
Nigel, some valid stuff in there, some inaccuracies as well, esp. the design and performance stuff. Won't go into it in a diving forum, but keep an open mind

Quote:
Originally Posted by nigelH
The big problem with most OO programming is that things spend their CPU time moving numbers on and off stacks and nesting calls through layers and layers of redirection just to return a pointer.

...

However if you ask why does my 3GHz PC running XPpro run slower than the 100MHz machine I had a few years ago it is all that OO stuff burning the mill time.
OO is not much slower than procedural. Method calls are just as efficient as procedural function/subroutine calls unless they're "virtual" methods. In fact the OO compiler will implement a method call as a procedural function call. Overall on average the performance limitation will be in the region of 1-5%, in most cases the code can be crafted to be just as efficient. I'm not talking about Java here of course

My current project is for BT. Last was France Telecom. Ran on Sun E10000, 64 processor servers. But then maybe because of OO?

cod3r
__________________
not a new species of cod
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 18-02-05, 12:28 PM
Conor's Avatar
Conor Conor is offline
Ginger, Irish, sometimes stroppy
 

Join Date: Jun 2003
Location: Royston (Herts)
Posts: 5,994
Conor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold waterConor swims in cold water
Quote:
Originally Posted by cod3r
How do you know it's "artificial" if you're not OO
How can someone Know that DIR is strict without being DIR?

I mean I am not a OO Believer, I don't go along with the idea that its an appropriate choice for every system. I think it has its place and if it is used appropriately can make modelling and delivery a shed load easier....If it is used in the right place.
__________________
“Did I leave the gas on? No! No, I'm a f***in' squirrel!”

Mr E Izzard
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 18-02-05, 12:34 PM
ahar's Avatar
ahar ahar is offline
Liberal Lefty
 

Join Date: Jan 2004
Location: Bushey, Herts
Posts: 1,694
ahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm waterahar swims in warm water
I find OO programming closer to natural thinking than proceedural, but not that much. If you've done some coding before then it'll be easier to learn Java than if you're new to it. If you haven't done any before, a good first step might be to try Visual Basic - it'll help with some basic programming concepts before tackling Java.

Nigel / Cod3r - are you talking about the difference between compiled and interpreted code ? As I remember there is not much difference between compiled proceedural and OO code, but there can be a huge difference between compiled proceedural programme (COBOL ?) and an interpreted OO programme (Java etc). You just need to look at Borland J Builder - the whole of that was written in Java and is interpreted - open it up and the thing grinds away for ages on the splash screen !
__________________
Andy

Proud member of the government's 'army' of consultants - your tax paying for my diving!

http://www.socialistworker.co.uk/ - go on, buy a copy and help a beardy sandal wearing liberal lefty
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Sponsored Links

Yorkshire Divers - RSS Feed
All times are GMT +1. The time now is 10:52 PM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0 RC6
Trademark and all rights reserved : © YD.com Ltd (2006)
YD.com Ltd (Registered in England - 05886696)
Other sites : Golf Clubs | New Premiership Football Kits | MP3 Portable Players | MP3 Players For Sale | Replica Football Kits

Forums Directory