Qafoo GmbH - passion for software quality ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Author: www-data :Date: Wed, 31 Oct 2018 10:07:55 +0100 :Copyright: All rights reserved ====================== Object Oriented Design ====================== - Ducks Do Not Type I consider public methods not originating from an abstract class or interface a code smell – at least when following class based object orientation design principles. Let me explain why… - Coding in Katas In almost any kind of sports you hone your skills by repeating a small piece of practice over and over again. Pretty much the same works for learning to play a musical instrument. The idea of Code Katas applies this simple, but for many aspects effective, method of exercise to the world of programming. - Code Review Tool We, at Qafoo, do Code Reviews quite often together with our customers. This often focusses on dicussing metrics, browsing the associated code and discussing solutions for the issues found. We started using a bunch of shell scripts for that, like everyone else, but at some point we came up with a webinterface to do this in a more comfortable way. Now we want to share this tool with you. - Abstract Classes vs. Interfaces Features of object oriented languages are often use from a purely technical perspective, without respect to their actual semantics. This is fine as long as it works for you, but might lead to problems in the long run. In this article I discuss the semantical differences between abstract classes and interfaces. I also outline why following the semantics of those language constructs can lead to better code. - Object lifecycle control From time to time I trip over APIs, which do not allow me to control the object lifecycle of the used objects myself. Let me discuss why this is a bad thing… - Howto write a Rule for PHPMD This blog post will give you a detailed introduction into the development of custom PHPMD rules. PHPMD is static code analysis tool that helps to improve the quality of PHP software projects. Therefore it processes the project's source code and searches for known error patterns, design flaws, overcomplicated expressions and unused/dead code. You would like to use like PHPMD to improve the quality of your project, but you are missing a features in the current release, then you should read this post. Because this blog post will give a detailed description how to write and configure PHPMD with own rules for. - Struct classes in PHP PHP arrays are a wonderful tool and one of the reasons I like PHP. Their versatility makes it possible to easily set up proof of concepts (POC), either used as hash maps storing multiple keys, or as lists, stacks, trees or whatever you like. But once you are past the phase of the initial POC, the excessive usage of arrays and exactly their versatility has some drawbacks: If you see an array type hint or return documentation, you know nearly nothing about the data structure. Using arrays as key-value hash maps for storing configuration keys or data sets you also know nearly nothing about the expected contents of the array. - Why software quality matters It is not always obvious why software quality matters in any development project. Especially in the PHP area, where projects are often won by pitching with short development time and low cost, people don't see the benefits of quality assurance action for their projects. We have therefore made up a white paper explaining the benefits of software quality for your company and how quality assurance can influence important business goals of development projects.