Book notes

Designing Data-Intensive Applications: Ch2. – Data models and query languages

Like data structures there are many ways to represent and query persistent data. The main models for representing persistent data are relational, document oriented, graphical, and hierarchical. Although that last one seems to be all but dead because of the onerous burden it places on the programmer to maintain and query the data. Relational is still king after 30 or so years and document oriented and graphical are on the rise and shine in domains with specific modeling requirements. Continue reading

ruby blocks and evaluation contexts

If you’ve ever played around with JavaScript and jQuery then chances are you’ve stumbled on call and apply. These are methods on function objects that allow you to change what this points to. If you haven’t stumbled on those methods yet then you have more than likely used them indirectly via bind. John Resig has an excellent set of interactive lessons that demonstrate everything you’d ever wish to know about JavaScript’s scoping rules and the cool tricks you can do by manipulating the scope with call and apply. The lessons can be found at

Ruby has similar context manipulation facilities and they are even more useful. In fact one Continue reading