has become too complex to be understood. • Often these days we just call this “legacy”. • It’s known as the silent killer of projects. • Based on the theory of incompetence in organisations due to promotion. • Can be avoided using good coding practices and avoiding unnecessarily complex code. • You can read much about it in Dilbert comics.
me, I can make this HTML page show things in a database, cool! • I’ll just use these variables from the query string to connect. Let’s mix it all up for speed. • Yay, MVC! Views are for winners. Separate all the things. • What is this Symfony framework thing people keep talking about? Composer is life. • Hey I’m getting pretty good at this OOP thing, let’s abstract all the things. Re-usability! • Input escaping is cool, look ma, no SQL Injections. XSS is so yesterday. • I am a code ninja. I don’t even see the code any more. I just see blonde, brunette, redhead. • Who wrote that awful unreadable code. What does it even do? Oh wait that was me a month ago. • Why god, why??? • OK, let’s just keep it simple, stupid. Simplicity is sanity.
in mind, don’t just write code for a machine to read. • Write code like future developers are armed, and know where you live. • Name your variables clearly, along with method and class names. • Make good use of in-line comments and doc blocks, though no pointless comments. • Use, but don’t abuse the Single Responsibility Principle. You can go too far! • Have consistent coding standards – e.g. PSR2. It really doesn’t matter which. • Try to have a nice low cyclomatic complexity score. • Generally, just avoid unnecessary features and complexity.
perform best when they have simple designs rather than complex ones. The simplest solution is often the best. In Philosophy it is called “Occam’s Razor”.
principle that states a programmer should not add functionality until deemed necessary. No more “oh but someone might need this in future, it’ll only take a minute”. ++$maintenance ++$tests ++$bugs YAGNI