As developers, we're in the business of continually bettering ourselves. Part of that process is pushing ourselves to learn and use better code patterns, try new libraries, and pick up new languages. For me, the latest self-learning project has been picking up Python.
As I’ve worked with it, I’ve discovered the joy of list comprehensions, and I’ve been wondering what it would take to implement a similar syntax in Ruby. I decided to give it a try. This exercise yielded several insights into the inner workings of Ruby, which we'll explore in this post.
Everyone knows more is better. More kittens, more money, more apps. Why settle for one Ruby project, when you can have three? We'll take one Rails app for authorization and one to serve an API. Hey, let's throw in a Sinatra proxy server serving up an AngularJS app to while we're at it! Now we're cookin'!
In the modern web, API-based projects are becoming the norm. Why? For one thing, APIs are necessary to serve Single Page Applications, which are all the rage right now. From a business standpoint, APIs give companies a new way to charge others for access to their data. If you are part of a company that offers such a service, a great way to generate interest in your API is to offer a Ruby gem that makes fetching and consuming your data easy for Ruby developers.
In this article, we'll take a look at how to wrap an imaginary API in a new Ruby gem and share it with the world.
Attending and speaking at RubyConf Uruguay was my first time visiting South America and turned out to be a great experience all around.
The conference was run very well by the organizers/volunteers. It was the first time I experienced a conference that was primarily conducted in a foreign language. Aside from the conference, I had a lot of great experiences, most notably a bus ride that gave me new awareness of the hidden treasures of foreign adventure motor sports.
Every day when I'm programming, I invariably come to a point where I'm looking for a certain line of code in my project. I could just use my editor's "find in files" feature and look for it, but sometimes I need more fine grained control. What if I want to find all the lines of code that don't contain a certain phrase? What if I want to search on a Regular Expression? What if I want to easily save the search results to a file?
When I need MOAR POWER in finding something, I turn my favorite command line search tool:
ack. In this blog post, we'll explore the ins and outs of this fantastic application.