finished notes from ruby (a lot of stuff copied from the web)