Posts

Are Houses Actually More Expensive?

Every time I compulsively check house prices near me I feel like I am picking at a scab. Everything just seems so crazy expensive it is hard to believe that things have ever been so bad. But is that actually true? It is easy to see that house prices are higher now, even adjusted for inflation, than they have ever been, and interest rates are still quite high (in early 2024) relative to the past 30 years or so. However, I can’t quite shake the feeling that perhaps what we are really seeing is a return to how housing was earlier in the century. How can we know? I have looked through historic data on house prices, wages, interest rates, and house features to get to the bottom of this question. Are houses really more expensive than they have ever been or were the last couple decades an anomaly of especially low housing prices?

Boids

One of the things I love about natural systems is how complex behavior can arise from sets of simple rules. In biology you see this fairly often, for example Lotka-Volterra equations predict predator-prey interactions and can lead to very complex outcomes despite being incredibly simple. A famous example from the history of computer science is John Conway’s Game of Life which produces incredibly complex (and sometimes unpredictable) interactions between cellular automata from only four rules. A lesser known example are Boids, or bird-oid objects, which demonstrate how three principles, separation, alignment, and cohesion can explain how flocking behavior can arise despite decentralized control. I implemented my own version of the Boids algorithm in Typescript using the HTML5 Canvas element. The complete code can be found in the Github repo.

Whitebox vs. Blackbox Testing

Many blog posts on testing belabor the need for “pure functions” that will always return the save value given the same inputs and never have any side effects. While this is nice to have, it is rarely achievable in real code bases that need to do IO operations or deal with third-party APIs. Even when it is technically achievable, it can be impractical. Instead, developers should aim for “blackbox” testing based entirely on inputs when possible, and “whitebox” testing, which “peeks” into the implementation, when it is not.