Page 17 of 20

Posted: Sat Jun 17, 2006 4:53 am
by RobertGonzalez
Got my vote. You are the lead on this project and you pretty much get to set the tone for it.

In the event that this concept takes on plugins, would you object to a MySQL (or any other DB) iterator being developed for it at a later time?

Posted: Sat Jun 17, 2006 10:54 am
by Ambush Commander
Fine by me, but here's my reasoning: no one should be interfacing with the MySQL result set except the gateway class. The interface it provides precludes most other methods of storage. If we want to be "storage neutral", we can't use DB-oriented tools in the main code.

Posted: Sat Jun 17, 2006 11:17 am
by alex.barylski
bgzee wrote:
arborint wrote:
bgzee wrote:I prefer that the code used in my projects has all been written by myself. If you use someone elses code in your project and you have to debug it, there's a learning curve. You gotta study their code to understand how it works. Once in a while I will use someones code if I need a quick fix, but I will eventually implement it myself.
The inablity to use others code is the key quality of a certain class of programmer.
Well I guess Ill take that as a compliment, but I should clarify. If I were working with a group of programmers, that would be different since we would all understand the workings of the codebase and conform to it. It's when you introduce outside code that it bothers me.
I think he was leaning more towards you being an inefficient software developer...

It's a common known fact that code reuse speeds/improves up development times...so by saying you don't re-use *others* or even external sources makes you sound either:
1) Stubborn
2) Inexperienced

Neither are good qualities in a software developer...

Getting that out in the open, I would like to add:

Code reuse in PHP is difficult as it is already a highly abstracted language...and the more abstract we become, the more difficult it becomes to write high reusable code...we instead are almost required to further abstract the language or technology...

The point is...much of yester-years code reuse doesn't apply to todays high level languages...as most of the brick and mortar is done for us, either natively by the language or technology or by a framework...

All that's left for developers to do is wiring, carpeting, etc...which is usually specific to a given house, so reuse isn't likely.

So, by this logic...I both agree and disagree with you...to flat out say code reuse is bad and buggy...that's just naive or ignorant of you

However, it's increasingly more difficult to use re-useable code in PHP projects because there is not much re-usable code (that is truely reusable) that exists...

Cheers :)

Posted: Sat Jun 17, 2006 1:18 pm
by Christopher
Hockey wrote:Code reuse in PHP is difficult as it is already a highly abstracted language...and the more abstract we become, the more difficult it becomes to write high reusable code...we instead are almost required to further abstract the language or technology...
Actually, PHP is not really that much of a "highly abstracted language". The basic syntax and library would be pretty familiar to a C programmer 40 years ago. The OO constructs, while improving, are below the abstraction level of modern OO languages. I would argue that it is the lack of creating abstraction or understanding current standard abstractions that cause the rampant NIH attitude in PHP.
Hockey wrote:The point is...much of yester-years code reuse doesn't apply to todays high level languages...as most of the brick and mortar is done for us, either natively by the language or technology or by a framework...
Again, I think the language is much the same as yesteryear and the NIH crowd are probably not using a framework.
Hockey wrote:All that's left for developers to do is wiring, carpeting, etc...which is usually specific to a given house, so reuse isn't likely.
Would you want a carpenter who half way through building your house says, "hey I found a cool new way to frame roofs!" or an electician who "discovered" a better way to wire junction boxes?? What you you think about all the previously done wiring and framing? And about the new stuff as well? There are Best Practices whether you know they exist or not.
Hockey wrote:However, it's increasingly more difficult to use re-useable code in PHP projects because there is not much re-usable code (that is truely reusable) that exists...
There is tons of re-usable code and the amount is growing.

The problem with "Stubborn and Inexperienced" is the lack of understanding that Best Practices exist and the lack of acknowledgment that software development is fairly counter intuitive. Thinking that you could build a house without knowing the building code, reading/learning about construction best practices, and first working with an experienced mentor is folly at best.

Posted: Sat Jun 17, 2006 1:31 pm
by Ambush Commander
At risk of going off topic...

It's more of a general problem in programming in general. It's a very immature discipline, only having been around for a little more than a decade. The house analogy that everyone is so fond of has a very important distinction: we've been making houses since the beginning of time (or, at least, the beginning of recorded history). In this manner, besides all the technical aspects such as the fact that building a house requires substantial investment while a program not-so, architecture is a far more mature discipline than programming is.

Posted: Sat Jun 17, 2006 1:36 pm
by santosj
True, I took a look at the phpBB 3 alpha user code and it was quite complex. I suppose they bundled the security in with the user information. However, from what I could read, it didn't make much use in any other project. It would also make it somewhat impossible to use a project like this in with it. They could be working on it some more.

Sometimes you have to rewrite the library or code because it is outdated or uses another Model. If the code uses a factory model and you are looking for a MVC or singleton, then most would rewrite the code completely. Some have suggested creating wrappers for the code, but I believe it introduces another layer for bugs and speed degradation. Also, if you are looking for using classes and the framework is great but uses functions, then yeah, it wouldn't be hard to refactor it into classes. Most would choose to rewrite it.

Posted: Sat Jun 17, 2006 1:56 pm
by Christopher
Ambush Commander wrote:It's more of a general problem in programming in general. It's a very immature discipline, only having been around for a little more than a decade.
:!: :?: :!: :?:

