[Phpwm] Saving snippets of code - Which applications are best?
elliot at townx.org
elliot at townx.org
Mon Mar 2 12:41:32 UTC 2009
Hello Gavin,
On Mon, 02 Mar 2009 11:59:52 +0000, David Goodwin <david at codepoets.co.uk>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Gavin Kimpson wrote:
>> Hi guys,
>>
>> Everyone does this differently I know - but what applications do you
>> regularly use to save your 'snippets' of code that you commonly use?
>
> I don't. I either rummage through previous projects where I remember
> something to be, or I will have added it to some sort of library-ish
> routine... and will use that
I agree with David: it's good discipline to extract pieces of code you use
regularly into libraries you can reuse. The job of extracting the code into
a library is a good exercise in itself, as it forces you to make your
functions more generic and remove any project-specific stuff (e.g.
hard-coded paths or constants). Better yet, find someone else's open source
code, use that, and contribute to it if you can: the Zend Framework is
bloody marvellous for this, but PEAR and PECL have lots to offer too.
Elliot
>
> thanks
> David.
>
> - --
> David Goodwin
>
> [ david at codepoets dot co dot uk ]
> [ http://www.codepoets.co.uk ]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkmryjgACgkQ/ISo3RF5V6bIlACg+rNzkC9L62O2OhIR+CU0t4nh
> C+UAniwEzvQpCoED143XQhKJGlBWJRsP
> =0bgH
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm
More information about the Phpwm
mailing list