Lurker News
I recently realized that certain kinds of knowledge allow one to be significantly more productive when solving a large class of problems.

For example,
* Regular expressions for simple text processing.
* Parser combinators for parsing.
* Parser generators (esp. packrat variety) for parsing.
* The concept of fuzzing and property testing for testing code.
* Calculus for solving all sorts of problems.
* MCMC for solving a huge class of probability problems.
* Search algorithms for solving a variety of problems (e.g. all NP-hard problems, sudoku, HTNs, scheduling, planning).
* Gradient descent for solving a variety of optimization problems.
* Vector Space embedding as a conceptual tool for a variety of complex AI problems.
* Effect composition (Haskell's IO or Scala's ZIO) as an incredibly powerful paradigm for concurrency and parallelism.
What are some examples of 10x multipliers that come to your mind? Fundamental ideas without which you would be drastically less productive.

Comments (418) 135 threads

Show all comments

Showing thread 35 of 135

Turing_Machine3 replies#
* Don't get too hung up on computational complexity.

A lot of times O(n^2) is gonna be perfectly fine. Write it the simple and easy to maintain way first, and only worry about fancy optimizations if it's too slow.

chadcmulligan#
And if it is too slow a hash table or two will probably fix it.
BobbyJo#
Optimize for humans first and computers second. Computers can read the crappiest, most spaghettified code on the planet as long as it is syntacticly and functionality correct. Humans cannot, and their time costs several orders of magnitude more.
bluGill1 reply#
in these days of modern CPUS with cache and branch prediction, O(n^2) often beats O(logn) because your data is tiny compared to the cost of all those cache misses and branch misses the seemingly faster algorithm creates. This doesn't apply when you data is large, but then you need parallel algorithms, and not in memory data (or just punt all your data to the sql server)
AnimalMuppet#
Yeah. n = 3 more often than you expect. n <= 12 far more often than you expect. If you don't work at a FAANG, don't automatically assume that your data and algorithm need to squeeze the last O(logn) possible out of the algorithm.