|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Mon Feb 25 2008 - 16:23:26 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 25 Feb 2008 22:23:26 -0000 Issue 5314
Topics (messages 270029 through 270128):
Re: PHP 24 hour processes?
270029 by: Bojan Tesanovic
270033 by: Richard Heyes
270053 by: Jim Lucas
270054 by: Daniel Brown
270062 by: Nathan Rixham
270066 by: Nathan Rixham
Re: Copying specific fields from table to table
270030 by: Bojan Tesanovic
270031 by: Robin Vickery
insert text with no specific format into database table
270032 by: jeffry s
270055 by: Daniel Brown
270074 by: Shawn McKenzie
270076 by: Shawn McKenzie
Re: temprorary error
270034 by: Robert Cummings
270036 by: tedd
270037 by: Robert Cummings
270038 by: Wolf
270041 by: Wolf
270043 by: Nathan Rixham
270045 by: Robert Cummings
270050 by: Jochem Maas
270052 by: Daniel Brown
270056 by: Jason Pruim
270057 by: Robert Cummings
270058 by: Nathan Rixham
270059 by: Andrés Robinet
270115 by: tedd
270118 by: Wolf
Re: When to use design patterns?
270035 by: tedd
270039 by: Matty Sarro
270042 by: Eric Butera
270044 by: Nathan Nobbe
270047 by: Matty Sarro
270048 by: Robert Cummings
270049 by: Nathan Nobbe
270051 by: Jim Lucas
270073 by: Eric Butera
270075 by: Nathan Nobbe
270093 by: Jay Blanchard
270119 by: tedd
270122 by: tedd
270123 by: Jason Pruim
270124 by: Michael McGlothlin
270125 by: Matty Sarro
270126 by: Greg Donald
270127 by: Stut
270128 by: Robert Cummings
Re: temporary error
270040 by: Andrés Robinet
Re: Cross-Post: Installing on Palm Treo?
270046 by: Daniel Brown
Re: URL modification
270060 by: Daniel Brown
270063 by: Andrés Robinet
270065 by: Nathan Rixham
270098 by: Richard Heyes
Re: Plant Extracts and Our Factory
270061 by: Daniel Brown
270068 by: Matty Sarro
270071 by: Thiago Pojda
270077 by: Jason Pruim
270082 by: Robert Cummings
270094 by: Daniel Brown
Re: mysql test and error
270064 by: Daniel Brown
Set PHP session expire to 2 months
270067 by: Manuel Barros Reyes
270070 by: Thiago Pojda
270072 by: Daniel Brown
Re: PHPTriad and php error
270069 by: Daniel Brown
Re: Shopping Carts
270078 by: Daniel Brown
Re: Session destruction problem
270079 by: Daniel Brown
Storing user ID in a cookie security precautions
270080 by: Steve Finkelstein
270083 by: Daniel Brown
270084 by: Robert Cummings
270085 by: Nathan Nobbe
Re: System errno in PHP
270081 by: Daniel Brown
Re: Question about PHP Licence and it's future!
270086 by: Andrés Robinet
270087 by: Daniel Brown
270095 by: Daniel Brown
270096 by: Daniel Brown
270097 by: Robert Cummings
270100 by: Andrés Robinet
270101 by: Jason Pruim
270105 by: Daniel Brown
270106 by: Daniel Brown
270107 by: Jason Pruim
270120 by: Daniel Brown
Re: Ignoring user cancel
270088 by: Daniel Brown
Password protected ZIP file
270089 by: Petrus Bastos
Re: More than one values returned?
270090 by: Daniel Brown
Re: Flash menu
270091 by: Daniel Brown
Re: All Survey leading to PHP
270092 by: Daniel Brown
checking for and enforcing https
270099 by: Rick Pasotto
270102 by: Per Jessen
270103 by: Shawn McKenzie
270104 by: Wolf
270108 by: Daniel Brown
270109 by: Stephen Johnson
270110 by: Wolf
270111 by: Wolf
270113 by: Stut
270114 by: Stephen Johnson
270116 by: Dan Joseph
Re: AMP installer
270112 by: Ryan A
Mysql vs. Mysqli crash handling
270117 by: Larry Garfield
270121 by: Daniel Brown
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Windows also have something similar to cron
Schedule accessory can also be set to execute some php every xxx
minutes/days etc
For linux it is much easier ,
create file eg cron.txt that has this content
#===============================
* 1 * * * /home/user/cleanUpDB.php
#===============================
save it and than enter in console
crontab cron.txt
this will install cron job that will execute /home/user/
cleanUpDB.php script
every day at 1AM .
One note on executing PHP scripts by cron ,you may want to include
path of PHP binary as it may not be in
PATH so
* 1 * * * /library/php5/bin/php /home/user/cleanUpDB.php
where /library/php5/bin/php is absolute path to yours PHP binary file
On Feb 25, 2008, at 7:46 AM, Paul Scott wrote:
>
> On Mon, 2008-02-25 at 07:39 +0100, Zoran Bogdanov wrote:
>> How can you perform a timed event in PHP; for example:
>>
>> Count 24 hours and then delete all rows in a database...
>>
>
> I thought that this question was answered in some detail before...
>
> Anyway, on *NIX based systems use cron.daily or on 'doze, use AT or
> command scheduler I think it's called.
>
> Either that or use a long running PHP process with ignore_user_abort()
> and a time of 86400 seconds :)
>
> --Paul
>
> All Email originating from UWC is covered by disclaimer
> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Kosovo je Srbija.
Bojan Tesanovic
http://www.classicio.com/
http://www.carster.us/
attached mail follows:
> create file eg cron.txt
Or if your version of crontab supports it (not all do) then you can use:
crontab -e
And to get the manual page, you can do this:
man 5 crontab
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
attached mail follows:
Bojan Tesanovic wrote:
> Windows also have something similar to cron
> Schedule accessory can also be set to execute some php every xxx
> minutes/days etc
>
> For linux it is much easier ,
> create file eg cron.txt that has this content
> #===============================
> * 1 * * * /home/user/cleanUpDB.php
> #===============================
>
> save it and than enter in console
>
> crontab cron.txt
>
> this will install cron job that will execute /home/user/cleanUpDB.php
> script
> every day at 1AM .
>
> One note on executing PHP scripts by cron ,you may want to include path
> of PHP binary as it may not be in
> PATH so
> * 1 * * * /library/php5/bin/php /home/user/cleanUpDB.php
>
> where /library/php5/bin/php is absolute path to yours PHP binary file
>
>
>
>
> On Feb 25, 2008, at 7:46 AM, Paul Scott wrote:
>
>>
>> On Mon, 2008-02-25 at 07:39 +0100, Zoran Bogdanov wrote:
>>> How can you perform a timed event in PHP; for example:
>>>
>>> Count 24 hours and then delete all rows in a database...
>>>
>>
>> I thought that this question was answered in some detail before...
>>
>> Anyway, on *NIX based systems use cron.daily or on 'doze, use AT or
>> command scheduler I think it's called.
>>
>> Either that or use a long running PHP process with ignore_user_abort()
>> and a time of 86400 seconds :)
>>
>> --Paul
>>
>> All Email originating from UWC is covered by disclaimer
>> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>
> Kosovo je Srbija.
>
> Bojan Tesanovic
> http://www.classicio.com/
> http://www.carster.us/
>
>
>
>
Be sure that if you install and run this script as root, that you set it so your
script is only writable by root. You don't want someone inserting malicious
code into your script and then just blindly running that code. :)
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
On Mon, Feb 25, 2008 at 1:39 AM, Zoran Bogdanov <test1.test1
hi.t-com.hr> wrote:
> Hi,
>
> How can you perform a timed event in PHP; for example:
>
> Count 24 hours and then delete all rows in a database...
Once again, I say verily unto you: RTFM and STFW.
Linux/*nix: cron
Windows: at
Cron Example:
40 03 * * * `which php` /path/to/php/script.php
PHP:
<?
include('configure.php'); // With database connection stuff, et cetera.
$sql = "TRUNCATE TABLE `table_name`";
mysql_query($sql);
?>
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Daniel Brown wrote:
> On Mon, Feb 25, 2008 at 1:39 AM, Zoran Bogdanov <test1.test1
hi.t-com.hr> wrote:
>> Hi,
>>
>> How can you perform a timed event in PHP; for example:
>>
>> Count 24 hours and then delete all rows in a database...
>
> Once again, I say verily unto you: RTFM and STFW.
>
> Linux/*nix: cron
> Windows: at
>
> Cron Example:
> 40 03 * * * `which php` /path/to/php/script.php
>
> PHP:
> <?
> include('configure.php'); // With database connection stuff, et cetera.
> $sql = "TRUNCATE TABLE `table_name`";
> mysql_query($sql);
> ?>
>
of negate php all together and use cron to schedule:
mysql -h hostname -u username -ppassword -e "TRUNCATE TABLE `table_name`"
attached mail follows:
Nathan Rixham wrote:
> Daniel Brown wrote:
>> On Mon, Feb 25, 2008 at 1:39 AM, Zoran Bogdanov
>> <test1.test1
hi.t-com.hr> wrote:
>>> Hi,
>>>
>>> How can you perform a timed event in PHP; for example:
>>>
>>> Count 24 hours and then delete all rows in a database...
>>
>> Once again, I say verily unto you: RTFM and STFW.
>>
>> Linux/*nix: cron
>> Windows: at
>>
>> Cron Example:
>> 40 03 * * * `which php` /path/to/php/script.php
>>
>> PHP:
>> <?
>> include('configure.php'); // With database connection stuff, et cetera.
>> $sql = "TRUNCATE TABLE `table_name`";
>> mysql_query($sql);
>> ?>
>>
>
> of negate php all together and use cron to schedule:
>
> mysql -h hostname -u username -ppassword -e "TRUNCATE TABLE `table_name`"
clean forgot, if your on mysql 5.1.6> then you can use the "create
event" syntax
http://dev.mysql.com/tech-resources/articles/event-feature.html
no need for cron or php and platform independant :)
attached mail follows:
On Feb 25, 2008, at 5:37 AM, Rob Gould wrote:
> I've got 2 tables. One table which contains a series of barcodes
> assigned to product id #'s, and another table with JUST product id
> #'s.
>
> I need to somehow transfer all the barcodes from the first table
> into the second table, but only where the id #'s match.
>
> Can anyone tell me if this is something that can be done with just
> a SQL statement, or do I need to write a PHP script to loop through
> the records of both tables and do the copying/mapping?
>
>
>
Insert into T2 (bcode) select T1.bcode where T2.id = T1.id;
Bojan Tesanovic
http://www.classicio.com/
http://www.carster.us/
attached mail follows:
On 25/02/2008, Rob Gould <gouldimg
mac.com> wrote:
> I've got 2 tables. One table which contains a series of barcodes assigned to product id #'s, and another table with JUST product id #'s.
>
> I need to somehow transfer all the barcodes from the first table into the second table, but only where the id #'s match.
MySQL?
This will update every row in table 2 to have the barcode from table 1.
UPDATE table2 INNER JOIN table1 USING (id) SET table2.barcode = table1.barcode;
attached mail follows:
i have text file and a table created with
create table word(
id int not null auto_increment primary key,
word varchar(50),
definition text
)
the text contain list of words but not really in specific format
word, some text definition
word, some text definition, some text definition, etc
i want to read the file line by line,
take the first word before comma (,) and insert into the word column in the
database
whatever after follow the first comma(,) will be inserted into the
definition column in the word table database.
i am not sure how to read the file line by line in php.
and how to separate the line of text into two. divided by the 1st comma (,)
..
my idea is using the explode(',' $text) function. but this one will separate
everything between a comma(,) into an array.
i wan't to know if there is another better way to do it..
any idea?
thank you!
attached mail follows:
On Mon, Feb 25, 2008 at 8:35 AM, jeffry s <paragasu
gmail.com> wrote:
> i have text file and a table created with
>
> create table word(
> id int not null auto_increment primary key,
> word varchar(50),
> definition text
> )
Look into the PHP function fgetcsv().
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
jeffry s wrote:
> i have text file and a table created with
>
> create table word(
> id int not null auto_increment primary key,
> word varchar(50),
> definition text
> )
>
> the text contain list of words but not really in specific format
>
> word, some text definition
> word, some text definition, some text definition, etc
>
>
> i want to read the file line by line,
> take the first word before comma (,) and insert into the word column in the
> database
> whatever after follow the first comma(,) will be inserted into the
> definition column in the word table database.
>
> i am not sure how to read the file line by line in php.
> and how to separate the line of text into two. divided by the 1st comma (,)
> ..
> my idea is using the explode(',' $text) function. but this one will separate
> everything between a comma(,) into an array.
> i wan't to know if there is another better way to do it..
>
>
> any idea?
> thank you!
>
Read about the file() function and also read about the explode()
function's limit parameter.
-Shawn
if(($lines = file("file.txt"))) {
foreach($lines as $line) {
list($word, $definition) = explode($line, ',', 1);
//insert word and definition SQL stuff here
}
}
attached mail follows:
Shawn McKenzie wrote:
> jeffry s wrote:
>> i have text file and a table created with
>>
>> create table word(
>> id int not null auto_increment primary key,
>> word varchar(50),
>> definition text
>> )
>>
>> the text contain list of words but not really in specific format
>>
>> word, some text definition
>> word, some text definition, some text definition, etc
>>
>>
>> i want to read the file line by line,
>> take the first word before comma (,) and insert into the word column in the
>> database
>> whatever after follow the first comma(,) will be inserted into the
>> definition column in the word table database.
>>
>> i am not sure how to read the file line by line in php.
>> and how to separate the line of text into two. divided by the 1st comma (,)
>> ..
>> my idea is using the explode(',' $text) function. but this one will separate
>> everything between a comma(,) into an array.
>> i wan't to know if there is another better way to do it..
>>
>>
>> any idea?
>> thank you!
>>
>
> Read about the file() function and also read about the explode()
> function's limit parameter.
>
> -Shawn
>
>
> if(($lines = file("file.txt"))) {
> foreach($lines as $line) {
> list($word, $definition) = explode($line, ',', 1);
> //insert word and definition SQL stuff here
> }
> }
Maybe I should read up on the limit parameter also :-0
list($word, $definition) = explode($line, ',', 2);
attached mail follows:
On Mon, 2008-02-25 at 00:56 +0000, Nathan Rixham wrote:
> Robert Cummings wrote:
> > On Sun, 2008-02-24 at 15:55 -0500, tedd wrote:
> >> At 7:38 PM +0100 2/24/08, Zoltán Németh wrote:
> >>> 2008. 02. 24, vasárnap keltezéssel 09.59-kor Mary Anderson ezt írta:
> >>>> Hey guys,
> >>>> Isn't this thread a bit OT?
> >>> well, for a php list sure it is... but not the first one, and it seems
> >>> to me that many members of the list are interested in it...
> >>>
> >>>> Anyway, as areligious person I have to say that I really do not
> >>>> like to hear religions trashed and smeared the way you are doing. And
> >>>> just for the record, we Quakers do not believe God tells us to kill
> >>>> people and we have no priests.
> >>> actually I think there was no trashing and smearing here, only some
> >>> decent talking about religion and some humor (the 'rewrite the bible'
> >>> site)
> >>
> >> I'm sure you'll get an argument over the "no trashing and smearing here" claim.
> >>
> >> But, in your defense, you probably don't realize
> >> the disrespect shown, or that's perceived by
> >> others, regarding beliefs.
> >>
> >> It's a touchy subject and usually not one to
> >> discuss with a wide range of different beliefs,
> >> some of which hold other's beliefs in low esteem
> >> -- as does the 'rewrite the bible' site.
> >> Incidentally, which started the religious portion
> >> of this thread.
> >>
> >> I think we've about beat this to death
> >
> > Sooooooooo.... let's resurrect it!! *ducks and runs away cackling*
> >
> > Cheers,
> > Rob.
>
> you know looking through the list - I'm struggling to find a thread that
> rob's participated in and *not* had the last say on..
>
> [can you resist?]
No I can't resist. It would be tantamount to agreeing with you. Since I
disagree with you I feel compelled to answer your direct reference to
me. There are plenty of threads in which I've participated but for which
I am not the last say. Obviously you aren't capable of searching
properly or you have developed a bias against me for whatever reason.
*shrug*.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
At 8:49 AM -0500 2/25/08, Robert Cummings wrote:
>On Mon, 2008-02-25 at 00:56 +0000, Nathan Rixham wrote:
>
> > [can you resist?]
>
>No I can't resist. It would be tantamount to agreeing with you. Since I
>disagree with you I feel compelled to answer your direct reference to
>me. There are plenty of threads in which I've participated but for which
>I am not the last say. Obviously you aren't capable of searching
>properly or you have developed a bias against me for whatever reason.
>*shrug*.
A bias doesn't have to be a "bad" thing. I have a bias in that I read
everything you write -- your opinion has value.
And I understand the "last word" thing for I experience I myself. But
age has diminished that tendency and now I pick my windmills more
carefully.
Cheers,
tedd
ps: I can't believe how long this thread has lasted without anyone
mentioning that the subject line is misspelled.
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Mon, 2008-02-25 at 09:28 -0500, tedd wrote:
> At 8:49 AM -0500 2/25/08, Robert Cummings wrote:
> >On Mon, 2008-02-25 at 00:56 +0000, Nathan Rixham wrote:
> >
> > > [can you resist?]
> >
> >No I can't resist. It would be tantamount to agreeing with you. Since I
> >disagree with you I feel compelled to answer your direct reference to
> >me. There are plenty of threads in which I've participated but for which
> >I am not the last say. Obviously you aren't capable of searching
> >properly or you have developed a bias against me for whatever reason.
> >*shrug*.
>
> A bias doesn't have to be a "bad" thing. I have a bias in that I read
> everything you write -- your opinion has value.
>
> And I understand the "last word" thing for I experience I myself. But
> age has diminished that tendency and now I pick my windmills more
> carefully.
In retrospect, I think Nathan was kidding around but forgot to add an
emoticon :) Sometimes I feel compelled to add a comment, sometimes I
feel compelled to get the hell out of a thread. The former just happens
more often ;)
> ps: I can't believe how long this thread has lasted without anyone
> mentioning that the subject line is misspelled.
I notice it everytime a post arrives, but usually the content is
juicier :)
Cheers,
Rob.
Ps. Someone follow this up, I don't want to be the last post :B
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
---- Robert Cummings <robert
interjinn.com> wrote:
>
> On Mon, 2008-02-25 at 00:56 +0000, Nathan Rixham wrote:
> > Robert Cummings wrote:
> > > On Sun, 2008-02-24 at 15:55 -0500, tedd wrote:
> > >> At 7:38 PM +0100 2/24/08, Zoltán Németh wrote:
> > >>> 2008. 02. 24, vasárnap keltezéssel 09.59-kor Mary Anderson ezt írta:
> > >>>> Hey guys,
> > >>>> Isn't this thread a bit OT?
> > >>> well, for a php list sure it is... but not the first one, and it seems
> > >>> to me that many members of the list are interested in it...
> > >>>
> > >>>> Anyway, as areligious person I have to say that I really do not
> > >>>> like to hear religions trashed and smeared the way you are doing. And
> > >>>> just for the record, we Quakers do not believe God tells us to kill
> > >>>> people and we have no priests.
> > >>> actually I think there was no trashing and smearing here, only some
> > >>> decent talking about religion and some humor (the 'rewrite the bible'
> > >>> site)
> > >>
> > >> I'm sure you'll get an argument over the "no trashing and smearing here" claim.
> > >>
> > >> But, in your defense, you probably don't realize
> > >> the disrespect shown, or that's perceived by
> > >> others, regarding beliefs.
> > >>
> > >> It's a touchy subject and usually not one to
> > >> discuss with a wide range of different beliefs,
> > >> some of which hold other's beliefs in low esteem
> > >> -- as does the 'rewrite the bible' site.
> > >> Incidentally, which started the religious portion
> > >> of this thread.
> > >>
> > >> I think we've about beat this to death
> > >
> > > Sooooooooo.... let's resurrect it!! *ducks and runs away cackling*
> > >
> > > Cheers,
> > > Rob.
> >
> > you know looking through the list - I'm struggling to find a thread that
> > rob's participated in and *not* had the last say on..
> >
> > [can you resist?]
>
> No I can't resist. It would be tantamount to agreeing with you. Since I
> disagree with you I feel compelled to answer your direct reference to
> me. There are plenty of threads in which I've participated but for which
> I am not the last say. Obviously you aren't capable of searching
> properly or you have developed a bias against me for whatever reason.
> *shrug*.
>
> Cheers,
> Rob.
> --
I vote he has a bias for your writing and notices threads dieing after your comments... What that says about him and/or your comments on threads is.. ;)
I couldn't resist either.
Wolf
attached mail follows:
---- Robert Cummings <robert
interjinn.com> wrote:
>
> On Mon, 2008-02-25 at 09:28 -0500, tedd wrote:
> > At 8:49 AM -0500 2/25/08, Robert Cummings wrote:
> > >On Mon, 2008-02-25 at 00:56 +0000, Nathan Rixham wrote:
> > >
> > > > [can you resist?]
> > >
> > >No I can't resist. It would be tantamount to agreeing with you. Since I
> > >disagree with you I feel compelled to answer your direct reference to
> > >me. There are plenty of threads in which I've participated but for which
> > >I am not the last say. Obviously you aren't capable of searching
> > >properly or you have developed a bias against me for whatever reason.
> > >*shrug*.
> >
> > A bias doesn't have to be a "bad" thing. I have a bias in that I read
> > everything you write -- your opinion has value.
> >
> > And I understand the "last word" thing for I experience I myself. But
> > age has diminished that tendency and now I pick my windmills more
> > carefully.
>
> In retrospect, I think Nathan was kidding around but forgot to add an
> emoticon :) Sometimes I feel compelled to add a comment, sometimes I
> feel compelled to get the hell out of a thread. The former just happens
> more often ;)
>
> > ps: I can't believe how long this thread has lasted without anyone
> > mentioning that the subject line is misspelled.
>
> I notice it everytime a post arrives, but usually the content is
> juicier :)
>
> Cheers,
> Rob.
>
> Ps. Someone follow this up, I don't want to be the last post :B
>
Yes, definitely noticed, but then someone might bicker that we were being insensitive to those who couldn't figure out how to use their spell checker before posting to a list, or how we were heathens unable to associate humor (or humour for you Brits) about our lives and religion (or lack there-of)...
You'd think some people were part of the "ME" generation... But as Dr. Phil would say... "It's not about you"... ;)
attached mail follows:
Robert Cummings wrote:
> On Mon, 2008-02-25 at 09:28 -0500, tedd wrote:
>> At 8:49 AM -0500 2/25/08, Robert Cummings wrote:
>>> On Mon, 2008-02-25 at 00:56 +0000, Nathan Rixham wrote:
>>>
>>> > [can you resist?]
>>>
>>> No I can't resist. It would be tantamount to agreeing with you. Since I
>>> disagree with you I feel compelled to answer your direct reference to
>>> me. There are plenty of threads in which I've participated but for which
>>> I am not the last say. Obviously you aren't capable of searching
>>> properly or you have developed a bias against me for whatever reason.
>>> *shrug*.
>> A bias doesn't have to be a "bad" thing. I have a bias in that I read
>> everything you write -- your opinion has value.
>>
>> And I understand the "last word" thing for I experience I myself. But
>> age has diminished that tendency and now I pick my windmills more
>> carefully.
>
> In retrospect, I think Nathan was kidding around but forgot to add an
> emoticon :) Sometimes I feel compelled to add a comment, sometimes I
> feel compelled to get the hell out of a thread. The former just happens
> more often ;)
>
>> ps: I can't believe how long this thread has lasted without anyone
>> mentioning that the subject line is misspelled.
>
> I notice it everytime a post arrives, but usually the content is
> juicier :)
>
> Cheers,
> Rob.
>
> Ps. Someone follow this up, I don't want to be the last post :B
>
Jesus you even posted twice more!
;)
attached mail follows:
On Mon, 2008-02-25 at 14:50 +0000, Nathan Rixham wrote:
> Robert Cummings wrote:
> > On Mon, 2008-02-25 at 09:28 -0500, tedd wrote:
> >> At 8:49 AM -0500 2/25/08, Robert Cummings wrote:
> >>> On Mon, 2008-02-25 at 00:56 +0000, Nathan Rixham wrote:
> >>>
> >>> > [can you resist?]
> >>>
> >>> No I can't resist. It would be tantamount to agreeing with you. Since I
> >>> disagree with you I feel compelled to answer your direct reference to
> >>> me. There are plenty of threads in which I've participated but for which
> >>> I am not the last say. Obviously you aren't capable of searching
> >>> properly or you have developed a bias against me for whatever reason.
> >>> *shrug*.
> >> A bias doesn't have to be a "bad" thing. I have a bias in that I read
> >> everything you write -- your opinion has value.
> >>
> >> And I understand the "last word" thing for I experience I myself. But
> >> age has diminished that tendency and now I pick my windmills more
> >> carefully.
> >
> > In retrospect, I think Nathan was kidding around but forgot to add an
> > emoticon :) Sometimes I feel compelled to add a comment, sometimes I
> > feel compelled to get the hell out of a thread. The former just happens
> > more often ;)
> >
> >> ps: I can't believe how long this thread has lasted without anyone
> >> mentioning that the subject line is misspelled.
> >
> > I notice it everytime a post arrives, but usually the content is
> > juicier :)
> >
> > Cheers,
> > Rob.
> >
> > Ps. Someone follow this up, I don't want to be the last post :B
> >
>
> Jesus you even posted twice more!
I'm not Jesus... I can barely tread water let alone walk on it :)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ;)
:D
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
Robert Cummings schreef:
> On Mon, 2008-02-25 at 14:50 +0000, Nathan Rixham wrote:
....
>>>
>>>> ps: I can't believe how long this thread has lasted without anyone
>>>> mentioning that the subject line is misspelled.
>>> I notice it everytime a post arrives, but usually the content is
>>> juicier :)
>>>
>>> Cheers,
>>> Rob.
>>>
>>> Ps. Someone follow this up, I don't want to be the last post :B
>>>
the subject line is misspelt.
attached mail follows:
I didn't think Quakers could use computers. Or electricity.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Feb 25, 2008, at 11:18 AM, Daniel Brown wrote:
> I didn't think Quakers could use computers. Or electricity.
>
That's Amish... Maybe Quakers too... I don't know...
> --
> </Dan>
>
> Daniel P. Brown
> Senior Unix Geek
> <? while(1) { $me = $mind--; sleep(86400); } ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim
raoset.com
attached mail follows:
On Mon, 2008-02-25 at 11:18 -0500, Daniel Brown wrote:
> I didn't think Quakers could use computers. Or electricity.
You're confusing them with Amish.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
Robert Cummings wrote:
> On Mon, 2008-02-25 at 11:18 -0500, Daniel Brown wrote:
>> I didn't think Quakers could use computers. Or electricity.
>
> You're confusing them with Amish.
>
> Cheers,
> Rob.
and coldfusion developers
[ps: rob your lucky i keep saving your ass from the dreaded last post]
attached mail follows:
> -----Original Message-----
> From: Nathan Rixham [mailto:nrixham
gmail.com]
> Sent: Monday, February 25, 2008 11:32 AM
> To: php-general
lists.php.net
> Subject: Re: [PHP] RE: temprorary error
>
> Robert Cummings wrote:
> > On Mon, 2008-02-25 at 11:18 -0500, Daniel Brown wrote:
> >> I didn't think Quakers could use computers. Or electricity.
> >
> > You're confusing them with Amish.
> >
> > Cheers,
> > Rob.
>
> and coldfusion developers
And windows users (lol)
>
> [ps: rob your lucky i keep saving your ass from the dreaded last post]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
At 11:18 AM -0500 2/25/08, Daniel Brown wrote:
> I didn't think Quakers could use computers. Or electricity.
>
>--
></Dan>
No, that's the Amish.
Quakers are the one's who make cereal.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
---- tedd <tedd.sperling
gmail.com> wrote:
> At 11:18 AM -0500 2/25/08, Daniel Brown wrote:
> > I didn't think Quakers could use computers. Or electricity.
> >
> >--
> ></Dan>
>
>
> No, that's the Amish.
>
> Quakers are the one's who make cereal.
>
Except for Joseph who run the underground power cable through the field one day and has the computer which hides in the hidden chamber behind the roll-top desk that is activated via a hidden release/tumbler system.
There are definitely days when the power being missing are fun though... ;)
attached mail follows:
At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
>Design patterns are just that: A formalization of various common patterns that
>come up over and over in programming. Ever get the feeling "wow, I know I've
>written something kinda like this at least three times now?" That means it's
>probably a design pattern of some kind.
>
>Studying design patterns helps you recognize a give problem as being similar
>to another, so the solution is probably similar. It also can alert you to
>common pitfalls and common ways around them.
I've read at least a couple of books on the subject and for something
that's designed to make programming easier, I find it difficult to
implement.
I'm more like -- "I've written something like this before -- I'm
going to find my code and alter it" -- type of guy.
I'm sure it's my failing, but I program trees and not forest. From my
perspective, you plant enough trees, the forest will take care of
itself. Besides, every forest I've designed ends up a lot different
than when I started. So I focus on trees -- it's simpler for me.
I think it's good to develop a methodology so that you can reuse past
code, but the "design patterns' I've read about seem too abstract for
me.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
Actually thats exactly what design patterns were created for. You come up
with a basic structure and then modify it as needed for other projects. I
mean, the objects/structures/whatever may change, but the patterns of logic
you use will often be the same or only require minor adjustments. Its a
whole lot better than trying to re-implement things again :)
On Mon, Feb 25, 2008 at 9:20 AM, tedd <tedd.sperling
gmail.com> wrote:
> At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
> >Design patterns are just that: A formalization of various common patterns
> that
> >come up over and over in programming. Ever get the feeling "wow, I know
> I've
> >written something kinda like this at least three times now?" That means
> it's
> >probably a design pattern of some kind.
> >
> >Studying design patterns helps you recognize a give problem as being
> similar
> >to another, so the solution is probably similar. It also can alert you
> to
> >common pitfalls and common ways around them.
>
> I've read at least a couple of books on the subject and for something
> that's designed to make programming easier, I find it difficult to
> implement.
>
> I'm more like -- "I've written something like this before -- I'm
> going to find my code and alter it" -- type of guy.
>
> I'm sure it's my failing, but I program trees and not forest. From my
> perspective, you plant enough trees, the forest will take care of
> itself. Besides, every forest I've designed ends up a lot different
> than when I started. So I focus on trees -- it's simpler for me.
>
> I think it's good to develop a methodology so that you can reuse past
> code, but the "design patterns' I've read about seem too abstract for
> me.
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
On Mon, Feb 25, 2008 at 9:20 AM, tedd <tedd.sperling
gmail.com> wrote:
> At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
> >Design patterns are just that: A formalization of various common patterns that
> >come up over and over in programming. Ever get the feeling "wow, I know I've
> >written something kinda like this at least three times now?" That means it's
> >probably a design pattern of some kind.
> >
> >Studying design patterns helps you recognize a give problem as being similar
> >to another, so the solution is probably similar. It also can alert you to
> >common pitfalls and common ways around them.
>
> I've read at least a couple of books on the subject and for something
> that's designed to make programming easier, I find it difficult to
> implement.
>
> I'm more like -- "I've written something like this before -- I'm
> going to find my code and alter it" -- type of guy.
>
> I'm sure it's my failing, but I program trees and not forest. From my
> perspective, you plant enough trees, the forest will take care of
> itself. Besides, every forest I've designed ends up a lot different
> than when I started. So I focus on trees -- it's simpler for me.
>
> I think it's good to develop a methodology so that you can reuse past
> code, but the "design patterns' I've read about seem too abstract for
> me.
>
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
> --
>
>
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
To each their own I guess. Just out of curiosity, are you primarily
writing entire web applications or one off scripts?
I used to say "you don't need all that" but over time I just can't say
it much anymore. It seems easy to just dive in and throw something
out the door, but then new features need to be added. One of my
favorite programming books, Design Patterns Explained, says "Change
happens! Deal with it." Using patterns helped me do just that with
minimal crying because the underlying architecture could be easily
modified.
Also maybe look at Head First Design Patterns if you are interested in
ever understanding them. Most of the books I've read say something
along the lines of it should be obvious when to use these patterns
when you read their book. This might be true for some/most people but
I couldn't get my head wrapped around them till I read Head First.
Seeing their examples with the fun writing just made things click for
me.
After reading that not only could I use them, but I started spotting
them in peoples code. Another benefit of knowing patterns is having a
common language for explaining solutions to problems between
developers. Saying I'm using the decorator pattern makes much more
sense then saying I'm wrapping this thing with another thing that
makes it do something else so I can swap out behaviors because they
work together, etc.
...but that is just the world I like to live in. :)
attached mail follows:
On Mon, Feb 25, 2008 at 9:20 AM, tedd <tedd.sperling
gmail.com> wrote:
> At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
> >Design patterns are just that: A formalization of various common patterns
> that
> >come up over and over in programming. Ever get the feeling "wow, I know
> I've
> >written something kinda like this at least three times now?" That means
> it's
> >probably a design pattern of some kind.
> >
> >Studying design patterns helps you recognize a give problem as being
> similar
> >to another, so the solution is probably similar. It also can alert you
> to
> >common pitfalls and common ways around them.
>
> I've read at least a couple of books on the subject and for something
> that's designed to make programming easier, I find it difficult to
> implement.
>
> I'm more like -- "I've written something like this before -- I'm
> going to find my code and alter it" -- type of guy.
>
> I'm sure it's my failing, but I program trees and not forest. From my
> perspective, you plant enough trees, the forest will take care of
> itself. Besides, every forest I've designed ends up a lot different
> than when I started. So I focus on trees -- it's simpler for me.
>
> I think it's good to develop a methodology so that you can reuse past
> code, but the "design patterns' I've read about seem too abstract for
> me.
some of the design patterns are a bit hard to grasp; and even harder to
determine when one might be appropriate to use. i think a common
misconception about people who advocate design patterns is that said
people attempt to use them arbitrarily. while this is undoubtedly true for
some people, design patterns are like anything else; mastery comes
through practice, and practice can be prone to errors.
that said, design patterns are mainly for adding layers of indirection, to
increase flexibility for an exchange of complexity and often times runtime
performance.
and also, there are patterns that are so trivial im sure weve all used them;
even tedd ;) for example, adapter, yes this is the famous, put a square peg
in a round hole pattern, but in reality its very simple,
/// NOTE: contrived example for demonstration only
function origFunction($p1, $p2, $p3) {}
function newFunction($p1, $p2) {
// pass the same thing for $p3 always for the new 'api'
return origFunction($p1, $p2, true);
}
another thing you will encounter studying patterns is subtle differences.
the non-patterns guys will call newFunction above, a 'wrapper'; and while
it is indeed that, 'wrapper' is a generic term. patterns have several types
of wrappers, adapter, decorator, proxy (and more im sure), which all have
different intents. Which brings us to one of the most important aspects of
patterns, a common vocabulary. this is an incredible tool that fosters
communication and enhanced efficiency.
take it or leave it; i think patterns are worth while.
-nathan
attached mail follows:
I agree, that head first book is fantabulous. Very well written and easy to
read for a techie book. It makes the usage of design patterns incredibly
easy to understand. But like all things simply understanding the theory
doesn't always equal being able to practice it... that only comes with using
them.
On Mon, Feb 25, 2008 at 9:51 AM, Eric Butera <eric.butera
gmail.com> wrote:
> On Mon, Feb 25, 2008 at 9:20 AM, tedd <tedd.sperling
gmail.com> wrote:
> > At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
> > >Design patterns are just that: A formalization of various common
> patterns that
> > >come up over and over in programming. Ever get the feeling "wow, I
> know I've
> > >written something kinda like this at least three times now?" That
> means it's
> > >probably a design pattern of some kind.
> > >
> > >Studying design patterns helps you recognize a give problem as being
> similar
> > >to another, so the solution is probably similar. It also can alert
> you to
> > >common pitfalls and common ways around them.
> >
> > I've read at least a couple of books on the subject and for something
> > that's designed to make programming easier, I find it difficult to
> > implement.
> >
> > I'm more like -- "I've written something like this before -- I'm
> > going to find my code and alter it" -- type of guy.
> >
> > I'm sure it's my failing, but I program trees and not forest. From my
> > perspective, you plant enough trees, the forest will take care of
> > itself. Besides, every forest I've designed ends up a lot different
> > than when I started. So I focus on trees -- it's simpler for me.
> >
> > I think it's good to develop a methodology so that you can reuse past
> > code, but the "design patterns' I've read about seem too abstract for
> > me.
> >
> >
> > Cheers,
> >
> > tedd
> > --
> > -------
> > http://sperling.com http://ancientstones.com http://earthstones.com
> >
> > --
> >
> >
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> To each their own I guess. Just out of curiosity, are you primarily
> writing entire web applications or one off scripts?
>
> I used to say "you don't need all that" but over time I just can't say
> it much anymore. It seems easy to just dive in and throw something
> out the door, but then new features need to be added. One of my
> favorite programming books, Design Patterns Explained, says "Change
> happens! Deal with it." Using patterns helped me do just that with
> minimal crying because the underlying architecture could be easily
> modified.
>
> Also maybe look at Head First Design Patterns if you are interested in
> ever understanding them. Most of the books I've read say something
> along the lines of it should be obvious when to use these patterns
> when you read their book. This might be true for some/most people but
> I couldn't get my head wrapped around them till I read Head First.
> Seeing their examples with the fun writing just made things click for
> me.
>
> After reading that not only could I use them, but I started spotting
> them in peoples code. Another benefit of knowing patterns is having a
> common language for explaining solutions to problems between
> developers. Saying I'm using the decorator pattern makes much more
> sense then saying I'm wrapping this thing with another thing that
> makes it do something else so I can swap out behaviors because they
> work together, etc.
>
> ...but that is just the world I like to live in. :)
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
My favourite patterns are the following:
factory
singleton
adaptor
These also happen to be the most common I come across.
Cheers,
Rob.
On Mon, 2008-02-25 at 10:31 -0500, Matty Sarro wrote:
> I agree, that head first book is fantabulous. Very well written and easy to
> read for a techie book. It makes the usage of design patterns incredibly
> easy to understand. But like all things simply understanding the theory
> doesn't always equal being able to practice it... that only comes with using
> them.
>
> On Mon, Feb 25, 2008 at 9:51 AM, Eric Butera <eric.butera
gmail.com> wrote:
>
> > On Mon, Feb 25, 2008 at 9:20 AM, tedd <tedd.sperling
gmail.com> wrote:
> > > At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
> > > >Design patterns are just that: A formalization of various common
> > patterns that
> > > >come up over and over in programming. Ever get the feeling "wow, I
> > know I've
> > > >written something kinda like this at least three times now?" That
> > means it's
> > > >probably a design pattern of some kind.
> > > >
> > > >Studying design patterns helps you recognize a give problem as being
> > similar
> > > >to another, so the solution is probably similar. It also can alert
> > you to
> > > >common pitfalls and common ways around them.
> > >
> > > I've read at least a couple of books on the subject and for something
> > > that's designed to make programming easier, I find it difficult to
> > > implement.
> > >
> > > I'm more like -- "I've written something like this before -- I'm
> > > going to find my code and alter it" -- type of guy.
> > >
> > > I'm sure it's my failing, but I program trees and not forest. From my
> > > perspective, you plant enough trees, the forest will take care of
> > > itself. Besides, every forest I've designed ends up a lot different
> > > than when I started. So I focus on trees -- it's simpler for me.
> > >
> > > I think it's good to develop a methodology so that you can reuse past
> > > code, but the "design patterns' I've read about seem too abstract for
> > > me.
> > >
> > >
> > > Cheers,
> > >
> > > tedd
> > > --
> > > -------
> > > http://sperling.com http://ancientstones.com http://earthstones.com
> > >
> > > --
> > >
> > >
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> > To each their own I guess. Just out of curiosity, are you primarily
> > writing entire web applications or one off scripts?
> >
> > I used to say "you don't need all that" but over time I just can't say
> > it much anymore. It seems easy to just dive in and throw something
> > out the door, but then new features need to be added. One of my
> > favorite programming books, Design Patterns Explained, says "Change
> > happens! Deal with it." Using patterns helped me do just that with
> > minimal crying because the underlying architecture could be easily
> > modified.
> >
> > Also maybe look at Head First Design Patterns if you are interested in
> > ever understanding them. Most of the books I've read say something
> > along the lines of it should be obvious when to use these patterns
> > when you read their book. This might be true for some/most people but
> > I couldn't get my head wrapped around them till I read Head First.
> > Seeing their examples with the fun writing just made things click for
> > me.
> >
> > After reading that not only could I use them, but I started spotting
> > them in peoples code. Another benefit of knowing patterns is having a
> > common language for explaining solutions to problems between
> > developers. Saying I'm using the decorator pattern makes much more
> > sense then saying I'm wrapping this thing with another thing that
> > makes it do something else so I can swap out behaviors because they
> > work together, etc.
> >
> > ...but that is just the world I like to live in. :)
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
attached mail follows:
On Mon, Feb 25, 2008 at 10:38 AM, Robert Cummings <robert
interjinn.com>
wrote:
> My favourite patterns are the following:
>
> factory
> singleton
> adaptor
i dont know about any favorites at this time but as far as common,
id say
strategy
adapter
template method (often used in conjunction w/ factory)
singleton too (watch out for eric; hes a registry guy ;)) (and this is the
top
3 from my exp list so had to stuff singleton by the wayside :))
the heads first book is key ;)
and also, you might check out phppatterns.com; though it hasnt been
updated in a while id consider it somewhat of a classic source on patterns
w/ php as the example language.
-nathan
attached mail follows:
tedd wrote:
> At 8:50 PM -0600 2/24/08, Larry Garfield wrote:
>> Design patterns are just that: A formalization of various common
>> patterns that
>> come up over and over in programming. Ever get the feeling "wow, I
>> know I've
>> written something kinda like this at least three times now?" That
>> means it's
>> probably a design pattern of some kind.
>>
>> Studying design patterns helps you recognize a give problem as being
>> similar
>> to another, so the solution is probably similar. It also can alert
>> you to
>> common pitfalls and common ways around them.
>
> I've read at least a couple of books on the subject and for something
> that's designed to make programming easier, I find it difficult to
> implement.
>
> I'm more like -- "I've written something like this before -- I'm going
> to find my code and alter it" -- type of guy.
>
> I'm sure it's my failing, but I program trees and not forest. From my
> perspective, you plant enough trees, the forest will take care of
> itself. Besides, every forest I've designed ends up a lot different than
> when I started. So I focus on trees -- it's simpler for me.
Not to say that what you are doing is wrong, but we had a guy here in our office
that was/is a cut/paste master. If he had a routine that he found that (almost)
worked. He would then use that same chunk of code everywhere.
But, if that same bit of code got almost the right answer, he would write a
"fix" that would "get it right" this time. Then the next time he used the
re-written code, he would have to write another "fix". This went on for two years.
When they brought me in to take over managing his code, I re-wrote the entire
lib in one weekend. I have not had to touch the base code since then, and it is
"right" every time. It is much lighter and faster.
The moral of my story, you keep adding floors to your sky riser, the foundation
is not going to support the add structure.
Build yourself a re-enforced foundation, you will never have to worry about how
many floors you have to put on top of it.
All you will need to do is build yourself a structure that deals with the
results returned to you by your base code.
The other day I gave an example of how I use code:
Users::GetGroup($somegroup)->update();
And I got this response
It really sucks for debugging though, because what if
GetGroup($somegroup) returns a null or unexpected value?
The idea is, if you wrote the code, then you force it to return to you what you
want. In this case, if something went wrong in the GetGroup() static method,
the I would return my normal object that has the update() method, at the same
time I would create an exception and catch that upstream.
Probably a little long winded on this one and maybe a little off this topic.
Sorry.
>
> I think it's good to develop a methodology so that you can reuse past
> code, but the "design patterns' I've read about seem too abstract for me.
>
> Cheers,
>
> tedd
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
attached mail follows:
On Mon, Feb 25, 2008 at 11:07 AM, Nathan Nobbe <quickshiftin
gmail.com> wrote:
> On Mon, Feb 25, 2008 at 10:38 AM, Robert Cummings <robert
interjinn.com>
> wrote:
>
> > My favourite patterns are the following:
> >
> > factory
> > singleton
> > adaptor
>
> i dont know about any favorites at this time but as far as common,
> id say
>
> strategy
> adapter
> template method (often used in conjunction w/ factory)
>
> singleton too (watch out for eric; hes a registry guy ;)) (and this is the
> top
> 3 from my exp list so had to stuff singleton by the wayside :))
>
> the heads first book is key ;)
> and also, you might check out phppatterns.com; though it hasnt been
> updated in a while id consider it somewhat of a classic source on patterns
> w/ php as the example language.
>
> -nathan
>
>
I'm not going to even say anything. :)
Since we're declaring our love for specifics, I really like the
observer pattern lately for adding a way to add features without
touching the core.
attached mail follows:
On Mon, Feb 25, 2008 at 12:06 PM, Eric Butera <eric.butera
gmail.com> wrote:
> I'm not going to even say anything. :)
>
> Since we're declaring our love for specifics, I really like the
> observer pattern lately for adding a way to add features without
> touching the core.
>
ahh yes, observer is key; i cant believe i forgot it!
-nathan
attached mail follows:
[snip]
Design patterns are used to solve common problems to in OOP programming.
[/snip]
It is just not limited to OOP, design patterns are used to solve common
programming problems regardless of methodology. They have come into
vogue with OOP and have been leveraged heavily in that case. Design
patterns are everywhere.
Do you need to use them? Only if the case implies it.
attached mail follows:
At 10:31 AM -0500 2/25/08, Matty Sarro wrote:
>Also maybe look at Head First Design Patterns if you are interested in
>ever understanding them.
Okay -- thanks for the recommendation -- I just bought it.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
At 9:51 AM -0500 2/25/08, Eric Butera wrote:
>To each their own I guess. Just out of curiosity, are you primarily
>writing entire web applications or one off scripts?
If a client can describe it, that's what I do.
As compared to some of the others of this list, I'm just a
script-kiddy. But, I do have the ability to make just about anything
work AND look good! So we all have our place.
I do everything from basic design to back-end stuff and everything in
between -- all with the newest buzz-words applied (i.e., graceful
degradation, unobtrusive code, accessible, functional, secure, and it
validates).
My clients seem pleased, I love the work, and I get paid.
I program 10 to 14 hours per day and 6 to 7 days per week. So even
someone as limited as me, will learn something from that work load.
I would like to think I'm an agile programmer. But the truth is, I
survive in constantly changing technology.
Does that answer your question?
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Feb 25, 2008, at 4:18 PM, tedd wrote:
> At 9:51 AM -0500 2/25/08, Eric Butera wrote:
>> To each their own I guess. Just out of curiosity, are you primarily
>> writing entire web applications or one off scripts?
>
> If a client can describe it, that's what I do.
>
> As compared to some of the others of this list, I'm just a script-
> kiddy. But, I do have the ability to make just about anything work
> AND look good! So we all have our place.
>
> I do everything from basic design to back-end stuff and everything
> in between -- all with the newest buzz-words applied (i.e., graceful
> degradation, unobtrusive code, accessible, functional, secure, and
> it validates).
Can you do web 2.0? Because it just HAS to be web 2.0... anything else
is soooooooo last version.... :)
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
> Can you do web 2.0? Because it just HAS to be web 2.0... anything else
> is soooooooo last version.... :)
Yuck - I hate overuse of 'web 2.0' stuff. Don't add features that don't
benefit your users and if you must do fancy stuff then please make sure
your site still works for users without Javascript, Flash, Java, etc.
I've been fighting with stupid Joomla lately because it throws
Javascript errors making it unusable.
attached mail follows:
Dangit, I can only do web1.9.5 :(
I guess I've been deprecated...
On Mon, Feb 25, 2008 at 4:27 PM, Jason Pruim <japruim
raoset.com> wrote:
>
> On Feb 25, 2008, at 4:18 PM, tedd wrote:
>
> > At 9:51 AM -0500 2/25/08, Eric Butera wrote:
> >> To each their own I guess. Just out of curiosity, are you primarily
> >> writing entire web applications or one off scripts?
> >
> > If a client can describe it, that's what I do.
> >
> > As compared to some of the others of this list, I'm just a script-
> > kiddy. But, I do have the ability to make just about anything work
> > AND look good! So we all have our place.
> >
> > I do everything from basic design to back-end stuff and everything
> > in between -- all with the newest buzz-words applied (i.e., graceful
> > degradation, unobtrusive code, accessible, functional, secure, and
> > it validates).
> Can you do web 2.0? Because it just HAS to be web 2.0... anything else
> is soooooooo last version.... :)
>
>
>
>
> --
>
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 3251 132nd ave
> Holland, MI, 49424-9337
> www.raoset.com
> japruim
raoset.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Message-ID: <15e66e4e0802251355i7eb19d79l64446c80366c4eb9
mail.gmail.com>
Date: Mon, 25 Feb 2008 15:55:16 -0600
From: "Greg Donald" <gdonald
gmail.com>
To: php-general
lists.php.net
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP] Re: When to use design patterns?
On 2/25/08, Michael McGlothlin <michaelm
swplumb.com> wrote:
> I've been fighting with stupid Joomla lately because it throws
> Javascript errors making it unusable.
The un-usability began for me when I became aware of the 250+
published exploits under it's current "Joomla" name:
http://search.securityfocus.com/swsearch?query=joomla&metaname=alldoc
And the 280+ exploits when it was called