Re: [PHP] Normalized Numbers

2007-01-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-22 19:36:50 -0500: > Roman Neuhauser wrote: > www.senecal.ca> # [EMAIL PROTECTED] / 2007-01-14 14:51:30 -0500: > >> I tried to install Testilence on my Ubuntu using Gnu make 3.81beta4(my > >> skills as a Linux administrator are weaker than my PHP skills) but was > >> u

Re: [PHP] Normalized Numbers

2007-01-22 Thread Brian P. Giroux
Roman Neuhauser wrote: -- Brian P. Giroux Sénécal & Associé.e.s / Associates Recherche et marketing / Research and marketing Tél : (705) 476-9667 Fax : (705) 476-1618 www.senecal.ca> # [EMAIL PROTECTED] / 2007-01-14 14:51:30 -0500: >> I tried to install Testilence on my Ubuntu using Gnu make 3.8

Re: [PHP] Normalized Numbers

2007-01-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-14 14:51:30 -0500: > I tried to install Testilence on my Ubuntu using Gnu make 3.81beta4(my > skills as a Linux administrator are weaker than my PHP skills) but was > unsuccessful :( What problems did you have? -- How many Vietnam vets does it take to screw in a lig

Re: [PHP] Normalized Numbers

2007-01-14 Thread Brian P. Giroux
Arpad Ray wrote: > Have you checked out the PEAR Validate packages? > http://pear.php.net/package/Validate_ISPN in particular might help you > along ;) I figured that someone had probably done this before. I wanted to do it myself because I figured it's a nice simple exercise to get my feet wet,

Re: [PHP] Normalized Numbers

2007-01-14 Thread Jochem Maas
Brian P. Giroux wrote: > > Jochem Maas wrote: >> Brian P. Giroux wrote: >>> I am just learning PHP and as a practical exercise I've been working on >>> a set of functions to process and manipulate what I call "normalized >>> number" (ISBNs, EANs, UPCs, etc...) >>> >>> My ultimate goal is to create

RE: [PHP] Normalized Numbers

2007-01-14 Thread bruce
n things in more specific detail. just part of the working product. peace... -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Sunday, January 14, 2007 11:45 AM To: [EMAIL PROTECTED] Cc: 'Brian P. Giroux'; php-general@lists.php.net Subject: RE: [PHP] Normali

Re: [PHP] Normalized Numbers

2007-01-14 Thread Brian P. Giroux
Roman Neuhauser wrote: -- Brian P. Giroux Sénécal & Associé.e.s / Associates Recherche et marketing / Research and marketing Tél : (705) 476-9667 Fax : (705) 476-1618 www.senecal.ca> # [EMAIL PROTECTED] / 2007-01-12 14:40:04 +: >> # [EMAIL PROTECTED] / 2007-01-12 13:39:59 +0100: >>> Roman Ne

RE: [PHP] Normalized Numbers

2007-01-14 Thread Robert Cummings
On Sun, 2007-01-14 at 11:21 -0800, bruce wrote: > hi... > > haven't followed the entire thread.. just saw this portion that pertains to > comments > > i can only assume you guys are relatively young.. if you ever have to pick > up a piece of code that was developed 10 years ago, and you need

RE: [PHP] Normalized Numbers

2007-01-14 Thread bruce
pposed to accomplish!! -Original Message- From: Brian P. Giroux [mailto:[EMAIL PROTECTED] Sent: Sunday, January 14, 2007 8:30 AM To: php-general@lists.php.net Subject: Re: [PHP] Normalized Numbers Robert Cummings wrote: > On Fri, 2007-01-12 at 14:40 +, Roman Neuhauser wrote: >> I kn

Re: [PHP] Normalized Numbers

2007-01-14 Thread Brian P. Giroux
Robert Cummings wrote: > On Fri, 2007-01-12 at 14:40 +, Roman Neuhauser wrote: >> I know it sounds crazy, but (most) comments are evil. Comments are are >> excuses for better code, they're often no more than a vague repetition >> of what the code says. If the code doesn't describe what it's

Re: [PHP] Normalized Numbers

2007-01-14 Thread Brian P. Giroux
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-12 13:39:59 +0100: >> Roman Neuhauser wrote: >>> # [EMAIL PROTECTED] / 2007-01-12 01:57:27 +0100: Brian P. Giroux wrote: > If anyone can help me out with that or provide any other advice about > the rest of it, I'd be grateful. >

Re: [PHP] Normalized Numbers

2007-01-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-14 10:49:49 -0500: > > 1 function is_valid_ean($ean) { > > 2return (13 == strlen($ean) > > 3&& is_numeric($ean) > > 4&& (0 == (digit_sum($ean,1,1,3) % 10)) > > 5); > > 6 } > > Again, WOW! This is certainly the version I will use (if you

Re: [PHP] Normalized Numbers

2007-01-14 Thread Brian P. Giroux
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-12 01:57:27 +0100: >> Brian P. Giroux wrote: >>> If anyone can help me out with that or provide any other advice about >>> the rest of it, I'd be grateful. >>> The file can be found at http://www.senecal.ca/normnums.php.txt > >> keep comment

Re: [PHP] Normalized Numbers

2007-01-14 Thread Brian P. Giroux
Jochem Maas wrote: > Brian P. Giroux wrote: >> I am just learning PHP and as a practical exercise I've been working on >> a set of functions to process and manipulate what I call "normalized >> number" (ISBNs, EANs, UPCs, etc...) >> >> My ultimate goal is to create a normnum class and child class

Re: [PHP] Normalized Numbers

2007-01-13 Thread Jochem Maas
Roman, thank you for the detailed argument/explanation. I am definitely going to take the time to think about what you said and re-evaluate my stance. additionally I found you practical example of unit testing of great value, time for me to STFU and go do some reading about Testilence. rgds, Joc

Re: [PHP] Normalized Numbers

2007-01-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-12 14:40:04 +: > # [EMAIL PROTECTED] / 2007-01-12 13:39:59 +0100: > > Roman Neuhauser wrote: > > > # [EMAIL PROTECTED] / 2007-01-12 01:57:27 +0100: > > >> Brian P. Giroux wrote: > > >>> If anyone can help me out with that or provide any other advice about > > >>> t

Re: [PHP] Normalized Numbers

2007-01-12 Thread Robert Cummings
On Fri, 2007-01-12 at 14:40 +, Roman Neuhauser wrote: > > I know it sounds crazy, but (most) comments are evil. Comments are are > excuses for better code, they're often no more than a vague repetition > of what the code says. If the code doesn't describe what it's doing > while it's doing it,

Re: [PHP] Normalized Numbers

2007-01-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-12 13:39:59 +0100: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-12 01:57:27 +0100: > >> Brian P. Giroux wrote: > >>> If anyone can help me out with that or provide any other advice about > >>> the rest of it, I'd be grateful. > >>> The file can be found a

Re: [PHP] Normalized Numbers

2007-01-12 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-12 01:57:27 +0100: >> Brian P. Giroux wrote: >>> If anyone can help me out with that or provide any other advice about >>> the rest of it, I'd be grateful. >>> The file can be found at http://www.senecal.ca/normnums.php.txt > >> keep commentin

Re: [PHP] Normalized Numbers

2007-01-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-12 01:57:27 +0100: > Brian P. Giroux wrote: > > If anyone can help me out with that or provide any other advice about > > the rest of it, I'd be grateful. > > > The file can be found at http://www.senecal.ca/normnums.php.txt > keep commenting all your code to that ex

Re: [PHP] Normalized Numbers

2007-01-12 Thread Arpad Ray
Have you checked out the PEAR Validate packages? http://pear.php.net/package/Validate_ISPN in particular might help you along ;) And BTW, most servers are set up to display php files renamed to .phps with syntax highlighting, so give that a try instead of .php.txt next time. Regards, Arpad B

Re: [PHP] Normalized Numbers

2007-01-11 Thread Jochem Maas
Brian P. Giroux wrote: > I am just learning PHP and as a practical exercise I've been working on > a set of functions to process and manipulate what I call "normalized > number" (ISBNs, EANs, UPCs, etc...) > > My ultimate goal is to create a normnum class and child classes for the > different type