- Took the BMW online test. 8 questions. Each was a 1-3m video recording of my answer.
- All had unlimited time to think - I was kinda hoping they'd be restricted in time and in #takes (could shine more I guess).
- The whole test was java heavy.
- JDK/JRE/JVM. Generics.
- Creational design patterns. Prototype, factory, singleton.
- JEE APIs. JavaMail - like flask-mail. Persistence - like sqlalchemy. Security API - like flask-user and flask-admin.
- Join differences.
- I know these, just typing out for refresher:
- Inner. Normal, condition matches in both tables.
- Left. Return the full left table with matching records from the right, and null otherwise.
- Right. Return the full right table with matching records from the left, and null otherwise.
- Full. Return both left and right (basically stitch both tables together and fill null with nothing).
- Good summary: http://www.sql-join.com/sql-join-types.
- Flash will not be supported on chrome at the end of 2020. I'm still amazed Amazon's conference room requires it.
- Apple TV+, Disney+, Hulu, Showtime, HBO, Netflix, Peacock (NBC) coming soon.
- Smoked a pork shoulder. Handpressed tacos with maseca.
- Cooked a couple pounds of garbanzo beans.
- Turns out that the IR lamp in the terrarium isn't dead, I simply had the outlet disabled.
- Supercontest.
- Had to decide to implement an offseason explicitly or simply extend week 17 to last through the remainder of the year. The latter is much easier, so I did that. The former bleeds into g.current_week, current_season, and downstream into is_paid_user, leagues, and much more. It's more proper, but much more complicated and unnecessary at this point. If I need an offseason-specific view in the future, I can add this.
- Fixed and deployed.
- Practice problems.
- Whiteboard most of these. Transferred to computer to check syntax.
- Another thing above leetcode that's superior to hackerrank: it reports time and mem usage, as well as your percentile.
- https://www.hackerrank.com/challenges/counting-valleys/problem.
- https://www.hackerrank.com/challenges/jumping-on-the-clouds/problem.
- https://www.hackerrank.com/challenges/repeated-string/problem.
- https://www.hackerrank.com/challenges/2d-array/problem.
- https://www.hackerrank.com/challenges/ctci-array-left-rotation/problem.
- https://www.hackerrank.com/challenges/new-year-chaos/problem. This was started to get a little tougher. Write down a few simple cases, reason through the logic.
- https://www.hackerrank.com/challenges/minimum-swaps-2/problem. This one is dumb. Hacker rank has some pretty misleading/bad questions.
- https://www.hackerrank.com/challenges/crush/problem.
- Sometimes a problem has two dimensions that you can iterate over, say N and M, and it’s worth putting an IF statement in your whole algorithm to dictate which you do.
- https://www.hackerrank.com/challenges/ctci-ransom-note/problem. Remember hash tables are faster lookup than arrays. If you’re going to access more than once later, it’s usually worth iterating over the array a single time creating a dict with word counts, and then accessing that later, rather than finding the word in the original array.
- https://www.hackerrank.com/challenges/two-strings/problem. Hash for lookup speed!
- https://www.hackerrank.com/challenges/sherlock-and-anagrams/problem. Dumb questions. Worded with zero clarity. Accepts a brute force O(n!) solution, but indicates nothing of such constraints.
- https://www.hackerrank.com/challenges/count-triplets-1/problem. Remember remember. For COUNTING problems, your gut should tell you to use a hashtable for fast lookup. I got a general solution that passed most the tests, but the final answer that passes all is VERY elegant. Was cool to read.
- https://www.hackerrank.com/challenges/frequency-queries/problem. Crushed it. Defaultdicts, tested with int, list, and dict. Kinda cool to have a defaultdict whose default is a nested dict.
- Went through the 4 basic "approach" videos as well: https://www.hackerrank.com/interview/interview-preparation-kit/tips-and-guidelines/videos.
- A factorial multiplies each integer's product, but in some cases for combinations you need to add them, like the sum of all integers from n to 1. This is called the binomial coefficient, and it's n(n+1)/2. It always yields an integer. This comes up in regular life way more often than you might think; pay attention for it.
- In python, collections.defaultdict(int) will make the default zero. Similarly, (list) will make the default an empty list. This is very useful to avoid the annoying "check if key exists, append if so, create if not" clauses.
- defaultdict is a little faster than Counter, as well.
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.
- His blog: https://lucumr.pocoo.org/. Posts erratically, maybe 1/mo average.
- 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:
- https://leetcode.com/problems/remove-element/submissions/. Another delete-in-place, constant memory problem. While loop, use your own index, del that val or increment. This allows in-place, because you're not iterating over the array while you modify it; you're iterating under your own volition and then simply accessing the array by index as needed.
- https://leetcode.com/problems/implement-strstr. Find index of substr. Not as simple as keep a running total, you have to do it for (possibly) n times, because a new instance of the match might begin WITHIN another search. Think mississippi, looking for issip - can't fail after the first one because the actual answer starts DURING it. Instead of iterating over the haystack char by char, check the whole needle with each matching first char.
- https://leetcode.com/problems/divide-two-integers/. This one was a nice change. Write a divide function without using mult, abs, etc. You basically have to loop and treat all multiplications as additions, then use comparators for less/greater than. It's constant in time and space, at whatever number the max size the integers can be (2^32).
- https://leetcode.com/problems/substring-with-concatenation-of-all-words. Sliding windows. Reduce the problem from words to chars, then simply find permutations.
- https://www.hackerrank.com/challenges/sock-merchant/problem.
- 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:

