• Received results for the amazon coding test, passed, got invited for a day of onsites.
    • Markets.
      • Boeing fired their CEO.
      • S&P up 3.5% in the past month. Record highs. Such a strange time, with every indicator shouting bear years ago.
      • Pivotal went public last year, 2018-04-20. Earnings tomorrow.
      • TSLA hit $420, and rising. People are so weird.
    • More practice problems. Mostly leetcode.
      • Getting better and faster with every one.
      • Writing out a couple BASIC examples of the iteration/recursion, like the first two loops/stacks, is extremely helpful for developing the algorithm. Makes it much easier to extrapolate if the whole problem is too complex to wrap your head around in code or thought.
      • Reversing an array is obviously O(n). Same for linked list.
      • When you see a problem that expects a logn solution, expect something like a binary search where you’re halving the problem space each time.
    • Started looking on redfin. 1-2br, 1bath, garage, $1m. There are some options in places like south city, rwc, epa, santa clara.
    • Marshawn Lynch might play for the seahawks next week against us. So conflicted.
    • Lunch at little lucca’s. They were out of dutch crunch.
    • Updated the banner so I wouldn’t have to on christmas. Redeployed.
    • German bar with all the kids from the block.
    • Did some leetcode problems to practice.
    • When doing something with only two elements (like check to see which two items in an array add to a target sum), you might be tempted to check the permutations of the remaining array, with each iteration. This is not the fastest. You can get it down to O(n) time by storing a complement map as you move through the array, then you can compare each to the complements to see if it fits.
    • Pretty much finished all my specific prep for interviews. Now it’s just going through the generic problem repositories, practicing a few each day:
      • Hackerrank. Leetcode. Careercup (CtCI). Glassdoor. Youtube.
    • So far I think I like leetcode the best.
    • 5 directly-interview-relevant docs in gdrive. 1 for general process/approach, and then 4 from book notes:
      • Structure and Interpretation of Computer Programs, Algorithms and Data Structures, Programming Interviews Exposed, Cracking the Coding Interview.
    • Reminder of great youtube channel for interview questions: https://www.youtube.com/channel/UCNc-Wa_ZNBAGzFkYbAHw9eg/videos.
    • Alpha = how much you outperform a generic benchmark, usually the S&P500. If that rises 5% in a year and you rose 15%, your alpha is +10.
    • Beta = how much more volatile than a generic benchmark. If your stock gained 3% in a day and the S&P500 lost 1%, your beta is -3.
    • Manacher’s algorithm is O(n) for longest palindromic substring: https://en.wikipedia.org/wiki/Longest_palindromic_substring. Fantastic.
    • Longest common subsequence = a common problem. Look it up.
    • When palindromes are mentioned, you can reverse the string and then it becomes a longest common subsequence problem (check indices tho).
    • An 8yr youtuber who reviews toys made $26m last year.
    • Helped dad backup/update his iphone 6.
    • Did the amazon coding interview (90m). Each question basically has 20 unittests, 2 of which are shown and 18 are hidden.
      • On the practice exam, I got 20/20 and 20/20, and finished in 35m.
      • On the real exam, I got 19/20 and 2/20, and finished in 90m. The first one was good, but something was up with the second one. It passed both visible testcases and then showed “passed 0 of 18 for the invisible testcases” – not sure what happened, but my program was correct so who knows.
      • Was also possible to have another computer googling the problems and copying the answers. I did it honestly, so I worry about the bar I’ll be compared to. I much prefer a voice/video call, for both authenticity and the ability to prove comprehension verbally.
    • Went to sunnyvale, madras and fam.
    • Walked 4 miles around Atherton.
    • Chan Sung Jung knocked out Frankie Edgar (38), and now there isn’t an event for the next 4 weeks until McGregor Cerrone.
    • All presents wrapped and ready. Dec 21st. World record.
    • SCORE_DAYS was the nominal th/sun/mon. I had to add saturday for these week 16 games. Deployed the supercontest change. Recompiled reqs.
    • Did a few hackerrank problems:
    • Side note: hackerrank has a terrible problemsolving interface. The inputs are given via stdin with line separations lol, and the outputs are compared to stdout. This is probably laziness to accommodate multiple languages, but it’s shrouded and detracting.
    • The difficulty is also widely variant. I finished some “medium” level questions in (literally) 60 seconds, and some “easy” questions took my 20 minutes to read the problem statement and 40m to answer.
    • Some complexity notes.
      • Recursion with 2 recursive calls is exponential in time complexity.
      • Binary trees require 2 recursive calls to traverse, one to walk the left edge and one for the right.
      • Fibonacci sequences require two recursive calls as well, but you can memoize each one to reduce it from exponential to linear.
    • For iteration problems, usually just run a while loop and add items to array, or do something else to keep track as you traverse.
      • There are so many python dep managers out there now, like my sx-setuptools. Poetry: https://github.com/python-poetry/poetry.
      • Awesome js recap: https://2019.stateofjs.com/. Typescript/express/react/redux/graphql still king. Jasmine is no where near the top for testing frameworks (jest is #1).
      • Ear buds died. Ordered 2 more. I still continue to be impressed. Great quality, people around can’t hear, only $7.
      • I always forget amortization: pay off periodically.
      • Permutations > combinations. Combos don’t care about order.
      • Finished CtCI. Went through some of the problems.
      • Flew LAX -> SFO.
        • The Ducati has been stalling a bit. I had originally thought it was misconfiguration of my nonstock levers (I think CRG) where the clutch couldn’t fully engage, but it happens at speed sometimes too. Did a bit of reading and it’s not uncommon. Can pursue a fix if it gets more frequent.
        • Charged the BMW.
        • Haircuttt.
        • Sick. All sorts of weird temps and delirium.
        • Dentist. The cut should go away in about a week. Good health, just need to not brush as hard. It’s causing more recession. They can fix with bonding if it starts to get sensitive. Deep cleaning scheduled for beginning of jan.
        • Read more of CtCI for interview prep.
          • Some notes from matthew walker:
            • Practice doesn’t make perfect, practice + a good night of sleep makes perfect.
            • While asleep, we can’t eat, we can’t run, we can’t take care of our young, we can be hunted, etc. If sleep didn’t serve an absolutely VITAL purpose, evolution would have made the biggest mistake of all time.
            • We sleep better in slightly colder temperatures. When our hands/feet are warm, vasodilation occurs. Blood flows outward to the skin more, reducing core body temperature. This is why you get better sleep with socks. The same vasodilation occurs after a bath.
            • We don’t have a “credit” system for sleep like we do for fat (eat more before winter, use fat stores) because we are the first species in the history of time that has ever faced lack of sleep. No animal has ever had to evolve to handle this, and it’s self-inflicted.
            • 20hrs awake = same impairment as 0.08% bac.
          • More record highs for stock market yesterday. My ZYME surpassed 45. DJ 28367 s&p 3193 nasdaq 8823 10yr treasury 1.878. Bitcoin is down to 6613.
          • Finished programming interviews exposed. Tons of notes, practice problems, brainteasers, coding tests, and behavioral examples.
          • Started cracking the coding interview.
          • Pro bowl selections: http://www.nfl.com/news/story/0ap3000001089218/article/nfl-reveals-rosters-for-2020-pro-bowl-in-orlando.
          • First day without the cat!
          • COMPOSER DAY.
            • John Williams: star wars, indiana jones, harry potter, home alone
            • Klaus Badelt: pirates, time machine
            • Danny Elfman: nightmare before christmas, lots of superhero movies
            • John Powell: dreamworks
            • James Horner: titanic
            • Hanz Zimmer: everything
            • Howard Shore: lord of the rings
          • Multi-year university hospital study has good things to say for keto: https://medium.com/@JPMcCarter/the-top-12-keto-myths-debunked-after-150-000-days-of-patient-care-9502383d4e8c.
          • At ~8:35am ZYME was up 6.06% giving me a day return of $666.86 thus far. Devilish.
          • Scheduled dentist appointment for tomorrow.
          • Still sick but run gym push.
            • Runner’s “neck check” – if your symptoms are below your neck, you’re probably better off resting than exercising.
          • Being cold doesn’t give you a cold, but airborne bugs spread more easily because the medium is denser.
          • Remember of the terrible complexities: n^2 (quadratic) then 2^n (exponential) then n! (factorial) is the worst.
          • Remember stack is static. It’s the variables, function calls, scope, etc. It’s very fast. The heap is for dynamic allocation. It’s a little slower. Both are in RAM. Threads share heap, but each have their own stack.
          • Big endian = most significant bit stored first. Little endian = LSB first.
          • TSLA about to hit 400, doubling in 6 months. I remember it being in the 170s in June.
          • Committed week 16 lines, backed up prod db, submitted picks.
          • Updated the widgetbot shard back to the main one, disweb.dashflo.net. They seem to have fixed their dos problem, so greatplainsmodding was no longer needed (and was offline). Verified on desktop and mobile in dev.
          • In december, mutual funds drop in market value by ~5-10% because they’re distributing capital gains for tax purposes. That drop in equity is coming to you in cash. Think of it like a dividend.
          • Cleaned and vacated most of the house. Started packing. Everything is so organized now.
          • The bluetooth headset arrived and I set it up. Works well. Did some tests. My voice is not as clear as regular speakerphone, but typing is much quieter.
          • 737 Max halting production, Boeing dropped 4%.
          • 10 years old, but a good AMA from an individual algotrader: https://old.reddit.com/r/IAmA/comments/9s9d7/iama_100_automated_independent_retail_trader_i/.
          • Finished all christmas shopping. $300.
          • Netflix confirmed the tech interview with the CI manager, which totals 5 phones now.
          • Ordered more post oak and maple chunks.
          • Installed new kitchen and bathroom bulbs.
          • Butterflied and oven-roasted a chicken. Fresh garlic, butter, and some of my red rub. Added to fried rice with egg.
          • Interesting JRE with a sleep scientist from berkeley: https://www.youtube.com/watch?v=pwaWilO_Pig.