Wednesday, January 8, 2020


  • Think about if a system needs to be read-heavy or write-heavy. Something like twitter is much heavier on read operations.
  • An index is placed on a specific column in a table so that you can perform lookups on that column more quickly. It's not the primary key, although you can think of the PK as an index if you know the ID, because that's the search val. More generally, it allows an indexed column to be sorted efficiently on the backend, so that lookup is binary search (logn) instead of n. The downside: this extra data takes space.
    • Think of it like a dictionary (an actual physical book with word). Indexing it would mean adding pages for each letter in the appropriate place, with little tabs that jut out. You can find your section much faster, but they take a little space.
  • PUT will update the data in that spot or create it if it isn't there. It's idempotent. POST just passes data to the service. The service can do whatever it wants with it. It's not idempotent. It's more generic.
  • Citadel interview got a callback for onsites. Call tomorrow for scheduling.
  • YAML is a superset of JSON. Can do more, but is bigger. Looks better, too.
  • Testing pyramid: unit -> integrated -> e2e.
  • Netflix phone interview.
    • Great convo. Took a one-pager of notes. Just phone, no coding. 1hr.
    • Discussed the INTERNET SHIELD, market viability in the future of streaming, attrition, culture.
    • Her team directly aligns with my automation tools / devops / autotest / sx-setuptools experience.
    • Next steps: take-home assignment, build an app. I said I'd submit by Saturday.
  • DHCP for dynamic IP allocation.
  • Perf is a main linux profiler.
  • "Computers perform tasks. Machines should be solving problems."
  • Practice problems:
  • Remember runbooks for ops/support. All stacks/apps should have a list of common tasks or inquiries, each with an explicit set of steps to respond with.
  • Slight tweaks to my resume. I still like my abridged resume more, although nobody else does. It's just so concise: 20 bullet points to summarize my life so far.
  • TSLA is absolutely skyrocketing. Hit ~500 today. Its market cap is now 85b, which the highest for any american car company in history. I bought 2 shares on margin just to have fun with it. The emotional roller coaster is worth it, regardless of final profit/loss (since I jumped in ON a surge woohoooooo).
  • Remember margin trading on RH is interest-free up to 1k, then 5% after that.
  • Watched a lot of this guy's channel on system design: https://www.youtube.com/channel/UCRPMAqdtSgd0Ipeef7iFsKw. I like em.
  • Athletes say a lot of dumb stuff on social media. It seems easiest to critique them for poor decisionmaking/tact, but in reality it's probably closer to: giving a huge stage to people on a career path where stage presence is not a required skill.
  • Jeop GOAT day twoooo.
  • Google phone interview.
    • Was 45m. The guy was cold, didn't really reply to anything or change tone. Accent was tough over the phone.
    • Didn't introduce himself or the team, jumped straight into a coding question on the google doc.
    • We did a 2 subsequence comparison question. I solved it, but still had a bad taste in my mouth.
    • We didn't discuss previous experience, scaling services, managing projects, writing apps.
    • Big turnoff for Google, when my interactions with all other folks from Amazon/Netflix/BMW/Citadel/GitLab/Disney have been very positive.

