logo       

Re: Useful Function Names: msg#00020

Subject: Re: Useful Function Names
On Sat, Oct 18, 2003 at 03:43:14PM -0400, Mike Gifford wrote:
> Howdy Joe,
> 
> On Fri, 2003-10-17 at 10:17, Joe Stewart wrote:
> > On Thu, Oct 16, 2003 at 09:23:50AM -0400, Mike Gifford wrote:
> > > One of our developers wasn't too keen on the function names "clean" and
> > > "dirty" in class/functions.inc
> > > In a future release could these be extended so that they are more
> > > descriptive?  cleanUserHTML perhaps?  He'd just like to have as much
> > > meaning built into it as possible.
> > yes.  I saw a note about name collision with getHeader in the BE cvs too.
> 
> It's hard to think of descriptive names some times.  You know what you
> mean and what you want the function to do..  If you could do that it
> would be great.  We'll certainly adopt it.
>

been trying to use psl prefixes of late.

> > > Also in class/slashPerm.class:have_perm() - If single letter variable
> > > names could be avoided or at least commented that would be good. 
> > > Realize this is just a modified version of phplib, but it's always
> > > easier to understand the code when it is written in human. 
> > If it's just the $i integer increments, I'm not too worried about this.  
> > This has been programming convention for a long time.
> 
> There are some $j's in there too..  I'm not all that concerned with
> it..  Teh $i, $ii & $iii, $v, $k conventions are pretty normal.  Wasn't
> sure what $j was referring to though.
> 

old fortran guy.  j is another integer increment.

I see the code in question.  Yes, it needs documenting and rewriting.  k
and v are the key and value.

> > As far as foreach loops instead of for loops.  This has been done as code
> > is worked on and was one of the design goals.
> 
> Yup.  Damn, I was hoping that http://www.phpslash.org was back up so I
> could look at your developers guide so I could just refer folks there
> (as we've done in the past).
> 

http://phpslash.sourceforge.net

This is why I don't use the rooturl.  Both domains served with one setup.

> > Also don't use:
> > for ($i = '0' ; $i < count($allSections_ary) ; $i++) {
> > since the count function is call for each loop.  Instead calculate the
> > count before the loop.
> 
> Interesting..  I didn't realize that..  That might be worth going back
> and cleaning up to boost performance.
> 

I haven't noticed it actually helping significantly.  But better practice.

> > But in general, move to foreach as development continues.  One thing this
> > can do is generate more warnings instead of less in at least one instance.
> 
> Good..
> 
> > Also getting rid of the warnings by defining variables before their use
> > definitely slows down the code measurably.  But I have found a few bugs in
> > the code fixing.
> 
> Yeah..  I figured that there must be a trade off for adding in the extra
> code/variables...  I do think it is easier for folks who are used to
> having the warnings/notices enabled to have an environment that isn't
> flooded with harmless ones..  I've had a couple folks complain about it
> this year.  
> 

Anybody getting them with 0.7.2, either submit a bug or patch please.

Joe

> Mike
> -- 
> Mike Gifford, OpenConcept Consulting
> Free Software for Social Change -> http://www.openconcept.ca
> Beads of Hope Campaign - http://uc.openconcept.ca/petition.php
> Nonconformity is the highest evolutionary attainment of social animals -
> Aldo Leopold
> 


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe