mwrc: TourBus server load tester by David Brady

David Brady — TourBus

He can make your website 10x faster in a day’s work. Given two weeks, he can make it 100x faster.

Do you believe in refactoring? If you don’t believe he can do what he says he
can do, then you don’t believe in refactoring.

How do you optimize?

1. Measure
2. Find bottlenecks
3. Go up a level
4. Rearchitect, redesign to fix
5. Measure

TourBus helps you find the performance problems in web servers. It makes use of:

– WWW::Mechanize
– Threaded
– Unit Testing

He showed us an example. It’s easy to use.

I notice he uses Aquamacs (emacs for Mac), and sinatra

TourBus trips over itslef at 500 requests per second, since its written in
Ruby. They used the mySQL slow query analyzer, and it told them they needed
some indexes on some tables. The db CPU use dropped from 100% to 1%. Then the
app server was 90%-100%.

mwrc: Improving Usability of Rails Apps

Adam Dunford & Jason Edwards: Improving the Usability of Your Ruby on Rails Applications

Instead of trying to define “usability”, let’s talk about “user ability”.
Can a user accomplish their goal? Programmers and designers are not users.
“Use users to test usability” so you can verify that users can accomplish
their goal.

There are seven principles of usability.

1. Create structure. Organize content, prioritize content, group content, separate content, differentiate content. WordPress 2.5 has horrible admin organization. 2.7 restructured it. Content that’s similiar is together. Craigslist is the “gold standard” of structure. That doesn’t mean it’s usable, per se.

2. Use standards. Not web standards. Standards of what people are used to —
“follow conventions”.

3. Be predictable. You won’t know unless you test with users. Accomodate their
expectations. Predictability doesn’t mean consistency. Google apps are similar

4. Reduce barriers. See geni.com or tumblr.com or pict.com. pict.com doesn’t
even require you to create an account until _after_ you’ve started uploading
pictures. Provide for progressive enhancement. Your website should work for people that don’t have JavaScript enabled, but it can work better with it enabled.

5. Add affordance. Make it easy for users to learn how to use your
application. Work around your users limitations. Provide an “undo” capability.
See ning.com. You can’t miss what you need to click and fill-in. Phone number validation. Don’t make people put in their phone numbers as three separate fields.

6. Give feedback. Respond to users in a way that is clear and obvious to users. See laterthis.com sign up when you fail to enter a field. Make sure your users feel like they are in control. Rather than a 404 page error, provide a phone number for support. It will reduce stress.

7. Simplify. We don’t want to overwhelm users. SonicMood is an example of a
bad app, and it’s supposed to help users create users to relax. “Choices =
Headaches” — Joel Splosky.

Reduce. Replace. Hide (info until its needed). Remove. Remove the obvious, and
add the meaningful.

Final note: Read “User Interface Design for Programmers” by Joel Splosky

mwrc: Adhearsion by Jay Phillips

Jay Phillips: Adhearsion

Adhearsion is a modern telephony framework leveraging Ruby.

