RE: PHP Standard style of writing your code

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

 



At 2:12 AM -0500 4/29/06, Richard Lynch wrote:
But I'm totally serious here -- I made this decision in college circa
1981, and I wrote the same long program both ways, and hung the two
versions up on the wall side-by-side, and I liked the one with { on
the same lines better.

I even solicited my non-programmer roommates' opinions, and they also
preferred the braces on the same line as ASCII art.

Well, that settles it -- if non-programmers like it, then it must be correct. :-)

It reminds of a time where a large oil company's "Geophysicist" was evaluating other consulting Geophysicist's work (I was one -- see http://geophysics.com ). He took our work product (highly technical seismic displays) and hung them on a wall and had everyone in the office (accountants, secretaries, UPS delivery man, etc.) parade by and pick the display they thought looked the best. To the winner, he awarded a multimillion dollar contract!

It had to be the worst way to evaluate a Geophysicist I have ever witnessed.

-------
I daresay an experienced programmer is going to pick the style they
prefer as "prettier."

I don't know about prettier, but I certainly strive that every piece of code I write to have a consistent style that I recognize as mine. Plus, when I see another programmer use the same style, I naturally assume that he's very intelligent. :-)

Additionally, the style I've developed cuts across several languages I've known.

------
Though it would be an interesting experiment for some psychology
student to A/B compare with programmers, non-programmers, experienced
programmers, etc...

That may be an interesting study as to how we perceive and solve problems -- anal-retentive vs the free-will types and all variations in between. Each, I am sure, has their place in the overall scheme of things.

But, I will pass on to the group here that I have noticed (over the last 40 years ) in my programming that the size of my monitor is generally in direct relationship with the size of my functions.

In addition, the larger my monitors, the more white space I use in making my code "pretty" and documented. In my view, there is no wasted space -- just a way to reduce my confusion.

tedd
--
--------------------------------------------------------------------------------
http://sperling.com

--
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