OSCON: Opening Keynotes

Tonight the opening keynotes for OSCON were held. After the Google/O’Reilly Open Source Awards, Larry Wall gave his annual State of the Onion in which he talked about his other ‘child’, Perl, and how she’s growing into adulthood (Perl will be 20 years old this year). After Larry, the White Camel Awards were given out.

Next up was Kathy Sierra – usually Paul Graham speaks on opening night but this year they decided to switch it up. She gave a talk entitled Cognitive Seduction which covered her usual Passionate Users content (the presentation was quite good, I can’t really do it justice here).

Finally, Damian Conway read from his latest work, The DaVinci Codebase. It was a very funny spoof on The DaVinci Code regarding the threat of Opus Arai (RIAA). The video he played at the end is linked below.

OSCON: Rock-solid Web Development: Testing Web Apps

John Paul Ashenfelter gave an interesting tutorial called Rock-solid Web Development: Testing Web Apps. The slides are available here. I’d heard about Selenium before this presentation, but never took the time to investigate it – after seeing it used here I’ve already installed it and set it up to test my Rails app. John Paul started out with an overview of software testing, the hierarchy of testing:

  • None
  • Ad Hoc
  • Unit Testing
  • Throwing Bodies at it
  • Bodies with a Test Plan
  • Automated Test Plan

Then he went into the different types of testing:

  • Low-level Code (Unit testing done by developers)
  • App-level (Done by developers and QA)
  • System level (Load, Performance, Stress)
  • User level (Usability/User acceptance)
  • The rest (security, regression, conformance, failover)

His important points were that your users do not do testing and that you should always be testing. The next part of the tutorial covered Selenium. He showed how to run Selenium (the barriers to entry are extremely low – just HTML and JavaScript) and then how to record your own tests using the Selenium IDE. Once he recorded a simple test, which is just an HTML table with three columns, we saw how it could be easily edited and run. Selenium Remote Control was brought-up next and code examples in Java, Python and Ruby were shown – here’s the Ruby example:

  def testHome
puts selenium.open "http://oscon/"
puts selenium.clickAndWait "link=Constitution"
puts selenium.assertTitle "Cat Club - Constitution"
end

The third part of the tutorial covered Automation and Continuous Integration which used Ant to run Selenium. Before Selenium was launched by Ant, dbUnit was used to get the database into a known state prior to the Selenium tests being run. Finally, the Grinder load testing framework was discussed. An alternative, OpenSTA was also briefly mentioned – but John Paul focused on Grinder 3. He showed how you can record a script using the TCPProxy portion of Grinder and then starting and agent and running from the console which hit his server with 100 users (5 processes with 20 threads each). His take home lessions were:

  1. Testing gives you confidence in your code and your application
  2. Users are NOT your testers
  3. Good programmers always write tests
  4. Selenium will save you time
  5. If you repeat it, automate it
  6. Load testing is pretty complicated

OSCON: Ajax on Rails

This morning I attended Stuart Halloway’s Ajax on Rails tutorial. The slides from his presentation are available here, here and here. This was the first time I’d attended one of Stuart’s presentations and I was impressed by his relaxed presentation style. He also seems to be a genuinely nice fellow – during the break, I spoke briefly with him to see if he would be interested in speaking about Streamlined to the NoVA RUG. Stuart started off by asking us what the really successful (and big) companies of the past few years have in common – the answer was their use of open source. Yahoo!, Google, Amazon, etc didn’t go out and purchase an enterprise solution from Microsoft or Sun, they built it themselves using freely available open source tools. So he positioned Ruby on Rails and Ajax as enablers to help you build the next great company. After a brief introduction to Prototype, Stuart went into several examples using Ajax with Rails: Ajax Search, Degradable Ajax, Autocomplete, and Drag and Drop. After that he went into RJS discussing RJS templates, inline RJS, detecting AJAX on the server-side, element and collection proxies, and testing RJS using ARTS. He also gave a brief demo of Streamlined, which he’ll expand upon at his session tomorrow. Finally, he wrapped up with a look at Prototype and it’s spin on JavaScript – making it friendly for Ruby developers. He’ll cover more on Prototype in his session tomorrow.

OSCON: Asterisk Inside and Out

This afternoon I attended Asterisk Inside and Out by Brian Capouch. His presentation is available here while all of the Asterisk configuration files can be obtained here. The tutorial was based on his forthcoming book, Asterisk Inside and Out: Do-it-yourself Open Source Telephony, from Addison-Wesley.

Following the slides, Brian performed several demos which displayed the power of Asterisk. He started with a simple ‘Hello World’ example where the caller was played a short message. Next he demonstrated the server calling you back (and playing a pre-recorded message). Then he called an inside extension, an outside of the system (on to the PSTN via the FXO), and called an inside extension from outside (via the PSTN and FXO). After that he showed a ‘road warrior’ who ran a local instance of Asterisk on their laptop which registered with the home office and then called the office number of the ‘road warrior’ and the call was automatically redirected to the laptop. Following that, he configured the laptop as a remote office and dialed an extension at the ‘remote office’ from the ‘local office’, which was properly routed through the system. Finally, he demonstrated an intra-office transfer of an incoming POTS call.

Asterisk appears to be an amazing application and there is quite a bit more that I need to learn about it. It seems like it would be a fun project to setup at home (if my wife will agree to it – which is doubtful).

OSCON: JavaScript Boot Camp

This morning I attended Amy Hoy’s JavaScript Boot Camp tutorial. The slides should be available online shortly at Amy’s website – I’ll update this post once she publishes them. She provided a good overview of JavaScript as a language, some of the issues with the various implementations, how to debug it and some of the libraries available for use. Updated: The slides are located here. Unfortunately, the material was a little too introductory for me, I thought she’d spend less time on the JavaScript basics and more on the intermediate/advanced techniques of the language and libraries. I guess I misunderstood what I had signed-up for. Anyway, she started out with the history of the JavaScript language (briefly mentioning the LiveScript name … which Rich Kilmer quizzed me on at my RJS talk) and the ECMAScript process which spawned several different releases of JavaScript – basically most browsers implement JavaScript 1.5 with the exception of Firefox which gives us JavaScript 1.6. At this point we lost power to everything but the projector, but Amy took it in stride and continued her presentation. She went through the syntax of the JavaScript language, keywords, etc. After getting through the language quirks, she discussed how to use FireBug and the JavaScript shell to test and debug your JavaScript code. Some of the libraries which were mentioned include: JSON, MochiKit, Script.aculo.us, moo.fx, Behavior, and Prototype. When asked for her favorite JavaScript related sites she gave her top three: