Posts

Showing posts from August, 2015

3 Layers of Static Code Analysis in PHP

Every developer should be running some form of static code analysis on their code regularly. A recent article I read about how this is done at Etsy makes for what I believe should be a minimum standard of code analysis for any team of developers work on a shared codebase. We shall assume you are committing your codebase to some form of version control on a regular basis. The 3 layers can be summarised as: Sanity Checks Formal Checks Security Checks Sanity and Syntax Checks In Stage 1 we perform basically a sanity check of the code. Are there any errors, missing semi-colon's or just plain stupid things being committed to our repository and code base. This is essentially a case of running php -l against all our files being checked in or changed to make sure we catch these before they are committed and let you fix them before they are picked up by the wider team. Formal Checks This stage involves a more global analysis of the source code files, checking for thin

PHP Traits

PHP 5.4 introduced the concept of traits. Until Traits PHP used a classical inheritance model in which one class could inherit only one class. In simple terms; before PHP 5.4 PHP used the single inheritance model which made it difficult to reuse the code. Traits allow developers to reuse sets of methods freely in several independent classes living in different class hierarchies. Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies. The semantics of the combination of Traits and classes is defined in a way which reduces complexity, and avoids the typical problems associated with multiple inheritance and Mixins. A Trait is similar to a class, but only intended to group functionality in a fine-grained and consistent way. It is not possible to instantiate a Trait

Keeping Account Management REAL

Account Management should be methodical. A process to work through to ensure nothing is missed.  The best way to do this is to remember 4 key stages. The four key stages in account management are: Recognise – The needs of the business, the customers' requirements and the role of the account manager Evaluate – Our current customer base, prospect list, category and planning process Act – On our plans, the sales process and required resources Learn – From what we've done, sharpen the axe and move forward

How to Lose Your Clients

If you are wondering how account management could cause you to lose a client, please pay close attention. In my experience, account management is almost as important as results. Clients typically terminate accounts when they are confused or just plain frustrated with you. What are the common account management mistakes you should avoid? What are the best tips for success? Account Management Mistakes You Should Avoid 1. Not writing a fresh email One of the biggest mistakes I see people making is sending an email to their client with all of their internal correspondences included. In other words, they went back and forth a few times with colleagues, and instead of writing a fresh new email, they just replied to the client from the last email they received from their colleagues. This allows the client to see what you are saying back and forth to one another. Depending on what was said, you could really end up with your foot in your mouth. 2. Not being prepared It's so easy to ju