I write code, primarily in backend and infrastructure as a software engineer.

matrix rotation

I used to be very afraid of a matrix question. I now view it as a bit of a gift, as it’s a highly visual format, and graphs and trees are a little harder to mentally parse. But the matrix structure has some tricks to it that it simply helps you to know. i.e. Matrix rotation is pretty difficult to write a raw algorithm for but does it help you know that rotation is the same as transposing and then inverting each row? I think that only helps if you know exactly what transposing is. Let’s start there.

Read More

a king's tour

So I recently got this one at a company I was ok not working at. The interview shows me 2 3 x 3 arrays with numbers 0-9, and a 3rd 3 x 3 array, this one numbered 4-12. The goal with this problem is when given the path of a king on a chessboard, is this a valid route where the king travels through each square on the board sequentially.

Read More

inflection point where character count match

Here’s a quick one. We commonly do iterations that lead to character counts. This one is looking for a moment where the left side and the right side have the same character count. In my interview, I quickly setup a for loop with a while loop inside it that found the counts, however this is way to algorithmly complex O(n^2). Of course then the interviewer asks for a better answer and left I’m scambling to find a better answer. I’ll give you a clue in case you run into this, when the question wants you to compare one side of an array to another, that is a tell to try this with 2 for loops, one after the other. 2 non-nested for loops is O(2n) ~ which is the same as 0(n). When you do something that’s 0(n^2), there might be a way you can do this with unnested loops, or nLog(n), or maybe use sorting.

Read More

dsa

data structures and algorithms challenges, abbreviated ‘DSA’, is a common and sometimes frustrating litmus test for interviewing software engineers. I’m interested in blogging all my recent challenges to confirm my understanding and put the knowledge out there without a paywall or login. I am newer to using python for coding challenges, but I feel like while I’m still true to javascript, python works better for these toy challenges.

Read More

nl complexity

I wanted to start off by saying succinctly and firmly that I believe using regular expressions are often more time complex, certainly less intuitive, and often only effective for niche situations when it comes to solving coding challenges and interview questions… however, I am still fascinated with it!

Read More

livecode curry

Tonight, I watched Cassandra’s talk on functional programming, and I got pretty excited about currying, composing, and piping functions. I wanted to live code some practical examples, as I must admit it took seeing this several times for me to really wrap my head around this topic and I hope this helps!

Read More

open with bash

There are many obvious benefits to working your computer from the terminal. I’ve been experimenting with opening tabs and running chains of commands from the terminal. Here’s a command to do exactly this.

Read More

livecode bind

In my few weeks in Telegraph Academy, I’ve discovered I learn best from live coding and I want to bring some of that feel to my blog. Live coding is a programming practice centered on the use of improvising interactive programming, there are live websites with many free, live tutorials and others simply challenging them to build something in a short period of time.

One reason I find them valuable is unlike slides, contrived exercises or doing the problem on your own, the live-coder puts on a show and gives me a chance to see an idea take shape. It also gives me confidence knowing that a quote-enquote professional programmer also makes typos, forgets keywords, and needs a moment to look at documentation. Finally, live coding also helps me establish patterns to look for and makes practical and succinct examples.

For example, I have been struggling with the concept of call, apply, and bind and a live coding session in class went a long way towards demistifying it for me. Here’s an expanded look at it! Open your console and try this out:

Read More

regexp.lanation

New programmers seem afraid of regular expressions. I love these particular tools and wanted to offer a full primer from abc to ^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$ . Regular expressions are a very old computer science concept that uses patterns to match subsets of strings. They are language agnostic, and can be a tool that you use for matching and modifying urls and other strings within your applications and for solving interview questions in a quirky manner.

Read More

hello world

I’m very excited to get this blog up and running and write my first post! Today is an important day in our country, gay marriage was declared legal all over our country, by the U.S. supreme court. As someone with many LGBTQ friends and some family, I feel a deep connection and am proud that our country will allow any two kinds of people to receive the over 1,000 benefits that marriage bestows.

Read More