It's a pretty rewarding week, learning various stuff and even applying some concepts to my personal website. I'm off for holidays next week though, looking forward!

But for now, here are the topics again:

  1. Leetcode
  2. JS Coding
  3. System Design / JS Theory
  4. Behavioural

1. Leetcode

2. JS Coding

  • [Mon] Did useInputControl (M) and useClickAnywhere (E)! Re-attempted Map Async Limit successfully!
  • [Tue] Attempted Middlewares, Cycles, and useCounter II!
  • [Wed] Did useCycle, useSet and useTimeout!
  • [Thu] Min By (E) and Count By (M)! Attempted getElementsByClassName (M)
  • [Fri] work problems... Using a ref to pass between data

3. System Design / JS Theory

  • [Mon] Try quick-fire 10 questions.
    • Revised 6: == vs ===, event delegation, Virtual DOM, cookies, localStorage & sessionStorage, hoisting, and
      • cookies are sent on every request, first sent by server
    • Studied 4: func.bind, event capturing, What's JSX, error handling for async functions
  • [Tue] Quick-fire optimisations! UX: Lazy Loading, Skeleton Loading, Silent Loading, Image fixed width and height for CLS, Error Prompts, Virtualised Lists, Caching (Redis / LocalStorage). Accessibility: Dark Mode, Aria Labels / Lang for screen reader, Button navigation and execution. Security: disable CORS, sanitize inputs (React default). SEO: meta tag with description.
    • Content-Security-Policy HTTP Header to define trusted source of scripts and resources, reducing change of XSS attacks. A good resource. Example: Content-Security-Policy: script-src ‘self’
  • [Wed] Yesterday's security article and a bit on keyloggers, and some CSRF best practices by OWASP, basically a per-request token sent in the HTTPS headers.
  • [Thu] -rest-

4. Behavioural

  • [Mon] 4 questions with back-and-forth answered today! Feeling confident
  • [Tue] 5 questions today! Feels great, and I find I have more stories as the questions come along. But perhaps I should constrain myself to the 7 - 10 stories I have and apply them to different questions. Otherwise I might not be able to follow STAR format
  • [Wed] 4 questions!
  • [Thu] -rest-
  • [Fri] -rest-