Blog Posts

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 […]

Code Corner: Triangles

For the last two weeks, I’ve had a bunch of interviews and code challenge tasks I was taking which took up a lot of my time. Add that to #DadLife and the result is two weeks with no content. The pressure is off for the moment so I’m picking it up again. So for today: […]

Code Corner: Nested Squares

Problem Draw three nested squares in html and css. My Solution Simple, you need three divs nested inside each other with a unique way of referencing them, the rest is done in CSS. I set the body to gray because reasons, there is really no need to do this. The first part is that all […]

Interviews are stressful

So I had an interview today, I would like to say it went well but I’ll only know that when they get back to me. Fingers crossed. It was a quick call with two guys, who were awesome, followed by a quick technical test. The first part was a general question and answer, how would […]

Code Corner: Counting Multiples

Problem We are given 3 numbers, a starting number A, an ending number B and an integer K, find the number of multiples of K there is between A and B inclusive. Source Example a = 6 b = 9 k = 2 Should return 2 My solution The ranges are irrelevant because this is […]

Code Corner: Bracket Matching

Problem Given a string with brackets check to see if the brackets are properly nested. Source Example [] = return 1 () => 1 )( => 0 ({)} => 0 ” => 1 My Solution Classic stack problem. Didn’t need to brute first. The idea is you create a stack and loop through each character […]

Code Corner: Max of 3

Problem Given an n-length Array of integers ranging from -1000 to 1000 find the largest product of three numbers in A that you can get. Source Example [-3,2,6,4,8] => 192 My Solution There are three basic scenarios that can produce the largest product: The largest three positive numbers The largest positive number and the smallest […]

Code Corner: 1-minute rule

So today’s task was so easy I’m going to do another one because I solved it way too fast. It’s really not that hard if you know some built-in data structures. Problem Source Given an n-length Array of numbers between -1,000,000 to 1,000,000, find the number of distinct values in the array. Example A = […]