the way i roll…

Since I do work for a variety of clients, I am of course happy to adopt whatever systems and styles they use if it is important to them. But I do have my personal preferences if I have the choice:

FONT: Verdana, 8 pt (I believe I have used Geneva on Mac in the past)
The basic point is that there is no need to use monospaced fonts with the languages I typically use: PHP/MySQL/Javascript

INDENT CHARACTER: tab

INDENT STYLE: Allman Style

if (foo) 
{
    bar();
}

AVOID AT ALL COSTS:
1 – AVOID: blocks of code that don’t fit in one small screen
2 – AVOID: nested IFs or LOOP. In almost every situation it can much more readably coded with a max depth of 1

*DO* DO THIS:
3 – AVOID ELSE, RETURN EARLY
And generally if you have more than about 1 level of {}’s in your method/function then you are probably failing at #1 above.

Advertisements

Leave a comment

Filed under mywork

Comments are closed.