Fast Reports: Exporting to a CSV in Ruby

posted in today-i-learned

 

Need to quickly export a collection as a CSV? Ruby has an awesome class just for this (named CSV of course). With this class you can quickly output a csv string which can then be imported into Excel, Libre Office, etc.

How to validate attributes for serialized objects

posted in articles

 

Rail's out of the box validation feature set is fairly rich. You have the validates shortcut DSL which maps to all the default validators. The ability to override those default validators through custom validator classes. Finally, you can also write custom validator methods for specific use cases. For the purpose of this article, we'll focus on custom validator methods.

Jedi or Sith Lord: Ruby's inject method

posted in articles

 

"Remember, a Jedi's strength flows from the Force."

The ruby inject method is a powerful ally in a jedi (ruby) master's arsenal. It is wielded easily to those who train with it and mastered by a jedi with both knowledge of the light and dark side of the force. The light side of inject involves the different usages for the method as well as the basic format of it. The dark side involves inject's power using symbol#to_proc shortcut methods.

A development roadmap for 2016

posted in articles

 

I recently read a blog post by Avdi Grimm about setting realistic expectations for a programming language roadmap. As a developer, constantly learning new skills is a must. While there are a ton of interesting languages to learn (and I would love to learn them all) I had to be realistic and split them into a priority listing.

  • 1
  • 2
  • 3
  • 4
  • 5