quote

How should you think about defining classes? the best approach is to think of a class as having a primary responsibility and to make that responsibility as singular and focused as possible. Put the responsibility into words. It has been said that you should be able to describe a class’s responsibility in 25 words or less, rarely using the words “and” or “or.” If your sentence gets too long or mired in clauses, it is probably time to consider defining new classes along the lines of some of the responsibilities you have described.… More

post

WP Meta Sort Posts WordPress Plugin

I initially developed WP Meta Sort Posts plugin because I needed to be able to create archive-style pages for posts based on custom fields. I quickly realized that it would be just as easy to knock down all the walls and allow for custom sorted pages to be created based on any combination of WordPress query variables. WP Meta Sort Posts is still in its initial beta release and I welcome all feedback and feature suggestions. If you would like to participate in development I will be managing the project through Github.com.
post

Learn the PHP Switch Statement

The PHP switch statement is a conditional statement used to select one of many possible blocks of code, which are called cases. By comparing the value of the expression to the value of each defined case, the switch statement will choose the correct block of code to execute.… More

post

Learn the PHP If Statement

The if statement is one of the most important features of any programming language because it allows you to evaluate expressions and selectively execute blocks of code if the expression evaluates to true. The principal behind the if statement is simply if (expression) is true, then do this or else do something different or nothing at all.… More

post

Learn PHP Operators

You may be thinking to yourself, why study PHP operators? After all, I think I can figure out what is going on by looking at code examples and I already have a good idea of what it means when I see a plus symbol, minus sign or equals sign.… More