Tag Archives: eRubyCon

eRubycon 2009 Day 3

Putting the “FUN” back in functional programming (or at least taking the “FU” out of it)

Randall Thomas - Erubycon 2009 - Day 3Randall Thomas kicked off the morning with a talk on Functional Programming. I have seen a number of talks on functional programming but was really looking forward to Randall’s take on it as he’s not only smart but he’s really entertaining.

The basis for functional programming was that there were a group of guys that were trying to figure out how to mathematically prove that an application was correct. This had strong basis in lambda calculus. The interesting idea here is that since the program can be mathematically proven, you can do things in a almost any order and it will still work. This means that you can

This is a big deal with systems that deal with concurrency. The reality is that any web application has to deal with concurrency. 3D video games deal with concurrency. Distributed computing, cloud computing and many of the things that we are doing on a daily basis have to deal with concurrency.

FU(Thinking) is when you start thinking functionally and solve a given problem in different way than you would have in the OO world.

Recursion is an example of this. Everyone has had to written and messed up a recursive function. The example that he used was calculating a Fibonacci sequence. In straight Ruby, the demonstration was 10-15 lines of code with a while loop, counters that were incremented and decremented and so on. The functional version of that was 4 lines with no looping,

I loved his quote “Amateurs copy, professionals steal” as he put up a demo that he borrowed from someone.

Honestly, he lost me a little on the deltas between procs and lamdas in Ruby.

He brought up the topic of Monads. When he asked the crowd who understood Monads and Jim Weirich didn’t raise his hand, I knew that we were in trouble. Then Randall admitted that he didn’t fully get Monads either. At that point, I knew that I wouldn’t get it probably ever. But he went on to say that mostly people talk about Monads in context of the obfuscated code contests and the like.

List processing is at the core of the things that we do on a day to day basis. There are three things that we do to lists every day.

  • Transform everything
  • Extract everything
  • Combining (everything or something)

Functional programming is really good at list processing.

“iteration is the life blood of ruby – and now a word from some bad ass functional code.”

#Ruby magic – f(x) style
(1..10).reject{ |x| 0 == x%2 }.map.join(‘,’)

So what does that do? It prints out all of the odd numbers from 1 to 10. Notice that there’s no initialization, no main and so on. This is at the core of why people love Ruby. It’s an extremely expressive language.

I was partially nervous that this talk was going to be a pitch for a “Functional” language such as Haskell, Scala, F# or Clojure. But it wasn’t. It was explaining functional programming and help us bend our head around thinking like a functional programmer but accomplish what we need to do *most* of the time in Ruby.

Modeling Workflow Concepts in Ruby or (almost) Everything I Needed to Know about Workflow I learned from Schoolhouse Rock.

David Bock - Erubycon 2009 - Day 3David Bock is a workflow consultant. He’s a great speaker and just a fun guy to hang out with.

State-Based verses Process-Based workflows is one of the core concerns in workflow camps.

