Two weeks in Australia in both the rural and city areas taught me this: the dream of a beautiful countryside life is not without it's struggles.
I was lucky to have chanced upon a lady running a wine vineyard, who committed to the Tasmanian countryside during covid to escape from the hustle of Melbourne city life. It seemed it was plenty hard work, even though it looked beautiful for her at the start.
I also had the chance to meet small town folk - a blacksmith at a Gold Rush era theme park. It wasn't a skill that paid well, but he enjoyed it so much that working was fun for him. A retired operations employee at the Cape Otway Lighthouse emanates a similar glow.
In the city, people are dreary. Overcrowding causes people to have short fuses. I witnessed a man stop his bicycle at a traffic light, only to have another inattentive cyclist knocking into him lightly from behind. He cursed like there was no tomorrow.
Yet, there is still little bits of enthusiasm in the city. Like a hotel receptionist that went beyond her job scope and helped us become a "human weighing scale" for our luggage since she used to work for an airlines before. Or an excitable lady doing what she loves, selling books and book-related stuff like crochets and reading socks.
Life is more of what you make it, than where you live, it feels. With that I find newfound resolve to find my ikigai, or for romanticism's sake, raison d'etre.
1. Leetcode
- SUN - easy question
- MON - had trouble with hard
Sliding Window
question Count Subarrays With Score Less Than K. Revise an easy SW question - TUE - medium SW question Count Subarrays Where Max Element Appears at Least K Times but still had trouble with it. Couldn't quite get this Medium SW question either. But I did get the hang of the Easy SW question
- WED - Easy Find Numbers with Even Number of Digits. Did another
Math
Easy, but got stumped by Medium DP / Math problem. - THU - PH rest
- FRI - Push Dominoes. It's a medium question I couldn't solve in 2022, but could do it now! It isn't super clean, but working from problem to 6 base cases and implementing the if-else sounds like a win!
- Interesting follow up on prefix sum
- SAT - Medium Greedy Minimum Domino Rotations For Equal Row but worked it out!
2. JS Coding
- SUN - throttle, function.prototype.call, curry
- MON - revised
flatten
,promise.all
. AttemptuseMediatedState
. - TUE - attempt
useWindowSize
. Revisedmemoize
.- useEffect to addEventListener on mount, and removeEventListener on unmount.
- WED - revised
promisify
,useDebounce
andThrottle
. - THU - PH rest
- FRI - COMPLETED
useMediatedState
and revised something else. - SAT - Completed
JSON.stringify
,HTML Serialiser
andMiddlewares
.
3. System Design
- SUN - speedrun
- MON -
Design a system that allows users to bookmark videos for later viewing.
- JWT or OAuth token validation on server
- TUE -
Notification Center
. Good, quick run - WED -
displaying real-time stock market data, such as price changes and volume, for a user's watchlist
. Gave ChatGPT better instructions to prompt me instead of giving full answers after my initial response - THU - PH rest
- FRI - What started from the idea of creating a post to illustrate and compare optimisations from system design optimisations ended in exploring an old project using
Next.js
andReact
. Hope to complete it today, but maybe it will extend into the weekend.
4. JS Theory
- SUN - HOC, Ref, React 18 (Suspense, Batching)
- MON - React 18 revision (suspense, batching, useTransition), and study
useDeferredValue
. StudyuseLayoutEffect
. - TUE - React 19
useOptimistic
, practice writing custom hook. Also learnt how to upgrade React versions. Key to releasing v19 after v18.2 is to release a v18.3 non-breaking minor version at the same time as v19.0. This version addsconsole.error
to allow developers to run in local and resolve any issues before fully committing to v19 - WED - revised
benefits of React
. Studiedbenefits of hooks
, andrules of hooks
. Went beyond the basic explanation for the last point! - THU - Arrow Syntax VS Traditional Function Pretty sure I've encountered this before, but in a different form.
- Arrow Syntax has
this
to be fixed at function creation. Traditional Functions allow for this to be modified bybind
,apply
,call
.
- Arrow Syntax has
- FRI - reviewed
difference between call and apply
. Studied Prototype Inheritance - SAT - speedrun through about 10 questions. Reviewed about 5 more. To re-test these 5 high importance questions, and I'll have completed all the high importance questions! 🥳
5. Behavioural
- SUN - rest
- MON - rehearsed 3 questions with GPT, saving some of the 10 free messages for system design practice. It's the first time doing it without referring to my
.docx
file for the onsite and it's going well. - TUE - 3 questions. Speak verbally before typing in.
- WED - 3 questions. Used the 3 stories that I've not used as much. Tomorrow can try speaking into GPT speech-to-audio
- THU - PH rest
- FRI - tried speech-to-text, and turns out I use a lot of filler words and / or sound uncertain. Need more practice!