the original database This blog entry is directed mainly at the body of web developers who have very little formal training but are trying to improve their own skill sets. As I’ve matured in my understanding of object-oriented software design, I’ve come to grips with certain realities. Often, I’ve found myself doing something that feels ‘dirty’ or ‘hackish’. That’s usually because I’m “doing it wrong” as smarter people say to me when I show them my code or describe my problem. When that happens I have two courses of action, but the only one that provides growth and self-improvement is to heed the advice of my mentors (usually a chorus of developers on IRC saying, “you’re doing it wrong!”).

Continue reading »

Apple Expo '07 In the early days of the web (the early ’90s), when the first HTML specification was being adopted, CSS did not exist. Web developers and webmasters (do those even exist anymore?) were responsible for delivering their content, design and layout in one package. It worked great and everything was right with the world. That is, until things became more complex. The roaring ’90s of the Internet brought new revisions to the HTML specification and new innovations to web browsers which allowed for increasingly complicated design elements and content delivery methods. The ever-increasing complexity made it more difficult to maintain consistent design across large web sites. That’s when big stupid web design suites became popular. Software like Microsoft FrontPage and Macromedia Dreamweaver became almost a necessity just to maintain page templates and edit pages in a wysiwyg format.

Continue reading »

If you’ve been following along with my wifi radio posts, you may recall my problem of storage for the platform. I chose an ultra-low power and nearly zero storage device for my music collection because I planned to buy an external storage device and serve music from that device. I still think that’s a good idea, but I’m too cheap to spring for the kind of device I really want. So I’ve been experimenting with cloud storage which has a number of big advantages which I won’t get into here.

Continue reading »

nginx logo The nginx build in the official ubuntu package repository is somewhat out-of-date, so I built my own package from source using 0.7.59. I’m going to provide it here in case anyone else would like it. One of the new features I like is the try_files directive. Here’s an example of what I’m doing using 0.6.35, the full post is here http://lithostech.com/lighten-apaches-load-nginx:

location / {
  root /var/www/fresnobeehive.com;
  proxy_set_header X-Forwarded-For  $remote_addr;
  if (-f $document_root/beehive$uri) {
    rewrite (.*) /beehive$1 break;
  }
  if (-f $request_filename) {
    break;
  }
  if (-f $request_filename/index.html) {
    rewrite (.*) $1/index.html break;
  }
  if (-f $document_root/beehive$uri/index.html) {
    rewrite (.*) /beehive$1/index.html break;
  }
  if (!-f $request_filename) {
    proxy_pass http://fresnobeehive.com:8080;
    break;
  }
}

Continue reading »

nginx logo Since we’ve been on slicehost, I’ve been forced to play the role of system administrator since we don’t have a real one. One problem I’ve run into is the long string of legacy applications that I have to support. Some of them I wrote, and some of them I inherited. For many reasons, they’re often organized and run in sub-optimal ways. Separating your static and dynamic content is a good habit to get into when you’re building scalable web applications. Static content is highly portable because it can live without context. You can serve it from anywhere and nobody knows the difference. When your site starts to get huge traffic, you can easily offload your static content to a CDN if you host it in an easy-to-separate way using an URL like static.domain.com or domain.com/static.

Continue reading »