How to avoid breaking builds

git The guy I’m mentoring right now in one of my freelancing gigs is fairly new to software development so I decided to give him a couple of guidelines (conveniently posted on the project’s wiki) on how to properly use git.

Hopefully this should spare me the horrible flashbacks to the days when everyone I was working with was consistently breaking builds everyday.

Best Practices

  • Commit often. The more you commit, the easier it is to do stuff like rolling back changes or pinpointing where a change was committed.
  • Put a meaningful comment every commit. You’ll be thankful you did that 3-6 months down the line when you’re trying to verify if a certain piece of code is a bug or a feature.
  • Push with care. Follow the procedure below to avoid breaking the build i.e. pushing a version of the code which doesn’t work.

Proper Version Control Procedure

Before you push your code to the repository, please follow the following procedure:

  • If you still haven’t done it yet, commit your changes to your local repository (git add and/or git commit -a -m).
  1. Pull the changes from the remote repository (git pull).
  2. In case of conflict, manually edit the conflicting files.
    • You may have to collaborate with the other dev for this.
    • After fixing the conflict, commit the merged changes and go back to step 1 (git pull).
  3. Run the DB migrations.
  4. Run the RSpec tests.
    • If the specs fail, either fix the code or fix the specs.
    • After fixing the failing specs, commit the fixes and go back to step 1.
  5. Run the Cucumber tests.
    • If the specs fail, either fix the code or fix the features.
    • After fixing the failing features, commit the fixes and go back to step 1.
  6. Do a simple developer test. Open the server, log in, and open a couple of pages.
    • If the system doesn’t work, find the problem and fix it.
    • After making the system run smoothly again, commit the fixes and go back to step 1.
  7. You can now push your changes to the remote repository using git push.

You might notice that we’re using RSpec and Cucumber in our project. I’ll talk more about them in a later post.

Nu Skin / Pharmanex and Multi-level Marketing

I haven’t been blogging lately because of the recent changes in my lifestyle (from bum to semi-freelance). From the looks of things, though, I might have to setup a regular blog update schedule, say once or twice a week, in order to improve my gravitas (?) as a freelance software engineer.

Anyway, to kick things off, let’s start with something that happened to me a couple of weeks back.

mlm

I received a call one Saturday morning from a guy who was offering me a job. Or something like that. It was around 9 in the morning that day and it was still an hour before I should wake up. All I recall is that the guy mentioned something about being in a “multinational company” and I was referred by a friend to a job with “high income” and “flexible hours”. Being groggy as I was, I immediately responded with what first came into mind: that I was not interested in the income and all I cared about is whether the project was interesting and whether the work hours are flexible enough.

I believe the guy hesitated for a moment after hearing such an unusual answer (people want money, not time), but regardless, the guy scheduled me for a 6:30 PM meeting the following Thursday at their office in Makati. The after-work hour meeting time was supposedly due to him being busy and that was the only time that he could meet with me.

Looking back, the whole thing was really fishy had I thought about it. But I didn’t; my past few freelancing gigs were of the same “referred by friend/acquaintance + meet with the guy to talk the job over” setup and they all went well. Besides, compared to those gigs, the friend that referred me this time around was a lot higher in the “people I trust” list.

Fast forward to the following Thursday. The first thing that came into my mind when I entered the guy’s office was:

Aw crap, I got suckered into an MLM seminar.

Continue reading “Nu Skin / Pharmanex and Multi-level Marketing”

Extracting Torrent from StarCraft 2 Installer

starcraft II installer

It’s a week before every certified geek in the world would drop everything to get their Zerg on.

Now, a lot of people have already reserved their copy of StarCraft II from DataBlitz, but I’m more of a digital download guy: less clutter for my room, the better. Fortunately, Blizzard is now using this opportunity to sell the new Battle.net as a viable digital distribution platform just like what Valve did when they made Half-Life 2 a Steam exclusive.

Unfortunately, as with Steam half a decade ago, the current version of Battle.net is crap in terms of actually distributing the data. Unlike Steam’s high-speed global CDN, Battle.net uses BitTorrent. Now that would be nice if only their BitTorrent client isn’t crap — the one bundled with their installers gives you limited settings on how the torrent is downloaded and shared.

Thankfully, it’s easy to extract the torrent file from their installers. All you need is a Hex editor.

Continue reading “Extracting Torrent from StarCraft 2 Installer”

Gmail powered e-mail addresses through Google Apps

I’ve finally found some time in my busy schedule to post something about the recent changes in this site.

my business card

As part of making my “freelance” status semi-official, I’m currently migrating stuff from www.bryanbibat.com to this site, www.bryanbibat.net. You might have noticed that I’ve already merged my old blogs to this single blog as well as modified the links in my portfolio pages to point to here.

Another change is the shift from using my Gmail/Yahoo Mail account to bry@bryanbibat.net, and this is what I’ll be talking about today.

Continue reading “Gmail powered e-mail addresses through Google Apps”

Agile Software Development

I never got around to post the follow-up article on Lean and how it relates to software engineering. Now, over 7 months and a huge scandal that made people skeptical about Toyota’s lean manufacturing later, here’s the post on Agile software development.

Continue reading “Agile Software Development”