Evan Sims

Evan is a 25 year old designer, programmer and college student from the cornfields of Illinois. Aside from being a freelance web developer, he is also an aspiring video game designer. Learn more.

Free for Job I am currently available for contract work! I have over a decade of experience in building appealing, standards-based web designs and applications. Check out my resume on LinkedIn, my list of ongoing projects and if you feel like we might be a good fit, drop me a line.

Add to Technorati Favorites

Last Seen

S Pine St, Arcola, IL

Lifestream

Copying ~90GB of various files off my backup NAS to one of my freshly reformatted machines. *sniff* I love that fresh OS smell.

Wednesday 0:07

Waiting in queue for the Reikland Factory scenario. Heavy Metal has begun! http://herald.warhammeronline.com/liveevents/2008HeavyMetal.php

Tuesday 15:03

OK, that was a pain in the ass to find. http://tinyurl.com/6xd6f3

Tuesday 13:56

Browsing Tips Entries

In which I exercise my genius-like ability to explain technology to complete strangers to boost my own delusions of self importance. Explore Archives

September 28th, 2007
Tips
Comments

Tags:



Intel Pro/Wireless 2200BG Disconnects on Apple Airport

I’ve had my laptop (a Dell XPS Inspiron Generation 2) for almost three years now. It’s still running strong, and overall I’ve been pretty happy with it. However, since day one I’ve had one majorly aggravating issue with it: the Intel Pro/Wireless 2200BG card disconnects. Like, a lot. Frequently. Several dozen times a day. I called Dell support on several occasions, and they were never able to really help. They replaced the card once to no avail. Now that it’s out of warranty, I kind of gave up on making the stupid thing work.

Then I decided to Google one day… go figure.

So it turns out the Intel Pro/Wireless 2200BG (and, I presume, other Intel wireless products) has a feature called PSP, or “Power-Save Polling”. Essentially the technique causes the wireless card to switch between an active and low power passive operating state, reducing power consumption and boosting battery life for your laptop. That’s all well and good, but the technology requires that the router you’re using supports this feature, as both sides of the process must cooperate in a unique manner to keep the connection alive during the lower power phases.

Surprise, surprise: Apple’s Airport line (Airport Extreme, Airport Express, etc.) doesn’t support PSP.

Continue Reading ‘Intel Pro/Wireless 2200BG Disconnects on Apple Airport’ …

August 3rd, 2007
Tips
Comments

Tags:


Web APIs by Example, Part II: del.icio.us

Today we’ll be looking at applying what we’ve already learned from working with the Twitter API to the social bookmarking site del.icio.us. As you might expect, the del.icio.us API offers a much broader set of functionality for interacting with it’s data. Besides being able to add bookmarks, you can delete existing ones and use a number of different methods to selectively filter your bookmarks and return just the ones you’re looking for. It’s quite nice, and today we’ll be exposing some of these features with an app that lets us add bookmarks as well as filter our most recent ones.


$delicious_username = 'YOUR_USERNAME_HERE';
$delicious_password = 'YOUR_PASSWORD_HERE';

$errno = 0;
$errstr = '';
$response = '';

$links = array();

function httpRequest($host, $path = '/', $method = 'GET') {

  global $errno, $errstr, $response;
  global $delicious_username, $delicious_password;

  $port = 80;
  if(substr($host, 0, 6) == 'ssl://') $port = 443;

  $sock = @fsockopen($host, $port, $errno, $errstr, 30);
  if (!$sock) {
    if(!$errno) {
      die("<p>fsockopen() error:<br />Unable to open socket for undefined reason; most likely the version of PHP you're running doesn't have SSL support compiled.");
    } else {
      die("<p>fsockopen() error:<br />$errstr ($errno)</p>");
    }
  } else {

    $host = substr($host, 6);
    $header  = "$method $path HTTP/1.0rn";
    $header .= "Host: $hostrn";
    $header .= "Accept-Encoding: nonern";
    $header .= "Authorization: Basic " . base64_encode("{$delicious_username}:{$delicious_password}") . "rn";
    $header .= "Connection: Closernrn";

      fwrite($sock, $header);
      while (!feof($sock)) {
      $response .= fgets($sock, 128);
      }
      fclose($sock);

      $response = str_replace("r", '', $response);
      $response = trim(substr($response, strpos($response, "nn")));
      return true;
  }

}

