Friday, March 18, 2011

MountainWest RubyConf 2011: Day 2

So, I am not doing as much coverage today as yesterday, but I will cover interesting tid bits here and there.

Just saw an interesting lightning talk about a new project on GitHub called trigger_happy that allows you to generate triggers from active record models, thus get all the benefits of triggers and the expressibility/db-independence of Ruby abstraction.

Another lightning talk was given on Ruby Mendicant University, which provides real world training for intermediate Ruby programmers.

In one very cool talk titled "Using Ruby with Xbox Kinect for fun and profit" by Nate Peel, the presenter showed us how to interface with the new XBOX Kinect technology using Ruby. He then concluded with a demo of it capturing his motion while waving at the audience. Not my cup of tea of programming, but I am sure a lot of developers find that interesting.

Next, Joe O'Brien from EdgeCase talks about Android Development With Ruby. One cool thing he showed is his own DSL for the views to avoid the annoying reliance on XML for views. Also, it was interesting how he relied on the typed version of Ruby, Mirah, to program the Android Java libraries since Mirah has a closer gap to Java given the typing.

Evan Light talks next about "Tiny Tools Tidy Tests", in which he mentions how he built coulda as a simpler Cucumber alternative because he did a lot of testing in his job yet really felt bogged down by Cucumber. He recommends developers write their own tools if they are not pleased with the ones they have, yet use them for the majority of the time in their job.

Afterward, I presented "Whatever Happened To Desktop Development with Ruby.". The presentation will be posted on the Confreaks website sometime in the near future. I will announce it when it happens.

Yahuda Katz is concluding the day with his keynote speech "Ruby: The Challenges Ahead". He is not pleased with Ruby developers sticking with the 80/20 rule without eventually (gradually?) going beyond it and solving the problem 100%. He thinks it discourages developers from taking Ruby seriously in comparison to languages like Java or C#. He emphasizes that protocols implemented in the standard Ruby library, such as RSS, may not have nice APIs, but are meant to be 100% solutions, so other gems can simply provide better APIs for them. There is no need to rewrite them. Often Ruby developers bite more than they could chew because they are not satisfied with a library, tackling a problem outside of their domain of expertise when they could have reused a reliable library but improved its APIs. He mentions how protocol libraries that do not change often are usually stable because they have a complete implementation, and thus are considered reliable. On the other hand, libraries that are more like frameworks (e.g. Rails) have to change often to express the latest needs. Yahuda gives examples of people's abuse of TheadLocal, Constant re-assignment, and inheritance instead of trying to solve problems the right way completely or rely on a library that does (albeit sometimes with an ugly API). He encourages developers to seek cooperation over NIH (not invented here), so maybe look for something out there first before rewriting things yourself. He also encourages pure Ruby over bindings for problem that are not too tough to rewrite in Ruby over C, such as YML parsing. The last thing he pointed out is encouraging streaming IO over blocking IO. He closed the presentation with emphasis on solving the 20 part of the 80/20, ending with "Let's Grow Up Together"

Thanks to everyone who helped with organizing this conference and thanks to all the presenters.

Thursday, March 17, 2011

Glimmer 0.1.3 Release

Just released a new version of Glimmer (0.1.3):
https://rubygems.org/gems/glimmer

New and noteworthy:
  • Made SWT the default DSL to avoid forcing developers to specify the DSL explicitly with the "dsl" method. Sample applications run successfully again as a result.
  • Revised SWT styling support to rely on Ruby symbols instead of Eclipse SWT's bit ORing via the SWT constant DSL as that better matches Ruby's conventions and avoids method name clashing.
  • Added swt_widget and swt_constant methods to String and Symbol to allow easy inflection of SWT Widgets and Constants via strings and symbols.

Before/After examples of the new SWT styling syntax:

table(SWT::BORDER) => table(:border)

text(SWT::PASSWORD | SWT::BORDER) => text(:password, :border)

layout_data GridData.new(SWT::FILL, SWT::FILL, true, true) =>
layout_data GridData.new(:fill.swt_constant, :fill.swt_constant, true, true)


Enjoy the release and stay tuned for the next one.

MountainWest RubyConf 2011: Day 1

Missed keynote by Zed Shaw (will watch on Video on ConFreaks), but I saw David Brady talk about "Monkey Patching your Brain". And yes, he hacked our brain well! The talk was mostly about how to work harder without overthinking and how to form efficient effortless habits fast via the power of strong emotions. Favorite brain hack: "I get the feeling that when there's a big elephant in the room, I gotta go poke it in the eye!"

