Blog Posts

Wave

Ever been to a football match, your team is playing for all their worth and the crowd is enchanted. Then some drunk guys on the other side of the stadium start shouting “WAVE! WAVE”. All of a sudden the a Mexican wave starts from their end, ripples all the way to where you are and […]

Outliers

Oh boy, this one involved some thinking. The problem is to find the outlier in an array of integers. You are given a list that has a minimum of three elements but can have up to a thousand. The array will always have either all even numbers and exactly one odd number or all odd […]

Expanded Numbers

For today we have a number problem. The idea is to take an integer and return the expanded form. This problem wasn’t particularly difficult or tricky and honestly finding a wrong approach would have been harder than finding two correct approaches. Example Input: 12, Output “10 + 2” Input 42, Output “40 + 2” Expanded […]

Brace Validation

Yesterday I did the valid parentheses problem and came up with two solutions, that worked. One was overthought while the other was simplicity defined. The next logical question one can ask though is what if we now want to do brace validation? I.e. there are more than just brackets? What if we include curly braces{}, […]

Valid Parentheses

The scenario is you are given a string of parentheses and are tasked to check if they are valid. The description from codewars: “Write a function that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return true if the string is valid, and false if […]

Word Reversal Code Challenge

Here’s the scenario, you are given a string s that contains a sentence and your task is to write a word reversal function to reverse the order of all words that are longer than n characters. Example: s = The quick brown fox n = 4 Then the result should be “The kciuq nworb fox” […]

Google axes Workspace Legacy Edition

As if this year couldn’t get any worse, Google decided to discontinue its free Google Workspace Legacy Edition. I honestly can’t say I didn’t see this coming because it started years ago when they stopped the creation of new accounts, then reduced the number of users you could use. Right now Google is saying that […]

Has something gone wrong with GitHub?

I work in a Github repo that checks in many non-plain text files and sometimes my PRs will fail to display the rich diff with the cryptic message: Not very helpful right? Especially when reloads have a 50/50 chance of fixing the issue. Until Github addresses this issue there are a few ways to work […]

A story about Storybook

Storybook is a fascinating piece of software that allows pain-free React development. We started using it at djangsters, and I wrote our thoughts about it here. This is a brief summary, and I will be writing a more detailed post both on Medium and here so follow me on Twitter @phoexer or @djangsters not to […]

is DOMRect not serializing for you?

Today I was writing a playwright test that needed to do some calculations on an element’s coordinates. No problem right? Just get the DOMRect object from getBoundingClientRect and go about your day. Easy, expect that rect was an empty object. It took me a second to figure out, but it appears that DOMRect is not […]