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