Hi, it's ! π Welcome to this week's edition of Weekly Tech Tidbits. In today's post, we will cover three interesting topics:
Compound interest of mentoring π‘
How to save time during git rebase β±οΈ
How to choose your tools πͺ
Enjoy reading and feel free to share your thoughts in the comments below. Don't forget to subscribe for more insights and share this post with your network! π’
Compound interest of mentoring π‘
The more experienced you become, the more you see that knowledge compounds. Learning your first programming language is hard, but the second one is easier since you already understand loops, classes, and variables. After working with one cloud provider, switching to another is simpler because the underlying challenges, like role management, are similar.
However, your time is limited. As a senior developer, you may be faster than less experienced colleagues, but you also attend more meetings, leaving less time for actual implementation.
You can optimize your day by minimizing non-coding activities to boost your output, especially when deadlines are near. But a smarter approach is to enable others to increase their output. If you can help two people improve, you invest a small portion of your time to gain double the value for the team. If those people mentor others, the benefits multiply exponentially.
The math may be off, but the essence is clear: the more you help others improve, the more your team benefits.
If you lack time for intensive mentoring, consider these strategies:
Write and Update Documentation: Help others solve problems independently with clear documentation.
Write Detailed Comments in Code Reviews: Provide useful feedback and links to relevant documentation or articles.
Host Regular Knowledge Sharing Sessions: Set up weekly or bi-weekly sessions where team members can share their expertise on different topics.
Investing time in mentoring boosts both individual and team productivity, creating a more efficient and skilled team over time.
If you want to read more on mentoring, I recommend this article by
.Save rebase time with fixup and autosquash β±οΈ
There is a common pattern when you work with feature branches and pull requests. After receiving comments on your pull request, you add changes to the branch, leading to new commits. However, not each commit must be preserved and merged to the main branch. Especially smaller commits, like fixing a typo, are of no value. So what you typically do is:
Fix the typo in the commit.
Run
git rebase -i <SHA>
.Manually reorder your commit.
Change the action to fixup.
Execute.
This process is a bit tedious, especially if you have to do it often. Another way is to use git commit --fixup
.
Imagine this initial git history:
* 316e87f (HEAD -> master) add bar
* 226733c first commit <-- commit with typo
* a9c145c initial
You want to add a commit between 226733c
and 316e87f
to fix it up later. You can add the commit using git commit --fixup 226733c
, which leads to this history:
* 4da3895 (HEAD -> master) fixup! first commit <-- fixup commit
* 316e87f add bar
* 226733c first commit <-- commit with typo
* a9c145c initial
It's important to note that the whole commit message was added by git itself. You can now call git rebase -i --autosquash a9c145c
, which has already 1) moved your commit to the correct position and 2) changed the action from pick to fixup:
git rebase -i --autosquash a9c145c
p 226733c first commit <-- commit with typo
f 4da3895 fixup! first commit <-- reordered commit
p 316e87f add bar
This handy trick might only save you one or two minutes, but free time compounds as well. π
The Craftsman Approach to Tool Selection πͺ
Earlier this year, I re-read Cal Newportβs Deep Work. The book is full of useful ideas, but one I frequently overlooked is the craftsman approach to tool selection:
[β¦] Identify core factors that determine success and happiness [β¦]. Adopt a tool only if its positive impacts on these factors substantially outweigh its negative impacts. (Deep Work by Cal Newport, page 181ff.)
Cal mentions this in the context of leaving (or reducing) social media, but in my mind, this approach can be applied to all areas of life. For instance, do you need a full-fledged solution for executing HTTP requests occasionally, or isnβt curl just enough?
The key here is that the positive impacts must βsubstantially outweighβ the negative ones. Consider factors like bloated UIs, new dependencies in your project, maintenance burdens, and so on.
By carefully selecting the right tools, you can streamline your workflow and focus on what truly matters.
Wrapping Up
Thank you for reading this week's Weekly Tech Tidbits. I covered the importance of mentoring and how it compounds knowledge within a team, a practical tip to save time during git rebasing with fixup and autosquash, and the craftsman approach to tool selection.
I'd love to hear your thoughts, questions, and feedback in the comments below. π¬ Don't forget to subscribe for more insights π and share this post with your network! π’
Stay tuned for next week's post.
And now I know about βfixup and βautosquash.
Iβve never heard of these beforeβ¦
Iβll make sure to try them out in my next rebase.
Thank you for the tips!