Monday, August 01, 2011

Experience report: Ruby

For a long time I've been curious about how the supposed benefits and liabilities of programming in a dynamically typed language1 actually play out in practice. I'm now getting a chance to find it out, since I'm involved in a largish project using Ruby (lots of Rails plus some Sinatra and a couple of random daemons). My professional background has largely been in Java, but I spend a good chunk of my free time learning about different programming languages (and some PL theory), mostly on the static side of the fence. Anyway, here are some notes:

The big question is whether dynamic typing allows for more bugs to pass trough. My answer to this has to be put in context: we are a medium-sized team (between half and a full dozen of devs), all experienced in, and practicing, TDD. As with the rest of this blog post, I don't have hard data to show, but my impression is that the unit tests do indeed catch all the bugs that the Java type system would help to catch; with the caveat that it's often harder to pinpoint the source of a regression. I don't have much real experience in languages whose type systems help to enforce strong guarantees2, but I would imagine they would catch a larger fraction of the bugs that are caught by the unit tests, while not really avoiding further bugs. The reason is twofold: firstly, in my experience, many of the bugs are found in the interaction of separate pieces of software (such as Javascript in the browser talking to the web server), secondly, even when the bug is located within process boundaries, it is most often related to a forgotten invariant than to breaking a established one. But that's all conjecture.

On the matter of productivity, the abstraction mechanisms offered by the Ruby language help to structure code and avoid repetition and that's certainly noticeable in comparison to Java (though, in my opinion, not in comparison to Scala, and probably also not in comparison to Smalltalk, ML, Haskell or Oz). That gain is offset to a point by the lack of refactoring tools. There are some who argue that those tools are made necessary by the verbosity of Java, and aren't needed in better languages. That's nonsense. If a language has an abstraction mechanism, that mechanism is used to define an abstraction and to use the defined abstraction elsewhere. If we then want to change the abstraction we must change code at the use sites as well, and that's where such tools can help. This is all so obvious that I find it almost silly to have to write it down.

Many of the abstraction gains in Ruby come from metaprogramming techniques. I'm not completely sold that they are necessary to achieve the level of abstraction attained, and I'm sure that they hinder readability. It's much easier to gain a footing in a library written with straighforward composition mechanisms (be it functions or classes and objects) than in a mess of Strings and calls to define_method and cousins.

While on the subject of abstraction, I have to comment on Rails. It's a mature web framework that does a masterful job of making the common cases easy. This is a much harder feat than it sounds, as we can glean from the failure of JSF, WebForms and similar unsuccessful attempts to abstract the web. The hidden cost of the bargain is when we get to the uncommon cases. It isn't so much the case that there are specific application features that are hard to code in Rails, though it happens, but that the structure of the code that Rails mandates sometimes isn't a good fit to the problem being solved.

I'm sounding a little negative, so let me balance it out by saying that I believe Ruby and Rails were as adequate choices for our project as any. The main reason is the availability of decent quality libraries and tools (refactoring and code navigation notwithstanding), specially in the often overlooked front of deployment and configuration management.

Apologies for an opinionated blog post.


1. Unittyped, for the pedantic.
2. Such as Agda or Coq, or some styles of programming in ML, Haskell or Scala.

255 comments:

«Oldest   ‹Older   201 – 255 of 255
norascarlett786 said...

My online research for the best website that provides top-ranking Statistics Assignment Help has settled on statisticshomeworkhelper.com. Despite a few negative reviews, I was convinced that it's the best Statistics Homework Help provider that I should work with. After my first order, I proved that my research results were accurate. I've been using the service for three semesters now, and this is one of the experts that has helped me get my order done. I appreciate it.

norascarlett786 said...

I've discovered that they're fully reliable with all Matlab assignments. I passed my test! I wanted an expert that could help me score the best marks in my class, and one of Matlab Assignment Help experts with a Master's Degree in Software Engineering did it! He even exceeded my expectations by getting almost everything right. I'll use him for all my remaining Matlab Homework Help.

norascarlett786 said...

This is the only Economics Assignment Help service website that I've seen with real experts' profiles that reflect true qualifications and experience. The other ones only show off fake high qualifications to lure unsuspecting clients into their fraud scheme. I received stellar-grade solutions that earned me a round of applause from my classmates and lecturer alike. Meanwhile, thank you for their fast service and overall professional treatment. I'll indubitably come again for your unmatched Economics Homework Help.

Amelia Carter said...

