Elwin's Blog

an activist who likes to think

Month: May 2021

front cover

Use Strapi & Next.js to bootstrap your blog site with high volume on free tier

Posted on

As a front end Web developer who likes to code, I think it's reasonable to start my own blog to document what I learned on web development, and there are multiple options to choose from when building a blog site, they are all viable options, I'll start from the one require no coding skills, all the way up to the one that needs the most coding skill :

Continue reading
front cover

Common mistakes regarding React rendering behavior

Posted on

As a react developer who builds a web app that can handle more than 50 WebSocket events that will be merged into state per second while keeping it 60 FPS, I spend a lot of times on tuning the performance on my web apps, and recently, when I was doing code review on a junior developer, I noticed some mistakes that will harm the performance of the web apps

Continue reading
front cover

The Fundamental Of Coding Interview Question part 2 (Javascript)

Posted on

Bit Manipulation

  • Negative Numbers: 3 => 011, -3 => flip 011 => 100 => 101 => prepend the first bit => 1101
  • << && >>> Logical Shift => move every bit to the left/right, the firt/last bit will be cut off, then append/prepend the bits with 0
  • Arithmetic Right Shift => shift values to the right but fill in the new bits with the value of the sign bit

  • get ith bit =>
Continue reading
front cover

The Fundamental Of Coding Interview Question part 1 (Javascript)

Posted on

Arrays and Strings

  • if the order is not important, then the hash table might be a good candidate to reduce the time complexity.
  • be familiar with all the methods for arrays and strings.

Linked Lists

  • How to implement a Linked List structure?
  • How to delete a node from a single Linked List?
  • How to reverse a Linked List?
  • The runner and dummy head
Continue reading
front cover

The Fundamental Of Coding Interview Question part 3 (Javascript)

Posted on

Recusrion and Dynamic Programming(DP)

Ways to approach:

  • Bottom-up: Starting from the simplest case, then build a solution that on top of the previous one.
  • Top-Down: The reverse of Bottom-up, less intuitive, but sometimes useful.
  • Half-Half: They are usually seen on the bitwise operation and binary tree operation.

DP & memoization:

  • Using recursion alone sometimes is...
Continue reading