State-based workflow – this is the thing that reminded David of Schoolhouse Rock. He was thinking about the example of getting a bill passed (http://www.schoolhouserock.tv/Bill.html). There are a lot of different states that a specific bill can be in at any given time. But how things progress from one state to another is the interesting bits. The states are just the points that you would tell your boss if he asked you how things are going. It’s been “Submitted”, it’s “In progress”, it’s “On order”, it’s “Completed”.

To implement a State based workflow, you can do it easily in Rails. David is also working on a project called “Stone Path

Process-based workflow flips things on it’s head compared to the state based workflow. Or as David said, Process based workflow says that Schoolhouse Rocks was wrong. The state is not what’s an issue, what matters is who does it and how it’s done. This deals with what things can be done in parallel and more. These are things that state based models don’t deal with. There’s a fair amount more handholding and strictness to a process-based workflow engine as it really deals with the “How” of what you are doing, not just the end results.

There’s a project that deals with it well called Ruote.

If you users are novices, you need to choose process-based workflow. This will give them a lot more handholding and rules that they will have to follow.

If you users are experts, you need to choose the state based work flow. This will give them the freedom to skip around, push the boundaries, take shortcuts and anything it takes to get from one state to the next. This can be a good and a bad thing.

“Workflow” is not a tool, it’s a bunch of domain concepts that you can apply and implement yourself.

Playing Nice With Others

Jeremy Hinegardner - Erubycon 2009 - Day 3Jeremy Hinegardner did this talk about playing nice with other languages and data stores and the like. He talked about the idea that there are three types of persistence that are out there. None, Snapshot and Lifetime. There are times that we need one verses the other

Then he talked about a number of different tools that accomplish various bits along the path there.

Memcache – This is a memory based object caching scheme that is used heavily in a number of different languages including Ruby, Python and PHP.

Tokyo Cabinet – This is a set of libraries that cover a fair amount of ground. They can fit in either the Zero or Lifetime persistence.

Redis – “Redis is a key-value database. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists and sets with atomic operations to push/pop elements.” – from the Redis home page.

Beanstalk – This is fast, distributed, in-memory work-queue service.

ZeroMQ – This is a memory based messaging system.

The most interesting part of the presentation to me was when Jeremy started showing how understanding what your persistence needs were and how that helped you make your decisions on which of the frameworks to pull down. For example, if you need
Lifetime persistence, you should look at Tokyo Cabinet and so on.

Building Native Mobile Apps in Rhode

Adam Blum - Erubycon 2009 - Day 3The last talk of eRubycon was done by Adam Blum on writing mobile applications. The Rhodes framework is an application framework that all allows you to build applications in HTML and Ruby and deploy that application to iPhone, Windows Mobile, BlackBerry, Android and Symbian.

Their tag line is “The Open Mobile Framework”.

The architecture is that they built a small web server and Ruby implementation for each of the platforms. The framework actually loads up the HTML/CSS from the small web server and runs it in the local device’s browser control. I asked him if they ship a browser control or not and he said that they haven’t had to. Specifically he talked about the fact that Blackberry is actually the hardest to work with. They were surprised by the Windows Mobile browser. In their experience, as a browser is not fantastic compared to Webkit based browsers but as a browser control it’s actually very light and works well.

They have a public beta of RhoHub which is a deployment as a service for mobile.

eRubycon 2009 Day 2

Leadership 101

Jim Holmes - Erubycon 2009 - Day 2Jim Holmes kicked off day two with a talk called Leadership 101. This is an amazing talk. Jim, as humble as he tries to be about it, is an amazing leader.

He has posted his slides at http://is.gd/2avEy.

He started off the talk with a story about World War 1 and a story about trench warfare. I knew but it didn’t really hit home that the phrase “Over the top” started in trench warfare. In trench warfare, the troops dig in and build trenches that they basically live in except for when they are on the assault. The phrase “Over the top” referred to leaving that safety and crossing no man’s land, the area between the two armies where you were in the direct line of fire, and going to attack the enemy. This was not a safe thing to ask people to do. But the “brass”, was not on the ground in the trenches. They were miles and miles away in relative safety. In 1912 in France, there was a huge miss that was caused by this separation. They missed the fact that it had been raining for weeks and that the trenches had flooded, the river had flooded, the fields were swamps and there was no way to move quickly. It was suicide to go over the top. But they didn’t know that so they kept sending people over the top and ended up loosing 500,000 men.

The next thing that he talked about is that we, as technologists, need to grow. We are passionate about what we do and take pride in the technology that we implement. But we need to understand business value and how that relates to what we are doing. When we talk to the business owners, we need to express ourselves in terms that they understand. “The business does care, they just speak a different language than we do”.

The next step is to mentor. Take on mentors. Mentor others. But as you are entering these mentoring relationships, you have to be an active participant in the relationship. As one of his early mentors said “You are not a teacup and I am not a teapot and I can’t just poor information into you. You have to be an active participant in this relationship”. Mentoring is a two way street.

Another thing that he talked about is the idea of smart mistakes verses dumb mistakes. If you make a smart mistake, there shouldn’t be any negative consequences for smart mistakes. These are ones where you do the due diligence and make a decision after some thought and it turns out to be the wrong decision. That’s fine. The dumb mistakes are the ones where you make rash decisions without understanding or thinking about the consequences of the decision. These should have consequences.

In order to be a great leader, you have to have the respect of your team, peers, clients and more. But how do you get that respect? “You don’t get respect unless you give respect. You can’t demand respect back. You earn that respect”.

“It’s not just enough for you to be successful. Those around you, below you and behind you have to be successful too. Leading from the rear has never been successful.”

Jim did an amazing talk and really opened my eyes in a number of ways.

Your Rails are Rusty

Adam McCrea - Erubycon 2009 - Day 2Adam McCrea from EdgeCase did a talk next about doing Rails development and productivity. He started off the session talking about a project recently where they got started and it took them several iterations to get to a productive state.

The basic problem that he started off is that when he started Rails development, he accepted all of the defaults and was very successful. But over time he kept changing this default or that default and trying new plug ins. Each time he tried a new plugin, he added possible complexity and startup time. He advocates “minimizing decisions – automating as much as possible”. This is the core thesis of the talk. I whole heartedly agree.

“If you’re learning too many new things at once on a project, something has to go if you hope for success” – Joe Fiorini on  Twitter

Adam laid out a number of really good guidelines in his talk.

“Your needs may be more complicated than this, but don’t assume that they are”.

“If you don’t understand the source” of a given plugin, then you should run away. This is a great tip. You can blackbox Rails to a degree but it’s really hard to do that with a given plugin.

One of the things that I really liked that he talks about is that you should pick a default UI for all of your projects that you don’t have a designer to work with on.

Be Careful, Your Java is Showing

Joe O'Brien - Erubycon 2009 - Day 2Joe O’Brien did a great talk next on developing Ruby as Ruby, not as Java, C#, C++ or whatever language you did last in Ruby syntax. There are some core changes in the mindset that you have to put yourself in to be truly successful.

Unfortunately, I was panicking over my upcoming talk a little so didn’t get to listen to him in great detail.

If someone wants to email me or put a summation in the comments section, I’d happily put it inline here and give them credit.

Enterprise Java

Charles Nutter - Erubycon 2009 - Day 2Charles Nutter was the talk right before me. As I was still building some of the demos and getting ready for my talk, I was not able to really get a lot of notes down.

JRuby is in version 1.3. They are rolling along pretty quickly. They are fully 1.8.6 compliant and are most of the way to 1.9. One interesting thing that he pointed out is that you can have 1.8.6 and 1.9 in a single binary.

He showed GlassFish running on JRuby.

He showed running JRuby on the Google Android device. This got a few good oohs and ahhs.

I really wish that I had been in a better spot with my talk to take more notes. Again, if you’ve got a good summation, please help me get that up here.

*Update* – my plea for a summary were answered by Gayle Craig, aha @gayleforce.

“Charles observed that when Ruby first gained it’s popularity, many Ruby developers were coming over from the Java world.  And now, some of those folks are going back to Java because their companies are not moving away from the Java platform, and because of the maturity and availability of tools that may not have been written yet in Ruby but are already available in Java.  If the rubyists embrace this, and work to find ways to build bridges between Ruby and Java, then that will continue to entice more Java developers over to Ruby instead of abandoning Ruby.  And that’s good for the Ruby community.  And that’s what JRuby is working to do.  Charles demonstrated some things in JRuby like ruby2java (a Ruby to Java compiler), become_java, and Jibernate (Hibernate through JRuby.) Charles highly encouraged developers in the room to contribute to JRuby, as there’s only a few of them working on JRuby and there’s plenty to do…”

Thanks Gayle!

IronRuby

Josh Holmes - Erubycon 2009 - Day 2I did the next talk on IronRuby. Largely, I did Jimmy Schementi’s talk from Oscon with my own twist. He posted his speaking notes at jimmy.thinking IronRuby at OSCON 2009 Mono, Moonlight, and scripting open source apps.

The short version of my take on the state of IronRuby is that it’s real this year. Last year and the year before, I talked about IronRuby but I really couldn’t show anything that I would actually consider putting it into production. This year, between the Gestalt stuff, the Witty app with the Repl/IronRuby scripting attached and many many more demos, I had some really awesome and powerful things to show people. I think I turned some heads.

It didn’t hurt that Leon Gersing, who wrote all of the labs and docs for Gestalt, was sitting in the back of the room. 

Why “Enterprise Tools” Are Bad for the Enterprise

Glenn Vanderburg - Erubycon 2009 - Day 2Glenn Vanderburg did a talk the next time about the enterprise and how development goes there.

The first thing that Glenn did is rehash his first eRubycon talk on Ruby in the Enterprise. The quick summation goes as follows – “Here are tools that will let you build software quickly, cheaply, with below-average developers”….“Enterprise problems are not nearly as much technology problems as much as they are people problems.”…“You have to write Enterprise software with the expectation that it might still be in production in 30 years. I really liked that talk. These are drums that I’ve been beating, although not as eloquently as Glenn does, for quite some time.

Glenn then talked about a the state of the industry in the form of a case study with Verizon Business. The reality is that there are a number of enterprises that are starting to look at agile development and figure out how it will work for them. There are a couple of ways to go about that. There’s the whole sale change over, which have largely failed for a number of different reasons. The second way is to run a small pilot effort that tries a few small projects to prove things out. These largely succeed but there’s no real follow up.

The reality is that the overall organization might need to change in order set itself up for success. To demonstrate the point, Glenn talked about how accounting was done in manufacturing organizations of old verses today. At one point in time, inventory was considered an asset. While this makes sense on it’s face, it actually created a number of counter incentives for productivity and sales as factories started hording inventory and materials. This pushed a change in the industry to start looking at inventory as a liability. This pushes things like lean manufacturing and just in time ordering of inventory.

So, what we need to do is to start looking for those type of hidden counter incentives in the enterprise. These are actually not that hard to find, we just need to start identifying them and figure out how to articulate these incentives in the correct language for the business.

“Individuals and interactions over process and tools”

Context-Switching is one place where people loose a lot of time. This is not talking about multi-tasking, this is talking about having to change tasks quite often and have the change the mental model to work on.

The next topic was “One job at a time”. The idea here is that there are a lot of tools in Ruby that do one and only one thing. Cucumber is an example. It allows you to write a specific type of test but you can’t really get distracted and do other things while writing in Cucumber because it really only does that one thing.

The next topic was “Crazy as I wanna be”. The idea here is that enterprise tools try to sell you on the concept that with that tool you can do anything. And typically don’t have to write any code in the meantime. The reality is that the tools cannot replace smart people doing smart people. Ruby allows you to do whatever crazy things you want to do without having that crazy be the main stream. This is common for agile tools.

Glenn then started talking about the idea that you shouldn’t buy tools that have “Impenetrable Skin”. These are the tools that typically have lots of configuration options but if you have a need outside of the imagination of the original tools writers, you are stuck. Glenn prefers “Onionskin APIs”. These are the tools and APIs that you don’t have to crack up most of the time but you can if you have to. Rails and ActiveRecord are good examples of this.

Glenn Vanderburg - Erubycon 2009 - Day 2Many enterprise tools are often large enough that they are they have their own ecosystem. What that means is they have their own group of people who’s sole job is managing and maintaining the tool. There are lots of examples of this such as databases, service busses and the like. The example that Glenn talked about quite a bit was ClearCase. The issue is that the tool is sold to the people that don’t use it all that much. These tools are sold to managers and project leads who use the tool an hour a week at best. It’s not sold to the developers who are going to use the tool 20 times a day.

The interesting issue is that as these tools start to gather their own ecosystem, the counter incentives start to mount. The use of the tool justifies the ecosystem which promotes the use of the tool regardless of whether or not it’s the right thing because it’s job security for them.

So many enterprises start by treating the symptoms verses actually fixing the problem. One of the treating the symptoms results is rules engines. Rules engines are not inherently the problem. The issue comes in when the rules engine is there because the engineering and development teams are unresponsive. The rules are really code but they are not treated as such. The result is that the people are making changes that are not tested and put through the correct rigor. This will eventually break and we’re back to the beginning.

The next set of symptoms that enterprises take on are really people problems. For example, why are there reuse repositories? Nobody uses them, ever. The reality is that reuse is far more of a people problem than it is a far more than it’s a technology problem. Requirements traceability programs are another great treatment of a symptom. The reality is that these problems are set up to assign blame. Many of the agile tools, such as Cucumber, leveraging index cards or Kanban boards get the benefits of the requirements traceability programs without the overhead and negatives.

The last topic is “Too much control”. The control that the business is really trying to force down is far less about moving forward than it is to keep people from making big mistakes. Too much control, however, stifles innovations and keeps people from making leaps of faith and trying new things.

To get the benefits that people are looking for with the control without the negatives, you need to ratchet up the communications and visibility rather than tightening down thing. Most of the tools in the agile and Ruby space fit this bill really well.

Panel discussion

Panel - Erubycon 2009 - Day 2Joe closed out the day by putting together a panel discussion with a number of people that have had success in the enterprise with Ruby.

Randal Thomas kicked off the panel with a story about a project where he taught a number of VB developers Ruby and was able to kick out and an application that was originally speced for 6 months in about a month. But the business freaked out and shut the project down. They went back and redid the project in “approved” technologies in about 6 months. David Bock followed with a similar story.

The topic quickly shifted to the idea that we really need to understand the business side and how to introduce ideas in such a way that you are not putting them on the defensive. David Bock and Glenn Vanderburg both recommended a book called Fearless Change: Patterns for Introducing New Ideas by Linda Rising.

One of the ideas is that they pitched is that you should start looking for allies. There will be a DBA somewhere that wants to run PostGreSQL and so on. Start quietly gathering that army and mount a campaign.

eRubycon 2009 Day 1

Joe O'Brien - Erubycon 2009 - Day 1This is my third year at eRubycon. I’m thrilled to be involved and speaking again this year. I’m shocked every year when Joe picks me as a speaker. I’m just honored to be considered worthy of speaking on a docket with Jim Weirich, Glenn Vanderburg, Leon Gersing, Charles Nutter, Randall Thomas, Neal Ford and all of the rest of the amazing speakers that are here. It’s definitely one of my can’t miss conferences every year.

Joe O’Brien does a great job putting this conference on year after year. The logistics are smooth, the talks are great and the vision for the conference is crystal clear.

SOLID Ruby

Jim Weirich - Erubycon 2009 - Day 1Jim Weirich started off the day with a talk called “SOLID Ruby”. The whole talk is already up on github at http://github.com/jimweirich/presentation_solid_ruby. Jim is not only very informative but fun to listen to. I really like his delivery and sense of humor.

The first question that he asked is “How do you recognize a good design?” One of the things that Jim points out is that most people can recognize a bad design but we can’t describe what makes a good design. This is actually quite profound. How can we ensure a good design if we can’t describe what makes one? To demonstrate his point, he talked about the 1666 London fire and the subsequent plans to rebuild the city. He talked about 4 to 6 very distinct designs that were all presented to the king at the time. They actually didn’t build any of designs but rather did the first ever agile project with an incremental build and no huge design up front.

SOLID
S – Single Responsibility Principle (SRP)
O – Open Closed Principle (OCP)
L – Liskov Substitution Principle (LSP)
I – Interface Segregation Principle (ISP)
D – Dependency Inversion Principle (DIP)

SRP – Each class should have one and only one responsibility. You should be able to describe what your class does in a single sentence without using the words “and” or “or”.

OCP – You should be able to change the behavior of a class without having to modify it. This is the basis of inheritance. In Ruby, you can just open a class and “Fix it” right?

DIP – Jim took this one out of order because it made ore sense when trying to explain things. Depend on abstractions, not on concretions. In static language such as Java, C#, C++ it meas that you develop to interfaces. In Ruby, you don’t have to do that as there are no hard references to classes so you can swap out classes at will. If you want to swap out the class, you just have to have all of the methods that the code that leverages that class call. Jim calls this coding to a protocol verses coding to a spec or interface.

LSP – the question answered here is how do you know if you can swap out two classes? The reality is that it’s more than just are the methods require present. It’s what are the promises back as well. For example, if you have a square root function but you require a certain level of precision. From the LISP community, Jim pulls the phrase “Require No More, Promise No Less”. If you are well covered on testing, this will be automatic.

ISP – Make fine grained interfaces that are client specific.

To finish up, Jim opened things up for discussion but in traditional Jim fashion he did things a little different. He brought the questions for the discussion.

First question – “ActiveRecord objects implement a domain concept and a persistence concept. Does that break the SRP?”

Next question – “How do you verify that your client software only uses the (narrow) protocol you expect”?”

Next question – “Some SOLID principles are an awkward fit for Ruby as they were built for static languages. Are there design principles from dynamic languages that are awkward fits for static languages?”

One of the key points that Jim implicitly made is that Ruby the language auto-implements many of the SOLID principles and the the culture pushes the rest of them in great ways.

Testing the Enterprise

Charlie Baker and Leon Gersing - Erubycon 2009 - Day 1I was really sorry but I had to miss this talk. I’m planning on getting a summary from the speakers later tonight and posting some notes later. They posted their slides at http://fallenrogue.s3.amazonaws.com/Testing%20the%20Enterprise.pdf.

In short, Leon Gersing and Charley Baker have been working at the Gap on a large project. A big reason for the success of the project and the team is the rigor around testing.

I asked Leon to email me a short write-up and this is what he sent me:

+++++++++++++++++++++++++++++++++++++++++++++++++
“Testing the Enterprise” is about how we brought Ruby testing into Gap Inc Direct. GID has campuses in Columbus, San Francisco and offshore. In addition to the challenges in a distributed environment, training QA resources and developers new to Ruby, Watir, other libraries; we’ll be talking about incremental adoption of Ruby in the Enterprise, and how it enables us to move from a Waterfall SDLC into an Agile model.
We’ll be going over lessons learned, pitfalls and successes. The points of view will be from Leon Gersing, who has been responsible for the adoption of Ruby at our San Francisco campus over the past 4 years, and Leon Gersing from EdgeCase, who’s working with our Columbus distribution IT organization as they adopt Agile practices and using Cucumber have bridged the gap between developers, QA and product teams.
+++++++++++++++++++++++++++++++++++++++++++++++++

Rails in the Large: How Agility Allows Us to Build the World’s Biggest Rails App

Neal Ford - Erubycon 2009 - Day 1Neil Ford came in next and talked about the largest Rails applications known to man.

The application itself is a car wholesaler web site called http://ove.com. He started out talking about how the project came about in the first place. They had a huge complicated web site built in Java. They were looking to do a ground up rewrite in either .NET or Rails.

Neil asked them “There are 300 Java developers downstairs, why don’t you want to rewrite it in Java?” The answer was “Frankly, we don’t want them to touch it.”.

Neil convinced them to go with Rails.

They started out in January of 2007 and built the team at 1 new pair of developers to the project every two weeks. At this poin
t they have 11 pairs of developers, 8 business analysts, an iteration manager, 6 quality assurance, a project manager and a client principle.

One of the key points that Neil made here is that “technology isn’t as important as responsiveness to business needs”. There are a lot of people in the technology world that don’t get that. The reality is that most customers don’t care about what the underlying technologies are, they only care that their business requirements are met.

One of the things that Neil pointed out very strongly, and actually spent a lot of time talking about, is the importance of the testing and specifically the way that they did them. One of the interesting stats that he threw out is that they have 3.2 lines of test code for every line of production code. There’s currently close to 100k lines of test code.

Obviously, this is a lot of code so they have had to pull together a number of other resources and tools to put together to actually run all of the projects. One of them that struck my fancy is DeepTest. It can do distributed testing of your Ruby code. Another one is Selenium grid. This does distributed running of Selenium tests.

One of the side effects of all of this distributed testing is that they have no setup and tear down methods in the tests. Rather all of the tests are completely standalone.

There were a number of social engineering things that they did that were very successful. They have a theme song for broken builds and theme songs for each person that plays on a successful check ins.

Agile, Rails and the Cloud: Why companies can’t afford to ignore the efficiencies of modern development approaches

Ian McFarland Erubycon 2009 - Day 1Ian McFarland finished off the day with a talk about why modern development approaches matter to business. This is a very important thing to talk about and think about for businesses. The reality is that not nearly enough people spend time considering.

He started talking about Agile development and walked through many of the core tenants. He put forth fairly compelling arguments that you really do need to follow the tenants of Agile. For example, having the customers setting the priorities on the things that you are building matters because it helps you produce business value faster. He spent quite a bit of time arguing that you really do need to do paired programming. Everyone learns more faster, gets distracted less and the team knowledge goes up dramatically.

After that, he switched to talking about Rails. He’s got data that switching from Java to Rails proved out to have have 2-4x productivity gain for the developers.

Then he talked about the Cloud. To steal words from Brian Prince to help paraphrase Ian’s thoughts here – “Don’t be a plumber!”. Unless it’s critical to your business to run your own infrastructure, you should outsource the infrastructure. Actually, he made a strong argument that you should outsource a number of things. As I’ve said for a long time, if it doesn’t add to your companies stock price, why are you building it? There are times that you have to run your own infrastructure such as regulatory issues or business needs that make it more advantageous to have it internal.

At the end, he made a very contentious statement that Rails is not ready for the Enterprise. There are a number of reasons for this and mostly it comes to the fact that Enterprise is actually not ready for Ruby. The actual barriers are being solved. For example, companies such as Engine Yard are solving cloud issues and the like.

 

Now for dinner – more tomorrow!

eRubyCon 2008 Day 3

I wrote a write up for eRubyCon 2008 Day 1 and eRubyCon 2008 Day 2.

Jerry Nummi's buddy icontheedgecase's buddy iconBTW – thank you to Jerry Nummi for all of the great pictures of eRubyCon. I haven’t had time to browse and put them in this post but I’ll do that tonight or tomorrow.

*Update – I added pictures…*

I’m sitting in the back of day 3 reflecting on the previous two days. It’s amazing the group of people that Joe has put together here to speak on Ruby in the enterprise.

Joe O'BrienJoe O’Brien started up the day with his DSL talk. I’ve heard the talk before but it’s still a fantastic talk. His sub-title on the talk “Why I love Ruby”. I like to add “(and Emacs chest thumping)” but that’s me… 🙂

I’m not going to explain DSLs here because I wrote about them after hearing this talk the first time at http://www.joshholmes.com/2008/04/25/DomainSpecificLanguagesDSL.aspx.

Honestly, part of what is so great about the talk is that Joe is just infectious in his passion and delivery. He, like a lot of great speakers, is a story teller. He told stories that ranged from past work in tech to past work prepping food displays for a cruise liner.

One of the stories that he told was about a large company that he did some consulting work for. They realized that the core issues at the company really came down to two people being able to communicate – a DBA and an Accountant. The issue was that they weren’t speaking the same language. One was speaking in rows, columns, triggers, sprocs and so on. The other was speaking in points, rates, forecasts and so on. The solution was to write an ORM that the accountant could understand that the DBA could work with. This came in the form of a DSL.

The food story was that the great sculptures on the table displays are actually food – not really edible but food non-the-less. It’s made from refined beef fat. There are many different forms, some softer and more moldable and some closer to marble than clay, and depending on what was needed, the master sculpture would pick a different form. Similarly, Joe picks a language that he can shape and mold to his needs. That’s what Ruby is for him.

Back to Emacs, one of the reasons that Joe loves Emacs is that you can shape the commands and key-bindings and the whole environment to shape your way of working rather than the other way around. I’m still not convinced. My biggest problem with Emacs is that the learning curve before you can be even mildly productive is giant. I understand that once you climb that mountain that the view is nice. I’m just not convinced that the incremental jump over my current tools will be enough to be worth it.

Interested in the talk? You can watch it from when Joe did it at the Mountain West Ruby conference.

Chris WanstrathChris Wanstrath followed Joe with a talk about GitHub. They have taken the Git source control and given it a centralized source server. The reality, as he explained it, with Git is that every person has a full blown copy of the repository. The interesting part is that people can go client to server or they can go peer to peer or any combination that you can possibly imagine. When they want to make a change, they actually fork the project.
Especially with the Git peer to peer checkins, it’s actually not a checkin. Nobody actually has write access to anyone else’s Git repository. When they are ready, they let the other devs know that they should pull and merge. They way that it works all the way up the list is that there are devs that make changes who let the project managers know that they should pull. That project manager is the “blessed version”.
The simplest explanation of GitHub is that it gives the individual programmer an offsite repository so that they don’t have to be online when the other members want to make a pull.  

Jim WeirichJim Weirich did the lunch time keynote called “What the Enterprise Can Learn From Your Mom”. In the spirit of the previous talk, he told us that all of his slides were up on GitHub already. He started out talking about Moores law. The first thing that he points out is that the number of transistors on the chip doesn’t mean that the chips will be faster – it might, and does in current times, mean that we get more cores. There’s a possibility of 100 core processors in the near future. Similar to our moms, we will have to learn how to do more and more things at one time. The fun part is that most people don’t know how to write multi-threaded applications… Jim went on to do a fantastic explanation of race conditions and threading at large. Somewhere in here I missed part of the talk trying to track down why the air-conditioning was not on. As I walked back in Jim was telling war stories about collecting real time data off of a jet engine in a multi-threading system. They designed a system that would only fail one in a million times – except that it was collecting data about a million times a day – oops. They had designed the system to fail once a day. Back to the drawing board…
Then Jim shifted gears. He started talking about “Blub Programmers” and languages other than Ruby. Jim is definitely the guy to do this. Jim is always playing with some bizarre language that would twist a normal brain like a pretzel.
First language that he talked about was Erlang. It’s a bizarre language. For example, you loop by writing tail recursion functions and most of the communication is done by sending process messages. The next language that he talked about was Closure Clojure (thanks Stuart Halloway for the correction). The interesting part about it, especially in light of the rest of his talk, is that it’s got different types of variables that are aware of multi-threading inherently.

Michael LetterleMichael Letterle followed Jim’s session with a session on IronRuby. To be far, I was supposed to follow Jim. However, I convinced to sw
itch me and Michael because I thought his talk was more core IronRuby than mine and would free me up to concentrate on Silverlight more than spending my time talking strictly about IronRuby. I was right and I liked the order. But I do deserve the comment that Michael started with where he called me an “ass” for making him get up right after Jim Weirick who is a phenomenal speaker.

Michael is one of the community contributor to the IronRuby project and has done a lot of work. He started with a lot of discussion about how the culture at Microsoft is shifting to be more and more open. With projects like CodePlex and Port25, there’s a lot of great new things.
Michael ran a lot of the test that were run at the Ruby Shootout in 2007 to see the differences and where things are now. While the functionality was largely complete, the perf was not great. It was a little worse than twice as slow as Jruby and MRI. As it’s still in beta and heavily under development, I’m not dismayed by that at the moment. If that’s still the case in a year, I will be.
Michael’s take on the talk was that since IronRuby is Iron, we should look at it with battleship grey windows applications. 🙂 He was adamant that there be an IronRuby talk that wasn’t about web technologies. He wrote a small windows app that hits a database and does normal IO type work similar to any and every enterprise application out there in the world. The next thing he did is fire up ir.cmd which is the IronRuby’s interpreted runtime. Then he attached to the running windows application and modified the application’s GUI and business logic to include tax information. Some of the cool things that he did was opening up base class library items and started adding Ruby things to them. For example, he added method_missing to the base Windows.Forms.Form class.

It’s awesome that there are guys like Michael out there in the world that are passionate Microsoft, Open Source, Ruby, .NET, Enterprise and Community. He’s a great ambassador from one world to the next carrying those passions with him everywhere he goes.

Josh Holmes– I followed Michael talking about Ruby in the Browser through Silverlight. I started out by talking about what evangelists do. After that I talked about User Experience and what that means to software. Then I started talking about some companies where the user experience, and their use of Silverlight, are making a great difference. I showed off the Olympics and the Hard Rock Cafe live and online. Then I pulled up some of the great work that Jimmy Schementi has been doing with a project that he calls Silverline. It’s pretty fantastic – it’s a number of different IronRuby samples running in Silverlight. The one that I missed showing and discussing was the idea of moving the controller in a Rails app out to the browser with IronRuby. Oh well. Next year.

I think that my talk was well received but welcome any comments. 

– Lance Carlson followed my session and closed out eRubyCon with a talk about an open source project that he’s writing called Anvil. It’s a framework for creating desktop applications that’s platform agnostic. The goal is to wrap all of the possible desktop frameworks from Shoes to RubyCocoa in one common framework. It’s a very interesting idea.

– Closing thoughts. Joe O’Brien did a fantastic job putting together this whole conference. The quality of the program, the speakers, the logistics, the whole package is fantastic every year. This is one of the highlights of the year for me every year. The other absolutely non-negotiable item on my calendar is CodeMash. The ton and the maturity of the conference coupled with the passion that not only the speakers show but the attendees as well is unparalleled

It’s an honor to me that Joe has invited me to come and associate with this group of elite and influential speakers/friends/attendees/geeks/passionate people that makes up the Ruby community. I’ve really enjoyed getting to know everyone at the conference.

I was thrilled that Joe wanted to host the event at the Microsoft offices in Columbus. We’re not going to be able to do that next year because we’ll overflow the venue but this year is was the perfect size. We can fit about 120 in the bigger meeting room without having to sit on laps and we had right at 106 in there. It was full but not crazy.

Last year, Joe closed with question as to whether or not they were going to do it again. This year, Joe ended with a definitive – “We’ll be announcing dates soon for next year, keep an eye on http://www.erubycon.com or the mailing list”. Me… I’m very happy about that.

eRubyCon 2008 Day 2

Yesterday I wrote a write up of eRubyCon 2008 Day 1.

Erubycon – Charles Nutter started up with JRuby. I’m always impressed by people that are able to make their weekend project their full time job. I was further impressed that Charles was up with the rest of the speakers until closer to 4am than any of us should really admit, drinking really good scotch and solving the world’s problems.

Charles talked about the JVM and Java as both a problem and a great asset. There are a lot of people that look at the J in JRuby and automatically associate it with all of the things that they don’t like about Java. Charles answer is to separate the JVM from the Java language. He did a really good job of talking about the things that the JVM brings over the standard Ruby runtimes such as world class garbage collection, memory compaction, thread handling and the like. He did a number of really compelling demos around threading in particular. One of the things that he said here is that JRuby and IronRuby are really the only Ruby implementations that are able to do native threads because they are the only ones that are built on production quality VMs that handle that native threading for them.

0816080915One of the great quotes was “We write a lot of Java. So you don’t have to…” – Charles Nutter

After setting the stage, he pulled up a long list of features and said – “There’s way too much for me to cover in the time left – what do you want to see?”. that was fun. The first suggestion that he showed was 2D graphics that flashed a bunch of little balls around the screen. It was even responsive to voice commands. The second suggestion was to show Rails running on JRuby. He showed that they are running Rails on Ruby 1.8.6 (java). Next he brought up image_voodoo to do more 2D libraries. Lastly, he showed “java_inline” which allows you to inline Java code similar to the Ruby_inline which allows you to inline C right in your Ruby code.

  – Evan Light came up next. Unfortunately I was putting out a few small fires. Fortunately Michael Lettere wrote up a small write up so that I could include it here.

Evan Light hates EJBs.
EJB encourages difficult to test idioms, private fields, private static final fields.
Nice demo code “public class DeepThought” <— How do you test that?
You COULD shoot the guy who wrote it, but don’t do that.
Very good use of humor, engaged the audience.

Stuart Halloway, Neal Ford – The lunch keynote was Neal Ford. Neil Ford is an amazing speaker. What’s cool about him is that every time I see him speaker, I wonder how he could get any better. And then he does. Today’s talk was about complexity. One of the core concepts that he talked about is the idea of Language Lockdown. It’s when language writers put in features to protect people from themselves and cut down on the stupid things that you can do. The idea is that if you do that the lower end (read cheaper) developers will still be productive. “What they are trying to do is strap a rocket to the ass of a turtle. What they are actually doing is putting chains on the rabbits than can go fast.”
The problem with that take though is two fold. First, it is not a linear line between the top developers and the lower end developers. What that means is that on the curve, a highly productive programmer will get done in one day what it will take an average developer more than a week to do and the weak developer a month or more. To point out the second issue, Neal quoted one of my other favorite speaker – “Bad developers will move heaven and earth to do the wrong thing” – Glenn Vanderburgh
One of the huge questions that he put out there is “How much of your enterprise software simple services accidental complexity?”. It’s a great question.
As he was wrapping up, he left us with the thought that “Courage is contagious. Cowardice is infectious”.

Stuart Halloway– Following Neal was Stuart Halloway again. He was talking this time about how one can fail with 100% test coverage. It’s an interesting topic because for so many people, 100% test coverage is the holy grail that they shoot for. The first thing that he pointed out is that you might cover all the lines, but not all the branches so it depends on how you measure things to get to 100% coverage. The second thing that he points out is that you can cover all the code, but not all the corner cases. The example that he used is testing if a value is above or below $25.00 but forgetting $25.00 even. Oops. Then you can start writing way too much code and too much complexity into your tests. Now you need to test your tests and you’ve taken too much time writing them. Then he talked about the “ugly mirror” where the test is really a mirror of the code where you’re covering the line but using the code that you are trying to test while testing – oh dear I have a headache. This is where he says that you are allowed to write literals in your tests.
Neal Ford piped in – “It’s ok for your test to be moist, not drenched”.
The next topic was slow tests and how dangerous they are. The short version of the issue is that if the unit tests don’t run in under 1 second, developers are not going to run them. Functional tests should run in under 2 minutes. If they don’t, then factor them so that they run on different schedules, parallelize them on different machines to get the normal check-in process back under the 2 minute mark if possible.
The last type of fail that he talked about is shallow tests. The quote that he referenced is “No automated test suite can ever replace exploratory testing.” – Jay Fields. The goal is that once the unit and functional testing passes, that people will put themselves in the clients seat and go spelunking and try out a bunch of stuff.

Joe O'Brien, Chris Nelson, Jim Weirich – The next talk was a very unique idea called “Dialogue Concerning the Two Chief Modeling Systems”. They wrote a play! The guys from EdgeCase, Joe O’Brien, Jim Weirich and Chris Nelson, acted out a normal project for them. They started out on twitter talking about the new project that they just landed. Then they actually started with the early on meetings that they have. Joe played the cowboy dev lead who insists that it’s a “simple rails app” and decides to do a data first model. Chris played clueless nub and Jim played the seasoned architect that was concerned about requirements analysis, separation of layers and behavior driven models. Joe, ready to start slamming code out, starts pairing with Chris. The first thing that they tackle is a simple calendar event. Then they have to schedule r
eoccuring events. Joe, the cowboy, just decides to replicate the events in order to do the reoccurence. The next requirement is rescheduling the reoccuring meetings…. Oops. They have neatly coded themselves into a corner and start hacking out a solution. At that point, Chris decided to take a walk and went to see what Jim thought of it all. Jim started writing out CRC cards and started thinking about higher level ideas, bringing in light-weight design patterns around temporal expressions from Martin Fowler and so on. Jim, the architect, is blithely ignoring “implementation details” such as where to store the data and performance. When performance sucked – they went back to the drawing board. Jim and Joe had to eventually come together. Of course the answer was to write a DSL… 🙂
Great talk. The good news is that Neal Ford is following them so there won’t be a let down as we end the day…

– The last talk of the day was Neal Ford talking about Design Patterns in Ruby. One of the things that he pointed out fairly early on is that the Design Patterns book, even according to one of the authors ( Vlissides), should have been called “Making C++ Suck Less”. Even the Smalltalk that’s in the book was really C++ written in Smalltalk syntax. He covered a number of different patterns including the Iterator and the Interpretor pattern. There were a number of circumstances where he pointed out that the issues addressed by the pattern were addressed by the Ruby language. For example, the interpretor pattern’s intent is really addressed by DLSs which are dead easy to implement in Ruby. The only problem with this session is that it’s at the end of the day and my brain is a little mush at this point.

eRubyCon 2008 Day 1

image I’m sitting here at the second Enterprise Ruby Conference (eRubyCon). There’s a couple of fun and interesting things that have happened this year.

One of them that’s exciting for me is that the whole event is being hosted at the Microsoft facilities in Columbus, OH. Joe O’Brien was looking for a facility so I offered up the office since we can get that for free. There are some minor facility issues, such as the internet access is fairly limited due to the Microsoft security policies. We got that mostly sorted by renting a number of cell card based routers from iBox2Go. It’s not a perfect solution because we’re at about double the recommended number of users per router. That’s caused network to be a touch spotty but it’s better than non-existent.

Another thing that’s a ton of fun is that we’ve doubled the number of attendees. The conference room here at the Microsoft office is FULL. Tomorrow I’ll show some pictures from the conference room. It’s really cool to see.

0815081326The whole event is going very well. Joe has been plagued with speakers having travel issues and the like. For example, Stu Halloway was supposed to do a lunch time keynote but was thrown off as his plane had mechanical issues. The great news is that this is an Agile conference and everyone is used to requirements changing mid-project and Joe was able to shuffle the speakers.

 – First up was Randall Thomas from the Engine Yard. He was talking about ETL (Extract, Transform, Load). He did a masterful job of making that important topic interesting and fun. It’s a fundamental topic but even Randall equated it to Bob Ross painting trees and it was tough to keep people awake talking about the best possible way to make one string into two and two into one…

– Next was Tom Mornini. I wish I had been able to stick around for this talk. He talked heavily about Vertebra, Scalability and Accountability.

Anthony Eden followed Tom with a session on Identity Management. It was interesting to hear his take on OpenID, InformationCard, SAML and how Ruby works with those. The good news for Ruby is that it does really well with and is leading the way with OpenID. The bad news is that the things that are done inside of an enterprise are a little less prevalent in the Ruby at the moment. It was a great tutorial on the state of

Giles Bowkett talked about Meta-Programming vs. Code Generation. He had a fun and deep tirade on something called Monkeypatching.

“A monkey patch (also spelled monkey-patch, MonkeyPatch) is a way to extend or modify the runtime code of dynamic languages (e.g. Smalltalk, Javascript, Objective-C, Ruby, Perl, and Python) without altering the original source code.” – http://en.wikipedia.org/wiki/Monkey_patch

This is meta-programming at it’s finest. He then went on to talk about meta-monkey-patching or meta meta programming… Somewhere in there I got a headache. That’s about the time that he brought it back to Code Generation. My favorite quote, other than “Here’s a completely gratuitous picture of Jessica Albert” (which did come with a gratuitous picture of Jessica Albert…) ” “Should I hire a programmer or should I just write one?”. He gave an example of a past job at NY Times where he left after he wrote a “mini-giles”. That’s a code generator that did much of what he had been doing until he wrote the generator. The “mini-giles” meme has really taken off since then and has been worked into a ton of the talks and conversations…

Stuart Halloway followed Giles with a keynote called “Ending Legacy Code in Our Lifetime”. He had one of the better starts that I’ve ever heard – “Legacy Code is like Porn. I know it when I see it. It’s ubiquitous on the internet. And like all porn, it’s ultimately unsatisfying”. (At least he has it on good authority that porn is ultimately unsatisfying). One of the things that Stuart points out is that code can be broken down to Ceremony and Essence. The Essence is what you actually want to get done. The Ceremony is the stuff that you have to do in order to have the Essence work. For example, if you have gone from “New” on an object to writing factories – the reality is the factory is Ceremony. End of the day, all you really wanted is an object.

Another great quote from Stuart was “Ceremony leads to fear. Fear leads to anger. Anger leads to pain. Pain leads to Ceremony.” The goal, according to Stuart, is to have as little ceremony as possible and have every line of code contribute to the Essence. And right now, Ruby is the closest answer as it’s got a fairly high Essence to Ceremony ratio.

His talk was chock full of great quotes – “What authority authorizes this in the Ruby world? – ME – and I’m Right”. It was full enough of great quotes that there’s a Stu Halloway Quote Tracker.

– Brian Sam-Bodden, always a great speaker, closed out the day with Refactoring with JRuby. He talked about the core of refactoring is having a great suite of tests. One of my favorite quotes from him was “Since I’m a Java consultant, I have a lot of work to do…”.

Overall, it was a great day. I really enjoyed catching up with a lot of the guys that I don’t get to see at the .NET community events. I’m hoping that most of these guys will be at CodeMash cause that will give me 2 times a year to hang out.