The 5 Most Popular Articles of 2011 on RubyLearning

(Based on Twitter Re-tweets)

The year 2011 saw RubyLearning’s awesome guest authors write and share their knowledge with others. If you missed any of these useful articles then here’s the roundup of the 5 most popular articles of 2011 on RubyLearning. Enjoy!

Throw, Catch, Raise, Rescue… I’m so confused!

Avdi Grimm explains the usage of Throw, Catch, Raise, Rescue in the Ruby programming language.

You’ve probably noticed that Ruby has throw and catch… but they don’t seem to be used the way you’re used to in other languages! And there are also these begin, raise and rescue statements that seem to do the same thing. What’s going on here?

Read the rest of the article: Throw, Catch, Raise, Rescue… I’m so confused!

Performance Testing Rails Applications – How To?

Gonçalo Silva shows you how to do performance testing of your Rails applications.

Rails’ performance testing tools allow you to quickly detect performance bottlenecks. As a rule of thumb, use benchmarking to detect the problem and then use profiling to understand it.

Read the rest of the article: Performance Testing Rails Applications – How To?

Do you ponder what to name things in your code?

Evan Light asks – do you ponder what to name things in your code?

Most of the time, someone has to maintain that pile of crap you just birthed! It may be someone else. It may be you! But it’s always wise to pretend that the person who will own your code next is an axe-wielding lunatic who knows where you live!

Read the rest of the article: Do you ponder what to name things in your code?.

How do I smell Ruby code?

Timon Vonk talks about Ruby code smells in an effort to improve Ruby code.

Writing bad code isn’t a bad thing. Not understanding the problem you’re trying to solve any better after having written that piece of code is. Fortunately, that happens far less often.

Read the rest of the article: How do I smell Ruby code?

How do I test my code with Minitest?

Steve Klabnik introduces the readers to Ruby’s minitest.

You run your program, try a few different inputs, check the outputs, and see that they’re right. Then, you make some changes in your code, and you’d like to see if they work or not, so you fire up Ruby and try those inputs again. That repetition should stick out. There has to be a better way.

Read the rest of the article: How do I test my code with Minitest?

Your turn: Share the link to a roundup post you’ve written. If you’ve never written a roundup, try it this week. Be sure to share the link to your post here!

comments powered by Disqus