You Haven’t Even Started Blogging and You Already Have a Typo

There are a number of blogs out there which list dates incorrectly. It doesn't help that many of the templates built for popular blogging platforms like WordPress, display the dates incorrectly be default. If you maintain a blog, develop templates, or have ever typed out the date; please stop writing them as October 3rd, 2011. [Continue reading]

Save Paper by Printing Multiple Pages to a Single Sheet with Microsoft Word

My personal preference is to avoid printing whenever possible. It's bad for the environment, it costs businesses money, and I really like seeing my desk. But there are times when printing seems inevitable. Maybe something is needed for a meeting and you won't have a computer—or internet access. There are still ways to reduce how much paper you use by printing more than one page per sheet. [Continue reading]

Using Custom Picture Thumbnails When Sharing Links on Facebook

When posting links to Facebook, the service usually searches the page for images to use along with the post. But Facebook seems to randomly ignore some pictures or fails to see any at all. If this is a common occurrence for the pages you maintain, there is a way to force Facebook to recognize an image. [Continue reading]

Utilizing the Short-hand if() within a PHP String

Until recently, one thing has eluded me when it comes to the Ternary Operator [aka the short-hand if()]. It's easy to assign the resulting value to a variable or to display it on the screen, but how is the short-hand if() used in conjunction with the concatenation character? In other words, how is it used in the middle of a PHP string? [Continue reading]

Getting Your Projects Done Faster by Writing Less Code with the Short-hand if()

Have you coded a simple if() construct that sets a variable to one of two values and thought to yourself "Five lines of code; there should be a better way?" Okay, maybe it's just me. Either way, let's take a look at the Ternary Operator [aka the short-hand if()]. [Continue reading]

Why You Should Utilize Separate Accounts when Managing Multiple Websites

When setting up accounts for your job with services like web hosting, Google Analytics, etc., don't be tempted by the "it will be convenient for me now" argument. If you manage multiple websites, it may be easier to have all your Google Analytics reports under one Google account for example, but what if you need to split those websites up for some reason? If another developer takes over a website, will it be easy to turn over the keys? As in turning over the source files and account information…not emotionally. For that, you might need counseling. [Continue reading]

Condensing if() Constructs to Improve the Scanability of Your Code

In a previous post, we went through the typical setup for the if() construct. The good thing (or bad) is that there's a lot of freedom when it comes to writing code. You could for example write the entire if() construct that contains dozens of lines of code and never use a line break. You could, but I wouldn't necessarily recommend it. However, there are other non-"standard" ways of writing out your if() constructs. [Continue reading]

Using Gmail to Automatically Send Troubleshooting E-mails

Recently, a request came through asking how to handle the troubleshooting aspect of an online seminar. Due to budget constraints, hiring someone to provide tech support was out of the question and with the event being two days away, we needed a solution quick. They were only looking to handle the problems/fixes common to the online seminar service we use, so my first reaction was to set up an auto-responding e-mail address. [Continue reading]

Quickly Switching Views for Facebook Fan Pages

Well it turns out that my previous post titled "Facebook Fan Pages No Longer Require Switching Views to See Notifications" needed to sit in the incubator a little longer. But instead of taking the blame, let's just say that Facebook updated their features shortly after my post… [Continue reading]

Small Changes to Make If Statements Easier to Scan

When developing programs with hundreds of lines of code, it's beneficial to write code that's easy to scan. That way when you need to update the program months or years later, it will be much easier to follow along. In addition to breaking the code into logical chunks, adding comments, etc. it's helpful to indent code which only gets executed given a specific criteria. For example, all the code within the if/else statement. [Continue reading]