April 14, 2016No Comments

How to represent money in Ruby

money in Ruby

Money. It makes the world go round.

It’s also rather important to many web applications, in that it’s what we ask our customers to give us in exchange for goods and services. And when we do, both us and our customers want those financial calculations to be very precise. Even tiny rounding errors add up, given time.

Read more

May 22, 2015No Comments

Ruby Rogues and the Double Life of Tests

nrtest2

[Authors note: So, I wrote this in December, and promptly forgot about it for five months. It happens. I've annotated slightly.]

I was excited to be a guest on Ruby Rogues this week [note: actually last December] to discuss my book Rails 4 Test Prescriptions, available now as an ebook, and coming very soon [note: available now]  as a physical object that you can buy or, say, give as a gift to all your friends. [note: still a great idea, please buy for all your friends].

Read more

August 21, 2014No Comments

Madison+ Ruby 2014: 5 Questions with Noel Rappin

madison-plus-ruby-93px-tallAfter months of anticipation it's finally here: Today kicks off Madison+ Ruby  in Madison, WI. I had the chance to sit down with Table XI Senior Developer Noel Rappin to find out makes Madison+Ruby a truly special conference.

Read more

June 12, 2014No Comments

Rails 4 Test Prescriptions: Build a Healthy Codebase

Your Ruby on Rails application is sick. Deadlines are looming, but every time you make the slightest change to the code, something else breaks. Nobody remembers what that tricky piece of code was supposed to do, and nobody can tell what it actually does. Plus, it has bugs. You need test-driven development, a process for improving the design, maintainability, and long-term viability of software. Table XI's Senior Developer & Agile Coach, Noel Rappin, can help.

Read more

February 13, 2014No Comments

Greg Baugues Talks Devs & Depression on Ruby Rogues

ruby roguesRecently, our old colleague Greg Baugues chatted with the guys at Ruby Rogues about a subject we think is one of the most important facing our industry today: the prevalence and stigma of mental illness in the developer community. A programmer who struggled for a long time to identify and deal with his own ADHD and Type II Bipolar, Greg has given several talks about his own experiences and how to get help if you or a friend is suffering from depression or another kind of mental illness.

Read more

December 28, 2012No Comments

Pragmatic Flight of Fancy in Rails Testing

A common TDD concept is that you write tests targeting the most optimal API imaginable, rather than contorting your code around current production realities. It’s possibly the most practical form of flight of fancy anyone has ever considered. Run free in a field with your API before you build retaining walls to thwart mudslides. The resulting code is much better because you work toward the best possible experience, deferring details for as long as possible. It’s amazing how well the process works in all types of contexts.

Read more

October 10, 2012No Comments

WindyCityRail’s Ray Hightower Talks Ruby Conferences

Last month all our developers took a trip to the south side of Chicago for WindyCityRails. It was a great conference, and afterward I talked to WCR organizer Ray Hightower about this year's event, what we can look forward to in 2013, and what other conferences Ruby developers should keep on their radars.

1. First off, how was Hawaii? 

Hawaii is wonderful! Aloha Ruby was a very well-organized conference full of smart people. I presented RubyMotion to a group of experienced iOS and Ruby developers. Some of the attendees produce the blogs, screencasts, and books that I use as reference materials. It was very challenging to have my teachers and mentors in the audience!

2. How did WCR 2012 compare to WCR 2011?

WindyCityRails 2012 was held on two weekdays, while previous years' events were Saturday-only. Last year's post-conference survey told us that attendees prefer to spend weekends with their families, so we shifted the dates to make that work. This year's attendance was higher than last year's even though we raised the price to cover two days of conference expenses. And of course, the venue was beautiful. The South Shore Cultural Center is in the middle of a golf course next to Lake Michigan. Since South Shore was so well received by the audience, WindyCityRails will return to South Shore in 2013.

3. What would you like to do differently for WCR 2013?

WindyCityRails 2013 will place heavier emphasis on the technical side of software development. For 2013, we've already confirmed two speakers who deliver large software projects on a regular basis. We will balance the increased technical emphasis with some creative ways for attendees to interact with each other. It would be great to make creative use of the golf course or the lake in 2013. Wonderful things happen when smart people collaborate, and WindyCityRails is a catalyst for powerful collaborations.

4. If you could recommend one non-WCR conference to a Rails dev, which would it be?

It's hard to recommend one, since I enjoy several conferences every year and each has special strengths. Aloha Ruby is exciting for the tech-cred of the audience and the speakers, plus the tropical island venue. MadisonRuby draws Ruby innovators from all over the world, and the organizers do a great job of bringing the local business community into the conference. If I'm giving a recommendation to a Chicago-area dev, I would lean toward MadisonRuby.

5. As a novice Rails dev in Chicago, what extracurricular activities should I be getting involved in?

Novice devs (and advanced devs too) will benefit from ChicagoRuby's monthly events. ChicagoRuby runs three activities each month, bouncing between downtown Chicago and the suburbs. Several strong groups can be found through Meetup.com, including Refresh Chicago, Rails Builders, and Chicago JavaScript. Finally, all devs grow stronger with practice. One great way to practice is to pair program with other devs.

Thanks for the tips, Ray!

Want access to more articles like this?  Subscribe now to stay up to date on the latest from Table XI 

September 24, 2012No Comments

Code Like a Chef Lightning Talk

On September 6th and 7th, all of the Table XI developers attended Windy City Rails. Along with the long-format presentations, Windy City Rails featured lightning talks, a rapid-fire series of five minute talks on a variety of topics.

On Thursday, our own Mike Laurence gave a talk called "Under the C," about how he has used C to drastically speed up his Ruby programs. Call us biased, but the consensus is that Mike's was easily the best of the Thursday sessions. Mike is a natural on stage, and years of vocal performance training has made him an excellent speaker. Presenting technical topics in a way that's accessible but interesting to all skill levels is a difficult task, and Mike nailed it.

On Friday, I gave a lightning talk based on my Code Like a Chef series. The official WCR videos will be released in the coming weeks, but you can watch the bootleg version below.

Thank you to Ray Hightower of The Wisdom Group and the rest of the Windy City Rails team for coordinating a great conference, and for giving Table XI the opportunity to get on stage. We look forward to another great conference next year.

Want access to more articles like this?  Subscribe now to stay up to date on the latest from Table XI 

August 28, 2012No Comments

A Ruby Gem for Fantasy Football Data

Last week I released my first Ruby gem - a wrapper for the Fantasy Football Nerd API.

I started playing fantasy football last year, not because I was an NFL fan, but because of the data. Inspired by Moneyball, I had a hunch that a data-driven approach would give me an edge over those who make decisions based on emotion, team allegiances and gut feelings. It seemed inefficient to watch twelve-hours of games on Sunday and to wade through half-a-dozen sites for news and analysis. I thought that there should be a better way to play the game - a way to filter out the noise and efficiently make objective decisions.

The first step was to find an easy-to-consume source of fantasy football data, which led me to Fantasy Football Nerd - a site that aggregates projections from twenty-six sources and weights them based on historical accuracy. Their "wisdom of the crowds" approach mitigates the risk of relying on a single pundit, similar to polling the audience in Who Wants to be a Millionaire.

I used the projections and player data from the Fantasy Football Nerd API ($9/season for full access) in conjunction with the Yahoo Fantasy Sports API to build an information dashboard in Ruby on Rails to pull all the relevant information about my team into one location, while ignoring the rest.

My app let me juke and jive. I identified undervalued players and started guys from my bench if they faced a weak defense that week. I picked up kickers expected to perform well one week, and ditched them the next. By the end of the season I had made over 60 "moves" (adding and dropping players), whereas the rest of the league averaged less than twenty.

How did it work out? I won my league... not bad considering I couldn't name five quarterbacks before the start of the season. I admit that I came to love the excitement of watching my players on Sunday, and the camaraderie of  discussing the game with fellow managers during the week. I realize now that I had never become a football fan because I make a poor spectator -  fantasy football gave me a way to participate.

The 2012 season starts in one week, and I can't wait. I've joined a more competitive league, refactored my tools, and I'm hoping to repeat my success. It's far from guaranteed - football has a huge variance due to a small sample size of sixteen games and an unbelievably high rate injury rate (only half the players I drafted made it through the season unscathed). But, this data-driven approach provides a compelling programming challenge, a non-trivial edge on the fantasy football field, and a reason for a geek like me to participate in America's favorite cultural obsession.

Want to start visualizing your project risks?  Download our free Software Risk Management template

July 25, 20122 Comments

Visualize Your Schema with the Erd Gem

Before stepping into the Railsconf 2012 lightning talks, the last time I saw a database schema visualizer was when Microsoft Access 97 was cool. Okay, that time may never have existed, but I can verify that I personally haven't run into too many visualizers since those days. Enter the fine cookpad engineers who came all the way from the Land of the Rising Sun for Railsconf festivities, including the lighting presentation of a fun gem called erd. It gives you a graphic birds-eye-view of your schema and it's pretty easy to use:

[powershell gutter="false"]
gem install erd
[/powershell]

Then start rails server and look for the magic at localhost:3000/erd

If you get the following error:

[powershell gutter="false"]
Saving diagram failed!
Verify that Graphviz is installed and in your path, or use filetype=dot.
You'll want to download and install Graphviz
(hombrew users can 'brew install graphviz')
[/powershell]

I find erd handy when trying to understand a new project quickly. Let's say I want to see how a simple blog application, enki, thinks about its data.

After following the install instructions and installing the erd gem*, we see the fruits of our labors:

Not bad. Gives a nice overview of the schema and jumping off point for understanding a new project. It even has (fledgling) support for editing the schema and generating rails migrations.

Which Access 97 feature shall we port to rails next?

* I also needed to comment out a clashing route:

[ruby]
scope :to => 'posts#index' do
get 'posts.:format', :as => :formatted_posts
#get '(:tag)', :as => :posts
end
[/ruby]

Photo Credit: John Parker

Want access to more articles like this?  Subscribe now to stay up to date on the latest from Table XI 

GoodFirms Badge