The company's good-grade guarantee makes me feel satisfied and relaxed. Indeed, they go out of the way to deliver the best Programming Homework Help grades. I got the best of their Python Programming assignments. My grades shocked everyone in my class, including the lecturer, who praised the way the solutions were arranged in a genius way. Asking for a hand in Python Homework Help up to the end of my course will always make me the best student, and that's what I must do.

Amelia Carter said...

I didn't understand why the customer service officials awarded my order to a rookie R programmer. The lady was fast but not accurate. She didn't fail but got me only 51 marks. I don't want to complain a lot because this is the first time you've done this to me. However, I must let Statistics Homework Help know that I'll choose my favorite R Homework Help expert next time. Meanwhile, thanks for the assistance.

Amelia Carter said...

I needed a flawless paper but the one Matlab Homework Help sent needed a bit of fixing. What made me forget the mistakes was the score I managed; it was 91%! Thanks a lot and please keep the Matlab Assignment Help expert that worked on this assignment for me. Each time, I'll go for her help so that I keep scoring top grades.

Amelia Carter said...

I tried to find all the things that indicate an untrustworthy assignment help website on this platform in vain. Then, I decided to try out their Economics Homework Help to see if it could turn out great. Guess what? It was great, and I have every reason to praise the organization so that its Economics Assignment Help services can reach more students. Thanks a lot, anyway.

Data Science Training in Bangalore said...

You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.

Data Science Training in Bangalore

Digital Marketing Training in Bangalore said...

Wonderful blog found to be very impressive to come across such an awesome blog. I should really appreciate the blogger for the efforts they have put in to develop such amazing content for all the curious readers who are very keen on being updated across every corner. Ultimately, this is an awesome experience for the readers. Anyways, thanks a lot and keep sharing the content in the future too.

Digital Marketing Training in Bangalore

Artificial Intelligence Training in Bangalore said...

I wanted to leave a little comment to support you and wish you the best of luck. We wish you the best of luck in all of your blogging endeavors.

Artificial Intelligence Training in Bangalore

Machine Learning Course in Bangalore said...

The Extraordinary blog went amazed by the content that they have developed in a very descriptive manner. This type of content surely ensures the participants explore themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

Machine Learning Course in Bangalore

Rose Watkins said...

All agents were booked and that got me disappointed. Why don't they recruit more if they have more orders coming in than the number of Programming Homework Help specialists? Meanwhile, my order got the right treatment when I came back the next day. As usual, I was satisfied and I'll always come for more C Homework Help . I also suggest that they give priority to loyal customers like us, please.

Rose Watkins said...

It's always very hard to trust any Statistics Assignment HelpStatistics Assig provider online. Most of them are propagandists that never put their grades where their fake academic qualifications are. Only the experts found on statisticshomeworkhelper.com have ever met my expectations. Find a Master's or Ph.D. Statistics Homework Help specialists on the platform and they'll score the best grades. I love them.

Rose Watkins said...

My previous order had the most limited time to submission. It was due in only 6 hours, and to make things worse, I forgot to mention that it's an emergency order while placing the order. To my surprise, The Matlab Assignment Help expert completed it within three hours and sent me back the solutions. The score was 81.5%, the best I've had with an emergency assignment. I can say that Matlab Homework Help has the best programming brains. Keep it up!

Rose Watkins said...

I have not received a prompt response from The Economics Assignment Help website. I submitted my assignment 30 minutes ago and I am still waiting for their response so that I can pay for them to start my work. I have seen on the website that they have many Economics Homework Help experts. I have not chosen any of them because I believe after looking at my work they will know who can deliver the best on it.

Evelyn Audrey said...

I always blow my mind with their diligent Programming Homework Help. Most of my programming academic grades are from your C++ Homework Help” services. That's why I highly recommend the services to any ambitious programming student that wishes to take his/her academic grades to the next level. Their prices are also affordable, and that's good news for students.

Evelyn Audrey said...

I always blow my mind with their diligent Statistics Assignment Help. Most of my programming academic grades are from your Statistics Homework Help services. That's why I highly recommend the services to any ambitious programming student that wishes to take his/her academic grades to the next level. Their prices are also affordable, and that's good news for students.

Evelyn Audrey said...

I enjoyed their prompt service and loved the great results. The diligent Matlab Homework Help is the best I've ever come across in all the online platforms that have given me the same service.Matlab Assignment Help experts are hands down the best If I need more of their services, I'll come again for it. Meanwhile, I wish them the best in their struggles to change students' lives.

