For the whole of May, I will blog about weird things in Ruby over at Idiosyncratic Ruby – Don’t miss it!
Be More Productive with Better Sublime Snippets for Ruby!
Long time readers of this blog will remember that I used to tweak GNOME’s gedit editor a lot. However, I ditched it for Sublime Text and I am not looking back. Here are some of the things I like about Sublime:
- Offers a good out-of-the-box experience, including an amazing “fuzzy search” tool (ctrl+p)
- It works on ubuntu without any problems
- Fast (enough)
- Multiple cursors!
- Once you have installed Package Control: An integrated extension repository
- Encourages you to write your own extensions
- Looks good
Get your Microscope for MicroLogger: A small Logger on Top of MicroEvent.rb
Being impressed by MicroEvent.js I played with the thought to use such a library not only in JavaScript, but also in Ruby. The design pattern of this kind of message passing is called observer pattern and there is also a library in Ruby’s standard library and some more on rubygems.org. However, MicroEvent.js just nails it,
The CARB stack: Coffee + Angular + Rails + Bower
AngularJS is a great way to build modern web apps and this affects Rails programmers. The combination of both is an excellent choice: Build your single-page app in Angular and let it communicate via JSON with your Rails-API backend (btw, this is exactly what we did for palava). However, you might ask yourself, what the best way to combine Angular and Rails is. Should you use the JavaScript tools world (grunt, yoeman, etc.) or should you prefer the Ruby tools (thor, sprockets)?
5 Ruby Syntax Edge Cases
My lightning talk from this year’s eurucamp:
Ruby and Random
Wrongly used randomness can be the source of hard-to-detect bugs and security holes. This is relevant every time you use randomness, for example, when implementing an existing protocol/interface that requires random values or generating tokens for your next raffle. This article describes when to use which of Ruby’s randomness methods.
ActiveSupport 4 by Example: Numeric#to_s
The NumberHelper functionality is now available as Numeric#to_s