Categories

Tags

Page 19 of All Articles

Why work so hard to stay at the bottom?

Not a day goes by that I see a headline about the need for a minimum wage increase. I read about staged sit-ins, protests and boycotts. I see people investing a ton of time and energy to remain the lowest paid workers in the country. I generally keep my political […]

Looping through a date range with PHP

Looping through a date range isn’t as simple as looping through an array with foreach but it doesn’t take much additional code to get the job done. To loop through a date range you will need to use a loop (I prefer a while loop) and increment the date by […]

Tabs vs. Spaces: I'm switching sides

It’s not very often that I make a drastic change to my coding style but after using tabs for my entire life, I am making the switch to spaces. My go to defense for using tabs was that they are more flexible because they allow developers to choose their own […]

Difference between break; and continue; in PHP

The topic of break and continue came up the other day and I thought it would make for a good blog post. You’re probably familiar with break moreso than continue because it is part of a switch statement’s syntax. Both break and continue can also be used inside of looping […]

Review: Sprint WeGo

A few months back when I picked up a Nexus 5 for myself, I decided to go ahead and get our 7-year-old daughter the Sprint WeGo phone. For those that are not familiar with the device, it’s a very basic telephone that comes standard with some great parental features. These […]

PHP without fancy braces

PHP is a C-style language and thus uses fancy braces to wrap or hug control structures. PHP is also a language that is extremely flexible so you can also get by without using fancy braces. You will never get away from them entirely as functions and classes / class methods […]

Tools of the Trade - 2014

It was February 18th, 2011, a week before my 30th birthday that my answers to AppSumo’s Tools of the Trade questionnaire were posted. A metric shit ton has changed since then - new jobs, new hardware, new software. At the same time, some things never change. This post is the […]

Debugging SimpleXML Objects with PHP

SimpleXML is pretty much the de facto standard for dealing with XML in PHP. The biggest problem with SimpleXML is that it is a pseudo-object that you can’t print_r() or var_dump() to see what’s going on. I recently ran into a situation where it would have been super nice to […]

Self-employed cabin fever

I was somewhat skeptical that it would happen to me, be after over a year of working for myself and by myself, it finally started to take it’s toll. I had an office so that I would have a place to go during the day to feel like I was […]

Parsing SOAP responses with PHP's SimpleXML

We recently discussed parsing XML with SimpleXML and since that writing I ran into a situation where I needed to parse a SOAP response. As it turns out, SOAP responses are a totally different beast when it comes to parsing them with SimpleXML. SOAP responses contain namespaces on some if […]

Quitting a job you just started

It’s happened to everyone, you just started a brand new job, probably event left a decent job for it, only to realize that the new job sucks and you absolutely hate it. It happened to me recently, I was starting to get cabin fever working for myself and decided to […]

How to calculate Independence Day observances with PHP

On this 238th anniversary of the United States of America, I felt it appropriate to post an article on how to determine what day the July 4th National Holiday is observed on. There are two rules to the observances. First, if the holiday falls on a Saturday, it is observed […]

The importance of a staging environment

Full disclosure, I don’t actually have a staging server for my personal projects. I develop locally in a very similar environment as my production server and any time I have to do something major, like upgrading the OS or upgrading software between major revisions, I always do a dry run […]

How to parse XML with PHP's SimpleXML

Parsing XML in PHP couldn’t be easier thanks to the SimpleXML extension. SimpleXML allows you to read in an XML string, verify that it is in fact XML and can create an object that you can interact with by way of the node names in the XML.The SimpleXML extension also […]

$10 Showdown: Linode vs. DigitalOcean

Every time I think that I’m done with this topic for a while, someone (usually Linode) drops something new on us. The latest from Linode is the addition of a 10$ a month plan which nearly puts it in line with DigitalOcean in regard to low tier pricing. Because of […]

Checking your IMAP email using PHP

I have an upcoming freelance project coming up that includes checking an IMAP email account as well as working with XML in PHP. Let’s talk about connecting to an IMAP account in PHP, don’t worry, I’ll discuss parsing XML next week ;) For the sake of example, we’re going to […]

Android Pros and Cons after 2 years with an iPhone

I recently discussed migrating to cross-platform apps in an attempt to break away from the Apple Ecosystem which was a precursor to me swapping my iPhone 4S for a Nexus 5. Now it’s time to talk about the pros and cons that I ran into by making the move. PRO: […]

How to calculate Mother's Day and Father's Day with PHP

A little late on the Mother’s Day part, but since today is Father’s Day, I figured it would be fun to discuss how to obtain the dates for these moving holidays. To do so, all we need to use is use strtotime and tell it when the holiday will occur […]

The receiving end of a DDoS Attack

This post was supposed to be a discussion of my migration back to Android from iOS but direction changed yesterday morning. At 9:30 am I found myself in the middle of a DDoS attack that was affecting the rack my server lives on. My sites slowed to a crawl and […]

How to pipeline with phpredis

Have you ever run into a scenario where you have to loop through a set of data and perform database queries for each iteration? Obviously we shouldn’t run them one by one, so we end up using a TRANSACTION or even just building out one large query in the case […]

How to process PUT requests with PHP

You are probably already familiar with $_GET, $_POST and $_REQUEST but what about $_PUT? Trick question, $_PUT (as well as as $_HEAD and $_DELETE) doesn’t exist in PHP at this time. Never fear! We can create a $_PUT array with the following code: if ($_SERVER['REQUEST_METHOD'] == 'PUT') { parse_str(file_get_contents("php://input"), $_PUT); […]

Breaking away from the Apple Ecosystem

I’ve recently come to a crossroad with Apple and it’s ecosystem. I’ve had an iPhone 4S for the last 2 years and I was itching for a new device. Giving the current iPhone lifecycle, it makes more sense to hold out for the next iteration of the iPhone than jump […]

URL Routing with PHP

I’ve been taking a lot of programming tests / challenges recently as I was in the market for a new [and hopefully exciting] opportunity to spend my time on. Because of this, I am full of new blog post ideas based on the questions / challenges asked. This week I’m […]

Having a child ruins your life

I started a new contract gig this week and one of my new co-workers was very candid in letting me know that having children ruins your life and implying that I in fact had ruined my life in doing so. To be quite honest, I was very taken back by […]

Spending money on advertising only to acquire spammers

I performed a little experiment last year, I decided to spend a small bit of money on advertising one of my sites via AdWords. My budget was low as I didn’t want to spend more than 100$ and my daily allocation fluctuated between 1$ and 5$ as I made adjustments […]