🔗 What Every Programmer Needs To Know About What Every Programmer Needs To Know
I won’t deny it. I came up with the title for this post before coming up with the actual content. It came to my head and it was just too good to pass, because it entices you to think about that subject. What does every programmer need to know, after all?
-
What Every Computer Scientist Should Know About Floating-Point Arithmetic - What Every Programmer Should Know About Memory
- What every computer science major should know
- What every programmer absolutely, positively needs to know about encodings and character sets to work with text
- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
- What Every Programmer Needs To Know About Game Networking
- What every programmer should know about time (the blog post is simply called “Time”, but it was featured in Hacker News with the long title)
What every programmer should know about names (actually titled “Falsehoods Programmers Believe About Names” — this is about people’s names)
If you run into any other of those lists, let me know at h@ this website’s domain!
🔗 A nice summary of Git commits with files when rebasing
When you’re making a large interactive rebase, it’s useful to see what files each commit touches.
Here’s a nice trick. Take the list of commits from `git rebase -i` and save it into a text file, `commits.txt`, which should look something like this:
pick aef18c84 fix something pick efa1d6pd add a feature pick 74417d1d something else
then run this:
(cat commits.txt | while read x commit rest; do echo; echo "#" $commit $rest; git show $commit --pretty=format:'## %an' --name-only; done ) > commits.md
This will generate a file called `commits.md`, with contents like this:
# aef18c84 fix something ## Hisham Muhammad project/some/file project/another/file # efa1d6pd add a feature ## John Doe project/blah.txt project/another/file # 74417d1d something else ## Hisham Muhammad project/another/file something/else/entirely spec/01-test_another_file_spec.lua
Keeping this `commit.md` open side-by-side to an interactive rebase session makes it a lot easier to quickly glance which commits touch the same files, which greatly reduces the changes of conflicts when moving commits around. Plus, using hash signs and the .md extension makes the whole thing even easier to read, when your text editor has support for highlighting Markdown files!
Follow
🐘 Mastodon ▪ RSS (English), RSS (português), RSS (todos / all)
Last 10 entries
- Frustrating Software
- What every programmer should know about what every programmer should know
- A degradação da web em tempos de IA não é acidental
- There are two very different things called "package managers"
- Last day at Kong
- A Special Hand
- How to change the nmtui background color
- Receita de Best Pancakes
- That time I almost added Tetris to htop
- Receita de Orange Chicken