switch statements

switch statements require you to exhaustively consider all relevant or possible inputs (if you don’t rely on default).

Interestingly, the notion that switch statements can require a default is reflective of the truth to the idea that when the stakes get high, we all fall back to our default level of training or function. This has global applications to our functionality and, by extension, the inputs (things,people/their methods,contexts) in our lives as well

  • @cheese_greaterOP
    link
    2
    edit-2
    5 months ago

    (1) Optimal Stopping (2) Old people don’t lose memory - they have so much of it that it slows their system. (3) Procrastination can be seen as an efficient scheduling problem with wrong priority. (4) Predictive Models - Gaussian, Power Law, Erlang (5) Over-fitting - “It really is true that a company will build whatever the CEO decides to measure”. (6) Penalize complexity - Occam’s Razor Principle (7) “A bit of conservative, a certain bias in favor of history, can buffer us against the boom and bust cycle of fads”

    (8)Over-fitting Examples - Military Training, taste buds (9) Early Stopping - Appropriate for Uncertainty (10) “The prefect is the enemy of the good.” (11) Continuous Relaxation for discrete optimization. (12) Lagrangian Relaxation - "You don’t HAVE to obey the law. There are consequences to everything and you get to decide whether you want to face those.

    (13) Random Sampling - Miller Rabin Primality Test (14) Charity - GiveDirectly uses random samples of review (15) Bloom filters for search engine crawls. (16) Simulated Annealing - Random restart hill climbing. (17) Randomness - heart of creativity? (18) Networking - Circuit Switching -> Packet Switching (19) Exponential backoff (20) AIMD - Additive Increase Multiplicative Decrease, TCP’s Sawtooth (21) Game Theory - Price of Anarchy. Selfish routing only has 4/3 as it’s price of Anarchy that’s how internet is working fine (infact 33% close to optimal).

    (22) Price of Anarchy is very high in case of Prisoner’s Dilemma. (23) Tragedy of Commons - Pollution, Climate Change, Number of Vacations employees use etc., (24) Game Theory - Information Cascade. (25) Vickrey Auction