The importance of mastering the fundamentals

One of the most common questions I get is, "how can I get better at X?" Whether X is object oriented programming, the MVC design pattern, PHP in general or just some generic question, it's something people are seeking out.

The answer that I always give them is that it's critical for them to understand the fundamentals of whatever they're seeking knowledge in.

Continue reading

Avoiding object oriented overkill

In the second live session of my object oriented design class, The Object Oriented PHP Masterclass, I show my students domain modeling, both with slides and with a live coding demonstration.

In my demonstration, I show them how I break the single model they’ve been using into three component parts: a value object, a data layer object (usually that talks to the database), and a gateway object that stands between the other two.

Continue reading

Are You Leaving Money On The Table?

I know most developers like you love to learn new things. They thrive on conquering new challenges and learning new techniques. Many people learn new languages just for the challenge. After all, why would anyone ever write a Brainfuck interpreter in the first place?

Many of us receive our training through our employers. We expect and accept that our employers will offer us continuing growth opportunities to boost our skills. But this creates a problem for us as our careers go on. How can you effectively train yourself for the skills you’ll need in your next job?

Continue reading

Writing Intentionally Bad Code

I’ve done my fair share of speaking; I won’t say I’ve done a lot of speaking (not at least compared to people like Laura Thomson, Chris Hartjes or Rafael Dohms), but I’ve done a bit. Every time you speak people expect to see code in your slides. And they expect to see both a wrong way and a right way to do a particular thing.

That’s all fine and good; slides aren’t big enough to write an entire application. But in preparing for my class, The Object Oriented PHP Masterclass, my task has been to write a complete application that my students can refactor using the principles they have learned. And writing code wrongly, on purpose, is hard.

Continue reading