You Suck At Programming And I Hate You: Things NEVER To Do In PHP & SQL

One of the more exciting (by which I mean soul-crushing, murderous-rage inducing) things about my job is getting to look at the terrible, terrible code that runs all sorts of different websites on the internet. Chances are, you wrote some of this terrible code; I know I did.  It’s even possible that you still write such code. In case you do, go grab yourself a stiff drink (a strong vodka martini, or gin and tonic is recommended) and get comfortable, because I’m about to lay some edumacation on you.

Things You Should Never Do

First, I’m going to talk about some things I’ve come across that you should never, ever do. If you do these things and I ever have to work on your code, be prepared for the fury of ten-thousand burning suns to come crashing down around you, for I have warned you. Pay it forward by writing decent code, for one day you may find yourself having to maintain someone else’s heap of terrible code and woe, for you shall feel some tinge of guilt, having made other developers go through your new hell.

All of the snippets in this article were found in actual code being used in the wild. (And most of them come from a single, disastrous, amalgamation-of-fail file.)

Read More »

Posted in: Development, Rants

Book Review: php|architect’s Guide to Enterprise PHP Development

Our office purchased a copy of php|architect’s Guide to Enterprise PHP Development (TOC) by Ivo Jansch last week, and I called dibs on the review. In it, Jansch sets out to identify tools and methodologies PHP developers can use (and have traditionally not used) to increase their chances of success. Jansch points out that PHP rapidly went from a tool used mainly to develop Personal Home Pages (I don’t know why I capitalized that… so weird) to an increasingly well-regarded enterprise-level platform. Unfortunately, while the open source community surrounding PHP is one of the most active and vibrant ones around, it has been reluctant to pick up some of the more formal development processes that the .NET and J2EE platforms are known for. We’ll dive deeper into the book in about 20 pixels. (You might have to click on a link or something, just a heads-up.)

Read More »

Posted in: Reviews

Enterprise Patterns: A Look At Application Service

Today we’re going to talk about PHP enterprise patterns and all the fun they bring to the party. We’ll get into front controllers and take a close look at MVC as well.

Towns, Buildings, Construction

So let’s talk about patterns. Specifically, I’d like to talk about the MVC architecture pattern, and some thoughts I’ve had recently regarding its application. Let’s first clear the air a bit, make sure everyone is limber, and define our terms. It may be unknown to some that the seminal work in patterns, A Pattern Language: Towns, Buildings, Construction, was actually about architecture (the kind with buildings) and urban planning, not software design. One of the key observations the author makes in the book is that many cities which are laid out in a practical and attractive manner follow a similar pattern, which was varied depending on the exact situation. This is exactly how patterns in software architecture work; Patterns are elegant solutions to common problems that are flexible enough to be applied to differing scenarios.

Read More »

Posted in: Articles, Development

The Software I Use

Chris is threatening to take away my shiny new workstation if I don’t make a blog post, and while we’ve got some interesting stuff in the pipeline, it’s not quite ready yet. Instead, I will make one of those generic posts that every blogger at some point makes: the list of software I use.

Read More »

Posted in: Cool Stuff

Meet David Bernal: Developer

My name is David Bernal and I’m one of the developers at Synapse Studios. I’ve been with the company for nearly 2 years, which, at this company is fairly long. I’ve been chest-deep in code since day one and have worked for various clients and on many personal projects before then.

As a developer, my primary contributions to this blog will be about enterprise patterns and reuse ability as we implement them in client projects and particularly in the Canopy Framework. One of my particular strengths is the wide variety of experience I have beyond the realm of PHP-based web development. In a previous life as a desktop application developer I worked primarily with C# and so I have experience with the things the .NET library does well and those which PHP does better. Based on this experience, I’ll be working with the team this summer to incorporate some exciting automation and reusability enhancements into the framework. Stay tuned, as the coming months promise to be exciting times for the web’s next best application platform. [That's Canopy, we think]

Posted in: People