- (bool func 1) != (bool func 2) is XOR in python. Makes clean one-liners.
- Checked supercontest.
- The end of 2019 week 17 was at 5pm. Throughout the season I put in handlers to disable picking, show passive data, etc in the offseason. I never tested it.
- There are a few small bugs. I'll hit them tomorrow. Created the ticket. https://gitlab.com/bmahlstedt-group/supercontest/issues/141.
- Remember float('inf') in python.
- Haven't checked zyme in a while, but up to ~45.50.
- https://leetcode.com/problems/merge-two-sorted-lists.
- It's often more convenient to make the recursive call within the function, not in the return clause. Often you want to manipulate the data, or append to the list, or do something before returning the specifics.
- https://leetcode.com/problems/merge-k-sorted-lists. first_iter = True useful in recursion also.
- https://leetcode.com/problems/generate-parentheses. Create all exponential (2^n) permutations, then run verification on them.
- https://leetcode.com/problems/swap-nodes-in-pairs/. Reversing pointer pairs in a linked list. Can't modify values.
- https://leetcode.com/problems/reverse-nodes-in-k-group/. Same, but with general k instead of k=2, alternating every pair.
- https://leetcode.com/problems/remove-duplicates-from-sorted-array/. In-place deduplication in a sorted (thankfully) array. Can't create secondary array, must be constant space complexity.
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:
- frank 58.8
- nick 58.8
- david 57.1
- quique 56.0
- art 55.9
- diego 55.7
- brian 51.2
- 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:
- Improved the 2sum solution. Much faster.
- https://leetcode.com/problems/remove-nth-node-from-end-of-list.
- https://leetcode.com/problems/3sum. 3 sum solution, got it down to O(n^2). Basically solving n 2sum problems.
- There's another one "3SumClosest" where instead of summing to 0, you're finding the triplet that sums closest to an input target. Instead of keeping matches, keep ALL in a hash table then just return the max. Same O(n^2).
- Another: https://leetcode.com/problems/4sum/. 4sum is the same, just wrap the 3sum solution with another loop around n, the input list. It doesn't matter if you're targeting zero or another explicit number with the sum. The general algo is O(n^(k-1)), where k is the number of items in the sum.
- https://leetcode.com/problems/valid-parentheses. Just tracking opening and closing characters. Easy. Use a stack, loop through once.
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:
- https://leetcode.com/problems/longest-common-prefix/. Easy.
- Started the array-sum problems. 2sum, 3sum, 4sum, and variations. Will finish later.
- 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
- Practice leetcode problems.
- https://leetcode.com/problems/string-to-integer-atoi. Nothing specially really, just checking lot of corner cases.
- https://leetcode.com/problems/palindrome-number. Very easy.
- https://leetcode.com/problems/regular-expression-matching/. They need to be clearer than the wildcard will only be in the second position. I was about to program the true way to do it.
- https://leetcode.com/problems/container-with-most-water. Nailed this one.
- https://leetcode.com/problems/roman-to-integer/. Easy. Remember, while loops allow you to iterate in desynced fashion, which is common (rather than just `for ind, item in enumerate(array):`. A while loop allows you to jump around in the array, skip 2 items, control your own index for each step, etc. This occurs pretty frequently in logic problems.
- https://leetcode.com/problems/integer-to-roman. More roman numerals!
- Went back over the leadership principles, making examples and memorizing each.
- Watched the second season of You. Loved how much they made fun of LA actors.
- Remember python's compound operators. You use += but you can did it with basically everything else, like *= or %= (modulo then define). They're all the same as x = x * 5, with whatever operator and number you need.
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:
- https://www.hackerrank.com/challenges/tree-height-of-a-binary-tree.
- https://www.hackerrank.com/challenges/tree-level-order-traversal.
- https://www.hackerrank.com/challenges/balanced-brackets.
- https://www.hackerrank.com/challenges/contacts.
- https://www.hackerrank.com/challenges/find-the-running-median.
- 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.
Thursday, December 19, 2019
- 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.
Wednesday, December 18, 2019
- 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.
Tuesday, December 17, 2019
- 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.
Monday, December 16, 2019
- New major version of coverage. sqlite storage, json report, contexts, relative filenames, dropped support for py 2.6/3.3/3.4.
- Compiled new sbsc requirements and updated the banner.
- Ordered a headset for the coding phone interviews where I need my hands to write.
- Remember js spread operator or rest parameter: ...obj
- Played with coderpad to familiarize myself. Can write in many languages, set key bindings to vim, etc.
- Webcammed practice interview, both tech and worklife questions. ~20m/350MB@720.
- Placed grocery order with amazon (whole foods). Arrived a couple hours later.
- Citadel tech test was moved to first week of Jan when the proctor is back from holiday.
- Disney reached out for a senior software engineering position.
- Scheduled a phone call for later in the day.
- Spoke for 20min, discussing the opportunity.
- React/node/docker/mongo/k8s/aws/lambda.
- Exciting projects. Thrown right in. Move teams quite a bit.
- Almost all enter as contractors before full time. 50% insurance, no 401k. Paid hourly, but usually ~175k. No equity.
- Shorter hours.
- They're an entertainment company before a tech company.
- Just one 30m coding call, then onsites.
- Review of old notes. Consume again and again, commit to memory.
- Bazel, c++, java. Lighter on python rules. Build and workspace files. Still similar to my old sx-setuptools, just files that take inputs and produce outputs. What files to build, what to do with it, etc.
- Computers perform tasks. Humans should be solving problems.
- Trees are just linked lists with multiple pointers, really. Graphs are just trees with no root.
- DP is generically named. Just solve subproblems and cache/memoize.
- C++ headers contain the declarations, source files use them.
- Polymorphism. Two children inheriting the parent but using a method/attribute differently (e.g. parent animal with noise() method, child cat would noise('meow') and dog would noise('bark')).
- let = block scoped. var = function scoped.
- Lists and dicts are basically the only mutables in python. All the primitives are immutable.
- Groovy is part of the java ecosystem.
- Python > byte code (pyc) > machine code.
- Netstat and wireshark.
- Can think of websockets as just persistent http connections with a server over tcp/ip, where a socket is any general tcp/ip connection.
- Every thread has its own stack (and registers), but all threads in the process share a heap.
- A$ap and chance most of today.
- Fed mouse.
- Went through Amazon's leadership principles and wrote examples of each: https://www.amazon.jobs/en/principles. Having gone through all, examples came readily. The principles were generic.
- Received the online test for amazon. It takes 2 hours, and I can complete at any time in the next 2 weeks.
- The coding portion is 90m, 2 explicit "write a function that returns this" questions.
- I did a full demo test, finishing both after ~35min.
- They use Aspiring Minds (not codepen or google docs). No proctor.
- Asked Renee if it scores higher by submitting earlier, or if all extra time should be used improving/cleaning/commenting.
- Amazon has such a crazy list of products: https://aws.amazon.com/products/.
- Did some research and took some notes in gdrive. Main ones:
- EC2/Lambda for cloud servers and compute.
- Aurora/DocumentDB/ElastiCache/DynamoDB for all types of databases.
- Beanstalk/Amplify for building web/mobile apps.
- S3 for storage.
- Bought new bathroom and kitchen light bulbs.
- Run gym pull.
- Washed all mesh running shoes with soap.
- Scheduled haircut for thurs.
- Started reading ctci.
Sunday, December 15, 2019
- Disneyland yesterday. Club 33.
- Late picks: franky, cam.
- The ufc card last night was stacked but looooong.
- Patriots cheating again, confirmed shady footage of bengals sideline: https://twitter.com/FOXSports/status/1206265478596816896.
- Bamboolib is a python package which acts as a GUI for pandas. Kinda silly.
- Cleaned terrarium.
- Saw black christmas.
- Uncle Bill's.
Subscribe to:
Posts (Atom)

