#algorithms-and-data-structures
4 posts
2017 - November
1 post2016 - November
1 post2016 - October
1 post2016 - July
1 post2017 - November
1 postHow does Bitcoin force consensus among Byzantine generals?
Bitcoin combines hashes, Proof of Work, mining, and adjustable difficulty to reach consensus among unknown nodes. Even with $1.5 billion in hardware, the network would remain difficult to break.
2016 - November
1 postMatches, Rankings, The Social Network, League of Legends, and Ruby?
With 2,000 matches, the author shows that wins minus losses produces absurd rankings. The Elo system accounts for opponents’ strength and responds better to unlikely results.
2016 - October
1 postRuby on Rails implementation of a (proper) Ranking/Popularity system
A Rails popularity implementation replaces fragile counts and averages with the Wilson lower bound, balancing vote proportion and uncertainty in an indexable score.
2016 - July
1 postTrying to match C-based Fast Blank with Crystal
Rewriting Fast Blank in Crystal and comparing it with C and Ruby, the author finds string copying expensive. For this trivial algorithm, the C version remains the best choice.