Hot Koehls

The more you know, the more you don’t know

02 Dec 2008

Pownce shutdown announced

I awoke to an e-mail this morning containing the following… We are sad to announce that Pownce is shutting down on December 15, As of today, Pownce will no longer be accepting new users or new pro accounts. To help with your transition, we have built an export tool so you can save your content. You can find the export tool at Settings > Export. Please export your content by December 15, 2008, as the site will not
25 Nov 2008

Easily calculate dates and times in different timezones

Building off my last post, where I showed you how to easily display any public Twitter feed on your site, I ran into another problem: the dates that are delivered by the Twitter API all reflect Greenwich Mean Time (GMT). Now I thought about going the old route and doing some convoluted math using <a href="http://us3.php.net/manual/en/function.date.php">date()</a>, <a href="http://us3.php.net/manual/en/function.strtotime.php">strtotime()</a>, and <a href="http://us3.php.net/manual/en/function.mktime.php">mktime()</a>, but I thought it was time find a serious solution, one that would allow me to display the correct time for whatever timezone I wished.
22 Nov 2008

Display Twitter updates on your website

Update: I’ve added a new chunk of code that will download and store your Twitter posts in a database, allowing you to do whatever the heck you want with them. After you’ve finished reading this, be sure to check that out as well. I am not a fan of social networking or so-called lifestreaming. I think it’s a BS excuse to fiddle on your computer more. Instead of telling everyone where you are and what you’re doing, go out and meet some friends for a drink.
18 Nov 2008

There are only two types of coders

Across every language, platform, and experience level, you can summarize all programmers into just two groups: Those who are constantly learning, and those who think they know everything. The ones who learn are aware that they don’t know everything, and never hesitate to seek out new information when a new problem (or language, or platform) presents itself. They aren’t afraid to ask questions because asking is precisely what got them to their current level, and asking will propel them forward to greater levels of achievement.
14 Nov 2008

Get number of message parts in an email using PHP

Alright, I admit up front that this is a pretty specific problem, but hopefully some Googlers will find it useful. I recently had need for a small side project to read e-mails. Every e-mail is split up into parts; each “part” represents every separate piece of the e-mail. The plain text format, rich text or HTML formats, and attachments are all sent as parts. Problem is that there is no obvious way to quickly decipher just how many parts you have in a message.
08 Nov 2008

Why include_once and require_once may make you a crappy coder

Over the last few years, I’ve noticed that the PHP community has, in general, started to favor include_once() and require_once() over the more standard include() and require(). For the uninitiated, the “_once” version of each function will check to see if a file has already been loaded. If it has, it will safely bypass loading the file again without throwing an error, and continue parsing you code. For the really uninitiated, here’s the difference between require() and include() straight from the manual:
07 Nov 2008

How focused is your startup idea?

As developers, most of us are always mulling over ideas for potential new services to bring to the world. Who wouldn’t want to say they came up with something Digg, Wikipedia, eBay, etc? And every day, many developers take the plunge on their ideas. Good for them! However, sometimes I look at new ideas, and I wonder how focused some of these business ideas are. In a world postively saturated with goods and services, it’s imperative that you have a crystal clear image of what your business is going to deliver, how it’s going to deliver, and to whom it will be delivered.
27 Oct 2008

Downtime and a new find

For the twelve people who subscribe to my feed, you may have noticed that it had gone bye-bye while I migrated the site. We’re back on track now, and I apologize for the downtime. If you unsubscribed, please don’t hate me and give me another chance. I’m a huge follower of the Signals vs. Noise blog hosted by the staff at 37 Signals. Jason Fried in particular is chock full of great insights for the aspiring software business or entrepreneur.
13 Oct 2008

Why DRM will always be a bad idea

As if you really needed to hear this, but in case you… * Don't know what DRM is * Are a music/movie industry person suffering a cranial-rectum issue * Are a moron (most likely a #2 in denial) …here’s a fancy visual:
30 Sep 2008

Format a RFC2822 date for mysql datetime fields

I was crash-coursing myself on PHP’s IMAP functionality recently, one of the first questions I came across was how I might store the date from an e-mail header in a MySQL DATETIME field. I was afraid I was going to have to parse out the string using a bunch of calls to substr(), but then I remembered that the strtotime() function recognizes various RFC formats. So, if you need to get the timestamp of an RFC2822 e-mail header—or most any RFC-based timestamp—into MySQL DATETIME format, it’s easy: [code=“php”]$timestamp = strtotime(‘Tue, 30 Sep 2008 10:30:00 EDT’);