Post ABHGtTdTG8d6IucT20 by nikoheikkila@mastodon.technology
(DIR) More posts by nikoheikkila@mastodon.technology
(DIR) Post #ABHGtTdTG8d6IucT20 by nikoheikkila@mastodon.technology
2021-09-11T14:13:20Z
0 likes, 0 repeats
The way we do code review is fluid and perpetually changing. I've updated my list of good code review practices to reflect this day.https://nikoheikkila.fi/blog/being-a-good-developer-tips-for-an-effective-code-review/
(DIR) Post #ABHGtUSADfBAq8Kx2u by nikoheikkila@mastodon.technology
2021-09-11T14:13:37Z
0 likes, 0 repeats
TL;DR: Five important points in my blog.💎 Get your code reviewed while it's hot. Don't waste time fiddling with pull requests and online tools.💎 Work in bite-size batches and use micro-commits to make changes digestible.💎 Invite the right people around for review (or the whole team).💎 Don't control people, mentor them.💎 Let go of your ego, and trust the code to be improved in the future.
(DIR) Post #ABHGtV1y4XoqdB5Xqy by Ninmi@mellow.town
2021-09-11T15:12:32.253591Z
0 likes, 0 repeats
@nikoheikkila I really need to learn how to manage git better to improve on the second point.
(DIR) Post #ABHGtVXACYlyBvgSTg by nikoheikkila@mastodon.technology
2021-09-11T15:16:22Z
0 likes, 0 repeats
@Ninmi Analogy of playing video games helped me to understand commits. Every time I'm safe (e.g. tests pass), it's time to save the game (git commit). If I screw things up, it's time to load (git checkout).
(DIR) Post #ABHGtW48Dz8zqB6mrg by Ninmi@mellow.town
2021-09-11T15:25:20.663699Z
0 likes, 0 repeats
@nikoheikkila I just end up doing a lot of changes unrelated to each other and I just need to learn how to separate said changes (often within the same file) in to separate commits. I'm suree that's possible.
(DIR) Post #ABHGtWa2JMfHR82Gau by clacke@libranet.de
2021-09-11T15:33:06Z
0 likes, 0 repeats
git add -p is a strong ally there.
(DIR) Post #ABHGtX3SXyCUuNnlSK by clacke@libranet.de
2021-09-11T15:36:13Z
0 likes, 0 repeats
Learning how to use partial add together with interactive rebasing to edit commits helps you just move forward while coding without worrying too much about isolating changes in the heat of the moment, if that's something that would be distracting.I sometimes make clean commits the first time, sometimes defer cleanup to later, it depends.
(DIR) Post #ABHGtXWWntS8MXOylU by clacke@libranet.de
2021-09-11T15:38:43Z
0 likes, 0 repeats
git config --global alias.rbi 'rebase --interactive --autosquash --rebase-merges' because I do that a dozen times a day.
(DIR) Post #ABHGtnhkdvwAXymATo by clacke@libranet.de
2021-09-11T15:23:32Z
0 likes, 0 repeats
A key point is to became good enough at interactive rebasing that you can make frequent commits while working on the code and then relatively effortlessly rework it to a helpful narrative once you've reached your destination.
(DIR) Post #ABHGtoDejJSS8vheD2 by nikoheikkila@mastodon.technology
2021-09-11T15:27:26Z
0 likes, 0 repeats
@clacke @Ninmi Yup, nowadays I mainly reword commit messages through interactive rebasing. Rarely I need to squash things together unless I've forgotten to add something (most of the time `git commit --amend --no-edit` is enough).
(DIR) Post #ABHGtohmvHYpeNniAy by clacke@libranet.de
2021-09-11T15:31:08Z
0 likes, 0 repeats
git config --global alias.amend 'commit --amend --no-edit'Indeed.