Next, Bobbie Wilson talks about visualization of git data via Grit, Protovis, MongoDB, and Map/Reduce algorithms. Grit is a package that gives you Ruby object oriented APIs for Git data. Protovis visualizes data via Javascript. MongoDB was used to store raw data obtained from Git before going over it with Map/Reduce to visualize it. He showed us how many commits Ruby had since its Repo inception as well as a graph of how it increased in frequency over time.

Next up, Wayne Seguin talks about the Ruby Community, covering the benefits it offers such as open-source projects, opportunities, education & mentorship, social interaction & communication, personal growth, satisfaction & happiness, and relationships & friendships.

After lunch break, people are giving lightning talks. David Henner just talked about his Rails E-Commerce solution, which offers quite a few unique features over other solutions, such as double-checked accounting and optimized image upload. The project is called ror-e.

Next, someone talks about remote pairing via tmux, a terminal multiplexer.

Next up, a developer from PivotalLabs talked about how to make it easy for people to contribute to open source, which summarizes to writing tests first, ensuring rake works, integrating contributor changes often, and keeping contributors happy by making eager ones members of the project direct committers.

Next, a guy from Chef, talks about tmux, a terminal multiplexer that enables remote pair programming with features such as simultaneous coding and screen splitting.

Next, a guy talks about VimGolf, a tool that counts every keystroke you perform with VIM to test how efficient you are in using its shortcuts (LOVE THE IDEA!). This goes beyond the "Avoid using the mouse" advice into "Avoid using inefficient shortcuts"! It is in fact a great tool for motivating developers to learn the best shortcuts as it ranks people via different VimGolf games on the site.

Next up, Zed Shaw is talking about his book "Learn Python The Hard Way", in which he tries to get as many non-programmers as possible to get into programming. He does so as he believes that these people will bring their own very different perspective to the field and thus help improve it in unpredictable ways.

Next, a developer talks about the kidsruby.com website inspired by Hackety Hack that helps kids get started withi Ruby programming. They need help with contributors with regards to the editor and system installers.

Next, a fedora wearing developer talks about Dubious, a project that allows running Mirah projects (Mirah is a statically typed version of Ruby formerly known as Duby) on Google App Engine.

Next talk is about "why do gems break and what you can do and don't about it". Causes for problems are:
1. Not declaring dependencies: use a clean RVM gemset to reveal missing dependencies.
2. declaring invalid, stale, old, or difficult to find dependencies: before packaging make sure what you are using is valid all the way down
3. declaring yourself as a dependency (cyclic dependency? BAD): use yourself as your testing framework!
4. not declaring absolute or minimal and maximal versions of dependencies: at least declare the versions you tested with.
5. tests broken: declare test frameworks as dependencies, including version. Declare development dependencies. Set tests not to run from the root of the project.

Next, Wayne Seguin talks about EngineYard's community commitment.

Next, a developer talks about how to generate class diagrams ( in SVG) from a Rails code base.

Next, Mike Moore talkes about Project "M". (Minaswan?). He's talking about the older Matz initiative of "Be Nice. Ruby developers are Nice! Bring niceness to the Ruby Community!"

After a quick break, longer talks resumed, and Joshua Timberman talked about Chef Cookbook Design Pattern. He starts by explaining how Chef's model compares to MVC where node specifications are the models, configured nodes are the view, and the controller is the recipe in pure Ruby.

Next, Wesley Beary presented "Fog OR: How I Learned to Stop Worrying and Love the Cloud".
What's the cloud?
-On demand (pay for what you use)
-Flexible (add and remove resources in minutes)
-Repeatable (code, test, repeat)
-Resilient (build better systems with transient resources)
Why worry?
-Option overload
-Expertise required
-Tool variety
-Standards slow
Solution?
Fog

Next, Nick Quaranto talks about Redis and how to make Ruby applications run faster.

Had a quick break, and then Chris Wychoff presented "Refactoring Monolithic Rails Apps with SOA" starting with how these apps were born as simple humble apps and then grew to behemoth applications. Recommendation is to separate responsibilities, handle them asynchronously, and make incremental steps. Gotchas include overly decomposed services,

Next up, Brian Helmkamp presented on "Service Oriented Design in Practice", focusing on Service Oriented Design as opposed to Service Oriented Architecture (anyone remembers difference between software design and software architecture? bonus points for you). Benefits of SOD are isolation, robustness, scalability, agility, interoperability, and reuse.

A very anticipated talk is next, which is "Securing Your Rails App" by Jim Weirich and Matt Yoho from EdgeCase (I did a craftsmanship swap with them last year).
Summary:
-Trust nothing
-Stay up to date on security patches
-Always scope your finds with proper privileges
-Whitelist properties/data being set
-Do a security audit

And that's a wrap! Day 1 ends with a HackFest sponsored by EngineYard.

Stay tuned for tomorrow as I will be presenting on "Whatever happened to desktop development in Glimmer?".