I'm a developer, math enthusiast and student.

Dhaivat's articles

  1. An Introduction to Celluloid, Part I

    This entry is part 1 of 3 in the series An Introduction to Celluloid

    This entry is part 1 of 3 in the series An Introduction to Celluloid A few years ago, there used to be a very easy way to optimize code. If you found out that your processor-heavy code was running a bit slower than you wanted it to, the simple solution was just to wait for […]

  2. Genetic Algorithms in Ruby, Part II

    This is the second part of a two-part article. Please read the first article if you haven’t already. Reproduction The chromosomes are reproduced with the weighted random (i.e. roulette machine) code that we just added to the Chromosome class. The idea is simple; take the existing chromosome pool, and replace it with a new pool […]

  3. Genetic Algorithms in Ruby, Part I

    Charles Darwin produced the theory of the “survival of the fittest” (though the term was coined by Herbert Spencer), which means that the fittest and quickest adapting organisms in a specific environment will always prevail over the others. This makes a lot of sense; the organisms that are stronger are more likely to survive and […]

  4. Introduction to Event Machine

    Event Machine is an awesome library that brings event-based, non-blocking IO to Ruby. Instead of saying “write to this file”, and then waiting for that procedure to end, you say “write to this file, and call this function when you’re done”, and, your program moves right along. The advantage being that there is no waiting […]

  5. A Look at DSLs

    If you have never seen or written any XML thus far, consider yourself very lucky. XML started out as a very friendly and sane way to represent data so that it would be human readable and machine readable at the same time. Of course, this sounded pretty darn great, until people began building incredibly large […]

  6. Keeping Your Rails App Clean

    Way back when in the 1600′s, astronomy was all the rage in Europe, due for the most part to the invention and production of telescopes. As a result, kinds of people were able to learn more and teach society more about stars and such, and it all progressed wonderfully. But, astronomy isn’t just looking at […]

  7. Payments in Rails with Stripe

    Annoyances Handling payments in the past has been a complete pain. Just looking at PayPal’s API introduction makes me want to scream. Redirects, logins, checkouts; I just want process a payment! Stripe is a much needed breath of fresh air into this chaos, and it’s no short of awesome. The API is easy to use, […]