Have you ever needed to build a new feature or fix some bugs for a WordPress site? Chances are the code you need to work with is way too complicated to understand quickly.
You can use a combination of
wp_die() to do some basic introspection, but that’s really just a snapshot of a moment in the code.
What you need to understand to fix the bug is to know where the application execution started, what was triggered and how you ended up at a certain point. What you need is a trace.
Continue reading One Weird Trick to Debug WordPress Quickly
There’s very little code that’s completely independent of other code. A simple “hello world” in your favorite language relies on the code powering your language. As your objective gets more complex, you start relying on more and more code to get things done. Your code depends on other code, which depends on other code, which … you get the idea.
An unfortunate side-effect of code dependency is yours inherits the flaws of other code it relies on. As a result, your code sucks because the code it relies on sucks.
Instead of getting on a soapbox about poor code, since we’ve written and released our fair share of it, lets focus on how you can make code great again.
Continue reading Make Code Great Again
Something in my laptop died a few days ago. I’m hoping it’s a simple change and it’s back to its (very) old self. Thank God I was able to get my hands on an alternate machine to use in the interim.
While the scary prospect of not having a machine to work from was avoided, I had to go from a fresh installation of Windows 7 to something that resembled my work environment. No easy feat since this particular machine is a culmination of software and configurations from the last six years.
Continue reading Laptop Failure Playbook
While this encourages code reuse and interoperability, you’re left with the responsibility of writing glue code to marshal oft misaligned paradigms to accomplish your objective.
CJS-Task was created with the desire to bring simplicity by acting as a high-quality glue between all the pieces you’ll use.
How? A few tricks.
Continue reading CJS-Task 0.0.8 Release
One day, however, a new sort of ad appeared in the pages of several dailies: an appeal from a certain Prince Bil Morrison.
The prince was of noble birth and hailed from the far reaches of Nigeria. All he wanted was some American pen pals.
So moving was the wording of the ad that the papers had published his mailing address free of charge. Should not the poor prince find some good old American correspondents?
Continue reading The First 419 Guy was an American Child
The story of how Matt Damon came to stardom is pretty interesting.
He was looking for a prominent role in a movie. Nobody would cast him in the role, so he wrote his own script and cast himself in the role. Problem solved.
Continue reading Do It Yourself
I am not an OOP convert. I’ve spent most of my professional life working with classes and objects, but the more time I spend, the less I understand why you’d want to combine code and data so rigidly. I want to handle data as data and write the code that best fits a particular situation.
– Games in C by Jonathan Whiting
Continue reading Classes Suck
It houses great big libraries like React, Electron and socket.io. It also contains itty-bitty snippets of code. Code so small you’d expect their behavior to be native to the language.
This seems like a very bad idea to me.
This is a Swiss Army Knife. The Handyman, to be precise. According to the site, it has 24 functions. Can opener, scissors, nail file, pliers, wine opener, bottle opener, wood saw, toothpick, nail cleaner … the list goes on.
Conceptually, it’s really great to have one thing that does so much.
Realistically, Swiss Army Knives have not replaced the need for single-purpose devices in any of those categories.
It’s doing too much to be good enough at one task to replace a device crafted specifically to solve a single purpose in any of those categories.
Have you watched Inception?
It’s a really interesting movie where people can enter the dreams of others. I don’t wanna ruin it for anyone but the ability to enter dreams is infinite.
You can enter the dream of someone who is sleeping in a dream. Dream within a dream.
My first dream was to design for the internet.
The moment I saw the Cartoon Network website in the late nineties, I knew that’s exactly what I wanted to do. I learned how to use Photoshop, Illustrator, picked up HTML + CSS, designed MySpace pages and built a static website.
The static website was the accomplishment of my dream. I designed a website, coded it up, published it on the internet and got paid handsomely for it.
Almost immediately after, I was unsatisfied.
Continue reading Deeper