News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Jones' Blog:
Line Length, Volume, and Density
March 11, 2008 @ 09:33:00

In a new blog post, Paul Jones looks at three aspects of coding style - line length, volume and density - and how different people have different assumptions as to what's "right".

When it comes to coding style, there are are various ideas about how you should write the individual lines of code. The usual argument is about "how long should a line of code be"? There's more to it than that, though. Developers should also take into account line volume ("number of lines") and line density ("instructions per line").

He mentions the PEAR style guide when talking about line length, reading code like and sentence in line volume/density and how the "shorter is better" concept can be pushed to its extreme limits taking code into the unreadable zone.

0 comments voice your opinion now!
coding standard style volume length density


SitePoint PHP Blog:
The Joy of Regular Expressions [1]
September 26, 2006 @ 08:02:45

Sometimes, it's just not enough to sit and try to teach theory about something in programming - it's better to just jump right in and take things as they come. That's what Harry Fuecks thinks, at least in his latest post on the SitePoint PHP Blog - a look at the "Joy of Regular Expressions".

He does go over a bit of the theory and why they are so invaluable, but it's a short section before he gets to the heart of the article - working with regular expressions for:

  • positive matching
  • matching all instances in a given string
  • finding an exact match
  • matching the start of a string
  • validation of the contents of a string
  • checking the length of a string
There's simple examples included for each of the items to help you get an idea of how they'd work.

1 comment voice your opinion now!
regular expression tutorial theory matching length contents regular expression tutorial theory matching length contents



Community Events





Don't see your event here?
Let us know!


language list symfony framework introduction interview composer podcast opinion conference community artisanfiles release tool series laravel version security voicesoftheelephpant library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework