Re: [PHP] Object Oriented PHP (5)

2005-07-01 Thread Brad Pauly
On 6/30/05, Richard Lynch [EMAIL PROTECTED] wrote:

snip great post

I was going to comment on a few of these points, but found I mostly
wanted to add ++ after each one. I do want to echo the comments about
fun projects and working with other developers.

You can really learn a lot by playing  around. Try out that crazy idea
you have. Even if someone (or many people) have said that it won't
work, try it anyway. Seeing for yourself, or maybe finding that it
does work, will help you understand why.

I recently did some work with another developer and we had different
opinions on how a core piece of the application should be implemented.
It was a good  exercise in understanding where my opinions came from.

- Brad

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Object Oriented PHP (5)

2005-07-01 Thread Jason Barnett

Richard Lynch wrote:
...


Ooooh.  At the risk of being branded a heretic, try to pick up another
language or two.  Start with something a whole lot like PHP.  Maybe Perl,
or even C.

You'll have to shove all your PHP knowledge over to one side of your
brain, cram all the new stuff into the other half of your brain, and then
compare/contrast.

Then, for real fun, try to learn something totally whacked-out different
like Lisp, Scheme, Forth, Logo, or even (blech) COBOL.  This will require
even more compartmentalization in your brain-space, and some serious deep
thinking on what makes a program tick.  Only after you really get it in
a totally different programming paradigm do you achieve that deep
comprehension of Programming with a capital P.



Hmmm how does declensional based programming sound?

Remember back when our ParrotHeadPoster was alive and squawking and 
ready to flap his wings right out into the news server?  Well doing some 
searching for text classifiers led me to this really funky, weird, 
unusual... twisted... programming tool.  The program is called crm114.


It's not ugly like Perl; it's a whole different *kind* of ugly.

I still am not an expert with this program (hell, the development is 
finally getting to where it can use autoconf), but it fits in really 
well as a new / active tool that does everything different.  And I mean 
almost everything.


Everything is a regex.

The default regex engine is called TRE (which supports approximate matches).

The language is declensional instead of parameterized.  For the most 
part the order that you use for your arguments just don't matter.


Variables look like :*:yourvariable:

Releases don't follow the typical naming convention; instead, people get 
blamed for releases.  crm114-20050628.BlameCochrane is the new release 
that just came out and it is the CRM114 Galactica Buzzphrase Compliant 
Version.  It makes use of the new hyperspatial classification... just 
read the manual on it, ok?!?!


At least one similarity to PHP though: it makes use of a JIT compiler.

In short, it's a useful and interesting utility.  Not just because it 
can sort your spam / nonspam email with greater than 99% accuracy... but 
because you can adapt it to other tasks by writing your own crm filters. 
 This is no simple task (I'm still learning how to use it!), but this 
is mostly because the way of doing things is just different.  The whole 
thing is like a computer science project gone mad, but at the same time 
it's actually very useful for something.


For those that are interested, grab the new version released today:

http://crm114.sourceforge.net/



H.  That came out kinda stronger than I meant it...  I mean, sure, the
guy who learns C, and knows only C, and codes C all day is a Programmer,
and I'm not knocking that.  But there's this sort of hole in a guy like
that, and while it doesn't hurt them or make them less a Programmer,
it's there, and it's just not the same as a guy who actually groks
something as bass-ackwards (that's a compliment) as Lisp as well as they
do C.

Well, that got long and philosophical, didn't it?



Indeed.  But those are some of my favorite posts to read.  :)

--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Object Oriented PHP (5)

2005-06-30 Thread Richard Lynch
On Fri, June 24, 2005 12:56 pm, Josh Olson said:
 PHP has inspired me to become a better programmer.  I have been
 actively reading books as well as online content to try to become
 better at designing and programming object oriented web applications.
 My primary focus is PHP.

 Will you help a pragmatic programmer in training out by suggesting
 some worthwhile resources?

 I have read the following already:
 PHP 5 Power Programming
 Advanced PHP Programming
 Pragmatic Programming
 Gang of Four Design Patterns
 php.net/oop
 zend.com php 5 resources
 most of ibm object design articles
 http://www.solarphp.com/home/
 and many many many shitty online tutorials and source repositories

I didn't read any of those books.

Only PHP books I've really read all the way through were the ones I
Tech-Edited.  I don't think I'd really feel right recommending those,
solely because I worked on them, but they are pretty good books.
PHP Bible series and MySQL/PHP Database Applications.

I mostly learned Programming from going to college.

Well, okay, really mostly from trying out all kinds of stuff sort of
loosely based (or not) on what the boring homework assignments didn't
cover. :-)

