## Math fun

I solved another 17 problems on Project Euler today. I've not solved more than the average Ruby participant on the site. But Rubyists have a pretty low average ranking on that site compared with other languages like Python and C.

Kind of makes sense given the number-crunching nature of most of the problems; Ruby isn't that kind of language. But it's also a bit surprising given that many of the problems there can be solved in one or two lines of code using standard Ruby libraries or a gem or two. In particular Ruby Facets is a great resource any time you find yourself dealing with combinatorics (permutations, combinations etc.).

Also, thanks to the speed of modern computers, given a decent algorithm, the difference between a C solution and a Ruby solution is often a matter of less than one second with C vs. 5 or 10 seconds with Ruby. The speed with which you can bang out working Ruby code likely more than offsets this.

I used to be good at math, back in the day. I was top of the class in all of the (few) calc classes I took. But then I verged into computer science and never looked back. Pure math never really held my interest. Now I find myself pretty lost even on simple math problems, which is sad.

## 1 Comment

[...] in Uncategorized Ok, so after reading Brian Carper post a couple of times about this Project Euler I decided like a jealous toddler I wanted to try. [...]