r/programming • u/fagnerbrack • Sep 14 '26
Small Programming Tricks
https://will-keleher.com/posts/small-programming-tricks-matter/
179
Upvotes
r/programming • u/fagnerbrack • Sep 14 '26
57
u/davidalayachew Sep 15 '26
Genuinely useful tips here.
Especially that
git log -S pattern. 50% of the reason why I installed TortoiseGit is to get that feature. Never knew it came with the CLI. At least not easily.20
u/Skaarj Sep 15 '26
I prefer the opposite and recommend agaisnt your complex glob syntax.
With find you write out your criteria in words. This makes it so much more easier to remember and understand.
Working on files where the name is a pattern?
find . -type f -name PATTERNWant to do something with every directory?
find . -type dSo much easier to remember.
13
u/lood9phee2Ri Sep 15 '26 edited Sep 15 '26
Mostly. There are/were databases that don't support that historically, the syntax might e.g. use a special dummy table like Oracle "DUAL". Apparently Oracle has finally stopped requiring DUAL usage in Oracle 23c in 2023. If you're dealing with older Oracle (and you may well still be in 2026), you might still need DUAL.
https://stackoverflow.com/a/73772 - not needed in 23c+, allegedly. I bet people still cargo-culting it forward though.
https://en.wikipedia.org/wiki/DUAL_table#In_other_database_systems
8
u/[deleted] Sep 15 '26
[removed] — view removed comment