Posted in December 2009

Ruby Metaprogramming Simplified

For an upcoming post, I needed to get my hands on Ruby’s metaprogramming capabilities. As always, I had a hard time to get the semantics and the syntax involved right. So, this time I decided to come up with my own approach to ease unleash the power of Ruby’s metaprogramming. Advertisements

Ruby Spreadsheets

A spreadsheet, as defined by Wikipedia, is […] a computer application that simulates a paper, accounting worksheet. It displays multiple cells that together make up a grid consisting of rows and columns, each cell containing either alphanumeric text or numeric values. A spreadsheet cell may alternatively contain a formula that defines how the contents of … Continue reading

On Coin Tossing Games (Part 2)

In the previous installment we considered a simple coin tossing came and the probabilities of winning it. We used explicit listing of all possible outcomes to infer the resulting probabilities of winning or losing that game. In this installment we take a different approach: inferring the success probabilities for the same coin tossing game by … Continue reading

On Coin Tossing Games

Ok, what if I offered you to join me in playing the following simple heads or tails game: Two fair coins are tossed. If any of the two coins shows head then you’ll win 60 cents if the other coin also shows head. you’ll lose 50 cents if the other coin shows tail. If both … Continue reading

Reducing Compilation Time: Unity Builds

I recently stumbled upon a method to reduce compilation times in C/C++ projects by so called Unity Builds (UB). The technique behind UB  is quite trivial: compilation time is reduced by reducing the amount of disk access during compilation. During compilation included files are walked multiple times. This is done for each translation unit the compiler … Continue reading