• Flatbuffer is a memory-efficient protobuf alternative.
    • Watched kingpin. Old, but great premise.
    • You can connect a websocket directly to a message queue like kafka.
    • Netflix responded to schedule an onsite next week. Looks like we can make Friday happen.
    • Disney responded to schedule a phone interview, I said asap, and talked to senior software engineer later in the day.
    • Amazon followup onsite interview for senior leveling today at the santa monica office.
    • FB wanted to chat again on monday.
    • Started watching the tv show sinner on the chicago flight, like it so far.
    • Ads becoming harder to spot in google search results now. Just a black word “ad” where the favicon should be.
    • 23andMe and DigitalOcean both laid off a substantial number. Surprising. I like both businesses.
    • AB was arrested, bailed, and required to go through a mental health evaluation.
    • Practice problems:
    • Scheduled citadel followup for monday.
    • Amazon is making a palm reader payment service.
    • Placed some tsla calls, but in bigger news, the $1000 1yr is over $45. Ridiculous.
    • Added KTN and FFN to the chicago flight.
    • Popular hash functions: MD5, SHA, NTLM, LANMAN.
    • FB coding interview. This guy was awesome. Did well, good convo.
      • Great answer to my question, Future success in data or product? It’s neither. It’s having the best tech stack, the best engineering talent. This will make you more agile in bringing NEW products to market in the future, whatever that landscape may look like.
    • Practice problems.
      • https://leetcode.com/problems/word-break/. Did it very fast with my recursive solution, but need a way to memoize. DP is crucial for this one. Think about it logically. Try every word at every starting position, and mark the index of the end of the word as findable if there are any matches. I still like my solution better.
      • https://leetcode.com/problems/min-stack/. Build your own stack.
      • Max path length in tree. This is the same as max path sum (https://leetcode.com/problems/binary-tree-maximum-path-sum/), but treat each val as 1 (unweighted, basically). It’s a recursion problem. Look to the left, recurse to the max depth there. Look to the right, recurse to the max depth there. Add the two together. That’s the max path for this root. Keep a global variable for the max found so far, and then on each recursion just check against it.
      • https://leetcode.com/problems/gas-station/. This one was weirdly hard. There’s such a wide variety in problems. I crush some “hard” ones, some “medium” ones are impossible. There’s definitely a bit of luck in the selection of the questions interviewers ask you.
      • https://leetcode.com/problems/longest-consecutive-sequence. Smartly keep track of visited nodes in sets. Little harder than it appears, but approach logically. The hard part of this one is the recognizing the complicated for/while solution is actually only n, not nested n^2, because you’re checking existence in set.
      • https://leetcode.com/problems/copy-list-with-random-pointer/. Deep copy a linked list, iterate through and keep track of a few things. A different type of problem. Can recurse like usual, and assign both pointers, with one tricky part: keep a memoization dict of the visited nodes. This is just a mapping of original node -> copied node.
      • https://leetcode.com/problems/palindrome-partitioning/. This one is tough too. I’ll have to do some easy/medium to get up for tomorrow. Remember that recursion is almost always a good answer, even for string/list problems. Iterate through the beginning till you hit some criteria, then recurse on the remainder. Keep track of all valid answers in a global variable, rather that directly in the recursive call scope.
    • Flew to chicago for citadel.
    • FB uses mercurial, not git.
    • Scheduled the amazon sr followup for friday, 1-3.
    • Citadel research.
      • 10s of billions of assets under management.
      • Ken Griffin founder, Peng Zhao current CEO.
    • Reviewed my tradebot.
      • Nasdaq for all tickers on the nyse.
      • Yahoo-fin and robin-stocks for history/data.
      • Backtrader for backtesting.
      • Simple moving average (and a few other basic one) for strategies.
      • Robin-stocks to wrap the rh api.
      • Scikit-learn/numpy/pandas/matplotlib for analysis.
    • System design, whiteboard and youtube, ~1hr each. Mostly from Naren’s channel.
      • Uber. Path planning. Websockets to keep gps locations updated every few seconds.
      • Fandango. All booking sites are comparable (airbnb etc) where you find a match. Suggestions are an important piece here (netflix etc), use heuristics from previous content.
      • Webcrawler. Probably the most different one. Follow links, basically just a gigantic 100b node graph. Use a bloom filter for the “in visited?” portion. Used for search engines, copyright police, more.
      • Twitter. Social media, read-heavy. Precompute feeds on write for most users. For celebrities, read on call.
      • Whatsapp. Any chat service. XMPP, or websockets as the persistent protocol to read-write with new messages. And session, for delivered/read receipts. Message queue for the actual text, before db.
      • Google docs.
      • Dropbox/gdrive/stash. Just remote file representation, upload/download/sync. History is the most important piece here. Store diffs, not copies. Chunk files so you can diff efficiently.
      • Gdocs. Collaborative editing. Just like optimistic locks. Like the previous, chunk for differential syncing. Could be character by character, or batched in whole lines, etc. This is called operational transformation, everything is captured in an event (insert, delete, update…) and replayed for all other clients. Or you could just do raw diffs (patches) and try to apply, raising conflict if need be.
    • Curated list of interesting stuff: https://github.com/sindresorhus/awesome.
    • Watched the ted interview with jim simons: https://www.youtube.com/watch?v=U5kIdtMJGc8. Not a ton of info.
    • Subscribed to https://eng.uber.com/.
    • Went through a bit of https://github.com/yangshun/tech-interview-handbook.
    • Spoke with fb to schedule the coding interview, asap today or tomorrow morning before flight. Talked about instagram and whatsapp team matching. She was actually chicago based and mentioned citadel!
      • Later in the day we scheduled for tomorrow morning before the flight to Chicago.
    • Quick call with citadel for Thurs prep. The importance of tech in finance, and how that’s reflecting in recent numbers (vs companies married to legacy finance fundamentals).
    • Practiced a few behavioral orations again.
    • Run, core, sauna, stretch, meditate.
    • Another amazon feedback survey. Good all around.
    • Watched a few videos on vocal coaching, remembering that breath class I took at stanford and how powerful of a speaker the professor was. Some were more focused toward singing, some toward presenting. Do mouth/face/voice warmups, stretch, posture, confidence, smile; treat it like a conversation not a stage.
    • XMPP is very similar in functionality to websockets. Persistent connection, peer-peer. XMPP is decentralized, can be distributed; websockets are centralized.
    • TCP is more reliable than UDP. It establishes a connection/handshake. UDP just sends data. Faster, but could be lossy.
    • The python logo is 2 snakes curled into a cross, just to represent the snake name.
    • Python isnum, isalpha, isalnum.
    • Problems:
    • Reread https://github.com/donnemartin/system-design-primer. Great document.
    • Remember to always popleft() with doing DFS or BFS. It’s just for BFS, append to end. For DFS, appendleft().
    • Practice problems.
    • Markets closed today for MLK holiday.
    • Dinner last night with the snyders (+baby) and everyone in culver.
    • Confirmed no supercontest late-pick-reminder email on saturday, as designed.
    • Python 3 type hint with default:
      • def sqrt(number: int = 0) -> float:
    • Orated the 4 behavioral questions in prep.
    • Run, push, sauna, meditate.
    • Emailed Netflix to keep them in sync with the others.
    • Roasted 5lbs of peanuts (450F 15min). Made 2.5lbs regular peanut butter and 2.5lbs pumpkin peanut butter.
    • Reread https://github.com/donnemartin/system-design-primer and did a ton more practice system design questions, including whiteboard. Boggle, twitter.
    • Consolidated my Amazon LP document into the general questions they might ask you, since that has a superset of all the general categories for behavioral interview questions.
    • Conf championships! Gonna be an all-red superbowl, niners v chiefs.
    • Disposed/packed more kitchen/bathroom supplies.
    • Practice problems.
    • Drew a system design diagram for autotest on the whiteboard, now that I’ve gotten much better at scalable system design.
      • Most of the primary nodes are present, there’s just not much redundancy. Lots of single points of failure.
      • Consistency > availability (although it doesn’t really matter at low scale, mostly 1-1 nodes and a couple requests / second).
      • Task manager / gateway = dispatch server. Did have a heartbeat for all downstream nodes, although it was http. Did not really serve as a heavy-burden load balancer, most test cells had a single control node – in use, or not in use.
      • Master-slave for RDB should have been in place years ago so that vehicle/component teams could query their data at will.
      • All the usual frills. Analytics, resource monitor, logs, app monitor, hydra/sync for parallel and rpc sync.
      • Redis cache for control node. Faster read, metadata, hydra state, etc.
      • Took picture on phone.
    • Remember that every db (disk or mem, rdb or nosql, etc) has locks for write.
      • Lowlevel, it’s a message queue with an event loop. It’s called the write ahead log, WAL.
      • Timeouts, so that one can’t deadlock a row.
      • Pessimistic = true, natural lock (“i’m using this”). Optimistic = check if change when writing back, like VCS merge conflicts. Favors smaller faster changes.
    • Behavioral.
      • Wrote a couple examples for each of the 4 LPs Amazon said they’d check during the senior interview.
    • Plugged my ehd into the ubuntu laptop for the first time. It could mount the FAT partition but not the ExFAT, obviously for NT.
      • FAT = file allocation table.
    • Ansible inventory. I had forgotten this word the other day. Playbooks run, inventory is the list of endpoint nodes.
    • Went back over sx-setuptools and autotest.
    • Watched countdown. Ending sucked, and was illogical, but overall the movie was better than I thought it would be.
      • Europix uses a ton of mem. Was basically 4GB of ram and 4GB of swap, yikes. Even compared to other streaming sites, for all (movies, tv, and sports), which are about half that.
    • If you have n + (n-1) + (n-2) + … (1), instead of n * (n-1) * (n-2) * … (1), which is factorial, it’s called the triangular number or the binomial coefficient. It equals (n^2 + n)/2, but you can just take the highest order term and approximate it as n^2. It’s much lower in complexity than n! factorial.
    • Practice problems.
    • Remember {} is the set literal in python.
    • Jack borrowed the BMW for a 7am ride with Teej.
    • Moon Shapes
    • Run, pull, sauna, meditate, stretch.
    • Watched the truth about emanuel, the 2013 movie which servant allegedly ripped off. It was decent until the ending. The similarity is the fake baby, but not much else. Overall I think Servant is distinct enough to survive.
    • UFC 246, mcgregor cerrone.
    • Got kabuli naan, my favorite.
    • Dimensional is the company that Rob partners with for data / portfolio suggestions (regarding my folks’ retirement).