Get flash to fully experience Pearltrees
NOTE: This blog had a good run, but is now in retirement. If you enjoy the content here, please support Gregory's ongoing work on the Practicing Ruby journal. Ruby Best Practices Practicing Ruby's second volume now freely available
Originally published as part of the Practicing Ruby newsletter on January 3, 2011. Most of these issues draw inspiration from discussions and teaching sessions at my free online school, Mendicant University . You should follow @seacreature on twitter if you want to keep up with my more recent projects. In this article, I’ve listed five people worth knowing about if you’re involved in Ruby.
Elementary strings assert_equal ' HELLO WORLD ' , ' hello world '
If you’re developing with Rails you’ve probably encountered rake once or twice. This blog post aims to walk you through where rake came from and an introduction on how to use it effectively in your Rails apps. A Little Bit of History
I always forget what kinds of crazy things you can do with Ruby's blocks and their parameters, so here's a little write-up on them. I regularly forget things I've learned (must be an age thing), and I found that not even books on the Ruby language fully cover all the gory details on block (and method) parameters. So consider this my personal reference of crazy Ruby block syntax features for future use. The Basics In its simplest form, a block parameter is a list of names, to which values passed into the block are assigned. The following iterates over all elements in the hash, emitting key and the corresponding value, printing both key and value.
As you might know, yesterday morning we had Monday talks at the office! Oriol talked about Object Oriented Nirvana , inspired by an old post about how to improve Object Oriented skills by using certain constraints while you're coding. Then I got immediately interested on how to automate this, and knowing how easy is dealing with the Rubinius' Abstract Syntax Tree, I decided to give it a try and develop a tool that statically analyzes Ruby code to gain insights from it.
Over the years, I've saved the Ruby techniques that have surprised other Rubyists I know. Now past 100, I'm making an e-book of them! It'll be free in all forms, except on the Kindle where it'll be just a few bucks (I want to see if cheap, fun programming Kindle books can work.) To start, I've picked 24 random "tricks" to show off in the video below. Enjoy! (And remember, this is a bit of frivolity, not an exercise in Ruby best practices ;-))
From Techotopia Purchase and download the PDF and ePub versions of this Ruby eBook for only $8.99 In the Understanding Ruby Arrays we looked at the basics of arrays in Ruby. In this chapter we will look at arrays in more detail. [ edit ] Combining Ruby Arrays Arrays in Ruby can be concatenated using a number of different approaches.