Yes it may seem like when you switch over to a new revision system, git perhaps? That your brain may explode.  Or that things might turn into a major catastrophe.  Be that as it may I'm going to let you in on how I get things done at my job using git in my daily workflow.  This is by no means the best way to get things done, or the end all solution... so comments and suggestions are very welcome.


So at my current place of employment we have 4 developers coding out of the same code base.  It would seem like it would be easy enough to not step on eachother's toes, but it happens.  Sometimes it happens a lot!  Some of the main reasons:

  • Whitespace in code
  • Large files/classes/controllers (multiple people working out of the same file)
  • Unique workflows
  • Different programming environments
  • Improper merges

I could go on for at least another minute or two, but you get the gist of it.  The whole point of a revision control system is to not only be able to version your code, but to also let it allow you to work succinctly with all of your team members.  So before I get into a typical day at the office, let's take a look at the structure of how our git repository is setup.


Repo Basics

I'm not going to go into how to setup a repository, how git is a DVCS, or how I like git better than SVN; but if you'd like I can do that in another post.  We're going to nail down the basics of how our repo should function and some general terminology.

First off we have a generic repository for each project.  We then use that generic repository to share code between ourselves and the deployment system.  Each developer then forks that main repository and creates their own repository of the codebase as well.  For instance our main repo might be developers/projectName@github, and my personal repository would be aronstaves/projectName@github.  The great thing about github is they provide a few not-so-common features with their repository and also have the ability to setup private and public repositories.


For the most part, each developer in our team has access to 3 repositories.

  1. Local - this is each developer's git repository that's located locally on their development machine.  This is what we develop in day to day.
  2. Origin (aaron/projectName@github) - this refers to the personal developer repository that lives remotely (on github).  This is used for personal backups of branches, or for pushing branches remotely that that other developers do not need access to.
  3. Upstream (developers/projectName@github) - this refers to the generic repository that everyone forked their developer repositories from.  Pushing branches to this repository allows you to share code with other developers as well as the deployment system.  If the branch isn't in upstream, it isn't a candidate for deployment.

So in short, I develop out of my local branch every day.  If I have a branch I want to save for later, or possibly an incomplete feature I want to delete locally and pull down later, I'll push it to origin.  This way I'm not cluttering up upstream with various branches that other developers know absolutely nothing about, and that they probably don't care about!  If I need to share code with other developers, or give the deployment system acess to code, I'll push it to upstream.


Branch Basics

Alright! Now that you see how the repos work, let's check out how branches work within a repository.  At any given time, I'll have a minimum of 3 branches available.   Master and Release typically are tracked against the upstream repository, and the development branch is pushed wherever it is needed.  Again, these aren't rules to follow, but how I personally use git.

Master Branch

Stable Tested code.  I cannot stress that enough, only stable and production tested code should be put into master.  Once we've had a successful deployment of release code, we will production test it.  Once tested, release code is merged into master and tagged.  This branch is mainly used for breakfixes or rolling back deployment.

Release Branch

This is all code that is staged for release, but not yet tested in a production environment.  Just to reiterate, if your code is not going to get released, it has no business being in this branch.  Once code from a development branch has been tested by a developer, it is merged into this branch and put through QA testing.

I also want to stress working out of this branch is typically a big no-no.  Not only could this lead to unwanted code getting committed to the next release, but it also has the potential to spread commits for a specific feature across non-linear commits.  I'll get into the problems this can cause later, but unless you're making a single commit change to the soon-to-be released, you should make a branch for your code change.


This is code that is currently being developed and is typically branched from release.  So when you want to start a new feature, you'll checkout release (and make sure you have the latest code pulled down!), then create a development branch from that.  I'll also go over a typical development lifecycle later as well.

Anyways, that's a quick high level overview of how I typically get things done in git.  Look out in the next week or two on how I branch, rebase and merge in code with other devs on my team.

So it's been a while since my last update!  Not sure if there's anyone out there still listening... but I've got no fancy excuses, I've just been lazy.  But in the spirit of the blog being not quite extinct, life goes on.


At any rate, this is just a quick update to hopefully kick myself into gear for getting some stuff done.  Some things that will be coming up:

A new project!

Not like I really actually finish any of my projects but I can dream right?  So far things have gotten off to a better start than most.  I've started using codeigniter, which is a pretty lightweight MVC framework.   Toss in a little ORM magic on there and I'm set!  Right now I've got just a login page, some sessions and some inheritance vodoo going on.  All things considered it's further than I've gotten most times.  I'll be sure to post more updates as they come.

Revision control!

At work we've been using git for the past few months and I'm becoming a huge git enthusiast.  Problem is, there's a ton of ways to do things!  So in the next few weeks I'll hopefully have a few posts on how *I* personally use git as well as how it could potentially be used in smaller to mid-size development teams.  This topic might have to be broken out into a few multiple ones.


So there you have it.  In the spirit of keeping me honest, please hound me to get at least one blog post a week.  Sunday nights seem like as good a time as any.  You know, until football season starts.


Here's the skinny...


