Canada on Rails: Dave Astels

Dave Astels on Behaviour Driven Development.. the step after TDD

Dave Astels’ Blog

Looks interesting now if only to see what a wookie looks like in real life

Act I

  • Not about creating a bunch of test, but doing design via tests.
  • Sapir-Wharf: language is important. The language you use effects and shapes your thoughts
  • Think Different: yes I do have a powerbook.
  • Not TDD but Behaviour DD.
  • Danial North coined the term.
  • classic mistake in TDD: do something look at state
  • never write a private method.
  • You should not be looking at the internal state of the object.

(state with a big red x thru it)

Act II

  • rSpec (also in gems)
  • a way to describe specs in code, then test against those specs
  • rather than assert_equal(a, b) do actual.should.equal expected
  • object.question? should be vocalized as “question, eh?”

The talk is bogging down into him showing every possible combo of this .should biz enabled by rSpec. This is great lesson about what I don’t think makes a good conf. talk

  • Mocking API
  • Mocks are auto verified, stubs are not

Act III

  • Code, Questions and Discussion

DSL – Domain-Specific Language

  • one more thing: shows up some code he hacked on the plane
#canada-on-rails

Canada on Rails: Tooling Rails

Tooling Rails

I have RadRails on my system, it’s pretty nice. Used Eclipse at my last job as my primary Java IDE, so maybe I’m brain damaged

  • Dev include a lot of Mnt. Dew
  • J2EE require tools to keep up
  • Rails does not, but can be made better with tools
  • all comes back to control, with J2EE you give up control, you no longer can figure out what’s going on.
  • RadRails is a joke on RAD systems that take away code, 95% code gen leads to 5% comprehension of system
  • Less code is not no code
  • Put the dev in the driver seat, but give him all the buttons he need close on the dashboard
  • Then he gave a demo
  • Lot’s of interest from the commercial world, just don’t get it about open source (RadRails is CPL).
#canada-on-rails

Canada on Rails: Joe O'Brian

Sorry fighting with apache during this talk so not quite as good notes as the last talk

Joe O’Brian on SOA

  • clear your mind
  • SOA is a pattern
  • Rails not going to hide HTTP/HTML. Understand the underlying stuff

better than ASP/java guys.

  • Let’s not rebuild everything (working with legacy stuff)
  • working with legacy stuff
  • Rails is agile (see picture)
  • able to respond to change
  • Well defined interface
  • sometimes must use SOAP.
  • idea of magically discovering service. Forget that.
  • must be context free.
  • XML is not evil.

I don’t know what the heck this guy was talking about except maybe “SOA is this idea you can use”

#canada-on-rails

Canada on Rails: Opening keynote: David

Watching David Heinemeier Hansson
give the keynotes at .ca on rails.

