Blog

  • Testing Mobile Sites on Your Phone Locally

    If you're like me, most of your work day is spent working on a local copy of a site. I have my local computer set up where each site lives at sitename.dev alias, but ran into problems when I realized I needed to test my site from my iPhone, but couldn't edit the hosts file there.

    I spent WAY too long looking at Charles, Wireshark, and various other proxy related tools when a simple settings change solved my problem.

    Step 1:
    Connect your phone and computer to the same wireless network.

    Step 2:
    Go to your wireless networks settings page and look for 'HTTP Proxy' at the very bottom.

    Step 3:
    Type your computers local network IP address for Server, and 80 for the port.

    You are now using your computer for HTTP requests including your custom hosts file.

  • Drush Cheat Sheet

    Anyone who has been developing with Drupal for a long time knows how tedious checking checkboxes can become. Luckily for those of us who have stuck it out drush has come to our rescue. With drush many common actions on your site can now handled by Drupal's very own command line client.

    When I first started using drush I was overwhelmed by the number of options available, and wasn't always ready to scroll through the manual page looking for what I needed. Moshe Weitzman one of the major contributors to drush has recently launched drush.ws to provide a unified location for online documentation, but I still felt like I needed something smaller to quickly glance at. In the spirit of scratching my own itch I created a one page cheat sheet for myself containing all of the available commands in drush 3.x.

    Please feel free to let me know if you have any suggestions on how to make this more useful.

  • Be Careful with MySQL Field Names

    MySQL Logo

    Today's tip is going to be a quick one, but I wanted to share since the solution wasn't completely obvious to me for a while even though I've been using MySQL for several years now on a daily basis.

    When naming your fields be sure you don't name them using language that MySQL might attempt to parse as a command. I was going along creating my database, and named a field 'primary' because that was what I'd called the value in the form, and it made sense in context. I then spent a good amount of time scratching my head wondering why all my values were saving in my update SQL I was sending unless this one was included. I realized the problem when I copy and pasted the SQL being run into PHPMyAdmin and saw that the line was breaking after it saw 'primary' in the command and realized my mistake.

  • Internet Explorer Doesn't Like Your Trailing Commas

    Internet Explorer Icon

    I just got bit by a strange bug that I haven't encountered before and wanted to share the 5 minute solution with everyone so they don't spend the hour I did trying to install Visual Web Developer Lite in a virtual machine to debug IE's Javascript wackiness.

    Firefox could care less if you write your code like this:

  • iPhone Development Crash Course

    iphone on lying on its face

    One big reason you haven't seen a post from me in the past few months is that I have been spending every available moment getting up to speed with developing iPhone applications. Aside from a short-lived attempt at becoming a game programmer using C++ years ago, this is my first venture away from the web development and into the world of compiled applications. Moving away from mostly open source to a proprietary SDK I was initially surprised at the lack of good tutorials and learning materials available online, but over time I've found some very good resources that have helped me out along the way.