Using Git

I’m finding that writing up my progress documents is more difficult than just coding on my own. There are blind paths I go down that don’t need to be documented. Sometimes I’m not sure if every line of code is needed to illustrate the point that I’m trying to make. And I’m generally not comfortable documenting something until I’ve done it at least twice.

For my first two project-related blog entries, I’ve ended up recreating the application from scratch. This is obviously insane, especially since it’s so easily rectified – this stuff needs to be in source control.

I’ve been using Git with some success locally, so it’s the obvious choice. In my project directory (that is, Projects/reviewdb), I simply did this:

git init
git add .
git commit -m "Initial commit"

Then a little more work, and

git add .
git commit -m "Second commit"
git tag project-blog-entry-x

I also make use of the git status, git diff and git log commands to keep track of what’s going on.

Book review: Don’t Make Me Think

Sometimes you read a book and realize that it’s something that you should have read five years ago. Steve Krug’s Don’t Make Me Think is one of those books.

It’s been lying around the office for ages and I finally picked it up while waiting for a machine to boot up. I was immediately impressed. It’s hard to quantify what I learned from the book, but I can say that it crystallized a lot of my thinking on web site design, sort of an “ah, so that’s why we do that” or “that’s why that didn’t seem to work properly”.

The amazing thing is that the book was originally published in 2000 (with a second edition in 2005, which is what I read). The web has moved on, but most of the suggestions and guidelines still hold.

What I would love to see is a similar treatment of mobile app design. I think mobile in 2011 is the equivalent of the web in 2000 – the metaphors are still evolving, and what seems cool now will be embarrassingly outdated in three years (or less, since product cycles are much shorter now). Best practices are still evolving, but someone must have some idea of what the best thing to do right now is.

Introduction to Ruby on Rails

So I’m finally ready to go. I started working through Getting Started with Rails and modifying it to match my movie review database.

All of my projects are kept in a directory named, conveniently enough, Projects. From my Projects directory:

rails new reviewdb

Continue reading

WordPress code formatting

Since I’m shortly going to be dropping in more than a few code samples, I guess it’s time to start mucking with the way that code is displayed on the blog. There are a few options for this. My first instinct was just to put together some CSS for the <pre> tag, but then I ran across the WP-Syntax plugin. It appears to do everything that I would want for code formatting and more. As well, it’s customizable since it looks in my current theme directory for an override of its CSS definitions.

Here’s a sample of some styled CSS code from my post on WordPress customization:

/*
Theme Name: steveshaw
Theme URI: http: //steveshaw.ca/
Description: Theme for steveshaw.ca, child theme of Twenty Ten
Author: Steve Shaw
Author URI: http: //steveshaw.ca/
Template: twentyten
Version: 0.9
*/
 
@import url("../twentyten/style.css");

Actually, after looking at a few code samples, I’m not excited about the trailing vertical space at the end of the code. You won’t be able to see it, because I’ve fixed it. Hopefully.

Firebug tells me that it’s because of a #content pre entry in twentyten’s style.css (line 470). I should be able to fix it by overriding it in the child theme’s style.css:

#content pre {
	margin-bottom: 0;
}

That’s made it bearable, although it still seems like too much vertical space.

Top-secret project blog

One of the main points of this blog, and the new computer, is to start developing apps for the iPhone. I haven’t done much with it so far.

I know I want to use Ruby on Rails on the back-end and access a web service to provide JSON-encoded data to the app. This is my first time using Ruby, so I’d like to document the work that I’m doing, culminating in a guide to developing Rails servers for iPhone apps. But at the same time I’m not ready to reveal what the actual app does.

I realized today that I can still share a lot of this educational information simply by twisting the business problem that I’m solving into a similar problem. So here’s my hypothetical problem statement:

I’d like to collect and categorize movie reviews. The iPhone app will query the movie review database and display the results in some format. The reviews will be categorized by reviewer, publication, genre and rating.

Continue reading

Drinking the Kool-Aid

A year and a half ago, I was in the market for a new cell phone. I knew at the time I didn’t want a smart phone – I honestly couldn’t see the point of them, and the constant Apple-hype was grating on me. I wanted a simple phone with some texting capability and happily used my new phone for exactly that. For about three months.

That’s when my then-fiancee (now wife) bought me an iPod Touch. I had asked for an iPod so I could listen to music and podcasts while running, but getting the Touch model changed everything. I started carrying it everywhere and using it as a small net-enabled computer. Unfortunately, I also had to carry my phone around.

Fast forward a year or so. I built my first iOS app at work, and really enjoyed it. I decided that iOS development would be a worthy pastime, and bought an iMac to start puttering with stuff. I really started jonesing for an iPhone at that point, realizing how easily it would be to sync all my data across devices.

Finally, this weekend, I got a iPhone 4 for my birthday. And an AppleTV unit. In under two years I’ve gone from owning zero Apple products to basically owning all of them. I’m still trying to put all the pieces together to make them work together optimally, but that’s definitely a good problem to have.

 

Apple tools

When I wrote my post on the development tools I was using, I knew that it would be outdated as soon as I moved over to the Mac. Some things haven’t changed: I’m still using FireFTP for file transfer and have moved over to MAMP for a runtime testing of WordPress themes. XAMPP, which I was using on Windows, is supported on OS X, but I decided to move over more or less for the hell of it.

Continue reading

Ok, Portal 2 is really good

For the past several years, almost all of my gaming time was taken up by World of Warcraft. I left that game for various reasons (that I’ll likely write about in the near future), but the upshot is that I’ve played very few games in the past five years, and most of the games that I did play were console games.

One of the few games I played on the PC, and the one that I liked best, was the original Portal. I played it well after the hype of the Orange Box had died down, and basically bought it on a whim from Steam.

When the sequel came out earlier this year, I put off getting it until I got my Mac, and then I put it off some more as I spent time setting up the machine to my liking. Eventually I had to get down to programming, however, and that’s when my procrastination muscles kicked in. I bought the game off Steam and tried to ration it out so it would last a couple of weeks.

Continue reading

The importance of images

Bear!Looking over the last few posts, I’m struck by how much the blog outline looks like what I had pictured in my mind. And by how much I dislike it. Here’s the problem: it’s too bland.

So something I’m going to do from now on is include at least one image in each post.It should serve to breakup the wall of text that tends to accumulate on the front page.

Hopefully I’ll be able to include an image that has something to do with the post – a screenshot, a book cover, that sort of thing. But for this post, which doesn’t really have a subject, I’m going to include a picture of my parents’ dog Bear.

Web fonts and Windows

For about thirty minutes today, I was completely interested in the rendering of fonts in web browsers. Through a fairly convoluted path, I ended up bringing up this blog on a Windows XP box and was surprised by the pixelated look of the title block.

Before ClearType

Jagged!

Continue reading