Evelyn Audrey said...

I am just starting in economics and that is why I am looking for an Economics Assignment Help expert to help me complete my assignments for the next four years. My first assignment is due in 4 days and therefore if the Economics Homework Help quality is good then they will have secured a deal for the next four years.

opbest said...


Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article...
but I put things off too much and never seem to get started. Thanks though.

Try to check my webpage :: 풀싸롱

(freaky)

Blogger said...

Hi, I am John Smith I am Web Developer, It is an amazing blog thanks for the sharing the blog. Frantic infotech provide the android app development such as an information about software development for costumer service. Franti infotech also provide the mobile app development. The development of advanced web applications is Orient Software’s specialty and we will successfully fulfill all your web application development requirements, from small-sized to wider-ranged projects.

onlineAssignmenthelp said...

We provide online quiz help answers to school, high school, college and university students. Our experts are accustomed to using multiple quiz portal platforms such as blackboard, canvas and modal. We have hired experts from various fields of education. So that you can give us an online quiz support service on your required services. Experts know how to solve explanatory questions and objective type questions. They will finish your quiz or exam on time.

https://www.thetutorshelp.com/online-quiz-help.php

Online Quiz

ONCADAY -VY said...

I’ve been surfing online more than three hours today, yet I never
found any interesting article like yours. It is pretty
worth enough for me. In my view, if all web owners and
bloggers made good content as you did, the net will be a
lot more useful than ever before. 카지노


-VY

Edison hope said...

Wow, this is lovely reading.I'm glad I found it and got to read it. Great job on this content. I liked it a lot. Thanks for the great and unique info.Yes, visa for Turkey from Canada or Canada traveling to Turkey will require an e-visa. All citizens have to complete the requested documents, go through the application process and pay the fee.

Daisy Lilly said...

Now, this is what I call a great read. I loved how you presented the need for professional assignment help services among students in today's competitive scenario. If you belong to the same lot you should definitely try out the My Assignment Help Australia facility offered by the diligent experts of the MyAssignmentHelpsAu platform. The highly qualified panel works day in and day out dedicatedly to produce 100% original and legitimate assignment outcomes for students pursuing their education in any nook and cranny of the world.

Tech Institute said...

I am really enjoying reading your well written articles. I am looking forward to reading new articles. Keep up the good work.
Data Science Courses in Bangalore

kumal kumar said...

What an incredible message this is. Truly one of the best posts I have ever seen in my life. Wow, keep it up.
AI Courses in Bangalore

Bhuvankumar said...

I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
Data Analytics Course

Unknown said...

Now you can secure the best grades in any online exams. All you have to do is request us for Online Exam Help services and we will be available immediately. Our MBA Online Exam Help is one of the most availed services. For any Chemistry Online Exam Help, please contact us by visiting our website.

Data Science Training in BLR said...

A good blog always contains new and exciting information and as I read it I felt that this blog really has all of these qualities that make a blog.

Data Science Training in Bangalore

Machine Learning Course in BLR said...

I am more curious to take an interest in some of them. I hope you will provide more information on these topics in your next articles.

Machine Learning Course in Bangalore

Professional Course said...

It is late to find this act. At least one should be familiar with the fact that such events exist. I agree with your blog and will come back to inspect it further in the future, so keep your performance going.

Digital Marketing Training in Bangalore

Omsdelhi said...

The Avana Tablet 100mg is used for the purpose of treating erectile dysfunction and works miraculously. It makes your body ready for sexual activity. With Omsdelhi, the tablets are properly delivered to the required address.

Professional Course said...

It is late to find this act. At least one should be familiar with the fact that such events exist. I agree with your blog and will come back to inspect it further in the future, so keep your performance going.

Best Data Analytics Courses in Bangalore

Training said...

Nice post. This is a great article and am pretty much pleased with your good work. Very helpful information. Thank you.
Best Data Science Courses

Unknown said...

This Bike rental in Bhubaneswar has become the first choice for the middle-income bracket as it is very convenient and keeps you stress-free. People who want to escape the paperwork of buying a car, instantly opt for a self drive cars in Bhubaneswar and Car rental in Cuttack which is equally reliable as your car.

Technical Knowledge said...

I just got to this amazing site not long ago was actually captured with the piece of resources you have got here and big thumbs up for making such wonderful blog page!
Data Scientist Course

Professional Course said...

I am more curious to take an interest in some of them. I hope you will provide more information on these topics in your next articles.