[http://adhearsion.com](http://adhearsion.com)

You could write code to play back the weather (text-to-speech).
One of his first apps was to write an app that let him call into his XBox
Media Center with a telephone, and press phone keys to move the cursor around on the screen.

Just recently, Skype allowed Asterik apps to tie into Skype to receive Skype
phone calls.

He showed how to build an app that lets you play a “Simon” memory game to see
how well you can remember sequences of numbers.

sandbox {
play “Hello world”
}

You can use ActiveRecord into your Adhearsion application. So you can extend a
rails app with telephony service.

Q: Can you make outbound calls? Yes

Q: Can you play pre-recorded voice clips? Yes

Q: Can you record voice from a phone call, then play it back? Yes

Q: What’s the support for things besides Asterik? Like Freeswitch. There isn’t any. He started with Freeswitch, then figured out that no one was using Freeswitch, so he switched to Asterik.

Q: Are there scaleability issues? Asterik is the limiting factor. It can get up to 150 simultaneous calls on a single box. You could have multiple asterik boxes, and one adhearsion server.

Q: Can Asterik run in the cloud (EC2)? People do it. There are some issues. Conference rooms don’t work so well.

mwrc: Building Mobile Apps with Ruby by Adam Blum

Adam Blum: Rhodes — The Open Source Ruby Framework for Building Mobile Applications

This was one of the most interesting talks for me.

[Rhodes](http://www.github.com/rhomobile) lets you build “native” applications for all mobile phones.

The exciting new phones like iPhones don’t have a footprint in big
organizations. So what platform do you target for your mobile app? Rhodes.

Build the app quickly in HTML and Ruby. It’s a mobile optimized ruby
implementation. They port the ruby interpreter to Symbian, Blackberry, iPhone,
and Android, etc.

[http://www.github.com/rhomobile](http://www.github.com/rhomobile)

It’s a micro framework, and has RhoSync to sync the data with the remote
service. Wikipedia is implementing their mobile version with Rhodes.

Rhom is a tiny ORM. They have a mini web server that runs so that you can
write your UI in HTML + JavaScript. That way, they leverage the Web Browser
that exists on each platform. You as a developer get to assume that your data
is local at all times. The framework handles synchronizing the data for you —
if you wish — you can do your own network programming if you want.

Rhomobile provides sample apps:

* SugarCRM
* Siebel Field Services

Third-party Apps:

* TrailGuide
* Wikipedia
* Mobile Lighthouse (bug tracker)

How do you build your Rhodes App?

* Create a sync source so you can get your data.
* Generate scaffolding for your app.
* Develop your app.
* Build, test, deploy

Let’s do it:

$ gem install rhogen
$ rhogen # displays options
$ rhogen app
$ rhogen model Contact “” 1 name,phone

Then you generate your app for iPhone, and/or Symbian, etc.

They use stylesheets to make your app look “native” on the different
platforms. It’s in great shape for iPhone, Blackberry. The UI doesn’t look as
good on Android. They need someone to do the stylesheet work.

Feb release:

* GPS
* PIM
* Symbian

Future 1.0 release planned for March 24th:

* Android
* Camera support, photo sync to backend
* SMS

Future things:

* Audio
* Video
* Accelerometer
* Proximity detection (to enable voice when it gets close enough to the face)
— will happen faster if developers contribute the code

RhoHub is hosted app development environment. They prvoide user downloading
from a URL, a sync server. First 100 registrants get a private beta:
http://rhohub.com — they’re looking for feedback from developers.

They believe web programming is more productive than the traditional way of
developing native mobile apps.

Q: Can you do your own custom styling?

A: Absolutely, per app. You can even contribute styling libraries back to them for everyone to use.

Q: How is the ruby runtime stripped down?

A: They’re developing a framework, and so that determines what they do and
don’t include in the runtime. They will get around to publishing what the
interpreter has, at some point. They took out ‘eval’, because the Apple App
Store doesn’t allow apps to have dynamic, downloadable code.

Q: What kind of performance? Do people feel like it’s slow?

A: Once it starts up, it’s very fast. Start up time is 5 seconds on iPhone. 7
sec startup on Windows Mobile and Symbian. They’re still aiming at getting it
down to 5 seconds. Always less than 3 MB for each app. Google noticed that
they’re using sqlite for a “property bag”, so they’re looking at switching to
something more lightweight. On iPhone, sqlite comes with the OS.

Q: Any apps in the app store? Do you anticipate problems?

A: No, No. But wikipedia’s app is very close. Their name is riding on it, so
they want to test, test, test before they release.

It sounds like they’ve targeted iPhone primarily, and the other platforms are
secondary.

mwrc: Herding Tigers by Daniel Philpott

Daniel Philpott: Herding Tigers — Software Development and the Art of War

He’s been a manager for a long time. He’s built systems for the DOD, worked
for CitiBank, ticketmaster, cisco, etc. Now he’s working for AT&T interactive,
and they’re putting up with him.

Why is software development so difficult? Because people don’t admit the
truth — they’re afraid — people don’t know what the end result will be. Why
not? Change.

A tiger team is one answer to the problem. He manages them very little. They
are a team. QA is part of the team. Members show leadership, and self-improve.
Almost no meetings. QA people and Test automation from the beginning. Shared
psychology and intelligence in the group. Bold. Winning. Excellence — members
push each others. Not afraid of “the dark” — of not knowing where they’re
headed when they get started. They know clients don’t know what they want.

Who’s on a tiger team? All the staff needed to deliver a product. Leader, 4
devs, one AQA, doc, etc.

He doesn’t demand that tiger team members pair program. They can pair, swarm,
or whatever they want — “shared intelligence”.

Business is battle. The battlefield is the marketplace, and is typically
divided into attrition and maneuvering. GM, Home Depot are experiencing
attrition warfare, and it’s not useless. Maneuver warfare — eBay, mySpace —
people didn’t see them coming.

General Sherman lost 1% of his men in the Civil War. He decided he didn’t need
to fight the confederate army to stop slavery. Instead, he started burning
down plantations, and the confederates came running home. He saved lives.
Daniel grew up in the south and feels bad that he grew up hating Sherman.

General Patton decided that instead of fighting the Germans in Normandy, he’d go
around them, up the Rhine, and attack them from behind.

Speed adds job satisfaction, excitement. Time flies when you’re having fun.
When you’re having fun, time flies. Speed builds credibility.

A cow is twice the size of a tiger, so which of the two wins? The one with
speed. Are you using agile terms to describe a non-agile process? It’s the
difference between cows and tigers: A cow in tiger’s clothing.

Leadership makes or breaks a tiger team. Faith in your team is critical. Gotta
love your battle buddies. Need to hope. If you have no hope, you might as well
find a new job.

Success belongs to the team. Fear belongs to the leader. No finger pointing —
the buck stops here.

“I have fear, but I do it anyway”.

Be a listener and a learner. He, as a leader, asks his teams what he can do to
make their jobs better. He protects his team from outside stupid influences.

Discussed U.S. Marines management techniques. Reward failure, which seems
counter intuitive — which means he thanks people for their efforts — not
that he gives gift certificates, but he will give them a drink. No failure
means no progress. Glorify the grunts — your programmers and QA people are
extremely important. Be polite and professional — no poison in the team.

Agile isn’t a methodology, it’s a mindset. And it’s inevitable.

Don’t get too attached to your code, because we’re going to rip it out.

Recommends a book called “warfighting” from the marines. You can buy it on
Amazon.

mwrc: Jeremy McAnally: Jive Talkin’: DSL Design and Construction

Jeremy McAnally: Jive Talkin’: DSL Design and Construction

He started by talking about how China has a ton of language dialects. And the
island [Papua New Guinea](http://en.wikipedia.org/wiki/Papua_New_Guinea) has an extremely high language density. North America has a relatively low number of language dialects.

Ruby Modules that have Domain Specific Languages:

* Cucumber
* Ruleby
* Configuration
* Puppet

Internal

* Rails Templates – very concise. some people would like more bubbly language
* RSpec – the model for Ruby DSLs these days
* Permissionable

mwrc: Machine Learning by David L. Richards

Machine Learning by David L. Richards

– TenaciousG – a graphs tool with persistence.
– Sirb – statistics and erb. A bit of a hack — it monkey patches other classes. It’s kind of cool
– TeguGears – Tegu is a never finished gem for machine learning, all in one
place. TeguGears is meant to be its core functionality.

statisticus – an immature “R” type stats package for Ruby. Don’t use it — it will break — if you can even get it to run. He’s still cleaning it up, and feels that it has potential.
rbtree

A lot of machine learning uses graphs.

Approaches

– Ruberl
– Rocaml
– Blurred Weasel

Functional style programming has three primary advantages:

– Composable
– Concurrent
– Distributed
– Etc.

Fibers. They’re a “new to Ruby” idea — coroutines. They start “paused” and
they are “resumed”.

– PipelineElement – stolen from Pragmatic Dave (Thomas).
– [NeverBlock](http://espace.com.eg/neverblock) is an I/O oriented library. Works with Fibers.

mwrc: Test-driving GUIs by Brian Marick

Brian Marick – Test-driving GUIs (with RubyCocoa). Brian is a good, enjoyable presenter.

Objective-C is more like Ruby than it is like Java.

He tests apps written in Objective-C using Ruby. This works fairly well, with
an occasional necessity to explicitly convert from a Ruby boolean to an Obj-C
boolean type.

The danger of using mock objects is that they don’t behave like the real world
objects that they mock. Sometimes, he has the test verify the expected result,
but runs the interaction with the application manually. He’s the “mechanical
turk”.

mwrc: FFI by Jeremy Hinegardner

FFI (Foreign Function Invocation): Making Cross Engine Extensions
by Jeremy Hinegardner

He Loves Ruby and C. This talk is about Ruby extension development.

FFI is a way for something in one language to call functions in another
language. It’s great because FFI works between JRuby and libsomething.so, or
between Matz Ruby and libsomething.so, etc. FFI reduces the amount of code you
have to write to bridge between Ruby and C. I wonder how it compares with
Java’s Java Native Access. Are they complimentary (for JRuby)?

There’s an FFI generator that takes C header files and generates FFI code for you.

FFI saves developer time. It’s not as fast as a traditional C extension. When
you need to support JRuby or Rubiniess, then it saves even more developer
time.

How many gems are there that use or depend on FFI? Four. ffi-ncurses,
ffi-swig-generator, tidy_ffi, ffi-zlib. There’s another one for Open GL.

How many gems are there with extensions? 346

mwrc: Puppet by Andrew Shafer

Puppet
by Andrew Shafer, works for Reductive Labs

Code, Tribes, Dawn of Time, Clouds, evolution, opportunity, and triumph

It’s difficult to automate the download ruby gems because the URL paths are
not friendly. Isn’t it interesting that RubyForge.org uses PHP to run?

Idempotence: an important property to have

He likes Debian’s setup of apache. It’s easier to work with for setting up
multiple sites than the way most Linux distributions do it.

He showed several examples of using Puppet to install packages from gem
repositories and packages.

How do you test your puppet deployment code? The best he’s come up with is to
use RSpec to make sure a machine is in the correct configuration, and run
continuous integration tests on it with your puppet code.

The Cloud. Anyone can bring up a server for 10 cents per hour, and when you’re
done, you turn it off.

Conversation with the audience:

Things get complicated when you’re using puppet to manage deployment to
different distributions or even platforms. E.g. Debian has two packages for
something that is a single package on another. The only way to make sure your
puppet deployment works is to try it and make sure the machine is in the
correct state afterward.

Does puppet help you to remove packages? Some providers purge unrequested
packages. It’s hard to back out a messed up install, and is easier to start
over with a clean slate.