I take it back.  I *have* read many many many shitty online tutorials and
source repositories.  So you got that going for ya :-)

Honestly, the best reference *I* know of is:
http://php.net/manual
The User Contributed notes are priceless.
Well, some of them anyway.
You have to find the pearls in the muck.

And, of course, this list, which has provided invaluable support for YEARS
from people way way way smarter than me.

One other piece of advice:

Write lots and lots of code.

Lots of it.

I was just reading an interview with Jakob Dylan, whom you may or may not
like, but he said something intereesting, which I'll paraphrase.

I really wasted a lot of years not writing songs, because I knew I
couldn't write them as good as I wanted.  I knew I had much better songs
in me, maybe even great songs, but I couldn't get myself to write them,
because I didn't know how.

Eventually I realized.  You have to write 10, 100, a thousand bad songs
before you've learned enough to write good ones.

That's just how it works.

If you sit around not writing songs, because they'll be bad, you won't get
anywhere.

So, stop reading so many books and start typing! :-)

Some other suggestions to consider:
Take some cheap programming courses at a local community college.  Even if
you whiz through them, you'll have a piece of paper that helps get a job,
and you'll be surprised how much you learn (or re-learn) from a structured
course that books and on-line digging won't push you through.

Re-write some old code of your own.  Amazingly instructive, and often
leads you to new heights. Plus your old stuff suddenly has a lower
maintenance cost, for some odd reason... :-)

Publish some articles or code snippets on your site. The act of trying to
explain what you did to somebody else will open up worlds of
understanding. You never really understand something until after you've
taught it to somebody else. :-)

Re-read the whole front part of http://php.net/manual/ -- Just up to the
function definitions part.  That section of the manual that defines the
actual language (quotes, commas, and braces) is SEVERELY under-studied by
virtually every PHP programmer, even the ones who have been around forever
and a day.

Try to work on a project with another developer.  You may tear your hair
out.  You may want to kill them.  You may learn a whole hell of a lot. 
Maybe what you learn is that a whole lot of developers just don't think
like you do.  That's okay too.  At least, it's okay for me. :-) [shrug]

Work on a cool new project just for fun, with no time-line, and no
intention of every finishing, much less releasing it, nor showing it to
anybody.  Just write that cool program you've always wanted to write. 
Hell, I do this with a dozen projects at once, all the time.  Don't pay
the bills.  Don't get the house cleaned up either.  But I'm happy.  What's
that worth?

Sure, some of these won't ever get finished. Hell, some of them I've just
plain lost interest in over the years.  So?  I've put in a lot of happy
hours instead of drudgery.  Wanna put a price on that?

One of them turned into the code that's still in production use 10 years
later. [shrug] I'm not all that interested in it, but some other guy uses
it all the time, and maintains it. Hell, I'd forgotten all about it,
pretty much.  Certainly had no idea this guy was still using/maintaining
it.

Ooooh.  At the risk of being branded a heretic, try to pick up another
language or two.  Start with something a whole lot like PHP.  Maybe Perl,
or even C.

You'll have to shove all your PHP knowledge over to one side of your
brain, cram all the new stuff into the other half of your brain, and then
compare/contrast.

Then, for real fun, try to learn something totally whacked-out different
like Lisp, Scheme, Forth, Logo, or even 