Data Science in Bangalore

Nathan said...

Really, this article is truly one of the best in the article. And this one that I found quite fascinating and should be part of my collection. Very good work!.
Data Science Training in Jaipur

우리카지노 said...

The assignment submission period was over and I was nervous, 우리카지노 and I am very happy to see your post just in time and it was a great help. Thank you ! Leave your blog address below. Please visit me anytime.

Professional Course said...

A good blog always contains new and exciting information, and reading it I feel like this blog really has all of these qualities that make it a blog.

Data Science Course in Nagpur

Leo Oliver said...


Academics who want assistance with statistics assignments could seek instantly straightaway. Statistics Assignment Help is the most beneficial assistance that any student can have. For every statistics student, they establish the integrated solution. They will undoubtedly be satisfied once they have obtained their solution.

onlineAssignmenthelp said...

If you have really availed the services of premium services, you will get A class writing help with the highest experience and advanced knowledge within the specific field or branch. Of course, this applies to almost all assignments and subjects, not just to civil engineering assignments. You don't have to worry about copied material or plagiarism, because we provide the most unique and high quality content with the original idea. We also provide references and resources used during the completion of the Civil Engineering Assignment Assistance Assignment.
Level 5,121 Castlereagh Street Sydney, NSW 2000
+61-280062221
info@thetutorshelp.com
https://www.thetutorshelp.com/civil-engineering-assignment-help.php

civil engineering assignment

Professional Course said...

Wonderful illustrated information. Thank you. It will certainly be very useful for my future projects. I would love to see more articles on the same topic!

Data Science Training in Bangalore

Unknown said...

Hi, I am Lucas malfoy I am Web Developer, It is an amazing blog thanks for sharing the blog. Frantic infotech provide the hardware app development such as an information about software development for customer service. Frantic infotech also provide the cross platform mobile app . The development of advanced web applications is Orient Software’s specialty and we will successfully fulfill all your web application development requirements, from small-sized to wider-ranged projects.

Hadin said...

Get Free Hard core XXX porn movies Watch high quality sex videos. Unlimited HD quality Xxx Videos, fresh porn tube, XXX SEX videos available at a very popular adult agency. To watch, click on them.

Unknown said...

Goa self drive car rental is a reliable mode of transport for the folks who cherish their freedom. It has become a sensation amongst youngsters and newly-wed couples. With Google Maps, the navigation becomes more fun than a hassle. Car rental in Goa can be booked on your mobile as soon as you land.

assignmentauthors said...

Research have shown that there are side effects of using this drug. These side effects ranges from hemorrhage, nausea, dizziness, strong uterine or abdominal cramping.
theology assignment help
assignment help
computer science assignment help
capstone project help online
article writer
content writer for hire
content writing services online
freelance writer for hire
ghost writer for hire online
write my assignments for me

Professional Course said...

Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.

Data Science in Bangalore

Unknown said...

Difficult to name the best seafood restaurant near me? Well, Goa’s like that. With so many excellent eateries mushrooming all over the place, spotting the best can be tough. For the best seafood junction Goa, go to Britto’s or Jamies, but for the Calangute restaurant it can only be Souza Lobo and Pousada by the Beach.

Fajil Hura said...

Hello, Golden Triangle with Udaipur Tour can be the best option to spend your weekend with friends and family. The most amazing part is that the Golden Triangle Tour Packages cover the important sites of the three most iconic cities. Feel privileged to indulge in the significant history of Lord Rama by opting for Ayodhya tour packages.

unknown said...

Want to make this family holiday unique? Rent a private pool villa in Goa. The gorgeous villas in South Goa with private pool are much more than this. They come with a host of enviable features that make for a splendid family holiday. Renting one among many luxury villas In Goa with private pool gives you exclusivity and family enjoyment.

Unknown said...

acheter permis de conduire en France
Comprar carta de conduçao
köpa körkort
comprare patente b
comprare patente b
kupiti vozačku dozvolu
Koupit řidičský průkaz
driver licence

Professional Course said...

Good blog and absolutely exceptional. You can do a lot better, but I still say it's perfect. Keep doing your best.

Data Scientist Training in Bangalore

morgan said...

real uk driving licence
comprare patente
comprare patente napoli
comprar carnet de conducir
carta de conducao verdadeira
buy ielts certificates without exams

buy ielts certificates without exams

«Oldest ‹Older   201 – 255 of 255   Newer› Newest»