How to solve the Leetcode 1657. Determine if Two Strings Are Close problem in JavaScriptDec 2, 2022·6 min read
The "best" git log commandgit log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit It gives you a graph, commit hash (red), decorations like branch names (yellow), commit subject / message (white), relativ...May 5, 2025·1 min read
How to make a star rating display in React that's better than the one on yelp.comOct 10, 2022·6 min read
Capturing multi-line console output in Ruby's RSpec testing interfaceHow do you capture multiple lines of console output in Ruby? Here is one way to do it. This example comes from writing a test for multiple lines of output from a command-line tic-tac-toe game, where the board should print into the console on 5 differ...Oct 2, 2022·3 min read
A quick guide to cell phone vibration with JavaScriptThe navigator.vibrate() interface will crash iPhones, so only use it after checking if the user's device supports itSep 25, 2022·3 min read
How to compare arrays in JavaScriptarray1 === array2 ? To compare arrays in JavaScript, don't assume you can check whether the contents of two JavaScript arrays are the same with === or == (the strict equality or equality operators). You can't. const array1 = [1, 2, 3]; const array2 =...Sep 3, 2022·3 min read
How to create a parallax scroll effect using vanilla JavaScript and CSSDepth and interactivity Well done parallax scrolling effects can add incredible depth and interactivity to a web page. This simple example uses a fixed background image. The site content is stacked on top and scrolling over it, while transparent <div...Aug 14, 2022·2 min read
Understanding JavaScript reference versus instanceAKA Why did my entire array change values inexplicably???Aug 9, 2022·4 min read
Shout out to The Odin ProjectLearn full stack web development for free with The Odin Project, an open source, project-based roadmap to entry into the web development worldJul 30, 2022·2 min read