Working with Git

For the past week and a half, I've been pushing myself to learn and use git. I think I'm using it enough now that I managed to integrate it into my workflow which is probably the thing you have to work through the most. At work, we have access to SVN, but I can't say that everyone uses it - I use it on some projects, but I really should be using it on all projects. At home, when I'm working on my own stuff, I hadn't been using it at all. Well, I'm making an effort to change that and I have an account on github.com ( Sorry, don't have any open source projects yet. :/ ) and I'm using it for a couple of side projects I have.

So, I thought I'd jot down some notes of what has been working well for me:

  • Forget about the GUIs. Learn the command line. Download msysgit and use it. I'm on a windows box, so this is actually a rough sell as we all tend to be GUI-centric, but seriously... open up explorer and right click the folder and "Git Bash Here" - if you're familiar with linux style commands, you'll feel at home here. Type 'ls' to list directory, 'rm' to remove files, etc.
    • Msysgit does have a git gui, but again, learn the command line. If anything does go wrong with GUI interfaces, you're going to have to resort to using the command line anyway.
  • Once you've initialized your project and git is up and running, create a branch and leave master alone. I use "master" as my current stable "ok, I know everything works here." I use branches for new development or bug fixes. I think this is probably the hardest thing for people (working solo) to get used to in their workflow.
    • So, in my current project, I have a user tracking app. "master" already has a working copy of the website, by typing 'git checkout -b tracking' in the command line, I'm basically creating and switching to the branch called 'tracking'. I get everything working there the way I want, at any point, if I seriously screw things up or things aren't going the way I'd like... I just simply blow it away or just switch back to master and create a new branch and start over again.
    • If things are going the way I'd like and I get to a good stopping point and everything is working, I'll switch to the master branch by typing: 'git checkout master' and then merge my code from the branch to the master by typing: 'git merge tracking' and like that, my master branch now has new files and modified files I've worked on over in the tracking branch.

I'm still fairly new at all this and I know that I need to figure out tagging and such. I'd love to list out all the git references I've been using, but honestly I've just been typing git commands into my chrome window and letting google find those answers for me. There's a lot of other CFMLers in the community that have more git knowledge and they've been slowly posting them on their blogs.

I would also suggest getting familiar with git locally first before rushing off to sign up for a github account. Once you're familiar with all the commands locally, trying to work remotely will make more sense. I must have created a couple of test projects on github before I was comfortable with pushing or pulling from an external source. I mention this because working with remote branches and stuff can get a little obscure.

Blizzard Authenticator / World of Warcraft / Android Devices

Update: As of mid-2011: This is no longer relevent. The Authenticator issue has been fixed. Great job Blizzard.

So, I was screwing around with my Droid Incredible today. Unfortunately, my phone decided to reset itself. No biggie, I didn't lose anything major (all my phone numbers and such are synched, etc) or so I thought.

I use Blizzard's Authenticator from the market to put extra security on my World of Warcraft account. I had done the same with the iPhone in the past as well. Never had an issue with this thing. In fact, I did a full restore on the iPhone and had forgotten to deactivate my Authenticator on my account and re-installed the app and everything still worked.

Yeah, I learned today that the Authenticator on the Android devices doesn't work the same way. You get a new serial number whether you want it or not. There's no way to change it either. So, you have to contact Blizzard to deactivate your authenticator on your account or you won't be able to log on. At all.

Fair enough.

Here's Option A of what Blizzard wants to deactivate the authenticator:

  • Original Serial Key of the Classic WoW game.
  • Account Info
  • Answer to your secret question

I've got 2 out of 3 of those. I have 2 WoW accounts and while I found one of the keys, I can't be sure it's the right account key. Plus I recently moved. Guess what probably got trashed during the move? :| After all, who keeps original serial keys for games from 1996? :P Especially when the disk / game is completely downloadable online.

Option B? Some form of ID scanned, emailed and the long run-around.

So, word of advice, don't screw up your phone or at least, be aware that the authenticator serial number is going to change so deactivate the old serial number before you root / screw around with your phone.

Update: As of mid-2011: This is no longer relevent. The Authenticator issue has been fixed. Great job Blizzard.

CFBuilder + Adobe AIR = More Stuff To Learn

If you already have CFBuilder, you're pretty much ready to go with AIR development. There's nothing extra that you need. Now, the default AIR SDK that ships with CFBuilder is AIR 1.5, but Andy Matthews pointed out that you can point CFBuilder at an AIR 2.0 SDK. Anyway, to create an AIR project in CFBuilder, just File->New->Project-> Type "AIR" and it will filter to "HTML Projects: Adobe AIR Project."

To update the SDK:
Download the AIR 2.0 SDK
and unzip it. Move it to somewhere safe on your computer that you won't randomly delete it for no reason. Then, open CFBuilder, go to Windows -> Preference. Type in "AIR" for the filter text, then select "AIR SDKs" - Click on "Add" - Browse to the directory I just mentioned to keep safe and then type "AIR 2.0 SDK" as the name and hit ok. When you return to the original panel, you'll see "AIR 2.0 SDK" in the list and if you want to make that your default SDK, you should check the box next to it and hit apply.

So, why am I mentioning this? Because if you already have CFBuilder, then you already have Adobe AIR and it's potentially another thing you should be learning if you're not already learning it. After all, you knew that you can create HTML / Javascript AIR apps, right? Right?

Additional (useful) AIR links: