André Figueira

Systems engineer - I write apps, I make websites, opinions are my own...

On standards and practices

I’ve recently quit my job as I found another one with a better salary and more interesting work. I should be fair in fact to the work, the idea was interesting, but the execution was not, I am an advocate for open source, best practices and standards. Any of the work I undertake in my own time I always adhere to PSR, and attempt to write code which adheres to best practice, e.g. using design patterns which have been established and proven, and where possible do not re-invent the wheel, there is nearly always a package for what you’re looking to do, just go to packagist.

One of the primary reasons for me leaving was my own OCD, I’m used to clarity and order, and where I see a mess I attempt to clean up, I am a “neat”. I like to have my code named semantically and descriptively, so my code almost speaks for itself in what it does, It’s expressive.

For these reasons I chose to depart from that project, it would never have the practices, or consistencies I believe make a good application, both reliable, stable, secure and most of all easy to maintain. I don’t like re-inventing the wheel, there are many tools which have been created to solve the very problems you’re attempting to solve, but others have done the work for you so that you may focus on what’s important, you’re code, the business logic which will run the primary objective of your application.

Comic about standards

When you prefer to roll your own and base your work without standards, and it's still consistent, you've essentially created a new standard that sometimes overlaps, more often than not, if you choose not to follow a standard it's a lot easier for things to get sloppy, and end up with a ton of spaghetti. Unfortunaltey there is very much still an anti open source mentality in the PHP community, more so with the older developers who were around during the PHP3/PHP4 days, when there was only PEAR, and copy and paste. Due to the fact that PEAR was essentially a nightmare, and you'd need root access, many PHP developers happily carried on using copy and paste for dependencies.

Many times, due to the PHP market being saturated with 1000s ways to skin a snake it would be quite tiresome to go through each method of doing something learning it, then realising it didn't suit your needs without heavy modification, this led developers to roll their own for nearly everything they did, I'm guilty of this, and I know many other developers whom are too. The point is, technology is always evolving, the advent of Composer ushered a new generation for modern PHP, it changed the way we built our applications. Open source really started to take an upward trend. Using Frameworks and third party packages has never been so easy, and as technology evolves, we cannot afford to become complacent in thinking we know everything we need to, there is always more to learn, and everytime you learn something new, you realise you've only just scratched the surface.

Alas, there is always a learning curve with anything, and many of these old school programmers, simply don't have the patience to learn things again, to do it the modern way, they look at their current toolset, and see themselves with the skills to build anything they desire. Albeit a lot slower than someone who embraces open source, and leverages the right tools and packages to build their application.

Standards exist for a reason, they help establish a way in which many parties agree to follow, to make interactions with each other easier, in this case for PHP it's the FIG, they come up with standards to make it easier for its members to work with each other, their code becomes interoperable. This article kind of turned into verbal diarrhoea and spilled over into the use of open source as well as just standards Sorrow :P.