Daves Personal Blog

Standardizing

by on Jun.07, 2012, under Ramblings

Okay.. so most developers know, standardization is key to good code.  Now when I was in school learning C and Cobol, we were taught to indent code in thus style:

function someFunc($a, $b) {
    echo "Do something";
    if (1==1) {
        echo "Do Something";
    }
}

Now, I’ve been doing a lot of work in WordPress over the last couple years and have been told I should be formatting and standardizing on the K&R formatting system.. This is counter-intuitive to what I learned.. 🙂 But I guess I need to change..
The K&R system is like thus:

function someFunc($a, $b)
{
    echo "Do something";
    if (1==1) {
        echo "Do Something";
    }
}

This will be a heck of a learning curve.. but I’ve already started changing my editors to do the new K&R style.. man it’s going to be a long road…

You wouldn’t think that one “ENTER” would make much of a difference, but when you have been doing something for 15 years the same way.. change will be rough..

1 comment for this entry:
  • Geovanny Poveda

    Hi Dave,

    Sorry…….

    I was looking for your email contact information in github and your personal homepage but it was impossible for me.

    Could you advise me on ordr api-php ?

    Thank you so much

    poveda.geovanny@gmail.com

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...