If you hadn't heard, my sister and brother in law just had (well, he's 1 now) a baby boy, congrats!.  Given how tech savvy they both are they take a ton of movies and photos and post them online for relatives from all around the country to watch.  This is an awesome way to keep up on how the little guy is doing.  However! Given that some of our relatives may be a bit more on the less tech savvy side I decided that making an interactive web based movie page would be a good way to help them view their new nephew, cousin, grandson or great grandson.  You can see a demo of it here.

For starters, I've already done a few projects using the JW FLV Player. I use this player for a few reasons.  First off, it's free to use for non-commercial purposes!  And even if you do use it commercially, it's pretty dirt cheap.  Second!  It's got an insanely awesome javascript interface.  You can pretty much completely control the player and hook into almost every event you can think of that the player may publish. This is great for web developers that know absolutely nothing about flash but still want the benefit of a flash based movie player.  Lastly, this player is great because it constantly getting updates and there's a huge community behind it; always good stuff.

What you'll need

I did try to spruce up this player slightly so you'll need a few things if you'd like this to work on your server.

  • mod_perl, along with the CGI, File::stat and DateTime packages.  I imagine most come pretty standard with a vanilla install of PERL.
  • ffmpeg, compiled with png support.  I imagine a pretty standard install of ffmpeg should be fine.
  • movie files, yup! you'll need some movies to view.  Right now this is limited by the type of movie files that the player natively supports.  I may add some transcoding using ffmpeg later if anyone actually uses this and wants it.

And that should be it!  Pretty simple.  I'm also using the YUI javascript toolkit, but Yahoo! has been kind enough to host that on their CDN.  So no need to download all those crazy javascript files.

How to Install