if(isset($_POST['url']) && isset($_POST['description'])) {

  // Bookmark a URL

  $url = urlencode(trim($_POST['url']));
  $description = urlencode(trim($_POST['description']));
  httpRequest('ssl://api.del.icio.us', '/v1/posts/add?url=' . $url . '&description=' . $description);

}

// Fetch our recent bookmarks:

$count = 10;
$tag = '';

if(isset($_GET['count']) && strlen($_GET['count']) && is_numeric($_GET['count'])) $count = trim($_GET['count']);
if(isset($_GET['tag']) && strlen($_GET['tag'])) $tag = urlencode(trim($_GET['tag']));

$ret = httpRequest('ssl://api.del.icio.us', '/v1/posts/recent?count=' . $count . '&tag=' . $tag);

if($ret) {
  $xml_parser = xml_parser_create();
  xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
  xml_set_element_handler($xml_parser, 'parsePostOpen', 'parsePostClose');
  xml_parse($xml_parser, $response, true);
}

function parsePostClose($parser, $name){}
function parsePostOpen($parser, $name, $attrs)
{
  if(isset($attrs['HREF'])) {
    $attrs['TIME'] = strtotime(substr($attrs['TIME'], 0, -1));
    $attrs['TAG'] = explode(' ', trim($attrs['TAG']));
    global $links;
    $links[] = $attrs;
  }
}

?>

<html>
<head>
  <title>del.icio.us Bookmarks Example</title>
</head>

<body>

  <h1>My Recent Bookmarks</h1>

  <form method="get">
    <fieldset>
      <legend>Filter Results</legend>
      Display the
      <select id="count" name="count">
        <option >10</option>
        <option >50</option>
        <option >100</option>
      </select>
      most recent bookmarks,
      tagged with <input type="text" id="tag" name="tag" value="" /> &nbsp; <input type="submit" value="Refresh" />
    </fieldset>
  </form>

  <ul>

  </ul>

  <form method="post">
    <fieldset>
      <legend>New Bookmark</legend>
      <label for="url">URL:</label><br />
      <input type="text" id="url" name="url" /><br />
      <label for="description">Description:</label><br />
      <input type="text" id="description" name="description" /> <input type="submit" value="Add Bookmark" />
    </fieldset>
  </form>

</body>
</html>

That’s it! If everything’s gone right, you’ve got yourself a pretty slick little bookmark manager for del.icio.us. Hope you enjoyed this article, and please feel free to comment with any questions or additions. I have a few more additions planned to the series, so stay tuned.

Download the Source Code

August 1st, 2007
Tips
Comments

Tags:



Web APIs by Example, Part I: Twitter

APIs, or application programming interfaces, are essentially standardized methods for applications to talk to one another and share information. In desktop applications, the operating system provides a full range of APIs in order for your programs to run and interact with it (in Windows an app might register itself as an option for when you right click an icon; or on a Mac an app will hide itself from the dock.) On the web, APIs are usually provided as a means of importing data to other services, or using third party clients to push information to your account.

Since Twitter is all the rage these days, I thought it would be a great starting point to introduce you to the world of web APIs and how simple they really are to work with. Twitter, like most presencing services, has a very limited range of API calls because, well, it’s a very simple service. The documentation for Twitter’s API can be found hrere. The Twitter API, all be it simple, has allowed great applications like Twitterific and Twittervision to be created.

Continue Reading ‘Web APIs by Example, Part I: Twitter’ …

July 30th, 2007
Tips
Comments

Tags:




Running Apache, PHP and MySQL on Windows.

Here at home, I run a local apache install to make building and testing my web projects easier. Instead of having to constantly upload files to my web host, I can save them locally and refresh my browser to see the result. It’s easier, and because I run my local server off of my laptop, it provides the added bonus of allowing me to work on projects while I’m out of the house, on a plane, or otherwise don’t have Internet access.

There seems to be a lot of confusion about getting Apache and PHP up and running in a Windows environment, and a lot of people give up and use bundled packages like WAMP or XAMPP. These are fine choices, but I like to do things myself, and install just the components I need or want. I also think it’s important to have a good understanding of Apache and PHP configurations, as they can come in handy when you’re trying to debug your application after it’s gone live on a web host.

Continue Reading ‘Running Apache, PHP and MySQL on Windows.’ …

© 2000-2008 Evan Sims. Content redistributable under terms. Hosted by (mt) Media Temple. Powered by Wordpress. Fueled by ramen.