Archive for the ‘Programming’ Category

Building a better WordPress portfolio

July 27th, 2011

It turns out to be extremely easy to teach WordPress how to handle more than just blog posts and pages. In this post, I’m going to describe how I converted my hand-coded, static portfolio/CV home page into a WordPress page powered by custom post types. This isn’t a full step-by-step tutorial but rather a medium-level overview [...]

Using git to build CSS files for deployment

November 17th, 2010

Lots of stuff going on here lately. I converted a store from osCommerce to Magento. I’m building the hosted bug tracking app I’ve always wanted. And I switched from svn to git. Converting svn repos to git repos and keeping all of the history is pretty easy. I’ll do a post about it soon. Basically, I [...]

Magento database model without an auto_increment primary key

August 3rd, 2010

When you create a model in Magento that reads and writes data ( $model->load() and $model->save() ) to a database table, by default, Magento expects the primary key of the table to be an auto_increment field called ‘id’. If you want to use a primary key that is not an auto_increment field then you need to [...]

Magento debugging tips

August 3rd, 2010

This helped debug some problems I was having with observers not doing what I was expecting. Login to your Magento admin and enable logging: Configuration | Developer | Log Settings | Enabled = Yes Add Mage::log() statements to your code. For example, in your observer callback: Mage::log(“My special observer called”) Watch the log files. In Linux, [...]

Teaching programming

June 30th, 2010

I just ran across another educational tool—Scratch—for teaching programming to kids. I love the idea behind these simplified programming environments because they make getting started very easy, show you results instantly, and remove all the frustration of setting up a programming environment. If you want to introduce your kids to programming, you might start with [...]

Magento 1.4.1.0 event hooks

June 29th, 2010

This listing of Magento event hooks was generated automatically from the source code. Please let me know if you find any errors or omissions.

Magento 1.4.0.1 Event hooks

June 29th, 2010

This listing of Magento event hooks was generated automatically from the source code. Please let me know if you find any errors or omissions.

Shell script that does something only when status changes

March 22nd, 2010

I needed a shell script that runs every 5 minutes but I only wanted it to do something when a status changes. In this case, I wanted it to log some information to the system log but I didn’t want it to fill up the log with redundant entries. Here’s the pattern I came up [...]

Android vs. web development

February 4th, 2010

When I first jumped into Android development, I went in with a mindset for developing desktop applications. That was a mistake. I think I would have been able to wrap my head around it quicker if I’d thought of it more like web application development. In particular, Activities have to account for a certain amount [...]

Learning Android

January 11th, 2010

I’m excited to be programming in Java again. I bought one of those fancy touch screen Android phones in October because I wanted to start writing applications for mobile phones (OK… I wanted a new toy). I skimmed the Android framework documentation and did the Hello World tutorial back in December. But late last week [...]