Re: verify problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 8, 2009 at 7:31 AM, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>wrote:

> On Sat, 2009-03-07 at 06:23 -0800, Michael A. Peters wrote:
> > Ashley Sheridan wrote:
> >
> > >>
> > > I'm more a fan of lining up opening and closing brackets so they are at
> > > the same indent level. It prevents one of the most popular errors
> caused
> > > by omitting a bracket, brace or other in the wrong place. A few extra
> > > line breaks in the code are not going to make a noticeable impact on
> the
> > > file size of the script!
> >
> > It's fairly easy to check for missing } with my method as well
> >
> > statementA {
> >     statementa1
> >     statementa2
> >     statementa3
> > statementB {
> >     statementb1
> >     statementb2
> >     }
> >
> >
> > You can see the missing bracket for statementA by seeing that statementB
> > doesn't have one above it.
> >
> > I also generally create my } as soon as I create the { so I can comment
> > the } identifying what it closes.
> >
> > I don't always comment it, but when I don't there are times I did when
> > trying to track down a logic issue in nested loops.
> >
> > But - how to indent - if it's your project, whatever floats your boat,
> > if it's a group project, you conform to the group specification for
> > indenting (almost nothing is worse than several different indentation
> > methods in a source file edited by multiple people - especially mixing
> > real tabs and spaces, unix line breaks and dos line breaks.)
> >
> It's easy to check in that example, but imagine a case in the switch
> that spans many screens worth of content, with many multiple levels of
> indentation. It soon gets impossible to check with a quick glance. Yes,
> a good IDE does make this a non-issue,... but real coders use a standard
> text editor don't they? ;)
>


Do the real coders make invent the first Wheel?
Do they always type and never use Ctrl+C and Ctrl+V?


I think a good IDE is a means of productivity multiplier. A coder can think
of many other things which really matters.

It can be compared with the Wild west gunmen versus AK-47 shooters or
Bazooka

>
>
> Ash
> www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux