标签:programming
带有 programming 标签的公开 Whisper
划选高亮2026-08-11 18:38:48
原文高亮摘录
“a comparison sort cannot perform better than O(n log n) on average”
Whisper 随想笔记
So that's why my custom sort is always slower than the built-in.
划选高亮2026-08-11 12:32:48
原文高亮摘录
“the output of any sorting algorithm must satisfy two conditions”
Whisper 随想笔记
Even the definition sounds like a math test I'd fail.
划选高亮2026-08-11 12:23:48
原文高亮摘录
“the output of any sorting algorithm must satisfy two conditions”
Whisper 随想笔记
So that's why my custom sort broke — missed condition two.
划选高亮2026-08-11 12:14:48
原文高亮摘录
“the output of any sorting algorithm must satisfy two conditions”
Whisper 随想笔记
Two conditions? I thought it was just 'small to big' and done.
划选高亮2026-08-11 03:09:57
原文高亮摘录
“List comprehensions provide a concise way to create lists.”
Whisper 随想笔记
List comprehensions are such a game changer, way cleaner than loops.
划选高亮2026-08-11 03:09:18
原文高亮摘录
“A Foolish Consistency is the Hobgoblin of Little Minds”
Whisper 随想笔记
Classic quote, still makes me think twice about over-obsessing with style.
划选高亮2026-08-09 21:09:57
原文高亮摘录
“error handling is intuitive”
Whisper 随想笔记
Error handling being intuitive is a huge win, honestly.
划选高亮2026-08-09 21:09:18
原文高亮摘录
“Flat is better than nested.”
Whisper 随想笔记
The flat is better than nested one really hits home with every refactor I do.
划选高亮2026-08-09 19:35:41
原文高亮摘录
“Hashing is an example of a space–time tradeoff.”
Whisper 随想笔记
Ha, the infinite time option sounds like my last interview coding challenge.
划选高亮2026-08-09 19:26:41
原文高亮摘录
“Hashing is an example of a space–time tradeoff.”
Whisper 随想笔记
But if memory was infinite, why would anyone bother with hashing anyway?
划选高亮2026-08-09 16:32:41
原文高亮摘录
“In a well-dimensioned hash table, the average time complexity for each lookup is independent of the number of elements stored”
Whisper 随想笔记
Average is the key word—worst case is still a nightmare though.
划选高亮2026-08-09 16:23:41
原文高亮摘录
“In a well-dimensioned hash table, the average time complexity for each lookup is independent of the number of elements stored”
Whisper 随想笔记
This is why databases use them under the hood for lookups.
划选高亮2026-08-09 16:14:41
原文高亮摘录
“In a well-dimensioned hash table, the average time complexity for each lookup is independent of the number of elements stored”
Whisper 随想笔记
Depends on the hash function, if it's bad you're back to O(n).
划选高亮2026-08-06 03:09:18
原文高亮摘录
“this is the correct code.”
Whisper 随想笔记
lol that else always trips me up, good catch.
划选高亮2026-08-04 21:09:18
原文高亮摘录
“When appropriate”
Whisper 随想笔记
Good point, sync order makes debugging way easier.
划选高亮2026-08-03 15:09:18
原文高亮摘录
“If a call to stream.”
Whisper 随想笔记
the drain event thing always trips me up, good to see it explained clearly.
划选高亮2026-08-02 09:09:18
原文高亮摘录
“curl http://localhost:11434/api/chat”
Whisper 随想笔记
curl command straight into terminal, love how simple it is.
划选高亮2026-07-29 15:09:18
原文高亮摘录
“the actual result is [1, NaN, NaN]”
Whisper 随想笔记
classic gotcha, always forget the radix
划选高亮2026-07-28 16:33:53
原文高亮摘录
“There is built-in syntax to compute a depth- or breadth-first sort column.”
Whisper 随想笔记
Finally, no more hand-rolling recursive CTE sorting!
划选高亮2026-07-28 16:11:42
原文高亮摘录
“Move semantics enable the transfer of resources and ownership between objects”
Whisper 随想笔记
This is exactly why modern C++ feels so much safer than the old pointer juggling days.