In my experience of building systems in Ruby over the last 7 years, I believe there is one main feature of Ruby that made these systems successful. Before I get to that unique feature of Ruby I want to describe a few of the first systems I built in Ruby and what I learned from them.
The first system I developed in Ruby was a testing infrastructure for a distributed multi-agent system being developed and funded by DARPA. DARPA is the research arm of the US Department of Defense. This project's grand challenge was to build a software system that could survive "in theater". The system had to continue functioning in a war-like situation with enemies attacking the software or the hardware the software is running on. The main function of the software (beyond surviving) was real-time logistics planning. Logistics includes routing supplies to people and places where its needed. That may not sound very interesting but logistics happens to be the key function that makes large groups operate effectively.
What I built for DARPA was a testing framework that observed the events being generated by the software agents using XMPP and then sent commands to these agents using HTTP. The core of the framework was a Domain Specific Language (DSL) which allowed us to script the multi-agent system. Initially this scripting was limited to simple things, but that basic automation helped the program significantly. In the first four months I wrote all the scripts.
During the next year the DSL was rewritten and then expanded to include all the forms of network and system attacks the program was tasked with creating. What was really cool was the majority of the extensions to the DSL were written by other non-Ruby developers in the program. The multi-agent system was written in Java, but each of the 80 people contributing to the attack-side of the program ended up learning enough Ruby to encode their attacks. We also expanded the DSL to generate the logistics rules and from the rules the agent society definition.
This was a large deployment. We had 300 dual core machines with 4GB of RAM and 10,000 agents running across them. The Ruby script that was generated for a single agent society definition was over 1 million lines of code. The events that Ruby handled per hour were well over 3 million messages of 1-10k each.
By the end of the program, Ruby was used to generate the entire agent configuration, drive the simulation, generate the attacks, record the results, generate reports and summarize them for the Program Manager. This development taught me three very important lessons about Ruby:
- Ruby is an excellent language to encode domain specific logic in. Its flexible syntax makes Ruby almost disappear and what's left is domain terms. Once the domain is encoded its very easy for domain experts to use the Ruby DSL. These domain experts may not be able to write it, but they most definitely can read and validate it. When people talk about a 10x developer productivity increase, I believe this is the primary reason for it, the close communication between domain experts and those building the system.
- Programmers can quickly learn Ruby and can be effective in it, especially if they learn it in the context of something they know. Every person on our project that wrote Ruby enjoyed it. Their enjoyment was the main motivator to them becoming more and more proficient in Ruby. I believe any good programmer can be a good programmer in Ruby.
- Ruby scales. We pushed Ruby to unbelievable levels on this program and it exceeded our expectations. The application under test was critical which made the testing framework even more critical. There were places in our code where we had to drop into C to perform computationally intensive operations. The ease of doing this is another key aspect of Ruby's scalability.
The second system I developed in Ruby was a desktop-based functional prototype for a complex system that was being designed for the US Air Force. The goal of this system was to create a unified view across the 18 different groups that coordinate the movement of military aircraft and provide mid-air refueling with tankers.
The team that hired me to do this was a Human Computer Interface research organization that had spent the prior 3 years traveling the world to interview and capture the requirements of all 18 groups. They had written a very detailed user interface specification for the system. They wanted to deliver this user interface specification along with a functional prototype to show the final implementors what they meant in the text & pictures of their design.
The primary challenge was time. They had less than 2 months left to build the functional prototype after a failed 24 person-month Java effort. I chose Ruby and Flash to build the prototype in. I will not focus on the Flash side of what I did because the Ruby side of this, although non-visual, ended up being transformative to the project.
My first meeting with the research scientist (who had become the domain expert) occurred in Boston. On the flight up, I had no idea where to start with the massive tome of information in the specification they had created. After arriving in her office we sat down in front of my computer and I brought up a text editor. I asked her to describe the the concepts in the domain. As she described it I typed in what I knew was valid Ruby syntax. As we encoded her domain knowledge we created a DSL on the fly. After 5 hours of talking and typing we had produced a very elegant 400 line script that she could read as her domain and I could read as code. On the flight back to DC, I wrote the code behind this syntax to enable the construction of the domain model objects (I called this approach syntax-driven development.)
Over the next 4 weeks we iterated on the domain model. I wrote scripts to parse flight plans and convert them to DSL code and flushed out more of the domain. I sent snippets of the DSL to domain experts for review. What amazed the team was the DSL encoding of the specification exposed numerous examples where the specification was incomplete or contradictory---something that none of them had seen in their reviews of it.
The final 4 weeks were spent developing the Flash-based UI which was driven by the domain objects in Ruby. In the end we met our goals. The functional prototype was delivered along with the updated specification. Although the user interface specification was main product delivered to the implementation team, the Ruby DSL was an important tool they could use to better understand the domain.
So, what did these two projects have in common? In both projects I used Ruby to implement the system through a language customized to the project domain. These domain specific languages became effective mediums for team communications. In my experience, this is the single most important feature of the Ruby language---capturing the domain in a language the entire team can speak. If you believe clear communications is an essential quality of highly effective teams, this feature is something that you should strive to exploit in your own Ruby projects.
We definitely learned from our experiences, Keep up the good job.
Posted by: carpet cleaning canberra | Thursday, January 13, 2011 at 09:53 PM
And the essence of friendship ethics is trust and respect
Posted by: Chanel Replica Watches | Saturday, January 15, 2011 at 02:51 AM
Thanks you for sharing your story,its very original I personally admire you for what you are done.
Posted by: xp fix | Sunday, January 16, 2011 at 12:33 AM
It worked for me. I never thought its gonna be so easy. Thanks o lot this lovely tutorial. veracity credit review
Posted by: veracity credit review | Sunday, January 16, 2011 at 07:02 AM
It was amazing. The way you tell about things is awesome. They are inspiring and helpful. Thanks for sharing your information .
Posted by: Blu cig | Tuesday, January 18, 2011 at 05:25 PM
Thanks for sharing this useful info for us. I didn't have the any idea about this before. It’s really great.
Posted by: MSI Credit Solutions | Wednesday, January 19, 2011 at 11:11 PM
What can i say that you have a great woman for sharing on this amazing achievement!!
Posted by: Lexington Law Firm Reviews | Friday, January 21, 2011 at 11:40 PM
For me,Being able to write in a domain-specific language subset is definitely nice.thanks for sharing your idea.
Posted by: Lexington law scam | Sunday, January 23, 2011 at 06:10 AM
For me,Being able to write in a domain-specific language subset is definitely nice.thanks for sharing your idea.
Posted by: Lexington law scam | Sunday, January 23, 2011 at 06:13 AM
Good work, I am glad to read good article in the website like this.
Posted by: bad credit problem | Wednesday, January 26, 2011 at 05:37 PM
Thank you for sharing a good story, I really enjoyed reading.I will share this to my friend.
Posted by: speed up my computer | Saturday, January 29, 2011 at 03:40 AM
Thanks for taking the time to discuss this, I am interested about it and love learning more on this topic.
Posted by: debt relief forums | Sunday, January 30, 2011 at 03:13 AM
Your post is definitely good a lot of useful information provide. keep up a good job!
Posted by: improve my credit | Monday, January 31, 2011 at 11:00 PM
yes you really done a great job and your blog is also very interesting.
Posted by: Latest technology | Tuesday, February 01, 2011 at 03:09 PM
Ruby's Best Feature is very impressive and worth of reading.. i like it
Posted by: Directx 8.0 | Thursday, February 03, 2011 at 12:10 AM
oh that sounds fantastic - both the krispy treats and your european trip. you'll love it there! do head for markets for fruits and vegetables, they are beautiful. cheese and chocolate, too! take lots of photos, both of you, Heidi & Wayne... have a safe trip and have a wonderful time!
Posted by: write my essay | Saturday, February 05, 2011 at 09:59 AM
I was waiting for such an article and I gained some useful information from this site.
Posted by: Lease Auditors | Monday, February 07, 2011 at 03:40 AM
Thanks for taking the time to discuss, I am interested about it and learning more on this topic. Good luck to your next post.
Posted by: charge off credit | Wednesday, February 09, 2011 at 05:07 PM
Those who want to become most beautiful in the world should try them. Just ones can make you different. Girls who want to grab your boyfriends's heart is necessary to use them.
Posted by: Red Bull Hats | Wednesday, February 09, 2011 at 10:17 PM
I appreciate the work of all people who share information with others.
http://www.dissertationcapital.com/
Posted by: Account Deleted | Friday, February 11, 2011 at 01:36 AM
Thank you for discussing great topic like this, definitely worth reading.
Posted by: direct e-cig | Friday, February 11, 2011 at 02:31 AM
Great and very interesting article. Keep it up.
Posted by: House Cleaning Cincinnati | Friday, February 11, 2011 at 02:51 AM
Thanks for very nice post.
Posted by: allied interstate collections | Sunday, February 13, 2011 at 12:48 AM
The loan are important for people, which are willing to start their own company. By the way, it's not hard to get a consolidation loan.
Posted by: loans | Wednesday, February 16, 2011 at 01:52 AM
You never failed to amazed me, thanks for providing quality informations.
Posted by: Lease Audits | Wednesday, February 16, 2011 at 08:52 AM
This is alot of really good information about Ruby. It looks like this is really good. We will share this with the class.
Posted by: Rain Gutter Cleaning | Wednesday, February 16, 2011 at 08:13 PM
Glad to visit your blog. Thanks for this great post that you share to us.
Posted by: poor credit rating | Thursday, February 17, 2011 at 01:25 PM
Great information. I got lucky and found your site from a random Google search. Lexington Law is one of the leading and pioneer credit repair law firms.
Posted by: lexington law | Thursday, February 17, 2011 at 08:31 PM
This is really greatfor taking free trial tests! Everything is okey with your research career if people defect the experienced custom eassays writing.
Posted by: bankruptcy on credit report | Friday, February 18, 2011 at 01:24 AM
thanks for the informative data. I’m glad to read your article.
Posted by: Smoke stik | Saturday, February 19, 2011 at 12:22 PM
Hello everyone! This is an another awesome post! I hope you will enjoy reading on it! Keep up a good works!
Posted by: registry cleanup reviews | Sunday, February 20, 2011 at 02:57 AM
Awesome write-up. You guys always deliver useful content. Worth it to read and beneficial information.
Posted by: spyware doctor review | Monday, February 21, 2011 at 06:07 AM
Sign up to Ro2 Mafia Empire the best free MMORPG game today to become a mobster working your way through the ranks to become the greatest and most powerful gangster in the Mafioso world..
You have the ability to be a leader and create your gang to drive to the top or can equally join gangs to help build an unstoppable empire. Collect cash, drugs and purchase weapons on the way of attacking your enemies to help build up respect.. Register if you think you have what it takes, remember...keep your friends close, but your enemies closer!
Last but not least, CASHOUT YOUR INGAME MONEY TO REAL MONEY!
www.ro2.biz/empire.php
Get paid to chat
Posted by: ovidiu | Monday, February 21, 2011 at 11:48 AM
I worked for me. I never thought its gonna be so easy. Thank a lot.
Posted by: 3 major credit reporting agencies | Tuesday, February 22, 2011 at 04:03 PM
That is awesome and so exciting to read your articles that have recently forgotten to turn off my kettle.
Posted by: computer runs slow | Tuesday, February 22, 2011 at 11:42 PM
That is awesome and so exciting to read your articles that have recently forgotten to turn off my kettle.
Posted by: computer runs slow | Tuesday, February 22, 2011 at 11:45 PM
It worked for me. I never thought its gonna be so easy. thanks a lot.
Posted by: improve credit | Monday, February 28, 2011 at 06:26 AM
Valuable information you shared on this post, I am looking forward for more post soon.
Posted by: webwatcher software | Tuesday, March 01, 2011 at 08:50 AM
Thanks for your effort to do this. I admire you.
Posted by: improve my credit | Wednesday, March 02, 2011 at 04:25 PM
There is an article that gives great insight to foundational elements when it comes to being able to successfully make money on the internet.
Posted by: dsi credit repair reviews | Saturday, March 05, 2011 at 09:12 AM
This is a great site and I have to congratulate you on the content. I appreciate it!Pretty good post, this is one of the best article that I have ever seen!
Posted by: truth about abs | Monday, March 07, 2011 at 04:11 AM
This is the best article I have ever found on the Internet.
Posted by: Carpet cleaners cincinnati | Wednesday, March 09, 2011 at 05:09 AM
Hey guys,
I just found a website which pays you for mostly everything. First i thought that it can't be real but i got paid more than 18$ by now.
If you wanna join please join under me: ro2.biz/index.php?id=2018
Thanks alot, and see you there ;)
Posted by: ovidiu12345 | Thursday, March 10, 2011 at 12:52 PM
Join to our newest gaming comunity and you can find or make tutorials for every game:
thextop.org Soon maybe we will be the best gaming tutorial comunity!!!
Posted by: duka | Thursday, March 10, 2011 at 12:53 PM
Today is not yesterday. We ourselves change. How then can our works and thoughts, if they are always to be fittest, continue always the same?
Posted by: Air Jordans | Friday, March 11, 2011 at 01:31 AM
I really appreciate your effort and creating on this pages for giving a chance to share my ideas about norton utilities trial
Posted by: norton utilities trial | Tuesday, March 15, 2011 at 12:29 AM
I remember this during the old days "During the next year the DSL was rewritten and then expanded to include all the forms of network and system attacks the program was tasked with creating. What was really cool was the majority of the extensions to the DSL were written by other non-Ruby developers in the program. " hahahaha
Posted by: Tenant Screening | Wednesday, March 16, 2011 at 12:28 AM
The idea of this post is so good! Impressive info, I like it!
Posted by: credit repair website | Friday, March 18, 2011 at 10:49 AM
Thank you for sharing good story, I really enjoyed reading. I will share this to my best friends.
Posted by: allied interstate collections | Saturday, March 19, 2011 at 05:51 PM
I was finding for this data for a long time, but I was not able to see.
Posted by: carpet cleaning canberra | Monday, March 21, 2011 at 06:21 AM