By Daniel Rice on Oct 20, 2016 - RUBY ON RAILS , POSTGRES
Over the course of my experience as a developer, I’ve often found that when things get complex - they get really complex. Often times the key to a solution isn’t finding the one thing that solves a problem, but rather the combination of different functionalities that ends up being the solution that works the best. In the case of one of our pro-bono projects, I had a particularly difficult problem that I needed to solve - and the solution that I arrived at involved a combination of Postgres’ Common Table Expressions, Window Functions, SearchLight, and Rails Query Scopes. What on earth was I trying to accomplish that could possibly elicit this witches brew of open source technologies? Simple: I needed to take user-supplied input, sanitize it, geocode it, then ensure that the result set did not contain duplicates. Each of the tools listed above contributed in some fashion to the working solution!
Continue Reading...By Jeremy Samples on Oct 14, 2016 - RUBY ON RAILS
In an app I was working on recently, there was a requirement for a document (these were agreements of one type or another) to have many parties. In turn each of these parties needed to have an owner—and here’s where things began to get a little more complex—the party owners could be one of several model types. Ugh. Building a working select box for this functionality was going to be a mess. Or that’s what I thought initially. That’s when I happened across a few blogs about using Global IDs in Ruby on Rails. The Global IDs module became an official part of Ruby on Rails with the release of version 4.2. This module only includes a few methods and the one I ended up using most often is #to_global_id.
Continue Reading...By Nathaniel Rowe on Sep 09, 2016 - RUBY ON RAILS
It doesn’t take much reading in regards to rails before you hit the “Convention over configuration” line. In my early days of development I had little idea of what that meant, either in terms of implications or for concrete uses. Now when I see that, I immediately think of arranging files within your application, how everything has a place, and how putting things where they belong make it quick and therefore efficient to find the files that need to change, make those changes and then update specs or associated files easily. That’s less headaches, more features and happier client and developers at the end of the day.
Continue Reading...By Nathaniel Rowe on Sep 08, 2016 - RUBY ON RAILS
Time is money. If this was a movie and I was a learned monk, I’d leave it at that, turn around and walk away into the mist, leaving you on a journey to figure out the full meaning and implications of that for yourself. But this is a brain dump of where I currently am in how I develop, so I’ll go into the details of what I do to insure my time is well spent.
Continue Reading...By Nathaniel Rowe on Sep 06, 2016 - RUBY ON RAILS
By Nathaniel Rowe on Aug 31, 2016 - RUBY ON RAILS , PERFORMANCE ENGINEERING
Here’s the situation: Your amazing developer team has rocked your world with caching and other optimizations to get data from your client’s Rails server over to the users’ browsers. Your monitoring shows requests that were taking a whole 80-90 seconds to serve are now only taking 1500ms (and all that time is actually spent transferring megabytes of html to the browser, actual data retrieval is ~10ms). These numbers come from a recent project I did for a client with production data. Now, to tackle the last piece of speeding it up… Chrome browser is taking MINUTES (6 minutes, actually) to fully build and render the page after it’s received the data. 100% unacceptable. Time to drop in some asynchronous data transferral and a specialized Javascript library to keep things performant on the client side!
Continue Reading...By Nathaniel Rowe on Aug 24, 2016 - RUBY ON RAILS , PERFORMANCE ENGINEERING
It’s inevitable that as you develop applications, clients and users will want searching added. Completely inevitable. What happens when you need to extend beyond searching fields that are saved on your models? There’s also the ever present need to keep things scalable. Having a solution that grows with you and isn’t tied 100% to your schema can not only impress, but save you time in the long run. Check out Solr, the incredibly powerful search solution from Apache. In this article, I’ll show you how to set it up and how to do a basic search.
Continue Reading...By danielrice on Jun 15, 2016 - RUBY ON RAILS
If you’ve built many Rails application, odds are high you’ve encountered the Devise gem. Devise provides several standard features we have all come to expect from modern web applications, such as logging in, securely storing passwords in a database, user tracking, and automatic session expiration. However, when you must authenticate with a new service or your company has its own authentication mechanisms (for example, an SSO portal) do avoid the temptation to design your own authentication service. Instead, follow the steps in this guide and you’ll be able to use Devise and Warden with any form of authentication.
Continue Reading...By Lauren Schneidewind on Apr 15, 2016 - BUSINESS
The Start-Up world is in right now and everyone has a great idea they want to bring to life. This world is new and exciting, and everyone seems to want to jump on this roller coaster of a ride. Unfortunately the success odds aren’t great. We have all heard that 90% of start-ups fail. Did you also know that of that only 10% of the successful businesses make it past $250k? It gets even slimmer with only 4% of successful businesses making it past the one million dollar mark. There are a couple of reasons why start-ups fail and they have nothing to do with your awesome idea. I am here to tell you that your idea, as cool as it might be, isn’t that important in the big picture.
Continue Reading...By Nathaniel Rowe on Mar 29, 2016 - RUBY ON RAILS , HEROKU