Meeting notes for October 5, 2010: MacRuby, HotCocoa, CouchAppSpora, hosting, OSes, tests, etc.

7 views
Skip to first unread message

Igal Koshevoy

unread,
Nov 2, 2010, 9:58:27 PM11/2/10
to Portland Ruby Brigade
* Popular hosting options:
- Server is managed for you, nice if you don't want to manage
servers yourself:
- Heroku.com: Cheap and easy to start, confining if you need
more flexibility.
- EngineYard.com: Premium, managed clustered hosting.
- You manage the server, nice if you need enough control to build
a custom solution:
- Linode.com
- Slicehost.com
- Rackspace.com
- EC2.com

* Popular operating systems for running Ruby:
- Ubuntu LTS (Long Term Support), stable and fairly current packages
- Ubuntu, fairly stable and current packages
- Fedora, less stable and very current packages
- Debian stable, very stable but old packages
- Debian unstable, fairly stable and current packages
- RHEL and CentOS, fairly stable but very old packages

* Max Ogden presented his "CouchAppSpora" project:
- CouchAppSpora is an implementation of the Diaspora protocol's
social network using CouchDB.
- Preview of app:
http://glitterbacon.couchone.com/couchappspora/_design/couchappspora/index.html
- Source code and details: http://github.com/maxogden/couchappspora#readme
- Diaspora project: http://www.joindiaspora.com/

* Reid Beels presented "MacRuby and HotCocoa"
- MacRuby is a Ruby interpreter for Mac OS X, provides complete
access to the operating system's Objective-C runtime:
http://www.macruby.org/
- HotCocoa is offers MacRuby wrappers for easily interacting with
the Cocoa framework using friendly Ruby-esque APIs and DSLs:
http://www.macruby.org/trac/wiki/HotCocoa
- Reid used it to write a simple web browser that displays the web
page and its print preview side-by-side. Cool!

* Discussion: "How do I make my tests faster?"
- It depends...
- Use mocks and stubs to avoid hitting database or performing
other expensive operations
- Partition your tests so you can run only the ones you need as
your developing, and then the whole set before a checking
- Parallelize your tests, but this may be tricky...
- Hydra: http://github.com/ngauthier/hydra/wiki/Getting-Started
- Specistent: http://github.com/jpoz/specistent
- Run a persistent server that has your Rails, libraries, testing
environment, etc loaded
- Spork loads Rails and test environment:
http://github.com/timcharper/spork
- Run specific tests with spec
- A file, e.g. ./script/spec spec/model/mymodel.rb
- A specific test at line 11, e.g. ./script/spec
spec/model/mymodel.rb:11
- Use zentest, autospec or watchr to run only tests in files that
changed automatically
- Commit your changes and then have a continuous integration
server run the tests, e.g. Cruise Control, Hudson, etc.
- Benchmark to find slow tests, so you can optimize or partition them:
- http://github.com/myronmarston/test_benchmarker

* Discussion: "How to deal with invalid HTML/XML/etc?"
* Use Nokigiri or Hpricot to parse and emit sanitized document, e.g.:
http://nokogiri.rubyforge.org/nokogiri/Nokogiri/XML.html
Nokogiri::XML::DocumentFragment.parse
* Use mechanize to interact with the remote service for you, as a
kind of programmable text-based browser:
http://github.com/tenderlove/mechanize
* Use the sanitize library: http://github.com/rgrove/sanitize/
* Abstract your HTML parser so you can easily switch between
implementations: http://github.com/sferik/multi_xml
* "Really simple JSON and XML parsing, ripped from Merb and
Rails": http://github.com/jnunemaker/crack
* Use a library that makes consuming RESTful services easier:
http://github.com/jnunemaker/httparty


* Discussion: Libraries to help with JSON?
* Abstract your JSON parser so you can easily switch between
implementations: http://github.com/intridea/multi_json/
* Turn json apis into jsonp apis through a heroku proxy:
http://github.com/maxogden/jsonpify

* Discussion: "What are lightweight test unit libraries?"
- Test::Unit
- Shoulda
- No framework, just do asserts:
http://debuggable.com/posts/unit-testing-with-node-js:4b647d40-34e4-435a-a880-3b04cbdd56cb

Reply all
Reply to author
Forward
0 new messages