Page 23 of All Articles

Ground up rewrites should be a last resort not the status quo

And even then, everything has to be so fucking abysmal that there’s no way to avoid it. The only time I’d ever condone a full rewrite is when you are completely abandoning an existing user base else you’re probably going to disappoint at least a good chunk of your users […]

Nintendo Wii U First Impressions

tl;dr - I like the Wii U but do have some pain points. Also affiliate links, so many affiliate links. I grew up in the 1980s. I got to experience the 8-bit console wars first hand. The Wizard taught me that the Power Glove was “so bad” (and how to […]

Holiday API free and ready to fork!

Last week’s post on calculating what date Thanksgiving will fall on got me thinking, wouldn’t it be cool is there was an API that you can call to return holidays for a specific date, month or even the entire year? I did some digging and there were some premium API’s […]

What I am thankful for

Surrounded by Facebook statuses about how miserable and broke everyone seems to be and with it being the week of Thanksgiving it felt appropriate to drop a quick list of things I’m thankful for: My wife who has the tolerance of a saint for putting up with my shit day […]

How to calculate Thanksgiving's date with PHP

The topic of this post ended up turning into quite the programming exercise for me. In true PHP fashion, I was able to come up with 3 distinct methods to determine what date Thanksgiving falls on (and have another in mind but it’s just a crappier version of what I’m […]

My Experience with Wizpert

For those that aren’t familiar, Wizpert is a platform for chatting with people (Skype, Gtalk and their site) that are experts (referred to as “wizperts”) of specific topics. Earlier in the year I was sent a beta invite to become a wizpert in the category of PHP. I’m not a […]

How to convert a negative number to a positive number with PHP

Converting a number from negative to positive is a pretty simple process using the absolute function abs(): $positive = abs(-123); // = 123 $positive = abs(123); // also = 123 Absolute returns a positive integer or float based on what you feed it. Because it only ever returns a positive […]

DirectNIC may have been compromised

Didn’t see any news about it this AM but it seems that DirectNIC may have been compromised. My wife just spoke with Bank of America regarding fraudulent activity on her credit card. According to the person she spoke with, DirectNIC had been compromised and there was a ping against her […]

PHP's HereDoc versus NowDoc

We’ve previously discussed how to assign variables and add in variables and all of that good stuff, but what about if you are dealing with a large block of text? There’s many approaches, most that require you to be mindful of escaping characters like simply using quotes to wrap a […]

Book Review: Remote: Office Not Required

I’m back on a reading kick as of late having knocked out 3 books in the last few weeks (Web Performance Daybook Volume 2 and Growth Hacker Marketing: A Primer on the Future of PR, Marketing, and Advertising) including the latest from 37signals, Remote: Office Not Required. I’ve been a […]

One Year Quitaversary!

Last week (October 30th, 2013) marks the one year anniversary of quitting my day job at CrowdSavings and pursuing my own startup dreams / running my own company. At the time I had only 3 social networks up and running with around 30k active users (SceneKids making up 99% of […]

How to handle daylight savings time in PHP

If you’ve ever dealt with time in PHP you’ve probably been burnt by daylight savings time before (quite possibly yesterday ;). I’ve been there, waking up on the Sunday of the time change with an email about timestamps being an hour off or some other anomaly that ends up being […]

Temporary `ufw` rules or How I learned to stop scripting and love the shell

This post was originally planned to be a social commentary on the potential for riots this coming Novemeber (a/k/a The 2013 Food Stamp Riots a/k/a The Backlash of the Entitlement Society) but that seemed like such a fucking downer. Then the post was supposed to be about a Python script […]

Split an array into chunks with PHP

Array chunking is a great way to paginate large arrays and as I found out recently, makes it very easy to map a large array from Redis (by way of mget and/or pipelining) back to the original data. Chunking an array is the process of taking an array and splitting […]

Were termites the least of our problems?

I’m definitely starting to think so at this point. If you’re not aware, last week our house was tented for termites and we took a mini vacation to New Orleans. What most don’t know is that this tenting was over a year in the making. Let’s back it up to […]

Shuffle an associative array with PHP

PHP makes it really easy to randomize the order of an array with the shuffle() function. If you’ve ever used this function on an associative array you know that the array will be randomized, but the keys will be dropped. It takes a bit more work, but you can randomize […]

New Orleans is more than just Mardi Gras you know

Blogging from the French Quarter in New Orleans today. A recent bout of termite infestation has left us with a circus tent full noxious gas enclosing our house and no place to call home for a few days. We were originally going to stay down in Ybor City which is […]

Incrementing / Decrementing a String with PHP

In the past, we’ve discussed incrementing and decrementing a variable and incrementing and decrementing a number by another number but did you know that we can also increment and decrement a string? You can use the shorthand operators ++ or -- to accomplish this. Please note that you can’t increment […]

The Pitfalls of Using BuySellAds

BuySellAds (BSA) is a platform for selling advertisements on your website. They take a mere 25% cut of sales and offer you a marketplace listing to help you gain exposure to potential advertisers. I love the idea and have attempted to use them on a few occasions. As of this […]

Simple Probability Distribution with PHP

We’ve all been there, trying to juggle two or more things for either split testing or just because you want some variety. This came up recently for me with juggling advertising networks and I wrote some simply code to handle it. The premise is simple, you assign weights to the […]

LinkedIn Endorsements are Nonsense

Recently a former coworker of mine sent out an email to her LinkedIn network pleading with us to leave her a thoughtful recommendation instead of just endorsing her for skills. Unfortunately, I never worked directly with her at the job (albeit part of the same department) and never really interacted […]

Incrementing / Decrementing a Number by a Number with PHP

We’ve previously discussed how to simply increment and decrement a variable but that only covered incrementing by a value of 1. What about when you want to increment a variable by 5s? There’s a few different ways this can be accomplished. First, the obvious (albeit far from ideal) using ++ […]

The Complexity of Permalinks and Slugs with User Generated Content

I’m not referring to the complexity of the permalink or slug itself, but the complexity to your code that can be introduced with certain formats, specifcally anything that the user can modify. When I was originally building I wanted to ensure that the user’s username was always in the […]

Sorting an associative array by a specific key with PHP

One of PHP’s most powerful data types is the array. It can hold numbers, it can hold letters, it can be sorted, sliced and chunked. Speaking of sorting, when sorting an array the straight forward sorting functions are only for sorting by the keys or by the values. What about […]

How to convert a CSV file into an array with PHP

Loading CSV files into an array is something that comes up more times than I’d like to admit. Scrubbing mailing lists, loading flat files to a database and various other use cases are out there and fortunately, PHP makes it easy to to do. There are a few ways to […]