Category: Learning

  • The Sliding Window

    The code below is representative of a “semi-involved” Sliding Window. Also, it’s worth reminding that the whole purpose of “memorizing code” is less about “rote memorization” and more about having “rapid access” to a useful pattern. With that in mind the “memory hack” for the sample below is not all encompassing but covers the key…

  • BubbleSort, Students by Height, and Sedimentation

    Yesterday, I had the good fortune of working with two Flatiron School Graduates, Tyler Caprioli and Coral Fussman to talk through and walk through the BubbleSort Algorithm. Unless you know what a Bubble Sort is to begin with, it’s difficult to code outright. Understanding is a precursor to coding. We ended up working through a…

  • “Setups and Payoffs in Fiction” … or, The Sliding Window Algorithm

    BACKGROUND: While on my adventure to learn algorithms, I was fortunate to have Flatiron graduate Daniel Dawson recommend this course: Grokking the Coding Interview. Despite my having access to multiple Udemy courses, AlgoExpert, InterviewCake etc., (all very helpful in their own way)… Grokking the Coding Interview was a standout, in part because of the recommend,…

  • SubSequencing Arrays: “The Awards Ceremony”, and… a Few Words About Learning

    Awesome coding challenge yesterday with fellow dev Ranika Williams from Flatiron School. Though I’ve been attempting to substitute values in code such as “index, idx, val” with more descriptive values and console logs, working through the problem via Zoom with Ranika gave me a new appreciation for the approach. If you’re attempting to tackle algorithms,…

  • Palindromes, or The Sock Draw of a Troubled Mind

    A palindrome is a word like “RACECAR” or “DID”, it is the same both forwards and backwards. Today, we’re going to cover several Javascript solutions with some variations that might be useful. Where does “The Sock Draw of a Troubled Mind” come into play? That’s a good question… but it seems safe to assume that…

  • objectMap from Array or String: The Snitch

    While many of the other algonalogies have stories accompanying code… the code for this is a pretty direct expression for the analogy. Think of a “Snitch” an “Informant” from a cop movie… or in a historical light: “The Kindly Old Neighbor” who works for the Stasi or GPU (secret police), keeping track of your every…

  • Dealing Cards, or “Chunking” Arrays

    When reviewing code, I often find that although I think “understand” what’s happening… it’s often when I try to put myself “into the shoes of the interpreter/compiler” that I realize some flaw in my perception. “Chunking Arrays” in JavaScript is one of those things. Though possible to force myself to memorize code using “totals” or…

  • Anagrams as a Matter of Secret Identity

    On my quest to master algorithms in JavaScript, I make a point of cross referencing different tutorials and solutions, that I might find a happy middle ground and greater understanding. However, if you want to learn straight from the masters, I recommend you check out Stephen Grider’s Algorithms and Data Structures course on Udemy and…

  • Real World Use Case of a Tree

    NOTE: to the prospective reader of this blog post: you may find it entirely “skippable”, unless you’re curious about how I think. This blog may appear “messy” as it’s me trying to work through an idea, breathe some life into it that I might have an easier time coding it. It’s basically a forward-looking-reflection on…

  • Breadth First Search (Trees)

    For a better explanation of Breadth First Search, check out my previous algonalogy for Breadth First Search. For the example here, we’ll be going level by level and returning the averages for each level. Cast of Characters:-Wart Nose Climbing a Tree-Construction Workers-Lewis and Clark-Retired Turtle Bouncer-Wile E. Coyote-Forex Trader-Pushy Car Salesman-Shifty Eyed Shoplifter Glossary of…

  • Depth First Search (Trees)

    Depth First Search was previously covered in my blog here but as I’ve been exploring more programmatic “use cases” with my other Code Pattern posts, I get the impression that Depth First Search could be useful in programming some “Natural Language Processor” to check for specific meaning first and then back up to something more…

  • Lifecycle Methods in React, and The Wheel of Karma

    In React, one of the more basic concepts for class based components is that of Lifecycle Methods. When thinking in only technical context the concept seems easy enough, but the ideas blur when it comes to implementing them. With that in mind, this analogy of Karma and The Wheel of Life may help. Imagine a…