Tuesday, January 7, 2020

  • There's an online shazaam service called acrcloud. https://www.acrcloud.com/identify-songs-music-recognition-online#record-div.
  • That old ACB call order which expired would not have broken even if it were filled. Coo.
  • Dis is still about the same plateau after the d+ surge, when I sold. Coo.
  • Was digging this article until they starting talking about "electromagnetic radiation" affecting your sleep, suggesting that you ground yourself before bed. Then on to light therapy and all sorts of good stuff: https://medium.com/swlh/sleep-like-a-pro-whats-the-deal-with-deep-sleep-and-how-to-get-more-46dad5da233d.
  • Interesting discussion in a drug from KRTX against alzheimers: https://www.reddit.com/r/investing/comments/elclxc/im_a_physician_and_im_long_krtx_dd_inside/. This sector is crazy, I like it. Being in the industry seems to provide a ton of inside info, more than relative to being inside others even.
  • Ricky Gervais' opening monologue for the golden globes was great.
  • Practice problems:
  • Convertible arbitrage: taking a long position in a convertible security and a short position in the underlying stock. It's a hedge tactic.
  • Coding interview with citadel. 1hr. Phone and coderpad. Prepped. Took a lot of notes during. 2 behavioral questions, 2 coding questions. Overall impression: good in both directions.
    • Said "see ya later" to hang up without even thinking twice about it, like I always do. Had some regret later; might have been interpreted as overconfidence or something. Need to pay attention to details, even ones this small.
  • Created a doc with all the resources I've used over the past month for interviews.
  • Generalized definition of a greedy algorithm/problem: start small and build the problem up, taking the (new) local optimum each time.
  • Went back over everything in gdrive/Notes/Career/*. Some fantastic refresher content in there. Mostly technical software, some workplace environment, some interview logistics. Being diligent about documentation my whole life has paid off.
  • Quicksort/mergesort/heapsort nlogn. Heapsort constant mem, others linear. Bubble slower time, const mem. Radix/bucket can be faster than the main 3 if n is small.
  • Anything hashable can be used as keys. All the immutable python built-ins qualify, including tuples (whereas lists don't).
  • QR = quantitative researcher.
  • CDS = credit default swap. Kinda like an insurance policy on credit card debt, can get it backed by another investor for a price.
  • Supercontest.
    • Changed the home page (the root route /) to the leaderboard instead of your weekly picks.
  • Scheduled haircut for friday, before onsites.
  • First day of jeopardy GOAT tournament.
  • Explored http://highscalability.com/.
  • Looked up a BUNCH of resources on system design. I feel pretty good about behavioral and algorithm/datastructure questions now - system design is the last piece. Took a bunch of notes, did a few examples. Will focus on more in-depth ones over the next few days for on-sites, but I feel ready enough for the brevity of phones.
  • Went over 27 common "tell us about a time..." questions and wrote responses to each. I then tried a ~60s spontaneous response to each. There are definite overlaps. A good core of 10 responses can apply/stretch to all 30.
    • I did generics, and then I did concretes for Amazon's leadership principles. They're obviously the same set/class of responses, just need to have them in the toolbox ready to connect.
  • Pubsub research. Not great in consistency. Latency means timing-related transactions are not great. Subscribers might receive messages at different times. Better for event-driven architectures like games.
  • JSON serialization/deserialization gets less efficient as the size gets larger and larger. This is where you might pick another data transport for your API, like protobuf. You can have an endpoint return a protobuf object instead of a json object. Very similar.
    • Typically, use json when talking to a browser. Use protobuf when talking to a service.

Monday, January 6, 2020

  • Practice problems.
    1. https://www.hackerrank.com/challenges/max-array-sum/problem. DP. Iterate through the array and notice patterns. What info do you need to hold on to? What are the possible answers? Keep track of the max by index and just walk through.
    2. https://www.hackerrank.com/challenges/abbr/problem. Easy to get most the cases, but hard to get all. Remember for DP you can sometimes build a 2D matrix of 1s and 0s and traverse it (like longest common substring/subsequence).
    3. https://www.hackerrank.com/challenges/candies/problem. An interesting one. Iterate through an array, once forward, once backward, and count the rising edges. Match them by index and take the max.
    4. https://www.hackerrank.com/challenges/decibinary-numbers/problem. Didn't do it. Wrapped my head around it, but didn't implement.
    5. https://www.hackerrank.com/challenges/min-max-riddle/problem. A cool problem. What mapping do you need to solve this? Can find the INVERSE of that mapping?. Swapping keys/values in a dict is easy.
    6. https://www.hackerrank.com/challenges/castle-on-the-grid/problem. Used a graph. Build an adjacency matrix of the 4 cardinal directions from each node and remove the ones that are off the grid or on an X. Then it's simply a shortest-path problem. Use BFS (queue).
    7. https://www.hackerrank.com/challenges/poisonous-plants/problem. Got the easy solution.
    8. https://www.hackerrank.com/challenges/ctci-bfs-shortest-reach/problem. When using BFS for shortest path, remember to slice the list for each neighbor, so you're not overwriting the root path. And just logically think through everything. Created visited set() and queue deque(). while queue. Get path. Get node. If node == end, exit. If node in visited, continue. Else, lookup the next nodes in the adjacency matrix, add to path, then append to queue.
    9. https://www.hackerrank.com/challenges/find-the-nearest-clone/problem. Getting good at the graph problems. It was a less-experienced topic for me before this.
    10. https://www.hackerrank.com/challenges/ctci-connected-cell-in-a-grid/problem. Could do DFS or recursion or iteration.
    11. https://www.hackerrank.com/challenges/matrix/problem. Fun problem. There's actually a bug in a unittest in this one.
    • Done with the hackerrank kit. I've probably done 100 practice problems not in total across the platforms.
  • Confirmed the phone interviews this week.
  • Dijkstra's algorithm is used to find the shortest path between two nodes in a graph with weighted edges. If you assigned no weights to edges (such that they're all the same, 1), it reduces to plain old BFS!
  • BFS is exponential (based on how many neighbors each node has) in time and memory. It's great for small problems, but solving something with a state space like a rubik's cube is huge.
  • Sets and lists are unhashable in python. For most problems, you can just convert the (i, j) coordinates to a string or something similar.
  • collections.deque is faster. This whole package is great for performance. defaultdict is awesome. Counter is also really useful for counting stuff (like frequency of char in str, or others).
  • When using BFS for shortest path, put PATHS (lists of nodes) instead of nodes into the queue.
  • Append the new nodes to the right of a queue or a stack. But in a queue, pop the node off the left to search next. In a stack, pop the node off the right.
  • Run, pull, sauna, meditate.
  • Checked the snail mail. Probably 100 items. Everything was complete garbage except for 1 dmv registration. The signal to noise ratio is laughable (and wasteful of paper / people resources).
  • Renewed the BMW registration. $150 total. The DMV charges a 2.1% fee for online processing. Fuck them. It should be a discount for online logistics, which have significantly reduced overhead.
    • Even if it's Elavon, you need to front that.
  • For number systems, the exponents always increase from 0 to n-1. This is known.
    • For binary, the base is 2, so the digits in the number (the constants before the base-exponents) can only be those 2:
      • [0, 1]
    • For decimal, the base is 10, so the digits in the number (the constants before the base-exponents) can only be those 10:
      • [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
    • I had thought about the base/exponent before, but never the limited range of digit values.
  • For previous-project questions, use STAR: Situation, Task, Action, Result.
  • My Amazon interview is actually at the Santa Monica location, which is more convenient! The hiring managers can pass offers between sites after, if need be.
  • Took a ton of "give an example of ..." notes. Moved gdrive docs around, cleaned.
  • Database partitioning. Horizontal partitioning is when you keep the table the same and split groups of rows across different machines. Each is usually called a shard. Vertical partitioning is when you split columns off into a new table. Both improve performance, making it distributed (but more complex).
  • Collections.deque is pronounced "deck" - it stands for double ended queue.
  • Of course threads in a process have their own stacks but share heap. Separate processes get their own stack and heap.
  • Disjoint sets. Another useful data structure. Usually implemented as trees. Two operations: find() and union().

Sunday, January 5, 2020

Saturday, January 4, 2020


Friday, January 3, 2020

Thursday, January 2, 2020

  • Double Irish, Dutch Sandwich = some big companies avoid taxes by shifting money overseas to irish/dutch subsidiaries. Google has done this with over 20 billion annually since 2017, tax free.
  • A JIT compiler is close to a regular old interpreter, in that both execute at runtime. The one difference is that the compiler will still compile the code all the way down to machine language. An interpreter usually runs the code directly or some middleground (like python's bytecode pyc).
    • Python has one called Numba, which tries to compile everything down to c. This gives you nice warnings for situations where you might be doing something python-specific (like a dynamic array with ints and strings) which can't compile.
    • Numba also gives you the ability to write python code which executes almost as fast as c. Very useful for compute-intense tasks.
  • Current portfolio shot up to an easy 52wk high. My return so far: 23.5% in 6wks. S&P500 rose ~3.5% in the same time frame. +20 alpha, even in this weirdly bullish time.
  • Fresh order.
  • Backed the puzzle.
  • Turned the soil in the terrarium to keep fresh, need to replace after move.
  • Watched Winchester. Shiv from succession is in it.
  • In order to enter the amazon chatroom, I had to install flash player and enable. Huge no-no.
    • Add the canonical repository. Apt install.
    • Within chrome, change to "ask" instead of "block all flash" - annoying.
    • Ultimately got in at 12:30, not 12. Will have to join next week.
  • Whiteboard arrived. Practiced a few problems handwritten instead of typed.
  • Due to all the problems with internal political activism, google has banned politics at work: https://medium.com/enrique-dans/suddenly-at-google-its-get-on-the-program-or-get-out-5ce19930f554.
  • Brainstormed open-ended answers to the generic question "how could you speed this up?" Got 12 good ones so far.
  • Armin Ronacher's open-source group is call pocoo. Sphinx, flask/werkzeug/jinja, click.
  • Remember jupyter is convenient for early development. Say you're writing a script/module for the first time. The notebook gives you the editor/ide to build the script AND the terminal to run the script all in one. Check outputs, inspect vars, etc. Bonus: you can add text/plots/documentation as well.
  • Started the garbanzo bean soak for tomorrow. Probably won't make hummus, just keep as a side for the smoked meat.
  • Made sushi. Rice, seaweed, tuna, hot sauce. Slowly clearing out the random kitchen items for the move.
  • Cleaned the kitchen, getting rid of ~8 old pots/pans/lids.
  • BMW set up an interview.
    • Sparkhire is an online video interview platform.
    • Submitted. Was allowed to record responses to questions. Time-limited.
  • Bought sirloin steak and a pork butt. Brined.
    • Vons has way worse meat than costco. Twice the price, half the quality.
    • The pork shoulder was bloody (had been frozen) and didn't smell nearly fresh.
  • Cleaned and reseasoned the old cast iron pan.
  • Steamed crab, panfried sirloin, baked potato, asparagus.
  • Redeemed Eric's christmas lotto tickets. Paid $5 total, won $15 total.
  • Pull.
  • Settled up the big bear trip in splitwise, $320.
  • Bootstrap headings, bold and opinionated: display-1 through display-4.
  • Supercontest.
    • Handled the offseason ticket.
    • Investigated. Found 7 issues.
    • The standard disweb dashflo shard for widgetbot is broken again. I'm not going to touch it again until next year, and hope they stabilize their DOS issues by then.
    • Fixed 2 of the 7 issues, will finish the rest tomorrow.

Wednesday, January 1, 2020

  • Interesting. Would have expected more:
  • Pure function = doesn't affect any global state, a call can be swapped out for its result without effect.
  • Home from big bear nye/beans. 2020.
  • Practice problems:
  • I like hackerrank's organization of different problems into groups (these are recursion, dp, dicts, sorting, searching, etc). But it's still terrible in that function input/output is by FILE. It clutters up your solution space.
  • Man I love data:
    • Post image
  • (bool func 1) != (bool func 2) is XOR in python. Makes clean one-liners.
  • Checked supercontest.

Monday, December 30, 2019


  • Hash tables high space fast speed.
  • S&P has almost quintupled since the low of the 08-09 crisis.
  • I know the # in a URL, but its formal name is anchor or fragment identifier, the subsection to focus to.
  • Escape room up in Big Bear.
  • Among the bay friends, final percentages and rankings were:
    1. frank 58.8
    2. nick 58.8
    3. david 57.1
    4. quique 56.0
    5. art 55.9
    6. diego 55.7
    7. brian 51.2
    8. omar 47.5
  • Approximate payouts:
    • 1st $730
    • 2nd $325
    • 3rd $180
    • 4th $140
    • 5th $115
    • 6th $90
    • 7th $80
    • 8th $70
    • 9th $60
    • 10th $50
  • 1st place comparison:
    • Westgate Supercontest: 59 pts, 58-2-25, 69.4%.
    • South Bay Supercontest: 53 pts, 52-2-31,  62.4%
      • Would have tied for 25th in the full contest.
      • The 9 people who tied for 26th last year each got a payout of $14,844.65.
  • Brainstormed a few more return questions.
  • Practice problems:

Sunday, December 29, 2019

  • M Night Shyamalan's Servant is pretty good.
  • Paid Jan rent, full.
  • Called Grayson for his 5th.
  • CFB national championship is gonna be LSU Clemson.
  • MapReduce used to be pretty popular for big data; take a large problem and split it into tasks for a distributed system (map) and then recombine them logically after whatever operations have been performed (reduce).
  • Practice problems:
  • Drove to big bear for NYE/brobeans.
  • Petty 1st place sbsc lol (62.4%). I finished the season at 51.2%, better than last year at 45.9.
  • Niners beat the seahawks, 1st place NFC.
  • A few requests were deadlocked. It can self-detect, and sentry notifies. Could restart, or just wait for nginx to kill the thread workers.

Saturday, December 28, 2019

Friday, December 27, 2019


  • Transcrypt is a python/js compiler. https://www.transcrypt.org/. You can put python in your html, javascript in your backend, etc. Weird.
  • The vip terminal at lax costs about 5k/yr for membership and >3k/flight. https://theprivatesuite.com/.
  • Bought a straightener. The boar's hair brush works a bit better for shorter beards. Needs to be ~2" for this to shine.
  • Nasdaq index is mostly tech focused (unlike dj/spy).
  • Hit up spencer, bonus alex is visiting la in a couple days.
  • Skipped amazon fresh and buying/brining/smoking meat, gonna be in big bear for the next half week.
  • Made this:
  • Added phil and raj to the paid league.
    • select * from users where email like '%WORD%';
    • insert into league_user_association values (<league_id>, <user_id>);
  • Coke has the same acidity as lemon juice.
  • Run pull sauna meditate.
  • 1000p motorcycle puzzle. 4hrs maybe?
  • The coriolis effect causes large-scale fluids (eg oceans/hurricanes, not toilets/baths) to rotate clockwise in the southern hemisphere and counterclockwise in the northern hemisphere (closer to equator = moving faster).
  • Lynch definitely running for seahawks on sunday. Awesome. AB is apparently working on signing with the saints as well. Terrible. Man needs mental help.

Thursday, December 26, 2019

  • Placed some small limit orders for option calls. They didn't execute.
  • Eric got me the athleanx inferno size program, started looking through the website.
  • Supercontest.
    • Odds:
      • 0: 1/32
      • 1: 5/32
      • 2: 10/32
      • 3: 10/32
      • 4: 5/32
      • 5: 1/32
    • Obviously a coin flip is a binomial distribution, just like a dice roll. As n gets large, this approximates Gaussian (normal).
    • Standard deviation of coin flip = 1/(2*sqrt(n))
    • Created ticket: https://gitlab.com/bmahlstedt-group/supercontest/issues/140.
  • Push sauna meditate.
  • Scheduled amazon onsite for mon jan 13.
  • Flew SFO LAX.
  • Ashish called about the NCL telem site.

Wednesday, December 25, 2019

  • Committed lines, submitted picks.
  • Final week 17, we'll know the season winner on Sunday.
  • This week was a pain in the ass. The iframe table format was completely different for the lines. Different order, different column, etc. The autofetcher didn't know how to understand any of it. I entered the lines manually.
  • [[u'TITANS', u'TEXANS*', u'SUNDAY, DECEMBER 29, 2019 1:25 PM', u'3.5'], [u'BROWNS', u'BENGALS*', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'2.5'], [u'VIKINGS*', u'BEARS', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'1'], [u'COLTS', u'JAGUARS*', u'SUNDAY, DECEMBER 29, 2019 1:25 PM', u'3.5'], [u'FALCONS', u'BUCCANEERS*', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'0'], [u'COWBOYS*', u'REDSKINS', u'SUNDAY, DECEMBER 29, 2019 1:25 PM', u'11'], [u'SAINTS', u'PANTHERS*', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'13'], [u'EAGLES', u'GIANTS*', u'SUNDAY, DECEMBER 29, 2019 1:25 PM', u'4.5'], [u'STEELERS', u'RAVENS*', u'SUNDAY, DECEMBER 29, 2019 1:25 PM', u'2'], [u'BILLS*', u'JETS', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'1.5'], [u'PATRIOTS*', u'DOLPHINS', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'15.5'], [u'PACKERS', u'LIONS*', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'12.5'], [u'CHIEFS*', u'CHARGERS', u'SUNDAY, DECEMBER 29, 2019 10:00 AM', u'8.5'], [u'RAMS*', u'CARDINALS', u'SUNDAY, DECEMBER 29, 2019 1:25 PM', u'3'], [u'49ERS', u'SEAHAWKS*', u'SUNDAY, DECEMBER 29, 2019 5:20 PM', u'3.5'], [u'BRONCOS*', u'RAIDERS', u'SUNDAY, DECEMBER 29, 2019 1:25 PM', u'3']]
  • dbsession.commits._commit_lines(week_id=34, lines=lines)
  • core.scores.commit_scores()
  • util.email.email_picks_open(season=2019, week=17)

    Tuesday, December 24, 2019


    • Happy Hollow Park/Zoo in San Jose.
    • LAMP = linux apache mysql php. I always forget this one. It's old.
    • Rivian, big ev company.
    • Power rankings (nfl and espn) have the niners 3rd after the saints and ravens.
    • FF ESPN: 5-7. 11/12 PF. 11/12 final rank.
    • FF Yahoo: 5-8. 7/10 PF. 10/10 final rank.
    • Worked with amazon to schedule the date of the onsite. Suggested the second week of Jan.
    • Went over their documentation of the onsite process: https://www.amazon.jobs/en/landing_pages/in-person-interview.
    • Confirmed the citadel coding challenge for Jan 7.
    • Ordered a whiteboard ($18) to practice. My old one was stained/dry.
    • STAR = situation task action result.

    Monday, December 23, 2019


    • 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.

    Sunday, December 22, 2019


    • 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.

    Saturday, December 21, 2019

    • 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.

      Friday, December 20, 2019

      • 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.