New Year’s Brain Teaser

Posted by Yariv on December 30, 2006

Here’s a good brain teaser to give you some entertainment for the new year.

You have 12 balls, identical in every way except that one of them has a different weight from all the others. You also have a balance scale. In 3 rounds, in each of which you can compare the weights of any 2 groups of balls, you have to ascertain which is the ball with the different weight and whether this ball is heavier or lighter than the other balls.

This is not a trick question in any way. I solved part of this puzzle after I got a significant hint. I wish I had tried a bit harder to solve it by myself, but it’s too late now. If you want a hint, you can email me, but you’ll feel greater satisfaction if you solve it by yourself.

Happy new year!

ErlyWeb is Undocumented No More!

Posted by Yariv on December 19, 2006

I resisted the distractions. Even the killer duo of Lord of the Rings books and the World Wide Web couldn’t stop me (although it did slow me down considerably :) ). I finally managed to sit down on my ass until I finished writing the first draft of the ErlyWeb API documentation, in meticulous conformance to the edoc specification!

Yes, my friends, it’s true. You can now go to http://erlyweb.org/ and feast your eyes on the most glorious API documentation ever written! Well, ok, I admit that may be a slight exaggeration, but it sure beats having to rely on a bunch of tutorials and source code, doesn’t it? :)

If you find any glaring holes or errors, please let me know.

(To generate the HTML yourself, check out the latest version from trunk and do the equivalent of “edoc:application(’ErlyWeb’, “/path/to/erlyweb/trunk”, [no_packages])”, and the files will appear in erlyweb/doc.)

Enjoy!

ErlyWeb Tutorial by Brian Olsen, Part 2

Posted by Yariv on December 12, 2006

Brian Olsen wrote the second part of his ErlyWeb tutorial. In this part, he shows how to acheive maximum code reuse for editing and creating new postings by making smart use of higher-order functions. It’s great stuff! You can read it at http://progexpr.blogspot.com/2006/12/erlyweb-tutorial-part-2.html.

ErlyWeb Tutorial by Brian Olsen

Posted by Yariv on December 05, 2006

Brian Olsen has written a very nice tutorial showing how to create a simple blog application in ErlyWeb. You can read it at http://progexpr.blogspot.com/2006/12/erlyweb-blog-tutorial.html.

It seems that many developers who haven’t used Erlang have the perception that it’s only good for scaling and concurrency, so it’s great to see other people appreciate Erlang (and ErlyWeb) for one if its greatest strengths: simplicity. He’s what Brian wrote:

I hope you are seeing what I am seeing. ErlyWeb has INCREDIBLE POTENTIAL, since it avoids a lot of complexity. Any gaps we found thus far were easily plugged in. Even though ErlyWeb is new, this, so far, blows Rails out of the water in terms of brevity.

This is just what I’ve been trying to achieve with ErlyWeb. I’m happy to see this validation that my efforts have borne fruit.

When I was in Sweden, Joe Armstrong told me (tongue in cheek) that one thing he likes about the Erlang conference is that being surrounded by like-minded people gives you a strong indication that you’re not insane.

Bring those indications on :)