One of my mentors recommended that I read a book by Stanford mathematics professor G. Poyla titled “How To Solve It” and I’m going to take notes for you from the book. First, we have to understand the problem. What is the unknown? What are the data inputs? Can you restate the problem in your… Continue reading The Poyla Approach To Problem Solving
In the last blog post, I provided an intro to poker combinatorics. Now I’d like to take it a step further and deep dive into the math to determine the probability of winning hands like two pairs and royal flushes. We’re assuming a 52-card deck for this math. The probability of gaining a pair of… Continue reading Probability Of Poker Winners
Probability rocks because it helps us make predictions about the future based on past data. As a pretty good poker player, probability allows me to track patterns to predict a range of hands that my opponents might have. In No Limit Texas Hold ‘Em, Doyle Brunson wrote a book a while back called the Super… Continue reading Poker And Combinatorics
When I started to become a programmer, I always wondered what’s the big deal about data structures. It kind of seemed like some abstract mumbo jumbo that you only need to know for job interviews. As I’ve been exposed to more software development, my horizons have been expanded to the importance of data structures. For… Continue reading Why Data Structures?
The problem with measuring functions with timers is that different machines record different times; even the same machine records different times. Furthermore, as algorithms get faster, speed measurements are typically not precise enough. So rather than counting time, it’s better to count the number of simple operations that the computer has to perform. And this… Continue reading The Big O
Holy moly this is a loaded (no pun intended) question. So let’s start by making this as simple as possible by understanding how computers work in general. I bought a brand new MacBook Air that came with an M1 core processor and the job of a processor is to execute machine code (binary code in… Continue reading What The Heck Is The Difference Between A Python Interpreter and Python Compiler?
The event listener is an asynchronous event and goes to the web API and not directly to the JS call stack. When an event that is attached to an addEventListener fires, the event handler addEventListener causes the web API in the browser to set-up a macrotask event queue in the event loop. This event macrotask… Continue reading Behind The Scenes Of addEventListener