Stupid git commit-tree tricks, Part 2: Building a merge commit manually out...
When it comes time to make a public update to the UWP samples repo, I usually have to update multiple branches. Each branch encompasses the changes from the previous-version branch, and then adds new...
View ArticleStupid git commit-tree tricks, Part 3: Building a throwaway commit in order...
Suppose you have a series of commits you want to cherry-pick and squash onto another branch. The traditional way of doing this is to cherry-pick the series of commits with the -n option so that they...
View ArticleStupid git commit-tree tricks, Part 4: Changing a squash to a merge
Suppose you performed a git merge --squash, and then later realized that you meant it to be a true merge rather than a squash merge. In diagrams, suppose you have this: A ← M1 ← ← ← M2 master ↖︎...
View ArticleStupid git commit-tree tricks, Part 5: Squashing without git rebase
Suppose you’ve made a bunch of changes. X WIP almost rename method silly typo X works update Y update Z base ← A ← B ← C ← D ← E ← F ← G You started by trying to get the X component...
View ArticleStupid git commit-tree tricks, Part 6: Resetting by reusing an earlier tree
Suppose you have a branch in which you have been doing a bunch of work, you’ve been merging regularly from the main branch to stay up to date, and you realize that your work should be abandoned, and...
View ArticleStupid git tricks: Combining two files into one while preserving line history
Suppose you have two files that you want to combine into one. Let’s set up a scratch repo to demonstrate. I’ve omitted the command prompts so you can copy-paste this into your shell of choice and play...
View ArticleStupid git commit-tree tricks, Part 7: Combining more than two files into one...
Last time, we saw how to combine two files to form a third file, while preserving line history. But what if you need to combine more than two files? For example, maybe you want to take a whole bunch...
View ArticleWhy are Bluetooth functions exported from the infrared control panel?
Remember infrared communications? Okay, maybe you don’t. It was a thing for a while in the late 1990’s and early 2000’s, but it never really caught on, and it became overshadowed by other short-range...
View ArticleHow to compare two packed bitfields without having to unpack each field
Suppose you are packing multiple bitfields into a single integer. Let's say you have a 16-bit integer that you have packed three bitfields into: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 r g b Suppose you...
View ArticleMy initial frustration trying to configure our internal VoIP phones that were...
I remember when Microsoft made their initial internal roll-out of its VoIP phones. The VoIP phones were integrated with a desktop app which let you configure the phone, managed your telepresence, as...
View ArticleAlternate definitions for English words, as inferred from bug reports
Here are some terms that appear in bug reports. "Empty" means "There are a bunch of things here, but not the ones I wanted." "Blank" means "There are things, maybe." "The picture is wrong" can mean...
View ArticlePredator-prey reversal: Rock lobsters vs whelks on Malgas Island and Marcus...
Malgas Island is dominated by rock lobsters, who happily feast upon whelks. Just 4km away, Marcus Island is dominated by whelks, not a rock lobster to be found. Researcher Amos Barkai couldn't figure...
View ArticleHow do I destruct an object that keeps a reference to itself, because that...
Consider the case of an ordered work queue. Components can queue work to the worker thread, with the expectation that the work will run sequentially. class OrderedWorkQueue { public:...
View ArticleWhat order are pages in a memory-mapped file flushed out to disk?
Say you create a memory-mapped file mapping and write data to it. In which order will the pages be flushed out to disk? Is it in the order the pages were written? Or are pages closer to the beginning...
View ArticleEven if your assembly language code doesn’t call any Windows APIs, you still...
Writing in assembly language doesn't absolve you from adhering to the software conventions. Certainly you have more flexibility in assembly language, but that doesn't give you freedom to do anything...
View ArticlePrecision questioning: The cynical description
Precision questioning is a technique used by some senior executives at Microsoft. Although precision questioning positions itself as a toolkit for critical thinking and problem solving, its use in...
View ArticleAsking for clear written documentation that Require trusted path for...
A customer had turned on the Require trusted path for credential entry policy (under Computer Configuration, Administrative Templates, Windows Components, Credential User Interface). They demanded...
View ArticleWhy is there a limit of 15 shell icon overlays?
There is a limit of fifteen shell icon overlays. Why fifteen? The value 15 came from the corresponding limit for image lists. The ImageList_SetOverlayImage function supports up to 15 image list...
View ArticleStupid git commit-tree tricks, Part 6: Resetting by reusing an earlier tree
Suppose you have a branch in which you have been doing a bunch of work, you’ve been merging regularly from the main branch to stay up to date, and you realize that your work should be abandoned, and...
View ArticleStupid git tricks: Combining two files into one while preserving line history
Suppose you have two files that you want to combine into one. Let’s set up a scratch repo to demonstrate. I’ve omitted the command prompts so you can copy-paste this into your shell of choice and play...
View Article