"Marcus Baker" <marcus@lastcraft.com> wrote in message
news:41859885.8000103@lastcraft.com...[color=blue]
> Hi...
>
> Tony Marston wrote:[color=green]
>>
http://www.tonymarston.co.uk/php-mys...d-bad-oop.html[/color]
>
> The part I bothered reading was a bit shallow and I don't find that tone
> of article useful or worth bothering with. How about you just name a
> single name and save us going around in circles again.[/color]
Just step through items 1 to 17 to see people's arguments with my replies.
[color=blue]
> Your fuming about the shape example is frankly a bit silly.[/color]
No it is not. When I wanted to find out how to use OOP to build applications
to deal with common-or-garden business entities such as CUSTOMER, PRODUCT
and INVOICE I bought some books and searched the internet. What did I find?
Nothing except how to write classes dealing with shapes and producing
subclasses for 'square', 'circle' etc. There were no examples at all on how
to deal with non-graphical objects, so I had to start from a blank sheet of
paper.
[color=blue][color=green]
>> No, but they would have experience of other paradigms to draw upon.[/color]
>
> So now you have shifted the ground to people who only have one paradigm?
> Hm, a slippery customer indeed. Not the argument.[/color]
When somebody makes the statement that "OOP is better than Procedural" that
begs the question - are you talking from personal experience or merely
echoing what you have been told? I have programmed in non-OO languages for
over 20 years so I have a considerable anount of personal experience - both
good and bad - to draw upon.
[color=blue][color=green]
> >It is because of my
>> non-OO background that I can recognise where and when an OO approach may
>> bring benefits.[/color]
>
> Well apparently not if you are using a more limited procedural paradigm in
> the very field OO excels. Also since when is knowledge of non-OO
> sufficient to recognise anything at all.[/color]
Working with non-OO languages has given me the following experiences:
- How to gather user requirements.
- How to analyse user requirements and design a solution.
- How to design the application database required for that solution.
- How to write program specifications.
- How to lead a team of programmers to implement that solution.
- How to prepare test plans.
- How to write documentation.
- How to handle unit testing, system testing, and user acceptance testing.
- How to train users in the use of the application.
- How to tell when something does not work as it should.
Is there anything I have missed out?
[color=blue]
> You need non-OO and OO knowledge and a lot more besides, such as a good
> deal of case studies or experience in both.
>
> In fact most of this knowledge already exists, but we have a lot of
> developers who have been promoted to the level of project managers without
> training or homework in the field. Oh great, now I'm ranting...
>
> From your article and the thread you pointed at it seems that you were
> just about to learn the very OO skills I am talking about. If you had
> given it a little longer you would have got it. A shame.[/color]
I don't need to learn any skills from people like you. I have taught myself
and succeeded in producing something which:
(a) follows the principles of OOP.
(b) follows the KISS principle.
(c) works rather effectively.
(d) makes it easy to build new components.
(e) is easy to maintain.
[color=blue][color=green]
>> A high-speed car in the hands of someone who is competent is perfectly
>> safe, while one that is in the hands of someone who is one sandwich short
>> of a picnic is a distaster waiting to happen. As I keep saying, it is not
>> the tool but the way that you use it that counts.[/color]
>
> You seem to get confused easily. Once you learn to drive you get around
> faster. Once you learn the basic OO skills you can more accurately map
> business requirements to code. That's the point. You suffer the learning
> process to progress long term.[/color]
Unfortunately if you are taught badly you start off with an immediate
disadvantage. It is also rare for people to recognise that they have been
taught badly and seek guidance from someone who is actually competent.
[color=blue][color=green]
>> It describes the aplication of polymorphism perfectly. A code example in
>> UNIFACE would be totally meaningless to a non-UNIFACE programmer.[/color]
>
> Pretty pointless example then. How about a PHP one given you are in a PHP
> forum?[/color]
It is a valid example of how I achieved polymorphism in a non-OO language. I
cannot give an example in PHP for the simple reason that I achieved it using
OO techniques.
[color=blue]
> Or were you just trying to confuse the issue by choosing just about the
> most obscure example possible.[/color]
I was just pointing out how polymorphism can be achieved in a non-OO
language. At least one other contributor to this thread had the ability to
recognise that.
[color=blue][color=green][color=darkred]
>>>I don't, I use a language that has those features. I don't think you are
>>>listening.[/color]
>>[/color]
>[color=green]
> >Once a language has been chosen for a project
>> then it would be totally stupid to try to write code that does not fit in
>> with the way that language is designed to work.[/color]
>
> I thought you you weren't listening. If I have to bend the language, that
> langauge is inadequate. If I have to bend procedural into OO or
> functional, then that paradigm is inadequate. Now do you see the point?[/color]
You fail to see the point. The language was chosen by the client before the
project started, yet some of the project team tried to bend that language to
make it work like a different language. They failed.
[color=blue][color=green]
> >So trying to get a non-OO
>> language to work in an OO way is a disater waitng to happen.[/color]
>
> Which is not the point (yet again). If you are trying to bolt OO features
> onto an OO language then you should change language. If the legacy code is
> too expensive to replace then you have to live with the limitations of
> procedural. Hardly desirable.[/color]
It is PRECISELY the point. Once the language for the project has been chosen
you should use that language in the way it was designed to be used and not
try to force it to behave differently. The language was not object oriented,
therefore trying to force it to begave in an OO fashion was a disaster
waiting to happen. And it did.
[color=blue][color=green]
>> I am being realistic. It is you who are insisting that everything OO is
>> good (white) while everything that is not OO is bad (black). I am simply
>> pointing out shades of grey.[/color]
>
> Nope. You can solve problems with procedural if you except that you are
> working under limitations.[/color]
I agree that some things can be achieved better using OO, but I also know
that some things are best left as procedural.
[color=blue]
> If you have fast changing requirements the cost to the business of
> procedural developers will be much higher than simply spending on those
> developers with OO skills. You won't lose anything by doing tasks in OO
> instead of procedural fashion though, mostly you gain (at least in the
> field of e-commerce). Procedural is just a step in the learning process.
>
> BTW we don't emply people "one sandwich short of a picnic". Instead we
> hire people who already have appropriate skills for the task or we get
> people who are willing to learn. It would take a dysfunctional
> organisation to do otherwise. Resorting to silly examples is rather
> desperate.[/color]
Judging by the 17 criticisms contained in my article
http://www.tonymarston.co.uk/php-mys...d-bad-oop.html there are plenty of
people out there who are being taught a load of rubbish. If your programmers
cannot tell the difference between rubbish and righteous then you have a
problem but are unable (or unwilling) to see it.
[color=blue][color=green]
>> Unfortunately this steep learning curve is too much of an investment for
>> some companies. And who do you decide is an appropriate mentor? If you
>> get taught the wrong ideas by the wrong people then all that investment
>> in switching to OO will take a very, very long time to bear fruit.[/color]
>
> It bears fruit within a year, 3 months or less with pair programming and
> the like if the skills are already in house. It's quite remarkable that
> you manage to find the "wrong people" with such regularity. We have had no
> such problems.[/color]
That is probably because you do not think there is such a thing as "bad"
OOP, therefore you are willing to accept any old rubbish.
[color=blue]
> I haven't seen the problems you describe in any of the last six companies
> I have been involved with[/color]
Then you haven't lived. Either that or you don't have the ability to
recognise rubbish when you see it.
[color=blue]
>. More importantly I hardly hear about it at all. I think your situation is
>unfortunate and exceptional if it was so disastrous. Yes, I have see people
>go through a drunk on patterns stage, but it usually only lasts a few
>weeks.
>
> You are either exaggerating or the projects that have scarred you have had
> many more problems than merely being OO. From your link it seems you had a
> design imposed on the developers without buy in.[/color]
No. Only the language was fixed from the start. All the application
designers had to do was come up with something which could be implememnted
in that language. They failed disastrously for reasons already mentioned.
[color=blue]
> Either the skills were not there, the design was inappropriate or personal
> factors got in the way. I don't see an OO problem in there, I see a people
> problem.[/color]
Exactly. There was nothing wrong with the language, it was the people were
incompetent.
[color=blue][color=green]
>> The problem still exists that too many programmers out there think they
>> are OO experts when all they can really achieve is to over complicate the
>> issue and produce bloated and expensive software.[/color]
>
> As I say, the minority in my experience. If you hire a shop of all
> juniors, so there are no skills to go around, then you have a disaster
> waiting for happen. That is true of any paradigm or any other skill.
> That's true of programming in general. The only time you can get away with
> this is to have a trial project which is not mission critical and
> willingness by the team to learn from their mistakes. Management don't see
> it that way, so that such pilot projects are a rarity in practice.
> Whatever project your on, someone in that project should have experience
> of all the technical and domain skills needed.[/color]
At last there is something we agree on.
[color=blue][color=green]
>> But there are plenty of other people out there who have had similar
>> experiences. I am simply trying to balance the argument.
>>[/color]
>
> You are doing nothing of the sort, you are ranting.[/color]
I am not ranting, I am simply coming up with arguments which counter the
statements you are making. You seem to dislike the fact that I have the
audacity to challenge the statement that everything OO is perfect.
[color=blue]
> You could balance the argument by saying when OO is good and when OO is
> bad. You could compare it with other paradigms to show where they are more
> appropriate in certain situations (functional for language processing,
> logic programming for rules engines, etc, etc). You haven't.[/color]
If you want a comparison between OO and procedural then take a look at
http://www.geocities.com/tablizer/oopbad.htm
[color=blue]
> I am quite happy to argue the pros and cons of different systems of
> development. I know nothing of Uniface for instance and it would be nice
> to know how that works out in practice. I would also like to know more
> about your failed projects as case studies are always useful.[/color]
Then take a look at
http://www.marston-home.demon.co.uk/...disasters.html
[color=blue]
> This industry doesn't make the efforts it should to learn from each other.
>
> Unfortunately such one sided rants mean that I cannot trust any
> information you now actually put out. You tarnish your own reputation with
> polemics.[/color]
I am not ranting, I am simply disagreeing with you. I will keep disagreeing
with you until hell freezes over.
--
Tony Marston
http://www.tonymarston.net