Having good developer habits

When you are working on a project by yourself, its really easy to get into bad or lazy developer habits. One of the big ones is not branching your features!

When you are working on multiple different features/bugfixes, it becomes rather “convenient” to just commit changes into master(first mistake was not branching) since you’ll just think “hey noone else will be working on this, so where’s the harm in that.”

But quickly a feature becomes complex, and you forget where the other feature was going. Wish you had branches now!

So here’s a list of must do’s when you are making new features:

  • USE GIT
  • Every time you start new feature, branch off from the latest master commit, assuming its working.
  • Rebase off master whenever master gets updated.
  • Switch branches when you want to work on a different feature
  • Review and merge into master when you are done

Posted Image
Doing those things even if you aren’t in a team is good practice. It will allow you to roll back changes, keep/remove features in the works and ease work tracking.

I just finished implementing spatial hashing to improve performance for collision detection. While working on that, I also started on an Emote feature. And doing those things I listed, it seriously helped me track the features I’m working on.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s