60 karma · joined May 18, 2018
A UUIDv7 primary key seems to reduce / eliminate those problems.
If there is also an indexed UUIDv4 column for external id, I suspect it would not be used as often as the primary key index so would not cancel out the performance improvements of UUIDv7.
[1] https://www.cybertec-postgresql.com/en/unexpected-downsides-...
They all seem to be names for more or less the same idea.
The first time a test runs successfully it auto captures the output as a file. This is the "approved" output and is committed with the code or saved in whatever test system you use.
The next time the test runs, it captures the new output and auto compares it with the approved output. If identical, the test passes. If different, the test fails and a human should investigate the diff.
The technique works with many types of data:
* Plain text.
* Images of UI components / rendered web pages. This can check that your code change or a new browser version do not unexpectedly change the appearance.
* Audio files created by audio processing code.
* Large text logs from code that has no other tests. This can help when refactoring, hopefully an accidental side effect will appear as an unexpected diff.
See: * https://approvaltests.com/ * https://cucumber.io/blog/podcast/approval-testing/ * https://en.wikipedia.org/wiki/Characterization_test
The Trio library felt easy to learn and just worked without much fuss.
Transfer Objects are not the Storage Objects.
https://youtube.com/playlist?list=PL926EC0F1F93C1837&si=U4Jx...
It's local stacked PRs and you can jump between them to edit as the ideas evolve.
https://stacked-git.github.io/
But if the nearby code is evolving quickly from other people this can be a bad approach because of merge hell when the work is finally submitted.
Arthur C Clarke wrote a great story about space elevators called "The Fountains of Paradise".
It's aimed at children around your daughters age (might be a few years too young, I'm not sure). It covers lots of fun science, craft, music topics and has many small activities that can be made at home.
There is a lot on YT: https://m.youtube.com/user/CuriosityShow
Some of the segments are a bit out of date now but most are still totally relevant today.
It is science / technology focused and aimed at kids around your daughters age.
They explain a lot of fun sciencey things, puzzles and magic tricks that can be made at home from very easy to find parts.
The YT channel has over 1000 short videos : https://youtube.com/c/CuriosityShow
It was made in the 70s and 80s yet much is still totally relevant today. Even the occasional thing that is out of date might be a fun history discussion.
When programming, just before stopping, I break the code where I'm working by deleting a few random characters.
Getting back to work later, I see the IDE showing some syntax errors and it helps me quickly switch back into the work.
Most of us do not spend all day just typing in the new code, there is a lot more to it: reading existing code, deciding how new code will fit in, running new code, debugging etc. I've found TDD means I spend less time on all that other stuff.
GeePaw Hill made a nice video where he talks about this as "The Lump Of Coding Fallacy":
https://www.geepawhill.org/2018/04/14/tdd-the-lump-of-coding...