Posts Tagged “Ruby”

I ran across a link on SvN to an interesting logic puzzle called Whose Fish?. It purports to be a logic puzzle created by Albert Einstein, and claims Einstein said 98% of the population would not be able to solve it. So naturally, I was intrigued.

The only problem was, the logic matrix for the puzzle doesn’t fit on a single piece of paper, and I don’t have Excel installed. So what did I do? I wrote a CGI script in Ruby that generated a logic matrix using a table of checkboxes, and I wrote some accompanying JavaScript to make it easier to use. Go try it!

If you don’t want to solve the puzzle yourself, feel free to check out some of my steps. Just please, don’t submit this as your own answer. If you’re going to submit an answer, do the work yourself. So anyway, here are some of my steps:

  1. Step
  2. Step
  3. Step
  4. Step
  5. Step
  6. Step
  7. Step
  8. Step
  9. Step

And here’s the final solution.

Comments 25 Comments »

Well, imagine my surprise when I discovered that a bunch of my old entries no longer worked right in Typo? The problem is, out of the box, Typo doesn’t bother showing the extended portions of entries, even though it does store them. So I sat down and started poking around the internals of Typo and got it to not only show the extended part, but also to let me edit the extended part from the admin interface. And it didn’t take very long at all, because of how powerful and flexible Ruby on Rails is.

And then, after that, I read up on mod_rewrite and added rewrite rules to get all the old MT URLs to point to the right place. Hopefully I didn’t miss anything.

Comments Comments Off on Hacking Typo

If you can see this post, you’ll notice that everything’s changed. Not only has the entire look of the blog changed, but so has the server the blog is hosted on. This blog is now being hosted by DreamHost, and the blog system I’m using is Typo. Play around with it — I think you’ll find it’s very cool. For example, you can do live searches, posting a comment is live too, and everything should also be nice and zippy. The first two are because of the new Typo engine (which uses Ruby on Rails, an excellent web application framework), and the last is a combination of Typo and the new server.

So hopefully, with this new blog in place, I’ll actually be motivated to start posting again. I’m sure if I have anybody that still reads this (and by reads I mean is subscribed in their newsreader), you’ll be happy to hear this.

Comments Comments Off on Say Hello to Typo