Skip to content

Instantly share code, notes, and snippets.

@squarism
Last active December 20, 2015 15:19
Show Gist options
  • Save squarism/6153112 to your computer and use it in GitHub Desktop.
Save squarism/6153112 to your computer and use it in GitHub Desktop.
Advice

Advice

Any advice, best practices or rules I run into. Mostly from reading new books.

The Way to Go (golang)

  • Use float64 for floating point numbers whenever possible, because all the functions of the math package expect that type.

Git

  • Rebase when you want a clean merging history. You can merge rebased feature branches and have the best of both worlds. When you are in a branch, rebase to the last commit of the develop or master branch (git rebase -i). Then squash all commits down (except first one). Commit it and it will prompt you for the commit message. Summarize all the commits to be the feature. Now merge like normal. The advantage here is that feature branches won't create long merge bubbles. It's a matter of taste really.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment