So you want to write a URL shortener? Let’s make it short and painless. You’ll need two pieces: a key generator and redirector. The key generator is used to represent a shortened url with a series of characters, often a-zA-Z0-9. This is what you see at the end of tinyurl and bit.ly links. The redirector needs to link the key to a url and perform a HTTP redirect. Shall we? Read the rest of this entry »
21 Comments »
UPDATE: You can watch me on GitHub, view documentation or fork the project.
Twitter recently added a feature to their API that let’s you allow users to sign into your site with their twitter username and password. I recently wrote a blog post on how to use Twitter’s OAuth API. This feature is a natural progression in allowing Twitter users to securely sign into your site. Read the rest of this entry »
258 Comments »
UPDATE: You can watch me on GitHub, view documentation or fork the project.
A new project I’m working on integrates closely with Twitter. As a result, I become a lot more familiar with OAuth than I care to. Many developers want to be able to speak the OAuth protocol without having to know the fine details. I am deviating from the normal order by starting with an example and explaining it afterwards. If you are interested in using “Sign in with Twitter” then read my other blog post. Read the rest of this entry »
161 Comments »
In a previous article I wrote about how to develop web applications locally on your laptop. In addition to being faster to develop, it lets you work without needing to be connected to the Internet. But what about the tools you use while developing? If you’re a PHP developer then the manual at php.net is an invaluable tool. It only make sense to have it available for when you’re not online.
Read the rest of this entry »
26 Comments »
Caching is often looked to as a first step in making something faster. Let’s face it, complex or frequent data access is expensive. As a result, everyone and their mother manager turns to caching for a magical shot in the arm. However, an often overlooked fact is that accessing a cache isn’t a NOOP. Read the rest of this entry »
No Comments »
A coworker of mine found some peculiar behavior in some code we had. We had an array with several values like you see in the title. We checked values in that array using PHP’s array_search function. While the string being searched for wasn’t present, the function was returning true. Initially perplexed by this we realized quickly after looking at the source of PHP’s array searching function we noticed the problem. There’s a second parameter to the array searching functions which tell PHP to do strict comparisons. This is in their documentation at http://php.net/array_search. It makes complete sense since PHP is loosely typed. But it’s not at all intuitive at first glance. Read the rest of this entry »
No Comments »
I’ve long been a proponent of developing web applications locally on my laptop. It’s amazing how much time you can save when you don’t have to transfer files to a development server or wait for a file to save over the network. You can also do development when you’re not at the office, vpn’ed or even have an internet connection. However, the most compelling reason to do it is because it’s relatively trivial. Read the rest of this entry »
1 Comment »
Just over a year ago my wife and I decided that we’d consider moving from Cincinnati to Silicon Valley. I’ve always found it difficult to find work that I enjoyed in Cincinnati. That resulted in me being involved in two startups, neither being successful :). As part of the process my friends who were also considering moving and I documented the questions we were asked during interviews.
Read the rest of this entry »
No Comments »
Facebook’s photos and albums are no way to truly store or organize your photos. It is however one of the best ways to share them. This created quite a conundrum for me as I had no interest in uploading photos to two different websites. I don’t use Flickr or Smugmug or any other photo sharing service that you’ve heard of. Since I was a co-founder at Photagious it’s a natural choice as my photo management site. Read the rest of this entry »
40 Comments »
Quicksilver is the only OSX application that I couldn’t live without. It’s one of those pieces of software that changes how you accomplish your most frequent tasks. Here’s short list of the things you can do much faster than you could otherwise: open applications, send emails and more. But one of my most frequent actions is to pull up specific web pages that. Normally, I would bookmark these but we can do much better than “normally”. Read the rest of this entry »
3 Comments »