One of the features people tend to love or hate (or simply accept) about writing PHP scripts is how you can mix general constructs of the language – such as conditions – with functions outside of any type of class, namespace, or container.

Bringing a Little Order to the Chaos

Bringing a Little Order to the Chaos

That is, you can write conditional logic that exists within the global namespace right alongside functions that aren’t part of anything other than the global namespace, as well. This can make for difficult code to maintain.

But the point of this post isn’t to complain – for what it’s worth, I see it as the nature of the language, accept it for what it is, try to avoid it, and work with it whenever something comes across my desk. I’m far less dogmatic about that kind of stuff than I used to be when I first started working as a developer, but I digress.

Anyway, this post is tagged as “WordPress” which doesn’t make a lot of sense, however the purpose of doing so is because I was recently working on an older WordPress-based site that was using Ajax, it wasn’t doing so using the built-in API, and it was basically using Ajax to call a vanilla PHP script.

As such, I thought I’d write a bit about as how it’s still possible to refactor code like this so it’s a little more maintainable even if it’s using a style of coding with which we don’t necessarily like to use.

Read More

About two years ago, I wrote about My Day-To-Day: Path and why I was a fan of the social network. Two years ago – which is roughly a decade in Internet years, right? – and a lot has happened since then.


In fact, I stopped using the social network for a while, opted to start using it again, and continue to do so now. Occasionally, I’ll share content from Path to Twitter.

I did so a couple of weeks ago and received the following tweet:

A completely valid opinion and one I’m finding more and more people are asking me about when they find out that I (and a few family members and friends) still use.

So I thought I’d write an updated post about Path and why I’m still a fan of the app.

Read More

Occasionally, I’m asked how I handle the situation when things go south with company, clients, people with whom I’m working, and so on. This is one of those things that if you were to ask a handful of different people ranging from freelancers to C-level executives, you’d probably get different answers from each of them.

And rightly so.

After all, we’re all working for and/or with people at different places in the industry, so how we handle this situation is going to be unique to our particular position. So this isn’t one of those types of questions that has a universal answer.

I can only answer it with respect to the type of business I’ve done over the past few years. If you’re a single person or a small team, then maybe this will be helpful.

Read More

I’ve written a few articles on working with the Google Maps API – some simply based on the API itself, others within the context of WordPress.

Generally speaking, I’m not a huge fan of the API. Sure, it’s powerful and yes you can do a lot with the information Google makes available, but I’ve also found the initial learning curve of the API is kind of steep. Once you orient yourself with the basics, it’s not as bad to introduce new functionality, but there is something to initially getting started.

Google Maps

But I digress. That’s not what this post is all about. Instead, this post is meant to share how to solve a specific problem: Programmatically listing Google Maps markers when the map isn’t visible (say in a responsive website).

Read More

One of the problems I seem to have (among many, some may say ;) is I can’t seem to find a consistent way to manage bookmarks.

I don’t mean I have a problem using the “Favorites” or the “Star” feature in my web browser. I mean I might as well toss the page into a black hole if I use those features. They are a pain to organize, search, and – for whatever reason – feel like an after thought in terms of features of a browser.

And I’ve tried a number of different ways to go about managing this – if you name it, I’ve probably tried it – and it’s not from lack of knowledge of available applications for things like this either.

But it wasn’t until I found Stache I felt like I finally found a utility that made it easy for me to save resources as I was browsing the web, categorize them as needed, and then be able to search them later using any of my devices.

Read More