Dev-Test-Prod

Coming from an enterprise application background (PeopleSoft), I’m used to the dev-test-prod development paradigm:

  • Develop and unit test in the dev environment
  • Migrate and functional/integration test in the test environment
  • Release to the prod environment

This is such a ingrained process to me that I thought maybe I should question whether it applies to web site development?

Stepping back for a moment, I believe the main reason you approach development this way is to mitigate risk. In other words don’t release to the world until something has been fully tested. Admittedly this seems like a very good idea if you are making a change to a process that updates customer accounts and a small  bug could lead to being out by a few million dollars. However, does it make as much sense in world of web development?

I believe it does. It lets you isolate a problem come up with a fix which you can then test before you release. If you couldn’t do this, say you simply created a fix in production what impact would it have? Well in most cases, probably none, but say your fix broke your entire site. Uh oh, now what? Restore from backup? When did you do the last backup … ?

Speaking of backups I think the two fall into exactly the same category: you use the dev-test-prod paradigm just in case your fix doesn’t work. Just like you backup your data just in case your hard drive crashes. So I’m sticking to it.

March 17, 2010 | In Programming, Web Development | No Comments

Creating vs Consuming

I read an really good article that mentioned having a balance between creating and consuming. Unfortunately I can’t seem to be able to find it any more. I think the reason is that the concept didn’t hit me straight away… I remember reading the article and then perhaps a day or two later I got it. Basically (and this is all coming from memory now), it was about balancing the time you spend creating things with the time you spend consuming.

For example, in my context, I’m referring to web development. Specifically the time I spend developing, and updating web sites (creating content) versus the time I spend learning new skills and technology (consuming). The point is to move more towards creating, and allowing the time spent consuming to compliment what I’m creating.In other words, there’s no point learning everything I can about web development, if I don’t actually build or update any web sites. Pretty obvious stuff, but like many things, I never thought about it consciously. In fact, I know I sometimes procrastinate on something I should be doing with the excuse that I need to do a bit more research.

I’m not saying you should just dive right into things. I’m just saying, you should honestly ask yourself this question: what are you doing towards your goals right now, creating or consuming? And if you are consuming, do you need to be, or is there something you can create right now?

March 17, 2010 | In Thoughts | 2 Comments

NotePad++: my new favourite editor

For a long time I’ve been using PSPad which is a very good free text editor for Microsoft Windows. I’ve always known about NotePad++ which has always been a great text editor (and its open source). However, I’ve never been able to fully justify the switch from PSPad to NotePad++.That is until I started Ruby on Rails development and got a case of Mac envy watching all the screencasts with TextMate and the really nice Railcasts theme. It seems the Ruby on Rails community is full of Mac users — well at least the helpful people that write the tutorials and screencasts anyway.

What I wanted was the really simple interface, theme and explorer you get with TextMate. I just had two conditions:

  1. I didn’t want to switch to a Mac. We’re not all made of money. Although I hear you can power a Mac with your own sense of self-satisfaction :P
  2. I wasn’t going to switch to a paid editor (at least not without exploring the free/open source alternatives first) like eTextEditor or Sublime Editor. Something open source would be good too.

The solution came pretty quickly as soon as I found out you can convert TextMate themes to NotePad++ themes.  Another great feature is the plugins manager which makes it easy to install a number of really useful plugins.

Here’s how my NotePad++ now looks running on Windows 7 (Consolas font) using the Railscast theme and Explorer plugin:

I know, I know, no TextMate bundles but hey, you can’t have it all, and I’m just a wannabe Mac fan boy anyway. Also I wish they would hurry up and update the NotePad++ icon. It looks like something that survived from Windows 95 :(

March 16, 2010 | In Software | 6 Comments

Guide to Git on Windows

Found this site: An Illustrated Guide to Git on Windows for us poor folks on Windows that want to use Git for version control ;)

Its a good walk through on how to use the major features in Git with plenty of helpful screen shots.

March 16, 2010 | In Software | No Comments

Sidebar Category Links in WordPress

Turns out its pretty easy to add a new category sidebar link in WordPress if you aren’t using a sidebar widget. For example, check out the new Useful link area that I’ve added to this site to list any articles I’ve written that may be considered useful.

To do this, I opened up the Sidebar template file (sidebar.php) and added the following lines:

<div id="blogroll">
 <h3>Useful</h3>
 <ul>
   <?php get_links(17, '<li>', '</li>', ' - '); ?>
 </ul>
</div>

I’ve used the same div id, blogroll as the blogroll link because I wanted to keep the same CSS formating. The key is the get_links function and working out the category ID.

17 is the category ID for the new Useful category which you can find out by going to Links > Link Categories in WordPress, clicking on your link category and looking at the URL which will be like this:

http://blog.praj.com.au/wp-admin/link-category.php?action=edit&cat_ID=17

So cat_ID=17, indicates that the link category Useful has a category ID of 17. Interestingly the blogroll category ID was 2, so not sure what happened to all the category IDs in between …

March 16, 2010 | In Web Development | No Comments