Here are some quick install instructions:

  1. Grab the zip file from here
  2. Make a directory on your server (in my case where you want the files to and unzip 'em there.
  3. Make a directory (if you need to) where you're movies are going to be placed.  I put mine in  This directory will need to be writable as far as your webserver is concerned.  If you already have them you can forget this step!
  4. Edit the movies.conf file.  You'll need to specify the absolute path of your movie director and the url that links to them.
  5. Once that's done you should be able to just go to your url and watch some movies!


Sorting and Dates

I've made it so the player automatically sorts the movies by date.  The newer movies are listed at the top and the older movies are listed at the bottom.  It also grabs the date one of two ways.  1) if the date is specified in the filename (yyyymmdd format), it will use that.  2) otherwise it will grab the timestamp on the actual file.  Neat huh?! The only downside to this is is that it has to touch each file(name) to do this.  But I wanted to make this without the hassle of a DB, kind of a necessary evil.  Hopefully with 100's of files, this won't be that much of a performance hit.

Native file support

As I said above, this natively supports mp4 (m4v, etc) files as well as flv files.  So hopefully if your files are in that format, you won't have to deal with transcoding files.  Awesome! As I said, transcoding wouldn't be that hard to do, but it would be pretty time consuming on the server side, pending on how large the files were, so I'm not sure how I'd go about that at the moment.


See a movie you like? Well download it! You'll notice at the top of the screen when you play a movie, you'll get an awesome download link.  For anyone that wants to actively share or archive these movies, I figured it would be a necessity.



Right now I've only tested this in FF3+, IE 7  and the latest version of Opera.  If anyone finds something wrong with it, let me know and I'll see if I can address those issues.  Otherwise feedback, suggestions, comments and criticism is welcome.  This is my first mini-project in a while that I've made to "distrubute" so somethings may be clear while others may not.  Hopefully with the addition of the conf file, you won't have to touch any of the code I wrote.  This small tutorial is written for them, but anyone is more than welcome to use it if they want their own personal video page to share with others.  Enjoy!

So as I've written before, I've had plenty of problems with my (work) computer, and below is just another example.  I have no idea why, no idea how but any CD I insert into my Macbook Pro just gets spat right back out.  How annoying!

Anyways, myself and a couple of friends went in on a pretty sweet deal that was on amazon yesterday.  All said and done it was pretty much about 60% of retail price.  Awesome!  And the fact that it comes with Vista Business <insert mild Micro$oft groan here>  just makes the deal that much sweeter. Needless to say, I'm looking forward to using my work laptop strictly for work, and actually having a nice dual boot personal laptop.  And one that's "ultra-portable" to boot!

So this weekend I decided to install linux on my PS3 (more on that later), so what better time to upgrade the hard drive! I commend Sony on making swapping out the drive so easy. Because it literally is that easy. Before you start, be sure to backup your data via System Settings -> Backup Utility.  For my purposes I just used an external USB hard drive.  My backup was 22GB (off of a 40GB PS3) just to give you some idea of how big it's going to be.  First off - we need to decide on a hard drive. Initially I was going to try going with a SSD, however the price/space ratio was just way too much. So I simply went to amazon and typed in PS3 hard drive. To my (pleasant!) surprise I was given a list of 2.5" notebook drives that seem to work well with the PS3. This is just based on user comments/googling. Anyways, I settled on a nice 320 GB hard drive from Western Digital. With over 95% five-star reviews, how could I go wrong.

Removing the old drive

As I said above, removing this drive is very easy. Do you know how to use a screwdriver? great! because that's all you need. First up, find the hard drive cover on your ps3.

PS3 Hard Drive Cover

PS3 Hard Drive Cover

Once you remove it you'll notice a (blue colored!?) screw. Unscrew it and you'll be presented with a nice little latch to safely pull out the hard drive.

PS3 Blue Screw!

PS3 Blue Screw!

Hard drive removed!

Hard drive removed!

Once it's out, you'll notice 4 screws on the side of the hard drive holding it in place.  Remove those!


Screws on the side of the hard drive

Once it's out, you're free to swap out drive.  Put your new drive in, then screw it into place with the 4 screws you just removed.


Everything taken apart!


In goes the 320GB!

Then just replce the last screw on the latch, pop the cover back on, and you're set! It's seriously that easy

Formatting and getting the drive "up to speed"

So some drives may already come pre-formatted. Unfortunately this was not the case for me. So I had to go through quite a bit of unexpected hoops to get the drive working once installed. First I was prompted to connect a controller... ok...


Insert controller here!

Then I received a more  nasty message from the PS3.


Uh oh!

Cannot run correctly?  Oh no!  Basically this is because there is no software on the drive, so it has no idea what to do.  The solution is to provide the new drive with a much needed update!  To do this I just went to the Playstation website and grabbed the software.  Make sure to note the directory structure!  Anyways, once that installed, it restarted, formatted the drive and everything finally started working.  Lastly I took my backup and restored it from the System Settings -> Backup Utility menu.  All in all it was pretty easy.  I just wasn't prepared for all the "usb disk that has software on it to boot your ps3" part.  Now for linux!

So most of the apps for my phone thus far have been free.  But recently I came into possession of a (trial!) program of panoman.  The user interface for it is insanely easy. So far I've only used it twice but the results have been extremely awesome.  Example below!  Especially check out the high-res that it was taken in (take that iPhone!)

On the balcony of work
On the balcony at work

Although I'd probably barely ever use this, it's awesome for those surreal views that you can capture.  Anyways, if it's ~$5 or so, that'd definitely be worth it; especially if the license can go between phones.

So in a previous post I mentioned my recent acquisition of a Nokia N78 phone.  Like I said, I wanted something not super expensive; yet something I could play around with.  The N78 just happened to be the right fit.  At any rate I don't think I have the patience to write up an all-out review of the phone so maybe I'll just do it in pieces.

For those that don't know, I've recently started a web community revolving around burritos (or pretty much anything else people want to talk about).  Since I end up eating burritos quite often, this makes me want to blog about them.  And of course, blogs need pictures!  The N78 has a 3.1` megapixel camera, it's not the greatest but it definitely gets the job done.  It's easy to use and has one click uploading to the server(s) of my choice.  In this case my public Ovi profile.

Nokia's Share Online Application

Nokia's Share Online Application

Another thing that it does when taking pictures is geotagging.  This pretty much serves absolutely no purpose for me... but look how cool it is!.  Granted it only works about 50% of the time, but when it does, it's always fun to see "hey! look that's where the picture actually was!".  So far I'm super impressed with the Nokia+Ovi integration.  As far as the future, things appear to be getting even better!

It's done!  I now finally have ubuntu on my  MacBook Pro(4,1)!  The initial partitioning of my drives (in order to keep my bootcamp'd windows and os x) was made out to be a lot harder than it actually was.  I wasn't quite sure what to do due to the fact that OS X seems very finicky about knowing what is booting from where; and any changes may affect it's need/desire to keep jounaling all drives it knows about.  At any rate, I found an awesome article detailing out all the specifics, as well as how to work around the swap space issue (which i still have yet to tackle!).  With that said, under an hour I think the only thing I don't have working that I'd like, but by no means need, is the keyboard backlight controls and the microphone.

Here's list of things that worked out of the box that I thought wouldn't:

  1. Multitouch Scrolling
  2. Multitouch Clicking (for the right click)
  3. Volume Keys
  4. Restricted Drivers
  5. 90% of the function keys in general (with some help)

So there you have it!  As I figure out more stuff that's wrong, or things to configure, I'm sure i'll be posting more.

If you don't know, Ubuntu 8.10 dropped today. As promised I will be attempting to install it this evening. I say "attempting" because you never know what might go wrong. Anyways, I came across an awesome program called rEFI that enables you to actually control and partition your mac hard drive without being forced into only 2 paritions (OS X and Bootcamp). So this way I can still keep my windows partition for the occasional game and create another partition for Ubuntu. Great! The program installs like any other program under OS X and only took about 5 minutes to get working (4:30 was how long it took for my mac to reboot). Anyways, there are some pics below, and expect an update within the next day or so. Or even possibly tonight!

c6da6a3da8404949b1180ceeace91027.jpeg - Share on Ovi ed39c578d12145f6a7b3b5c846e190e2.jpeg - Share on Ovi

If you can't tell... I'm really excited about throwing ubuntu on here, and my Mac must be too... since it keeps hinting that it wants to be fixed (image below). I even plan on ordering some [3D] stickers and a physical copy of the OS!

Next Page »