[OT] [thelist] Email vs. E-mail vs. email vs. e-mail

Lachlan Cannon luminosity at members.evolt.org
Thu May 23 06:33:00 CDT 2002


Miriam Frost said:
>> I think the hyphen is there merely because it's a joined word, eg
>> electonic-mail.
> Bingo! Reason number one. We rule.

Well, I can't argue with that. ;)

<tip author="Lachlan" type="optimising PHP">
Always make sure you use the best function for the job, and native functions
over building your own. Thus if you need to convert newlines to line breaks,
use nl2br.

If nl2br didn't exist, the next best function would be str_replace.
ereg_replace should only ever be used if you actually need to use a regular
expression.
</tip>

<tip author="Lachlan" type="extensible coding">
Find yourself writing code more than once? Write a function, to automate the
task. You'll save yourself from boredom, and the large lilelihood that in
one of those versions of the same stuff you'll make a typo, or some other
hard to find mistake.
</tip>

<tip author="Lachlan" type="typography">
Find yourself inserting -- into a document for an em dash? Don't. Using the
proper entity (&#8212;) will make the eye flow more easily from one side of
the dash to the other. Using proper typography like this can greatly
increase the readibility of a document on tired eyes, and make it quicker
for someoen to read through and co,prehend it. For more typography help see:
http://www.alistapart.com/stories/emen/
</tip>

<tip author="Lachlan" type="coding a site">
When you are producing scripts for a site, make sure you use a consistent
coding style. This will make it much easier for you, or anyone else who
reads through your code later to understand how the site works.
</tip>

<tip author="Lachlan" type="maintaining consistency">
Before you start coding a site, decide on a coding style and make sure you
document it. This way if you can't remember how you've decided to handle a
certain part of your style, you always have something to check. Documenting
it will also help you to remember it better, and will mean that if someone
else has to maintain the coe later, it will still maintain consistency.
</tip>

<tip author="Lachlan" type="code libraries">
After finding parts of your code that you reuse frequently and turning them
into functions, take any of them that could possibly be used by another
script (even ones which don't exist yet), and put them into an external code
library. Make sure you give your libraries smart names to keep track of them
later. Then if you need a custom date function you wrote, you won't need to
go searching for the name of it's library, but will know straight away to
import the date library.
</tip>

<tip author="Lachlan" type="security">
Always keep database and other important password and usernames out of your
scripts. This way if the code parses goes down, and your files are sent as
plain text, people won't be able to find the passwords and wreak havoc on
your site.

The best place to keep the file you include the password variables from is
in a directory outside the publicly accessible path. (eg, keep it in
/home/user/includes/ instead of in /home/user/public_html). Also, if you are
using a unix system you can prepend a . to the start of the filename to make
it hidden.
</tip>

Lach
--------------------------------------
http://members.evolt.org/luminosity/
MSN: luminosity @ members.evolt.org
--------------------------------------





More information about the thelist mailing list