Re: [PHP] Object Oriented PHP (5)

2005-06-30 Thread Matthew Weier O'Phinney
* Richard Lynch [EMAIL PROTECTED] :
 On Fri, June 24, 2005 12:56 pm, Josh Olson said:
  PHP has inspired me to become a better programmer.  I have been
  actively reading books as well as online content to try to become
  better at designing and programming object oriented web applications.
  My primary focus is PHP.
 
  Will you help a pragmatic programmer in training out by suggesting
  some worthwhile resources?
 
  I have read the following already:

snip

 I didn't read any of those books.

snip

 One other piece of advice:

 Write lots and lots of code.

 Lots of it.

Amen. Only after approaching similar problems several times will you
find a more general, elegant solution that could solve all of them. It's
the repetition of the problem, and the differing approaches that inform
your ability to program towards it. The only way to get there is doing
lots of coding.

 Re-write some old code of your own.  Amazingly instructive, and often
 leads you to new heights. Plus your old stuff suddenly has a lower
 maintenance cost, for some odd reason... :-)

I do this all the time. It's invaluable. Sometimes you find some little
gems -- and most of the time you discover how much you've learnt since
then, and you refactor it and make it better.

 Publish some articles or code snippets on your site. The act of trying to
 explain what you did to somebody else will open up worlds of
 understanding. You never really understand something until after you've
 taught it to somebody else. :-)

I keep a blog, mostly about my PHP development. I do this in part for
myself. If I act as if I'm explaining it for someone else, I often get
to the meat of an issue or problem -- a place I might not have visited
had I not spent that extra time trying to understand it enough to
explain it. My blog has a public face, but it's really for myself.

snip

 Try to work on a project with another developer.  You may tear your hair
 out.  You may want to kill them.  You may learn a whole hell of a lot. 
 Maybe what you learn is that a whole lot of developers just don't think
 like you do.  That's okay too.  At least, it's okay for me. :-) [shrug]

I work with another developer, and we're constantly refactoring
each other's code. But the brilliant part of it is that we then learn
from each other as well. Do some code review for another developer
some time. As Richard notes, writing lots of code will improve your
coding ability; so will *reading* lots of code.

snip

 Ooooh.  At the risk of being branded a heretic, try to pick up another
 language or two.  Start with something a whole lot like PHP.  Maybe Perl,
 or even C.

I wouldn't understand PHP half as well as I do if I didn't know perl
already. I still use perl regularly; sometimes it's suited for the task.
But that's another reason to learn other languages -- to determine when
PHP is the right tool for the job, and when another language is.

 Well, that got long and philosophical, didn't it?

Yes, but well worth th read. Thanks, Richard!

-- 
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Object Oriented PHP (5)

2005-06-27 Thread Esteamedpw
Sams, PHP and MySQL Web Development (2005 edition)
PHP Anthology
 
both good books...


[PHP] Object Oriented PHP (5)

2005-06-24 Thread Josh Olson
PHP has inspired me to become a better programmer.  I have been
actively reading books as well as online content to try to become
better at designing and programming object oriented web applications.
My primary focus is PHP.

Will you help a pragmatic programmer in training out by suggesting
some worthwhile resources?

I have read the following already:
PHP 5 Power Programming
Advanced PHP Programming
Pragmatic Programming
Gang of Four Design Patterns
php.net/oop
zend.com php 5 resources
most of ibm object design articles
http://www.solarphp.com/home/
and many many many shitty online tutorials and source repositories

 ...and some of my OO code is still in production use 10  years after it was 
 written.
Inspiring.

Please don't Lynch me

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Object Oriented PHP (5)

2005-06-24 Thread Chris W. Parker
Josh Olson mailto:[EMAIL PROTECTED]
on Friday, June 24, 2005 12:57 PM said:

 ...and some of my OO code is still in production use 10  years after
 it was written. Inspiring. 
 
 Please don't Lynch me

Oh snap! Now you're just asking for it. :P


Chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php