|
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: Wed Feb 27 2008 - 17:44:19 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 27 Feb 2008 23:44:19 -0000 Issue 5318
Topics (messages 270270 through 270486):
What design patterns do you usually use?
270270 by: skylark
270271 by: skylark
270272 by: Richard Heyes
270273 by: Paul Scott
270275 by: Zoltán Németh
270282 by: Jochem Maas
270286 by: Ray Hauge
270287 by: Paul Scott
270289 by: Daniel Brown
270290 by: Aschwin Wesselius
270291 by: David Giragosian
270292 by: Daniel Brown
270293 by: Jochem Maas
270294 by: Jochem Maas
270295 by: Jason Pruim
270296 by: Daniel Brown
270298 by: Wolf
270300 by: Wolf
270301 by: Daniel Brown
270303 by: Aschwin Wesselius
270304 by: Daniel Brown
270305 by: Wolf
270307 by: Daniel Brown
270308 by: Robert Cummings
270309 by: Robert Cummings
270310 by: Ray Hauge
270311 by: Robert Cummings
270312 by: Robert Cummings
270314 by: Aschwin Wesselius
270316 by: Daniel Brown
270317 by: Robert Cummings
270318 by: Daniel Brown
270319 by: Nathan Nobbe
270320 by: Aschwin Wesselius
270321 by: Robert Cummings
270322 by: Jochem Maas
270323 by: Jason Pruim
270324 by: Aschwin Wesselius
270325 by: Nathan Nobbe
270326 by: Aschwin Wesselius
270327 by: Jason Pruim
270329 by: Daniel Brown
270331 by: Thiago Pojda
270332 by: Daniel Brown
270333 by: tedd
270335 by: Jason Pruim
270336 by: Daniel Brown
270337 by: Nathan Nobbe
270339 by: Zoltán Németh
270342 by: Nathan Nobbe
270343 by: Zoltán Németh
270361 by: tedd
270362 by: tedd
270366 by: tedd
270370 by: Nathan Nobbe
270416 by: Jochem Maas
270417 by: Jochem Maas
270425 by: Daniel Brown
270474 by: Aschwin Wesselius
270479 by: Nathan Nobbe
Re: crc check for JPEG file exists
270274 by: Aschwin Wesselius
270288 by: Daniel Brown
Start/stop daemon using php
270276 by: David Sveningsson
270280 by: Jochem Maas
270281 by: Per Jessen
270283 by: Daniel Brown
270284 by: .4u
270328 by: Nathan Rixham
270438 by: David Sveningsson
270454 by: David Sveningsson
Re: Cannot even come up with the beginning of a regex
270277 by: Zoltán Németh
270279 by: Zoltán Németh
270449 by: Dotan Cohen
sort in while(list($vars) = mysql_fetch_row($result))
270278 by: Verdon Vaillancourt
270285 by: Daniel Brown
270306 by: Verdon Vaillancourt
270313 by: Per Jessen
270315 by: Daniel Brown
Re: Shopping Carts
270297 by: Manuel Barros Reyes
Re: Question about PHP Licence and it's future!
270299 by: Daniel Brown
Re: email with style (again)
270302 by: Daniel Brown
Multiple Inheritance
270330 by: chetan rane
270334 by: Daniel Brown
270340 by: Zoltán Németh
270476 by: Nathan Nobbe
Database Abstraction Idea
270338 by: Ray Hauge
270346 by: Daniel Brown
270351 by: Ray Hauge
Performance Problem
270341 by: Adriano Manocchia
270344 by: Daniel Brown
270349 by: Adriano Manocchia
270353 by: Eric Butera
270363 by: Adriano Manocchia
270374 by: Adriano Manocchia
270380 by: Adriano Manocchia
270388 by: Eric Butera
270396 by: Daniel Brown
270405 by: Shawn McKenzie
270424 by: Adriano Manocchia
270433 by: Shawn McKenzie
270434 by: Ray Hauge
270440 by: Daniel Brown
Are these Truthful Proof about PHP ??
270345 by: Dare Williams
270347 by: Christoph Boget
270348 by: Zoltán Németh
270352 by: Robert Cummings
270354 by: Daniel Brown
270355 by: David Giragosian
270356 by: Per Jessen
270358 by: Greg Donald
270360 by: Nathan Rixham
270364 by: Robert Cummings
270367 by: Greg Donald
270368 by: Nathan Nobbe
270371 by: Nathan Nobbe
270375 by: Ray Hauge
270376 by: Greg Donald
270377 by: Matty Sarro
270378 by: Greg Donald
270381 by: Matty Sarro
270382 by: Stut
270383 by: Robert Cummings
270385 by: David Giragosian
270389 by: Robert Cummings
270390 by: Matty Sarro
270392 by: Stephen Johnson
270394 by: David Giragosian
270395 by: Greg Donald
270397 by: Jay Blanchard
270398 by: Greg Donald
270400 by: tedd
270402 by: Robert Cummings
270403 by: Matty Sarro
270413 by: tedd
270414 by: Daniel Brown
270418 by: Bastien Koert
270421 by: Matty Sarro
270422 by: Bastien Koert
270423 by: Jason Pruim
270428 by: Daniel Brown
270429 by: Shawn McKenzie
270436 by: tedd
270443 by: Daniel Brown
270445 by: Andrew Ballard
270446 by: Shawn McKenzie
270448 by: Shawn McKenzie
270451 by: Nathan Nobbe
270457 by: Stephen Johnson
270458 by: Daniel Brown
270464 by: Nathan Nobbe
Re: How do you send stylized email?
270350 by: Andrew Ballard
270365 by: Paul Scott
270372 by: Andrew Ballard
Request for work on the php.net FAQs
270357 by: Philip Olson
270373 by: Daniel Brown
Getting the name of a function
270359 by: Richard S. Crawford
270369 by: tedd
270391 by: Daniel Brown
270406 by: Shawn McKenzie
270475 by: Andrés Robinet
Guidance
270379 by: Matty Sarro
270384 by: Stut
270386 by: Thiago Pojda
270399 by: Daniel Brown
270401 by: Matty Sarro
270404 by: Ray Hauge
270407 by: Daniel Brown
270408 by: tedd
270409 by: Daniel Brown
270410 by: Robert Cummings
270411 by: Nathan Rixham
270412 by: Daniel Brown
270427 by: Stephen Johnson
270430 by: tedd
270431 by: Stut
270435 by: Daniel Brown
270437 by: Daniel Brown
270439 by: Shawn McKenzie
270441 by: Shawn McKenzie
270442 by: Stut
270447 by: Jason Pruim
270452 by: Robert Cummings
270460 by: Stut
270468 by: Nathan Rixham
270471 by: Daniel Brown
270478 by: Jochem Maas
270482 by: Jochem Maas
270483 by: Jochem Maas
Digg like app..
270387 by: Ryan A
270393 by: Daniel Brown
Uppercase first letter of each new line?
270415 by: Keikonium
270419 by: Daniel Brown
270420 by: Robert Cummings
270426 by: Robert Cummings
270432 by: Keikonium
270450 by: Robert Cummings
270462 by: Daniel Brown
270469 by: Andrés Robinet
270472 by: Daniel Brown
270477 by: M. Sokolewicz
270480 by: Daniel Brown
270481 by: Andrés Robinet
Sometimes I wonder why I even started programming...
270444 by: Jason Pruim
270453 by: Ray Hauge
270455 by: Daniel Brown
270456 by: Andrew Ballard
270459 by: Jason Pruim
270461 by: Daniel Brown
270463 by: Ray Hauge
270467 by: Stut
270473 by: Jochem Maas
Re: Sometimes I wonder why I even started programming...RESOLVED
270465 by: Jason Pruim
Test
270466 by: Ray Hauge
270470 by: Daniel Brown
Functions not available when run as Scheduled Task?
270484 by: Brian Dunning
270485 by: Ray Hauge
270486 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:
Hi all,
What design patterns do you usually use?
--
Regards,
Shelley
attached mail follows:
Hi guys,
What design patterns do you usually use?
--
Regards,
Shelley
attached mail follows:
> What design patterns do you usually use?
Whatever solves the problem. Factory is quite a common one. MVC is another.
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
attached mail follows:
On Wed, 2008-02-27 at 19:50 +0800, skylark wrote:
> What design patterns do you usually use?
I am not sure that you are understanding what a design pattern is. It is
not a piece of software or a thing to use, but it is a set of repeatable
components that you use in whatever app you are writing.
Take for instance an observer pattern. When would you use that? Why
would you use that? Have you used it somewhere before and what were the
circumstances? Is it repeatable? Is your previous code re-usable?
Answer some of those questions, look up design patterns (even on
wikipedia to get an overview) and buy some books to see solid examples.
If you suspect that you "need" to use a specific pattern, or are
interested in how to implement a specific pattern, write some throwaway
code to do it and ask opinions.
Look at the simple things that you would probably have used already -
factory, singleton and MVC and expand on those a little to get them to
be actual design "patterns" that you can use/reuse.
Don't "use design patterns" because you heard it on TV - same as
"Web2.0" _think_ about what it means to you and your enterprise before
asking for a buzzword generator to do your job for you! :)
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
attached mail follows:
2008. 02. 27, szerda keltezéssel 19.50-kor skylark ezt Ãrta:
> Hi guys,
>
> What design patterns do you usually use?
>
whichever seems fit to the situation ;)
for me its most often singleton, registry, factory, activerecord
and you could also read the thread about these last week...
greets
Zoltán Németh
attached mail follows:
Paul Scott schreef:
> On Wed, 2008-02-27 at 19:50 +0800, skylark wrote:
>> What design patterns do you usually use?
>
> I am not sure that you are understanding what a design pattern is. It is
> not a piece of software or a thing to use, but it is a set of repeatable
> components that you use in whatever app you are writing.
>
> Take for instance an observer pattern. When would you use that? Why
> would you use that? Have you used it somewhere before and what were the
> circumstances? Is it repeatable? Is your previous code re-usable?
>
> Answer some of those questions, look up design patterns (even on
> wikipedia to get an overview) and buy some books to see solid examples.
>
> If you suspect that you "need" to use a specific pattern, or are
> interested in how to implement a specific pattern, write some throwaway
> code to do it and ask opinions.
>
> Look at the simple things that you would probably have used already -
> factory, singleton and MVC and expand on those a little to get them to
> be actual design "patterns" that you can use/reuse.
>
there seems to be some misunderstanding ... a design pattern is not
a component (or anything else of substance) but merely a conceptual
strategy used to tackle a problem ... ever find yourself writing code
that's conceptually identical to previously written code (in a different
site/project/context), if so you've got yourself a pattern and as such it's
probably been documented as an 'official' design pattern with suitable fancy
name (something like 'Observer', 'Delegator', 'Factory')
chances are then that you're already using design patterns - it's just
that you don't know them by name :-)
> Don't "use design patterns" because you heard it on TV - same as
> "Web2.0" _think_ about what it means to you and your enterprise before
> asking for a buzzword generator to do your job for you! :)
>
> --Paul
>
>
>
> ------------------------------------------------------------------------
>
> All Email originating from UWC is covered by disclaimer
> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
>
>
attached mail follows:
Richard Heyes wrote:
>> What design patterns do you usually use?
>
> Whatever solves the problem. Factory is quite a common one. MVC is another.
>
I have a story to kind of touch on what Jochem said about you just don't
know the name yet.
Just recently I was tasked with creating a new in-house CRM for an
external partner. I only had four days and they had particular
requirements that ruled out Sugar or other things. I had never really
understood what the MVC pattern really was. I knew the basics, but I
just didn't "get it". After I finished the first wave of development on
this project I finally had a chance to sit back and see the forest
through the trees and sat back and thought "damn... I just used MVC."
If you're willing to shell out a few bucks, there's a pretty good book
on design patterns for PHP. http://www.phparch.com/c/books/id/0973589825
You can think of design patterns more like classes you use with your
code. They can help you achieve a goal, but they're not going to do
everything for you. Maybe an even better analogy would be a really
expensive set of knives. They're super sharp, so make sure you know
what you're doing with them before you use them.
There is also such a thing as too much. I heard a talk a while ago
about code maintainability. The speaker mentioned a co-worker of his
ran into his cube almost exhausted and proclaimed, "I finally did it!.
I used every one of the design patterns in my program!" Just a few
months later the speaker ended up being in charge of maintaining that
program, and it was a nightmare.
To make a long story short. I generally do what's easiest. It's
typically faster to develop and easier to maintain. Unnecessary
complexity can start a snowball effect.
--
Ray Hauge
www.primateapplications.com
attached mail follows:
On Wed, 2008-02-27 at 14:48 +0100, Jochem Maas wrote:
> Paul Scott schreef:
> there seems to be some misunderstanding ... a design pattern is not
> a component (or anything else of substance) but merely a conceptual
> strategy used to tackle a problem ... ever find yourself writing code
> that's conceptually identical to previously written code (in a different
> site/project/context), if so you've got yourself a pattern and as such it's
> probably been documented as an 'official' design pattern with suitable fancy
> name (something like 'Observer', 'Delegator', 'Factory')
>
> chances are then that you're already using design patterns - it's just
> that you don't know them by name :-)
>
Ja, that's what I was trying to say in a long, convoluted,
burning-the-candle-at-both-ends type of way :)
Thanks Jochem for clearing that up!
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
attached mail follows:
On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
> Hi all,
>
> What design patterns do you usually use?
This one:
http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Daniel Brown wrote:
> On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
>
>> Hi all,
>>
>> What design patterns do you usually use?
>>
>
>
> This one:
>
> http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
It's maybe off-topic, but I like a slightly humorous note once in a
while ;-).
Aschwin Wesselius
attached mail follows:
On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
> On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
> > Hi all,
> >
> > What design patterns do you usually use?
>
>
> This one:
>
> http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
>
Somebody been thinking about wedding attire?
--
-David.
When the power of love
overcomes the love of power,
the world will know peace.
-Jimi Hendrix
attached mail follows:
On Wed, Feb 27, 2008 at 9:40 AM, David Giragosian <dgiragosian
gmail.com> wrote:
> On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
> > On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
> > > Hi all,
> > >
> > > What design patterns do you usually use?
> >
> >
> > This one:
> >
> > http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
> >
>
> Somebody been thinking about wedding attire?
Yeah, but I can't fit into that dress. ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Paul Scott schreef:
> On Wed, 2008-02-27 at 14:48 +0100, Jochem Maas wrote:
>> Paul Scott schreef:
>> there seems to be some misunderstanding ... a design pattern is not
>> a component (or anything else of substance) but merely a conceptual
>> strategy used to tackle a problem ... ever find yourself writing code
>> that's conceptually identical to previously written code (in a different
>> site/project/context), if so you've got yourself a pattern and as such it's
>> probably been documented as an 'official' design pattern with suitable fancy
>> name (something like 'Observer', 'Delegator', 'Factory')
>>
>> chances are then that you're already using design patterns - it's just
>> that you don't know them by name :-)
>>
>
> Ja, that's what I was trying to say in a long, convoluted,
> burning-the-candle-at-both-ends type of way :)
lol ... I often have the same problem ... then Richard Lynch comes along
and explains 'whatever' in a way that the rest of the world does understand :-)
>
> Thanks Jochem for clearing that up!
>
> --Paul
>
>
>
> ------------------------------------------------------------------------
>
> All Email originating from UWC is covered by disclaimer
> http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
>
>
attached mail follows:
Daniel Brown schreef:
> On Wed, Feb 27, 2008 at 9:40 AM, David Giragosian <dgiragosian
gmail.com> wrote:
>> On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
>> > On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
>> > > Hi all,
>> > >
>> > > What design patterns do you usually use?
>> >
>> >
>> > This one:
>> >
>> > http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
>> >
>>
>> Somebody been thinking about wedding attire?
>
> Yeah, but I can't fit into that dress. ;-P
besides the flower pattern doesn't really suit you, go with blue velvet ;-)
>
attached mail follows:
On Feb 27, 2008, at 9:52 AM, Daniel Brown wrote:
> On Wed, Feb 27, 2008 at 9:40 AM, David Giragosian <dgiragosian
gmail.com
> > wrote:
>> On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
>>> On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com>
>>> wrote:
>>>> Hi all,
>>>>
>>>> What design patterns do you usually use?
>>>
>>>
>>> This one:
>>>
>>> http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
>>>
>>
>> Somebody been thinking about wedding attire?
>
> Yeah, but I can't fit into that dress. ;-P
*Shudder* Quit putting mental images into my mind!!! :P
>
>
> --
> </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-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
On Wed, Feb 27, 2008 at 9:55 AM, Jochem Maas <jochem
iamjochem.com> wrote:
> besides the flower pattern doesn't really suit you, go with blue velvet ;-)
Don't touch me there, you're not my Daddy! ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
---- Jochem Maas <jochem
iamjochem.com> wrote:
> Daniel Brown schreef:
> > On Wed, Feb 27, 2008 at 9:40 AM, David Giragosian <dgiragosian
gmail.com> wrote:
> >> On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
> >> > On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
> >> > > Hi all,
> >> > >
> >> > > What design patterns do you usually use?
> >> >
> >> >
> >> > This one:
> >> >
> >> > http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
> >> >
> >>
> >> Somebody been thinking about wedding attire?
> >
> > Yeah, but I can't fit into that dress. ;-P
>
> besides the flower pattern doesn't really suit you, go with blue velvet ;-)
>
No, go with the Crushed purple velvet with the pageboy sleeves, that should accentuate the colors of your hair...
:-P
attached mail follows:
---- Daniel Brown <parasane
gmail.com> wrote:
> On Wed, Feb 27, 2008 at 9:40 AM, David Giragosian <dgiragosian
gmail.com> wrote:
> > On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
> > > On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
> > > > Hi all,
> > > >
> > > > What design patterns do you usually use?
> > >
> > >
> > > This one:
> > >
> > > http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
> > >
> >
> > Somebody been thinking about wedding attire?
>
> Yeah, but I can't fit into that dress. ;-P
But with the pattern you can make it bigger as needed.... And for them really big sizes, contact Omar and see if he can use something other then tent materials...
Though that flame resistant stuff might be good for those with an issue walking and catching their knickers on fire...
;)
attached mail follows:
On Wed, Feb 27, 2008 at 10:05 AM, Wolf <lonewolf
nc.rr.com> wrote:
> No, go with the Crushed purple velvet with the pageboy sleeves, that should accentuate the colors of your hair...
Purple is my favorite color, actually, but I'd appreciate it if
you'd please stop peeking through my windows at night, Wolf.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Wolf wrote:
>
>
> But with the pattern you can make it bigger as needed.... And for them really big sizes, contact Omar and see if he can use something other then tent materials...
>
> Though that flame resistant stuff might be good for those with an issue walking and catching their knickers on fire...
>
> ;)
Why not going with a Scottish kilt and have some cooling breeze while
showing off what you're made of? Clan-wars sometimes started with having
the wrong pattern on the kilt.... talking about the Bloods and the Crips
fighting eachother just for the color is just childsplay.
Aschwin Wesselius
attached mail follows:
On Wed, Feb 27, 2008 at 10:16 AM, Aschwin Wesselius
<aschwin
illuminated.nl> wrote:
> Why not going with a Scottish kilt and have some cooling breeze while
> showing off what you're made of? Clan-wars sometimes started with having
> the wrong pattern on the kilt.... talking about the Bloods and the Crips
> fighting eachother just for the color is just childsplay.
Coincidentally, I'm actually hoping to get all of the groomsmen
measured in time to be able to do the traditional Irish kilts. And by
traditional, I mean REAL kilt-wearing, with nothing underneath! ;-P
We're supposed to have bagpipes and all, which - in this
highly-Polish area - will probably be a wedding like no one around
here has seen. It should be a great time!
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
---- Daniel Brown <parasane
gmail.com> wrote:
> On Wed, Feb 27, 2008 at 10:16 AM, Aschwin Wesselius
> <aschwin
illuminated.nl> wrote:
> > Why not going with a Scottish kilt and have some cooling breeze while
> > showing off what you're made of? Clan-wars sometimes started with having
> > the wrong pattern on the kilt.... talking about the Bloods and the Crips
> > fighting eachother just for the color is just childsplay.
>
> Coincidentally, I'm actually hoping to get all of the groomsmen
> measured in time to be able to do the traditional Irish kilts. And by
> traditional, I mean REAL kilt-wearing, with nothing underneath! ;-P
>
> We're supposed to have bagpipes and all, which - in this
> highly-Polish area - will probably be a wedding like no one around
> here has seen. It should be a great time!
OK, so now I have to ask... Where does an Irishman live that is in the middle of Polocs working in IT?
attached mail follows:
On Wed, Feb 27, 2008 at 10:26 AM, Wolf <lonewolf
nc.rr.com> wrote:
> OK, so now I have to ask... Where does an Irishman live that is in the middle of Polocs working in IT?
Northeast Pennsylvania (USA). There's not much at all in the way
of IT around here, it's mostly factories and farms. I work in one of
the few "high-tech" companies in the area. I'd imagine, though, that
in the next ten years, there's going to be a rather major shift, due
to the lower cost-of-living here and availability of commercial and
residential real estate. Too bad I'm getting the hell out of here to
move to somewhere warm.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Wed, 2008-02-27 at 08:25 -0600, Ray Hauge wrote:
> There is also such a thing as too much. I heard a talk a while ago
> about code maintainability. The speaker mentioned a co-worker of his
> ran into his cube almost exhausted and proclaimed, "I finally did
> it!.
> I used every one of the design patterns in my program!" Just a few
> months later the speaker ended up being in charge of maintaining that
> program, and it was a nightmare.
>
> To make a long story short. I generally do what's easiest. It's
> typically faster to develop and easier to maintain. Unnecessary
> complexity can start a snowball effect.
You bring up a good point... knowing how to refactor crappy code is also
a great skill to have.
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:
On Wed, 2008-02-27 at 15:53 +0100, Jochem Maas wrote:
> Paul Scott schreef:
> > On Wed, 2008-02-27 at 14:48 +0100, Jochem Maas wrote:
> >> Paul Scott schreef:
> >> there seems to be some misunderstanding ... a design pattern is not
> >> a component (or anything else of substance) but merely a conceptual
> >> strategy used to tackle a problem ... ever find yourself writing code
> >> that's conceptually identical to previously written code (in a different
> >> site/project/context), if so you've got yourself a pattern and as such it's
> >> probably been documented as an 'official' design pattern with suitable fancy
> >> name (something like 'Observer', 'Delegator', 'Factory')
> >>
> >> chances are then that you're already using design patterns - it's just
> >> that you don't know them by name :-)
> >>
> >
> > Ja, that's what I was trying to say in a long, convoluted,
> > burning-the-candle-at-both-ends type of way :)
>
> lol ... I often have the same problem ... then Richard Lynch comes along
> and explains 'whatever' in a way that the rest of the world does understand :-)
Surely he didn't explain OOP to you... he's anti OOP :)
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 Wed, 2008-02-27 at 15:53 +0100, Jochem Maas wrote:
>> Paul Scott schreef:
>>> On Wed, 2008-02-27 at 14:48 +0100, Jochem Maas wrote:
>>>> Paul Scott schreef:
>>>> there seems to be some misunderstanding ... a design pattern is not
>>>> a component (or anything else of substance) but merely a conceptual
>>>> strategy used to tackle a problem ... ever find yourself writing code
>>>> that's conceptually identical to previously written code (in a different
>>>> site/project/context), if so you've got yourself a pattern and as such it's
>>>> probably been documented as an 'official' design pattern with suitable fancy
>>>> name (something like 'Observer', 'Delegator', 'Factory')
>>>>
>>>> chances are then that you're already using design patterns - it's just
>>>> that you don't know them by name :-)
>>>>
>>> Ja, that's what I was trying to say in a long, convoluted,
>>> burning-the-candle-at-both-ends type of way :)
>> lol ... I often have the same problem ... then Richard Lynch comes along
>> and explains 'whatever' in a way that the rest of the world does understand :-)
>
> Surely he didn't explain OOP to you... he's anti OOP :)
>
> Cheers,
> Rob.
You're right. I just started reading this list again after a 1.5 year
break, and I still remember some of the great discussions with Richard
and others about OOP. Great times :)
--
Ray Hauge
www.primateapplications.com
attached mail follows:
On Wed, 2008-02-27 at 10:05 -0500, Wolf wrote:
> ---- Jochem Maas <jochem
iamjochem.com> wrote:
> > Daniel Brown schreef:
> > > On Wed, Feb 27, 2008 at 9:40 AM, David Giragosian <dgiragosian
gmail.com> wrote:
> > >> On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
> > >> > On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
> > >> > > Hi all,
> > >> > >
> > >> > > What design patterns do you usually use?
> > >> >
> > >> >
> > >> > This one:
> > >> >
> > >> > http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
> > >> >
> > >>
> > >> Somebody been thinking about wedding attire?
> > >
> > > Yeah, but I can't fit into that dress. ;-P
> >
> > besides the flower pattern doesn't really suit you, go with blue velvet ;-)
> >
>
> No, go with the Crushed purple velvet with the pageboy sleeves, that should accentuate the colors of your hair...
You fools... you can't just use any old design pattern anywhere. It's
really important to use the correct pattern otherwise things will just
fall apart. This one is more aptly suited I think:
http://panty.hanty.net/sexy.html
Note the figurine Dan... this pattern is the lady decorator pattern...
it could possibly work on a male, but I think you'll need an adaptor
pattern first :)
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:
On Wed, 2008-02-27 at 10:42 -0500, Robert Cummings wrote:
> On Wed, 2008-02-27 at 10:05 -0500, Wolf wrote:
> > ---- Jochem Maas <jochem
iamjochem.com> wrote:
> > > Daniel Brown schreef:
> > > > On Wed, Feb 27, 2008 at 9:40 AM, David Giragosian <dgiragosian
gmail.com> wrote:
> > > >> On 2/27/08, Daniel Brown <parasane
gmail.com> wrote:
> > > >> > On Wed, Feb 27, 2008 at 6:46 AM, skylark <myphplist
gmail.com> wrote:
> > > >> > > Hi all,
> > > >> > >
> > > >> > > What design patterns do you usually use?
> > > >> >
> > > >> >
> > > >> > This one:
> > > >> >
> > > >> > http://www.vam.ac.uk/vastatic/microsites/1486_couture/create.php
> > > >> >
> > > >>
> > > >> Somebody been thinking about wedding attire?
> > > >
> > > > Yeah, but I can't fit into that dress. ;-P
> > >
> > > besides the flower pattern doesn't really suit you, go with blue velvet ;-)
> > >
> >
> > No, go with the Crushed purple velvet with the pageboy sleeves, that should accentuate the colors of your hair...
>
> You fools... you can't just use any old design pattern anywhere. It's
> really important to use the correct pattern otherwise things will just
> fall apart. This one is more aptly suited I think:
>
> http://panty.hanty.net/sexy.html
>
> Note the figurine Dan... this pattern is the lady decorator pattern...
> it could possibly work on a male, but I think you'll need an adaptor
> pattern first :)
BTW, if you get this implemented, we'll need to also add the observer
pattern.
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:
>>> No, go with the Crushed purple velvet with the pageboy sleeves, that should accentuate the colors of your hair...
>>>
>> You fools... you can't just use any old design pattern anywhere. It's
>> really important to use the correct pattern otherwise things will just
>> fall apart. This one is more aptly suited I think:
>>
>> http://panty.hanty.net/sexy.html
>>
>> Note the figurine Dan... this pattern is the lady decorator pattern...
>> it could possibly work on a male, but I think you'll need an adaptor
>> pattern first :)
>>
>
> BTW, if you get this implemented, we'll need to also add the observer
> pattern.
I think it depends case by case when it will be applied. Not every
'input' suits the wish for an observer. Even sometimes you wish that the
return value is void in some cases.....
--
Aschwin Wesselius
<social>
What you would like to be done to you, do that to the other....
</social>
attached mail follows:
On Wed, Feb 27, 2008 at 10:42 AM, Robert Cummings <robert
interjinn.com> wrote:
> You fools... you can't just use any old design pattern anywhere. It's
> really important to use the correct pattern otherwise things will just
> fall apart. This one is more aptly suited I think:
>
> http://panty.hanty.net/sexy.html
>
> Note the figurine Dan... this pattern is the lady decorator pattern...
> it could possibly work on a male, but I think you'll need an adaptor
> pattern first :)
If only that were the case. If the adapter pattern comes in a
size "Extra-Extra Small" then maybe it will fit.... loosely.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Wed, 2008-02-27 at 10:55 -0500, Daniel Brown wrote:
> On Wed, Feb 27, 2008 at 10:42 AM, Robert Cummings <robert
interjinn.com> wrote:
> > You fools... you can't just use any old design pattern anywhere. It's
> > really important to use the correct pattern otherwise things will just
> > fall apart. This one is more aptly suited I think:
> >
> > http://panty.hanty.net/sexy.html
> >
> > Note the figurine Dan... this pattern is the lady decorator pattern...
> > it could possibly work on a male, but I think you'll need an adaptor
> > pattern first :)
>
> If only that were the case. If the adapter pattern comes in a
> size "Extra-Extra Small" then maybe it will fit.... loosely.
Oh, the phallus endowment fairy passed you over eh!? Sorry to hear.
;)
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:
On Wed, Feb 27, 2008 at 10:58 AM, Robert Cummings <robert
interjinn.com> wrote:
> Oh, the phallus endowment fairy passed you over eh!? Sorry to hear.
I was left with nothing but honesty and humility. Err....
humiliation. Take your pick.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Wed, Feb 27, 2008 at 10:37 AM, Robert Cummings <robert
interjinn.com>
wrote:
> Surely he didn't explain OOP to you... he's anti OOP :)
ya; im waiting to see one of these 'simple' sites thats written strictly w/
functions and procedural code that does more than support a username
and password :)
-nathan
attached mail follows:
Nathan Nobbe wrote:
>> Surely he didn't explain OOP to you... he's anti OOP :)
>>
> ya; im waiting to see one of these 'simple' sites thats written strictly w/
> functions and procedural code that does more than support a username
> and password :)
>
> -nathan
I worked for a company where they maintain an interface for a
creditcard-billing platform (one of the eight biggest platforms in the
world). They only have 1 library file for each part of the application
and they don't do classes at all.
It does millions of transactions per day for clients worldwide and is
real fast.
So, it can be done. Except that only two persons know where to find the
code and how to maintain it and it is not documented. I learned a lot at
that company.
--
Aschwin Wesselius
<social>
What you would like to be done to you, do that to the other....
</social>
attached mail follows:
On Wed, 2008-02-27 at 11:08 -0500, Nathan Nobbe wrote:
> On Wed, Feb 27, 2008 at 10:37 AM, Robert Cummings <robert
interjinn.com>
> wrote:
>
> > Surely he didn't explain OOP to you... he's anti OOP :)
>
>
> ya; im waiting to see one of these 'simple' sites thats written strictly w/
> functions and procedural code that does more than support a username
> and password :)
Careful what you say... it is very possible. Just think of all the
complex code out there written in C. It's just a question of how you
leverage your libraries. I personally prefer to have an object than to
have to always pass a structure to a procedural function.
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:
Aschwin Wesselius schreef:
> Nathan Nobbe wrote:
>>> Surely he didn't explain OOP to you... he's anti OOP :)
>>>
>> ya; im waiting to see one of these 'simple' sites thats written
>> strictly w/
>> functions and procedural code that does more than support a username
>> and password :)
>>
>> -nathan
> I worked for a company where they maintain an interface for a
> creditcard-billing platform (one of the eight biggest platforms in the
> world). They only have 1 library file for each part of the application
> and they don't do classes at all.
>
> It does millions of transactions per day for clients worldwide and is
> real fast.
>
> So, it can be done. Except that only two persons know where to find the
> code and how to maintain it and it is not documented. I learned a lot at
> that company.
including how to build job-security into your code by the sounds of it ;-)
>
>
attached mail follows:
On Feb 27, 2008, at 11:08 AM, Nathan Nobbe wrote:
> On Wed, Feb 27, 2008 at 10:37 AM, Robert Cummings <robert
interjinn.com
> >
> wrote:
>
>> Surely he didn't explain OOP to you... he's anti OOP :)
>
>
> ya; im waiting to see one of these 'simple' sites thats written
> strictly w/
> functions and procedural code that does more than support a username
> and password :)
I think I actually have one of those :) It's a site where people can
put all their mailing addresses into our database and then edit/delete/
add them when they want. Barely any functions... and as far as I know,
no OOP code... Procedural code just more sense to me... $this =$that
makes more sense then $this -> $that or would it be $that ->$this?
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
Jochem Maas wrote:
> Aschwin Wesselius schreef:
>> Nathan Nobbe wrote:
>>>> Surely he didn't explain OOP to you... he's anti OOP :)
>>>>
>>> ya; im waiting to see one of these 'simple' sites thats written
>>> strictly w/
>>> functions and procedural code that does more than support a username
>>> and password :)
>>>
>>> -nathan
>> I worked for a company where they maintain an interface for a
>> creditcard-billing platform (one of the eight biggest platforms in
>> the world). They only have 1 library file for each part of the
>> application and they don't do classes at all.
>>
>> It does millions of transactions per day for clients worldwide and is
>> real fast.
>>
>> So, it can be done. Except that only two persons know where to find
>> the code and how to maintain it and it is not documented. I learned a
>> lot at that company.
>
> including how to build job-security into your code by the sounds of it ;-)
Nah.... these two people are just the owners of this company with only
two other people for support (ridiculous I know), so that's not such a
big deal. They where hardcore C programmers, so I understand why they
don't do OOP.
--
Aschwin Wesselius
<social>
What you would like to be done to you, do that to the other....
</social>
attached mail follows:
On Wed, Feb 27, 2008 at 11:15 AM, Robert Cummings <robert
interjinn.com>
wrote:
>
> On Wed, 2008-02-27 at 11:08 -0500, Nathan Nobbe wrote:
> > On Wed, Feb 27, 2008 at 10:37 AM, Robert Cummings <robert
interjinn.com>
> > wrote:
> >
> > > Surely he didn't explain OOP to you... he's anti OOP :)
> >
> >
> > ya; im waiting to see one of these 'simple' sites thats written strictly
> w/
> > functions and procedural code that does more than support a username
> > and password :)
>
> Careful what you say... it is very possible. Just think of all the
> complex code out there written in C. It's just a question of how you
> leverage your libraries. I personally prefer to have an object than to
> have to always pass a structure to a procedural function.
i know what you mean; obviously, php is written in c w/ functions and its
over 600k lines! as an aside, something that irritates me is the criticism
of oop is notorious for long identifiers. when if you look at the source
for
any substantial c application youll find the same sort of long identifiers;
case in point, php
zend_objects_get_address
zend_objects_store_put
zend_parse_method_parameters
zend_unmangle_property_name
and anyway, what i was really getting at is richards allusion that
all 'web pages' are very simple and therefore dont mandate the use of
classes. where my perspective is, once you get beyond something very
trivial, 'web pages' may require a ton of code to drive, no matter how the
code is written. as the amount of code in a project increases, so does the
complexity, depending on the style of the code the complexity can increase
at variable rates. ive seen and dealt w/ a number of applications that were
procedural and or functions w/o classes that were quite complex.
i understand designing for simplicity is key, however, things can only be
kept
so simple beyond reason. the more something does, the more complex it is;
period.
-nathan
attached mail follows:
Nathan Nobbe wrote:
> i understand designing for simplicity is key, however, things can only be
> kept
> so simple beyond reason. the more something does, the more complex it is;
> period.
>
> -nathan
Nice touch, but what I'm most afraid of is abstraction layers. It is
good to know what to abstract, but also how it is abstracted and where
it came from.
Sometimes, abstraction makes it so unbelievable complex, just because of
the sake of abstraction (or over-engineering). Maybe it's just me, but I
like things clean and simple. I can't grasp oversight easily. Especially
when it's someone else's code.
I do acknowledge the need (or purpose) of OOP, but sometimes you can
make it more clean and simple by getting rid of the clutter. If you
don't know anymore where the code is that you need to edit, you have to
read the code over and over again (parsing it in your head to something
that makes sense). If you have to do this 10, 20 or even 50 times a day
my head explodes.
I have to deal with spaghetti code from some old code-base every day, it
frustrates me because I can't get inside the head of the programmer who
wrote this trash. Nice patterns, nice classes (not so OOP), no
documentation. It takes to much memory, to much included files (125+),
to many templates, sometimes a 1000+ queries per page (mad!).
No. Give me procedural code please. I can read that from top to bottom,
it sticks on 1 flow of the processing. Downside is having some code
multiple times all over the place (hence an argument for OOP). But that
saves me time and a huge headache every day. I like it to maintain it
that way. And maybe the programmer after me has to clean it up too. But
refactoring procedural code is way easier that refactoring OOP code is
my opinion.
--
Aschwin Wesselius
<social>
What you would like to be done to you, do that to the other....
</social>
attached mail follows:
On Feb 27, 2008, at 11:42 AM, Aschwin Wesselius wrote:
>
> No. Give me procedural code please. I can read that from top to
> bottom, it sticks on 1 flow of the processing. Downside is having
> some code multiple times all over the place (hence an argument for
> OOP).
Wouldn't that be a perfect place for functions though? Write the
actual code just once and then call it throughout... At least that
way, it (should be) easy enough to track down the actual code that
needs to be changed... Assuming of course that the original programmer
organized the functions either into separate files, or did 1 big file
of functions...
>
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
On Wed, Feb 27, 2008 at 11:53 AM, Jason Pruim <japruim
raoset.com> wrote:
>
> On Feb 27, 2008, at 11:42 AM, Aschwin Wesselius wrote:
> >
> > No. Give me procedural code please. I can read that from top to
> > bottom, it sticks on 1 flow of the processing. Downside is having
> > some code multiple times all over the place (hence an argument for
> > OOP).
>
> Wouldn't that be a perfect place for functions though? Write the
> actual code just once and then call it throughout... At least that
> way, it (should be) easy enough to track down the actual code that
> needs to be changed... Assuming of course that the original programmer
> organized the functions either into separate files, or did 1 big file
> of functions...
Or the functions are in the same file as the rest of the code. Or
you trace the includes/requires. Or there is stack tracing on
__FILE__....
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
-----Mensagem original-----
De: Wolf [mailto:lonewolf
nc.rr.com]
Enviada em: quarta-feira, 27 de fevereiro de 2008 12:06
---- Jochem Maas <jochem
iamjochem.com> wrote:
<snip>
> >
> > Yeah, but I can't fit into that dress. ;-P
>
> besides the flower pattern doesn't really suit you, go with blue
> velvet ;-)
>
No, go with the Crushed purple velvet with the pageboy sleeves, that should
accentuate the colors of your hair...
:-P
</snip>
Okay, this is just getting weird...
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
attached mail follows:
On Wed, Feb 27, 2008 at 12:07 PM, Thiago Pojda
<thiago.pojda
softpartech.com.br> wrote:
> Okay, this is just getting weird...
We're a very close-knit bunch. ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
At 11:21 AM -0500 2/27/08, Jason Pruim wrote:
>Procedural code just more sense to me... $this =$that makes more
>sense then $this -> $that or would it be $that ->$this?
You and me both.
Also, this I understand:
$query = "SELECT cert FROM cert eval_id = $eval_id";
$result = mysql_query($query) or die('Error, query 1 failed');
But this I have problems with:
$db->select("SELECT cert_id FROM cert WHERE eval_id = $eval_id");
$db->readrow();
Sure, I understand that if you want to swap databases (MySQL to
whatever) having a abstract layer makes it easier. But, it don't make
it easier for me in the short term.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Feb 27, 2008, at 12:07 PM, Thiago Pojda wrote:
> -----Mensagem original-----
> De: Wolf [mailto:lonewolf
nc.rr.com]
> Enviada em: quarta-feira, 27 de fevereiro de 2008 12:06
>
>
> ---- Jochem Maas <jochem
iamjochem.com> wrote:
> <snip>
>>>
>>> Yeah, but I can't fit into that dress. ;-P
>>
>> besides the flower pattern doesn't really suit you, go with blue
>> velvet ;-)
>>
>
> No, go with the Crushed purple velvet with the pageboy sleeves, that
> should
> accentuate the colors of your hair...
>
> :-P
> </snip>
>
> Okay, this is just getting weird...
Wouldn't that require it to NOT be weird at some point? :)
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
>
> --
> 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-9337
www.raoset.com
japruim
raoset.com
attached mail follows:
On Wed, Feb 27, 2008 at 12:10 PM, tedd <tedd.sperling
gmail.com> wrote:
> Sure, I understand that if you want to swap databases (MySQL to
> whatever) having a abstract layer makes it easier. But, it don't make
> it easier for me in the short term.
Or create a simple non-OOP db_query() function and rewrite or
expand that as necessary.... like I do.
Lynch isn't the only anti-OOP person on this list, after all.... ;-P
Rephrase: I'm not necessarily anti-OOP, I just choose not to use
it. I can work with it, I can read it, and I can update it.... but I
don't do my own applications that way when building from the ground
up.
Most of my code is like public school on a Sunday or that one
uncle that no one in the family likes to acknowledge: no class.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On Wed, Feb 27, 2008 at 11:42 AM, Aschwin Wesselius <aschwin
illuminated.nl>
wrote:
> Nathan Nobbe wrote:
> > i understand designing for simplicity is key, however, things can only
> be
> > kept
> > so simple beyond reason. the more something does, the more complex it
> is;
> > period.
> >
> > -nathan
>
>
> Nice touch, but what I'm most afraid of is abstraction layers. It is
> good to know what to abstract, but also how it is abstracted and where
> it came from.
>
> Sometimes, abstraction makes it so unbelievable complex, just because of
> the sake of abstraction (or over-engineering). Maybe it's just me, but I
> like things clean and simple. I can't grasp oversight easily. Especially
> when it's someone else's code.
>
> I do acknowledge the need (or purpose) of OOP, but sometimes you can
> make it more clean and simple by getting rid of the clutter. If you
> don't know anymore where the code is that you need to edit, you have to
> read the code over and over again (parsing it in your head to something
> that makes sense). If you have to do this 10, 20 or even 50 times a day
> my head explodes.
>
> I have to deal with spaghetti code from some old code-base every day, it
> frustrates me because I can't get inside the head of the programmer who
> wrote this trash. Nice patterns, nice classes (not so OOP), no
> documentation. It takes to much memory, to much included files (125+),
> to many templates, sometimes a 1000+ queries per page (mad!).
>
> No. Give me procedural code please. I can read that from top to bottom,
> it sticks on 1 flow of the processing. Downside is having some code
> multiple times all over the place (hence an argument for OOP). But that
> saves me time and a huge headache every day. I like it to maintain it
> that way. And maybe the programmer after me has to clean it up too. But
> refactoring procedural code is way easier that refactoring OOP code is
> my opinion
adding layers of abstraction arbitrarily is foolish no matter what style the
code is written in. design patterns are largely methodologies for adding
abstraction but it takes time and practice to know when to use a particular
pattern and how to implement it.
one of the things that functions, and patterns do in general is assign
labels
to concepts. this is where functions take the first step over procedural
code;
you have something people can refer to in an abstract way; w/o referring to
the implementation. this enhances conversations, and reduces complexity,
think about a conversation where people are discussing a procedural block of
code; "you know in said file, where the code does that one thing..." where
as
w/ a function, you can easily refer to the functionality; "you know, the
doThatOneThing() function..". patterns do the same thing for software
engineering,
so rather than saying; "dude, i built this thing where other things can like
register,
then they can like all get messages from it when it changes.." thats where
a patterns guy steps in and says "ya dude, thats observer!". and if you all
know about it in advance you can save yourself the hassle and just say
observer,
then youre all on the same page immediately. think of the impact this has
on a design session; it doesnt quickly degrade into a low level conversation
about implementation details, because you already know how to implement
observer.
-nathan
attached mail follows:
2008. 02. 27, szerda keltezéssel 17.42-kor Aschwin Wesselius ezt Ãrta:
> Nathan Nobbe wrote:
> > i understand designing for simplicity is key, however, things can only be
> > kept
> > so simple beyond reason. the more something does, the more complex it is;
> > period.
> >
> > -nathan
>
>
> Nice touch, but what I'm most afraid of is abstraction layers. It is
> good to know what to abstract, but also how it is abstracted and where
> it came from.
>
> Sometimes, abstraction makes it so unbelievable complex, just because of
> the sake of abstraction (or over-engineering). Maybe it's just me, but I
> like things clean and simple. I can't grasp oversight easily. Especially
> when it's someone else's code.
>
> I do acknowledge the need (or purpose) of OOP, but sometimes you can
> make it more clean and simple by getting rid of the clutter. If you
> don't know anymore where the code is that you need to edit, you have to
> read the code over and over again (parsing it in your head to something
> that makes sense). If you have to do this 10, 20 or even 50 times a day
> my head explodes.
>
> I have to deal with spaghetti code from some old code-base every day, it
> frustrates me because I can't get inside the head of the programmer who
> wrote this trash. Nice patterns, nice classes (not so OOP), no
> documentation. It takes to much memory, to much included files (125+),
> to many templates, sometimes a 1000+ queries per page (mad!).
>
> No. Give me procedural code please. I can read that from top to bottom,
> it sticks on 1 flow of the processing. Downside is having some code
> multiple times all over the place (hence an argument for OOP). But that
> saves me time and a huge headache every day. I like it to maintain it
> that way. And maybe the programmer after me has to clean it up too. But
> refactoring procedural code is way easier that refactoring OOP code is
> my opinion.
>
>
nowadays I work on a project which currently has 413415 lines of php
code in hundreds of files, part of which are generated by the other
part, but at least half of it is coded by us... its well-structured oop,
we know we're using some patterns like mvc, singleton, registry, factory
and there may be several ones we are using without knowing.
now please tell me can you read 413415 lines of code from top to
bottom? ;)
(and before anybody asks, no that number does not include the framework
-symfony- and the orm -propel- we are using, only the propel generated
object classes and the classes generated by our generator and the
classes written by ourselves)
thanks to its good class structure if we need to modify something we
know which file to open and where to modify, even if that class was
originally the work of someone else in the team. how would you do that
without class structure?
greets
Zoltán Németh
>
>
> --
> Aschwin Wesselius
>
> <social>
>
> What you would like to be done to you, do that to the other....
>
> </social>
>
attached mail follows:
On Wed, Feb 27, 2008 at 12:32 PM, Zoltán Németh <znemeth
alterationx.hu>
wrote:
> 2008. 02. 27, szerda keltezéssel 17.42-kor Aschwin Wesselius ezt Ãrta:
> > Nathan Nobbe wrote:
> > > i understand designing for simplicity is key, however, things can only
> be
> > > kept
> > > so simple beyond reason. the more something does, the more complex it
> is;
> > > period.
> > >
> > > -nathan
> >
> >
> > Nice touch, but what I'm most afraid of is abstraction layers. It is
> > good to know what to abstract, but also how it is abstracted and where
> > it came from.
> >
> > Sometimes, abstraction makes it so unbelievable complex, just because of
> > the sake of abstraction (or over-engineering). Maybe it's just me, but I
> > like things clean and simple. I can't grasp oversight easily. Especially
> > when it's someone else's code.
> >
> > I do acknowledge the need (or purpose) of OOP, but sometimes you can
> > make it more clean and simple by getting rid of the clutter. If you
> > don't know anymore where the code is that you need to edit, you have to
> > read the code over and over again (parsing it in your head to something
> > that makes sense). If you have to do this 10, 20 or even 50 times a day
> > my head explodes.
> >
> > I have to deal with spaghetti code from some old code-base every day, it
> > frustrates me because I can't get inside the head of the programmer who
> > wrote this trash. Nice patterns, nice classes (not so OOP), no
> > documentation. It takes to much memory, to much included files (125+),
> > to many templates, sometimes a 1000+ queries per page (mad!).
> >
> > No. Give me procedural code please. I can read that from top to bottom,
> > it sticks on 1 flow of the processing. Downside is having some code
> > multiple times all over the place (hence an argument for OOP). But that
> > saves me time and a huge headache every day. I like it to maintain it
> > that way. And maybe the programmer after me has to clean it up too. But
> > refactoring procedural code is way easier that refactoring OOP code is
> > my opinion.
> >
> >
>
> nowadays I work on a project which currently has 413415 lines of php
> code in hundreds of files, part of which are generated by the other
> part, but at least half of it is coded by us... its well-structured oop,
> we know we're using some patterns like mvc, singleton, registry, factory
> and there may be several ones we are using without knowing.
> now please tell me can you read 413415 lines of code from top to
> bottom? ;)
> (and before anybody asks, no that number does not include the framework
> -symfony- and the orm -propel- we are using, only the propel generated
> object classes and the classes generated by our generator and the
> classes written by ourselves)
>
> thanks to its good class structure if we need to modify something we
> know which file to open and where to modify, even if that class was
> originally the work of someone else in the team. how would you do that
> without class structure?
if i were going to design a system consisting largely of functions, i would
use the same practice i use for designing classes; each function would be
concise. that is, if functions became large, eg over 20 - 30 lines (NOTE:
this value is obviously not a scientific coefficient) then i would probly
try
to rethink them. and per organizing the functions, i would group them in
files that indicated related functionality.
if i were to design a procedural system, i would do the same thing still;
except that each file would essentially be 'a function' and the 'parameters'
would be the global variables expected by said file. there would be probly
some sort of validation script, to ensure required variables were supplied;
that one would be included a lot ;)
but for me i choose classes; why; (and im not starting another holy war, for
real ;)) i started out coding on c++ then to java, now to php; i suppose i
never learned, or had any need to learn techniques of building complex
systems with functions and/or procedural code. yes, i started out w/ basic
back on the ti-86 if you really want to get down to it and i had a lot of
gotos
in there; w/ lots of 3 letter variable names. some of my programs were a
couple thousand lines of that, and i had to have an 'external document' a
sheet of looseleaf that would tell me what the variables were all really
for.
but in the current day and age ill stick w/ the status quo, the momentum,
and use classes in my code. thats what makes sense to me, and obviously
quite a few other people out there.
and yes, i use files w/ functions in them from time to time and
occasionally
sprinkle in global functions in my applications w/ classes. guess why; its
php ;)
-nathan
attached mail follows:
2008. 02. 27, szerda keltezéssel 12.45-kor Nathan Nobbe ezt Ãrta:
> On Wed, Feb 27, 2008 at 12:32 PM, Zoltán Németh <znemeth
alterationx.hu>
> wrote:
>
> > 2008. 02. 27, szerda keltezéssel 17.42-kor Aschwin Wesselius ezt Ãrta:
> > > Nathan Nobbe wrote:
> > > > i understand designing for simplicity is key, however, things can only
> > be
> > > > kept
> > > > so simple beyond reason. the more something does, the more complex it
> > is;
> > > > period.
> > > >
> > > > -nathan
> > >
> > >
> > > Nice touch, but what I'm most afraid of is abstraction layers. It is
> > > good to know what to abstract, but also how it is abstracted and where
> > > it came from.
> > >
> > > Sometimes, abstraction makes it so unbelievable complex, just because of
> > > the sake of abstraction (or over-engineering). Maybe it's just me, but I
> > > like things clean and simple. I can't grasp oversight easily. Especially
> > > when it's someone else's code.
> > >
> > > I do acknowledge the need (or purpose) of OOP, but sometimes you can
> > > make it more clean and simple by getting rid of the clutter. If you
> > > don't know anymore where the code is that you need to edit, you have to
> > > read the code over and over again (parsing it in your head to something
> > > that makes sense). If you have to do this 10, 20 or even 50 times a day
> > > my head explodes.
> > >
> > > I have to deal with spaghetti code from some old code-base every day, it
> > > frustrates me because I can't get inside the head of the programmer who
> > > wrote this trash. Nice patterns, nice classes (not so OOP), no
> > > documentation. It takes to much memory, to much included files (125+),
> > > to many templates, sometimes a 1000+ queries per page (mad!).
> > >
> > > No. Give me procedural code please. I can read that from top to bottom,
> > > it sticks on 1 flow of the processing. Downside is having some code
> > > multiple times all over the place (hence an argument for OOP). But that
> > > saves me time and a huge headache every day. I like it to maintain it
> > > that way. And maybe the programmer after me has to clean it up too. But
> > > refactoring procedural code is way easier that refactoring OOP code is
> > > my opinion.
> > >
> > >
> >
> > nowadays I work on a project which currently has 413415 lines of php
> > code in hundreds of files, part of which are generated by the other
> > part, but at least half of it is coded by us... its well-structured oop,
> > we know we're using some patterns like mvc, singleton, registry, factory
> > and there may be several ones we are using without knowing.
> > now please tell me can you read 413415 lines of code from top to
> > bottom? ;)
> > (and before anybody asks, no that number does not include the framework
> > -symfony- and the orm -propel- we are using, only the propel generated
> > object classes and the classes generated by our generator and the
> > classes written by ourselves)
> >
> > thanks to its good class structure if we need to modify something we
> > know which file to open and where to modify, even if that class was
> > originally the work of someone else in the team. how would you do that
> > without class structure?
>
>
> if i were going to design a system consisting largely of functions, i would
> use the same practice i use for designing classes; each function would be
> concise. that is, if functions became large, eg over 20 - 30 lines (NOTE:
> this value is obviously not a scientific coefficient) then i would probly
> try
> to rethink them. and per organizing the functions, i would group them in
> files that indicated related functionality.
> if i were to design a procedural system, i would do the same thing still;
> except that each file would essentially be 'a function' and the 'parameters'
> would be the global variables expected by said file. there would be probly
> some sort of validation script, to ensure required variables were supplied;
> that one would be included a lot ;)
> but for me i choose classes; why; (and im not starting another holy war, for
> real ;)) i started out coding on c++ then to java, now to php; i suppose i
> never learned, or had any need to learn techniques of building complex
> systems with functions and/or procedural code. yes, i started out w/ basic
> back on the ti-86 if you really want to get down to it and i had a lot of
> gotos
> in there; w/ lots of 3 letter variable names. some of my programs were a
> couple thousand lines of that, and i had to have an 'external document' a
> sheet of looseleaf that would tell me what the variables were all really
> for.
> but in the current day and age ill stick w/ the status quo, the momentum,
> and use classes in my code. thats what makes sense to me, and obviously
> quite a few other people out there.
> and yes, i use files w/ functions in them from time to time and
> occasionally
> sprinkle in global functions in my applications w/ classes. guess why; its
> php ;)
yeah, thats more or less all true for me too. (aside from the fact that
I started with basic on C64 not ti-86 ;) )
classes are just sooo convenient for anything larger than a couple of
files, now that I got used to them I would not go without them any more
greets
Zoltán Németh
>
> -nathan
attached mail follows:
At 6:32 PM +0100 2/27/08, Zoltán Németh wrote:
>thanks to its good class structure if we need to modify something we
>know which file to open and where to modify, even if that class was
>originally the work of someone else in the team. how would you do that
>without class structure?
>
>greets
>Zoltán Németh
Zoltán:
How? Same as you -- good organization.
My largest program (a Street Atlas type program
for the Mac) was about 10 percent the size of
yours (not counting data). But, I was the only
programmer. It took me almost two years to write
from scratch.
Just about all my code was reduced to functions
and all functions were placed in files according
theme. My "main" was probably less than 50 lines
of code.
I seldom use any globals -- for example, this program had only 4 globals.
If I needed to modify anything, I knew exactly
where to go. That was not a problem.
I understand how classes work and this project
could have been done that way. But, I think it
would have taken me longer if I had been forced
to use them.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
At 12:18 PM -0500 2/27/08, Daniel Brown wrote:
>On Wed, Feb 27, 2008 at 12:10 PM, tedd <tedd.sperling
gmail.com> wrote:
>> Sure, I understand that if you want to swap databases (MySQL to
>> whatever) having a abstract layer makes it easier. But, it don't make
>> it easier for me in the short term.
>
> Or create a simple non-OOP db_query() function and rewrite or
>expand that as necessary.... like I do.
>
> Lynch isn't the only anti-OOP person on this list, after all.... ;-P
>
> Rephrase: I'm not necessarily anti-OOP, I just choose not to use
>it. I can work with it, I can read it, and I can update it.... but I
>don't do my own applications that way when building from the ground
>up.
>
> Most of my code is like public school on a Sunday or that one
>uncle that no one in the family likes to acknowledge: no class.
Maybe, but it gets the job done.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
At 12:45 PM -0500 2/27/08, Nathan Nobbe wrote:
>if i were going to design a system consisting largely of functions, i would
>use the same practice i use for designing classes; each function would be
>concise. that is, if functions became large, eg over 20 - 30 lines
One of the things I've noticed over the span of decades is that my
functions have gotten larger as my monitor size has.
This has lead me to conclude that function size is really dependant
upon what you can "take-in" in at one time.
Fortunately/unfortunately, my eyesight is failing as my monitor size
increases so I'm at a static size now for functions, usually not
exceeding 20-30 lines.
Maybe the younger ones will remember this as they age and see if this
holds true for them.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Wed, Feb 27, 2008 at 2:17 PM, tedd <tedd.sperling
gmail.com> wrote:
> At 12:45 PM -0500 2/27/08, Nathan Nobbe wrote:
> >if i were going to design a system consisting largely of functions, i
> would
> >use the same practice i use for designing classes; each function would be
> >concise. that is, if functions became large, eg over 20 - 30 lines
>
> One of the things I've noticed over the span of decades is that my
> functions have gotten larger as my monitor size has.
>
> This has lead me to conclude that function size is really dependant
> upon what you can "take-in" in at one time.
>
> Fortunately/unfortunately, my eyesight is failing as my monitor size
> increases so I'm at a static size now for functions, usually not
> exceeding 20-30 lines.
>
> Maybe the younger ones will remember this as they age and see if this
> holds true for them.
for me it has nothing to do w/ monitor size. large functions generally
equate to one thing; they do more than one thing. which is a problem.
i hate running across do-it-all functions, because they simply arent
extensible. unless of course you dont mind tossing more conditionals
in there, and growing it even more, thereby adding more bloat and
obscuring the original purpose of the function even further. im faced
w/ this sort of code as i maintain a nasty hacked mess almost every
day for sometime now. *sigh*
but seriously, i like to keep my functions to the point. whether they
are in classes or not. theres even a formal software engineering
concept about it, separation of concerns;
http://en.wikipedia.org/wiki/Separation_of_concerns
-nathan
attached mail follows:
Richard Heyes schreef:
>> What design patterns do you usually use?
>
> Whatever solves the problem. Factory is quite a common one. MVC is another.