Web Development Course Updates

At the end of the current term, it will be two years since I began teaching evening web development courses for Portland Community College. I’ve taught a wide range of topics including Javascript, jQuery, HTML5, CSS2 & 3, PHP, MySQL, and WordPress. In the past few months I’ve also been involved in planning a new structure and flow of courses for Summer 2011 and beyond.

(more…)

Installing MongoDB on CentOS 5

I’ve recently been exploring alternatives to SQL-based databases, primarily MongoDB.

MongoDB essentially stores records as JSON-encoded values and you interact with those records through the API rather than running any SQL. The following instructions are for getting mongodb installed on CentOS 5, along with the extension necessary for PHP support.

(more…)

Using Rails-less Capistrano Multistage on Mac OS X Snow Leopard

Despite being originally developed for Ruby, Capistrano is an excellent code deployment tool that can easily be used for any language. Capistrano primarily works by executing instructions in recipes – which are basic ruby scripts. By wrapping server commands and other logic in these programs, you can automate almost every step of the deployment process.

(more…)

Thoughts on the Google Chrome Browser

I’ve used Firefox since it was Phoenix, and before that I used Mozilla, and before that I used the Netscape line. Firefox 3.x began feeling slower than I liked and it seems to quickly consume memory in such a way that by the end of the day, I had to quit and restart it. I switched to Chrome for Mac for the past two months or more and am finally switching back to Firefox. Here’s why.
(more…)

Using CSS3 and RGBa for Size-Friendly Wireframes

Until recently I’ve used both border and background-color CSS properties to make elements visible when laying out a new web page structure. Until I’ve added content, most block-level elements are invisible.

The problem with those methods is that a) giving an element a border will increase its width and/or height, which can affect your layout, and b) background-colors needed to be set for each element, and possibly with different colors. It all takes more code than I like and it usually looks awful.

(more…)

Mac OSX Finder Droplet for Windows-friendly Zip Files

I frequently prepare course materials on a Mac which will be distributed to users on a variety of machies. Not only does the default “compress file” feature include the .DS_Store hidden files, but it also includes all of the resource fork files which, when viewed on a PC, appear as “__MACOSX”.

I really like the convenience of a toolbar droplet (which I already use for opening the terminal and tar/gz compression). I searched around for a solid zip archive droplet that would not use the ditto service (which includes the resource fork data), but couldn’t really find anything – so I wrote my own.

Download the following application and place it in your Applications folder, and drag it into your Finder toolbar. Any files or folders you drag onto it, will immediately be compressed – without any Mac-specific extras.

Download ZipDroplet

PHP5 Class for Hotpads.com XML Feeds

Fresh out of the oven is a PHP 5 class for building real estate listing XML feeds for Hotpads.com. If your application needs to syndicate listing data through the Hotpads service, this class allows you to build the complete output without creating any XML yourself.

The output of this class has been validated and verified by Hotpads so you’re ready to go. Check it out on Github.

Installing Memcached for PHP on CentOS 5

Memcached is a high performance cache system designed to improve the speed of web applications. A common example would be storing the results of database queries that can benefit from having a cache system in place.

Recently we had a web application that provided a long list of items formatted as an HTML ul element in response to an AJAX-style request. Our results and its formatting were the same for all users and they were also going to be called up frequently. We spent time ensuring the code and database structure were as optimized as possible before looking into a cache, but when you have a high ratio of accesses versus changes to the data, using a cache is very smart way to solve the problem.

(more…)

Introducing Branches, Merging in Git

One of the most powerful features of any source control system is a method called branching. If you imagine a time line of your code, it flows from left to right, oldest to newest. This is often referred to as the trunk (as in “tree”).

Let’s imagine that you want to follow alternate development paths. Whether you’re trying out some larger changes that may or may not work, or you’re working on some big stuff that just isn’t ready to be included on the main (live) code. Creating a branch allows you to copy your code and add/commit all of your work like usual. However, your changes are being done on the branch only and not the primary “trunk” code.

(more…)

Contributing to a GitHub Repository

While there are numerous tutorials that cover taking your own git repositories to GitHub, or forking and submitting changes back to open source projects, none really explain the process if you’re primarily interested in working with an existing repository as a contributor.

(more…)