Page 1 of 1

What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Wed Dec 17, 2008 2:22 pm
by volomike
Linus Torvalds was commenting about C++, but it could just as well affect PHP and our reliance on these object model frameworks, or frameworks on top of frameworks.

http://lwn.net/Articles/249460/

I mean, he hasn't persuaded me to give up on the idea of my own framework on top of PHP, but it does give room to pause and think about what he is saying here and think about keeping things lean but yet effective and a time-saver as well, and not just now, but in the long run as well.

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Wed Dec 17, 2008 2:30 pm
by John Cartwright
Interesting rant. I especially like Linus' opening :)

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Wed Dec 17, 2008 3:00 pm
by Christopher
This is a recurring rant and one we have heard in PHP since the beginning. The essence of the argument is that there is the group who think you should never create a software system that makes it "easier to generate total and utter crap with it". And the closer you get to the processor, the more sense that argument makes.

On the other side are the group of web and scripting folks who have made it their life's work to create software systems that make it "easier to generate total and utter crap with it". One of the points of PHP is to allow people without the knowledge, wisdom or taste of Linus to have the ability to program web applications.

Linus has been very successful at maintaining control to create an incredibly useful operating system. PHP has been very successful at giving up control to allow the creation a bazillion incredibly useful web applications. It ends up that allowing crappy can be as useful in some areas and requiring excellence is in others.

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Thu Dec 18, 2008 12:49 am
by Cirdan
In response to Linus' comments: Programmers should use the best tools to solve the problem they are presented with. Using design patterns or whatever just because that's what OOP programmers do, is wrong.

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Thu Dec 18, 2008 1:24 am
by alex.barylski
It's not wrong it just inappropriate...in some instances such as system design...generl application design patterns do not really apply but they have their own catalogue of patterns.

Patterns are not magical...they are in our every day lives in everything we do. So using patterns in developing a system would be a good idea. Best practices or methodologies are little more subjective, but most I would imagine could be applied to every level of development.

Linus is clearly a C programmer with no interest in writing abstract code and as a systems developer he has every right to stay that way. System code has to be fast and that means staying away from abstractions which are typically more overhead then they are worth in the eyes of a system developer.

As long as those those who prefer abstraciton stay out of the realm of those who hate it and visa versa there should never be any problems.

I for one will gladly let someone else bang their head against the wall dealing with bits and bytes while I express ideas more and more like English every day. :)

I'll even appreciate low level developer efforts, cause tried it, been there, done that, and I hated it, very frustrating, too many details, felt like a machine, which was empowering at first and confusion followed immediately after. :P

Cheers,
Alex

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Thu Dec 18, 2008 8:14 am
by volomike
I think I'm coming around to patterns after all these years. It comes down to this:

1. You build objects to help organize your thoughts and keep the code clean, upgradable, "team-able", and intuitive to future developers.

2. Often you find yourself refactoring object models to better suit the problem.

3. All patterns do are help you have terms for what you're doing, so that you might better explain it to others, and to kind of see the general direction you are going and where a better pattern might help.

Now, do we need to get too academic about this? No we don't. It's kind of like that website I saw recently where they had a timer, and in that timeframe you have to determine whether you can pull something off with CSS and DIVs, or just say "the heck with it" and move on to doing it with tables. It's that same sort of thought process, just as long as it doesn't box you into a corner in the long run.

Unfortunately I think a lot of projects I've been on with teams get too academic about this. Or, they go 180 degrees in the other direction and refuse to use objects at all except that which are provided by the ORM, template engine, or the framework, which makes no sense to me either.

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Thu Dec 18, 2008 9:38 am
by VladSun
arborint wrote:... One of the points of PHP is to allow people without the knowledge, wisdom or taste of Linus to have the ability to program web applications...

... PHP has been very successful at giving up control to allow the creation a bazillion incredibly useful web applications...
I would rewrite the last sentence in the quotation above like this:
... PHP has been very successful at giving up control to allow the creation a bazillion incredibly crappy web applications and a few nice coded ones ...
I've had recently similar argue with a friend of mine about this :)

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Thu Dec 18, 2008 10:32 am
by Eran
There is no real relation between the usefulness of an application and how well designed its code base is.

Re: What Linux Torvalds Says on C++ Also Affects PHP Frameworks

Posted: Thu Dec 18, 2008 12:55 pm
by VladSun
pytrin wrote:There is no real relation between the usefulness of an application and how well designed its code base is.
In my rewrite I don't see any "use*" words, right? ;)
It's just another aspect of the PHP development.