My notes in italics

  • “It’s early” (it’s 11:15 his time).
  • Nothing as easy as GEMs, even for dynamic languages like Python :(.
  • Book explosion: 16 new rails books this year. Last year there were only 4 on ruby at all.
  • Mainstream journals have picked up Rails (e.g. eWeek). Quite a few mentions on /.
  • IBM writer doing one article on something, then an article on Rails, one article on something, then Rails agian. Good pattern.
  • Awards: O’Riely, then RadRail’s award. JOLT award
  • All this indicative on an ecosystem. Critical mass.
  • Screenfeld of people that have committed a patch.
  • Has been accused of being arrogant, he’s cool with that. He had a “exaggerated sense of one’s own importance or abilities” about Rails. 2 years ago Rails better than other solution in market. 50 revisions of David’s wikipedia page removing and readding “David is widely considered to be extremely arrogant.”
  • “Mostly doing this for me”. So he doesn’t have an problem with saying Fuck You
  • Rails is saying FU to a lot of things other solutions want to do.
  • FU to having a smart db. FU to everything should configurable. Way too much objectivity, not enough subjectivity.
  • Rails has lots of opinions on how to do things. (_He saying sell the stack as a product rather than a wild open solution_)
  • Not going to OpenACS or Zope. Represent a mindset that dev should be painful and avoided at all cost. Thus they use components
  • I’m hungry no breakfest, maybe sushi for lunch
  • Don’t like the results of putting components together.
  • Rails == what most people want most of the time.
  • Todo list on 3 sites, but each is different in subtle ways. Rather than making a TODO component and ignore the diffs, abstract on a lower level: acts_as_list.
  • “WS-(deathstar)”: “I can about little things, like not going insane”
  • Care about ourselves, care about small teams doing big things, not enterprise happy (Yeah! (said like a 5 year old)).
  • No vender, DIY.
  • WHERE ARE WE ACTUALLY GOING: Who knows?
  • It’s all about abstractions. Not about a roadmap. All the interesting features in 1.1 no idea he’d ever do.
  • Probably not what some of you wanted to hear, so (shows roadmap of 1.1.x – bugfix, 1.2.0, then 2.0.0)
  • Deprecation: 2.0 is where we settle the score. Get rid of the baggage. 1.2.0 will put warnings in the log file.
  • If your app is working fine let it sit there.
  • Rails about infrastruction, not about biz logic.
  • Things going away (really becoming a plugin):
    • Components (use plugins)
    • JavaScript Macros
    • Pagination (not everyone wants the same pagination)
    • Rich has and belongs to many (use Join Models in 1.1)
    • Action Web Service
  • Plugin: saying no to ideas without really saying no. Do not burden core. Eariler he talk about features in Rails that they get lots of bug reports on but none of core team use or care about.
  • Do more of:
    • use HTTP features, like caching. How do I know when I want to expire the cache. acts_as_timestamp
    • REST
      • Google Web Accelerator guys morons. Designing for world that doesn’t exists.
      • make a link that does a POST. Fix HTML problems (_Wish they could fix bloody HTTP auth_).
      • exposing REST api. Need a single controller map two resources “/articles/” and then “/article/1”. Something committed last night.
      • entities (”/article/1”) can be worked on via verbs
      • _If you are interested in this go read this article on REST_
      • Making the rest of Rails see everything as a REST-style request, and making browser base resquest look like REST to the framework.
      • Optional. If you follow convention you get a lot of stuff for free.
      • In SVN
  • One more thing. Campfire scales because bits are written in C.
  • Thus Armageddon, Push with AJAX. Show demo. Control browser from command line. Turned h1 green.
  • Updated DB, and change propagated to another browser window.
  • Uses reusable 1×1 flash to open a socket.to push RJS (_???_) down. Don’t have to write a line of Flash.
  • I need a mac to use SubEthaEdit

Q&A:

  • what’s diff between components and plugins? Size and if includes views and …, permission system is a component, not a plugin… too big. People spend too long on getting plugins up and running when they could write it themselves quicker. People coming to rails with battle scars of what Software Dev used to be.

Canada on Rails Campfire Room

Canada on Rails Flickr Pool

#canada-on-rails

So... this is Canada

So…. banks suck. I arrive here late at night and misremember my pin, and they lock out my card. That feels good. Call up my bank and they are closed. Fortunately a call to Laura sorts out something that works. 40 Canadian pesos out of the ATM and I can get to the hotel.

Vancouver is this dark black hole. I’m sure this has nothing to do with the fact it’s night time. I’m sure it is always like this… dark. Lights on the edge of blackness. I fully expect to find a black hole out there in the morning.

Get off the airplane and someone behind me starts singing “Blame Canada”.

So, this thought went thru my head: Python = Snake, speaking snake is Parseltongue, Ruby = Red, Red = Gryphindor’s color, Harry Potter wears glasses, I wear glases, I also speak python and hang out with the Ruby guys…. so I’m the Harry F-ing Potter of Rosetta Stone?

Tomorrow I join the Royal Canadien Kilted Yaksmen or see David Heinemeier Hansson, one of the two, it’s becoming fuzzy.