Posted: Sat Jun 17, 2006 1:57 pm
by Ambush Commander
Haha.... redundancy. "It's more of a problem of programming in general."

Posted: Sat Jun 17, 2006 2:58 pm
by Christopher
Ambush Commander wrote:It's a very immature discipline, only having been around for a little more than a decade.
:!: :?: :!: :?:

Posted: Sat Jun 17, 2006 2:59 pm
by Ambush Commander
Erm... okay... how long has programming been around?

Posted: Sat Jun 17, 2006 4:09 pm
by Christopher
Well Fortran is over 50 years old. C and super OO Smalltalk are over 35. Which would mean that most of the best practices that PHP programers are either ignorant of or to stubborn to acknowledge have been around since before they were born. And many of the practices were build upon those from engineering and mathematics which are far older.

FYI - I should note that Simpson ties came into widespread use in the 70s and 80s and caused, arguably, more changes in best practices for building houses than have been seen in software development in the same time.

Posted: Sat Jun 17, 2006 4:25 pm
by Ambush Commander
Hmm... another soul enlightened. Thanks for the info.

...Although... what's a simpson tie (I keep on getting "The Simpsons" references when I google it.)?

Posted: Sun Jun 18, 2006 12:43 pm
by alex.barylski
arborint wrote:Well Fortran is over 50 years old. C and super OO Smalltalk are over 35. Which would mean that most of the best practices that PHP programers are either ignorant of or to stubborn to acknowledge have been around since before they were born. And many of the practices were build upon those from engineering and mathematics which are far older.

FYI - I should note that Simpson ties came into widespread use in the 70s and 80s and caused, arguably, more changes in best practices for building houses than have been seen in software development in the same time.
Fare enough, but first off, there is a difference between academia and *real* developers...

Many of today's best practices have not exactly been popular culture for the last 50 years...

C++ the first commercially successful/viable/widespread OOP language was introduced in 1983...so OOP wouldn't become pop culture until somewhere in the mid 80's and/or early 90's...
Which would mean that most of the best practices that PHP programers are either ignorant of or to stubborn to acknowledge have been around since before they were born
What best practices are you refering too??

OOP?

Code reuse? Until the proliferation of the Internet and especially open source movement, code reuse was fairly minimal, with the exception of in-house libraries...or those who could afford costly libraries from third party vendors...

Design patterns??? I know I don't have to tell you when they gained popularity...but they certainly haven't been in common use for 50 years...

So in defense of AC...especially in the context of PHP...

This industry is indeed in it's infancy...

If you look at the computer programming timeline it's clear we've made the most progress both in abstraction and complexity in the last 15-20 years not the first 50 ;)

Posted: Sun Jun 18, 2006 1:30 pm
by alex.barylski
Actually, PHP is not really that much of a "highly abstracted language
Let's see...

1) It has GC facilities
2) Loosely typed, variable variables, etc
3) Supports OOP
4) No need to compile or build
5) Uses HTML as a native GUI
6) Dynamic code execution

Perhaps this is all relative, but compared to C++ that's pretty abstract...

I am sure in some adademic circles...some guy/girl has invented a new fantabulous language which more resembles English than source code...which truely abstracts the language...but...

That's where theoretical proponents and pragmatist's collide...

I won't bother going into this right now...
Again, I think the language is much the same as yesteryear and the NIH crowd are probably not using a framework.
According to my list above...not so much...except maybe in syntax, there is little similarities...

PHP takes care of alot of the junk for you...maybe you should spend a couple years programming web pages in C/C++ or assembler so you can fully appreciate all the work that PHP actually does for you ;)
Would you want a carpenter who half way through building your house says, "hey I found a cool new way to frame roofs!" or an electician who "discovered" a better way to wire junction boxes?? What you you think about all the previously done wiring and framing? And about the new stuff as well? There are Best Practices whether you know they exist or not.
So whats your point? I am aware there are best practices...or at least what someone assumingly more experienced than me thinks is best practice...

Code reuse being one of them...I agree...but my point is...PHP will naturally have *less* reusable code when compared to C/C++ and especially low level like assembler...

PHP is abstract...it becomes more difficult to write reusable code in high level languages because of the very nature of it all. One must think more abstract, which is what most developers don't do very well as we are quite pragmatic and logical...

This "thinking outside the box" is an art...
There is tons of re-usable code and the amount is growing.
Fare enough, but again...only because PHP is in it's infancy...as most languages like C++ have tons of encryption classes, etc...

When I said it's more difficult in PHP to write reusable code I meant from scratch...new reusable code...not port existing classes from a successor to PHP.
Thinking that you could build a house without knowing the building code, reading/learning about construction best practices, and first working with an experienced mentor is folly at best.
My point was, the more abstract we become the more difficult it becomes to write/invent re-usable code, as all the obvious are likely done already...

As languages evolve they inherit yesteryear's libraries/techniques which proved useful and generic and become part of a framework or possibly the language/technology itself...

Cheers :)

Posted: Sun Jun 18, 2006 8:50 pm
by Christopher
If I had time to respond to all of that ... I would ... but I don't ... so I'll leave it at -- we disagree. ;)