Jul 19, 2010
Here are my favorite talks for Day 2 of Ruby Midwest. Yehuda Katz's keynote was similar to Chris Wanstrath's, touching on the importance of the Ruby community. He called the Ruby community, "a blessing and a curse" because it :
- enjoys experimenting with new projects
- does not put up with crap
- expects basic commands to run without reading the manual
- expects a high level of UX
- expects support for all platforms, unique environments (e.g., Windows, JRuby, Passenger, rvm, Unicorn, gemcutter)
- expects the project to work with other gems
- expects maturity of a project
- expects proper maintenance and frequent releases
He listed four phases of his life as a Ruby developer:
- Phase One : Noob
- Phase Two : Aspiring Plugin Author
- Phase Three : OSS Contributor
- Phase Four : Full-time OSS at Engine Yard
Like everyone else, he started off as a noob, using Windows as his primary OS, building small Rails apps for a non-proft. He called it a time of confusion, because he did not know things like methods, etc. But of course, that didn't stop him from becoming an aspiring plugin author, building plugins such as autodb and yhtml. As an OSS contributor, he contributed to projects like DataMapper and Merb. Merb had a following and Rubyists were switching to Merb from Rails because they love trying out new projects, even though the project was not stable and contained bugs. While disrupting the Ruby ecosystem (as Merb did) can be a good thing to bring constructive competition, it can also breed arrogance and can leave stable, working projects unnoticed (Rails). In the case of Merb though, features that were great in Merb, integrated into Rails after the Rails-Merb merge.
Yehuda strongly encourages OSS contributors to
- give high-level UX to the users
- make sure basic commands work and does not require a manual
- make sure all platforms, special environmental factors are supported
- be excited if the first project takes your ideas (e.g., Rails vs Merb)
- continue contributing to the project for the long haul if you're the primary maintainer
- continue contributing to the project even after the "hype" dies
- make sure the next person is in it for the long haul if they decide to jump ship
- announce the project is no longer maintained and in need of a new maintainer
Yehuda strongly encourages the Ruby community to
- reward long-term maintainers
- encourage up-and-coming projects to mature
- push mature projects to improve UX
- become a maintainer
- expect reading the manual for complex commands
Wesley Beary also had a similar talk on UX. Here are some bullet points:
- do not worry about competition (it's a good thing)
- "tutorialize" - as a maintainer of the project, help out as much as possible (e.g., IRC)
- encourage contributors
Aman Gupta talked about memprofiler. I listened to his talk with Joe Damato at LA Ruby earlier this year, but most of it was over my head. Listening to it again months later, I mostly understand the power of memprofiler and how it can help you find bottlenecks in your code. Here are my notes:
- Ruby's GC (garbage collector) does not scale as object count increases
- More objects == longer GC time, fewer objects == better performance
- When GC is running, nothing else runs which pads response time.
- useful tools
- ObjectSpace.each_object
- ObjectSpace.count_objects (in Ruby 1.9)
- gdb.rb: gdb hooks for REE (http://github.com/tmm1/gdb.rb)
- bleak_house
- heap dumping patches
- memprof
- easy to use
- no patching the VM
- just require the gem
- includes file/line, object contents, info about references between objects
- simple analysis
- allow processing via various languages and databases using simple JSON data format
- http://github.com/ice799/memprof
- gem install memprof
- use ruby 1.8.x
- under active development
- how it works
- rewrites your ruby binary in memory
- injects short trampolines for all calls to internal VM functionals to do tracking
- more info - http://timetobleed.com
- http://bit.ly/memprof-abi
- memprof features
- memprof.track
- memprof.dump
- detailed info about block in JSON
- memprof.dump_all
- dumps out every single live object as json
- one per line to specifed file
- http://memprof.com
- web-based heap visualizer and leak analyzer
- built using rails 3 app
Unfortunately, I didn't stick around for Cory Flanigan's Zero to Hero talk which I heard was really good. Overall, the conference was great. I'm glad I attended and look forward to next year's. Hopefully by then, I'll give a talk on something. Kansas City is a great city. I look forward to coming back again soon for a nice weekend vacation. If you ever decide to visit to KC, be sure to check out Fresher than Fresh Snow Cones.