When I was younger, I remember spending way too much time with a puzzle much like this one. Mine was diamond shaped, and on the back there were triangles to create a 3D pyramid with the same shapes. It came…
How to use Python generators to save memory
I recently saw a Reddit thread where someone was asking for help managing memory in Python. It was a pretty short script, but it contained the following function: Needless to say, I think I found the memory problem. This function…
Review: edX Artificial Intelligence
Artificial intelligence has always been something that has interested me, but more in the “I can beat you at chess” sense than the Data from Star Trek sense. Perhaps because the former seems like something I can reasonably design whereas…
An Experiment with Scala.js
We don’t usually think of Scala as a front-end language, but Scala.js is challenging that assumption. The framework gives you easy access to the DOM and therefore the canvas, making it trivial to develop an HTML5 application. To demonstrate this,…
How to Use Recursion in Scala
When learning about recursion, a common example is the Fibonacci sequence. In simple terms, we say that the nth Fibonacci number is equal to the sum on the (n-1)th Fibonacci number and the (n-2)th Fibonacci number. By adding in the…