Cool tricks to do with Ruby, Rails and Pry: Date Parse, WTF, Safe Navigation Operator

23 October 2016

Not the machete kind of hacking.

Find Cool Hacks for your Work

Once every few weeks, I find contemplating a new feature or project I’d like to pursue either for a client or myself. Often, this involves building out a simple proof of concept. This is the path my thought process will go down:

  1. Build a mental picture, start to finish of the large building blocks (The high level, architectural view)
  2. For each large feature, quickly run through the individual implementation details in my head and identify the process needed to build that larger feature out
  3. Connect the dots

Invariably, there will be some detail that escapes my current knowhow. These days I typically solve that between reading source code and hacking around in Pry. What follows is a list of a few cool tricks and observations I’ve run across while finding solutions to future development. There will be more to come as I expand on it.


Rails 5 Base App With Sidekiq, Devise, Bootstrap, Cocoon

22 October 2016

Ruby on Rails

Always Have a Good Place to Start

Over the last few months I’ve had a couple ideas bouncing around in my head for experimental projects. After creating basic versions of them, I found myself repeating steps to set those applications up. So, I decided to DRY up my life and create a base Rails 5 application with all my usual configuration changes extracted out to a couple environment variables. Now, I can simply clone this application, change 3-5 lines in .env and immediately get to feature development.

Without further ado, the repo: Rails 5 Base Application Repo

Feel free to clone, fork and use for yourself. As long as I continue to develop with Rails, this repo will be evolving to keep my personal workflow efficient.


Modeling Postgres Common Table Expressions and Window Functions with Rails and ActiveRecord

21 October 2016


The following is a guest post by Daniel Rice of LD Studios:

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!


Efficiently Architect Ruby on Rails Applications

09 September 2016

Rails Architecture

Get Your Codebase In Shape

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.


Efficiently Develop Ruby on Rails Applications

08 September 2016

Develop Efficiently

Why Focus on Efficiency During Development?

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.


Previous Page: 7 of 11 Next