Category: Work

  • Expanded Numbers

    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

    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

    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

    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

    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…

  • A story about Storybook

    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?

    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

    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

    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…

  • Code Corner: Counting Multiples

    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…