I normally use resque for background jobs in Rails (with capistrano-resque for managing resque processes). But I decided to switch to Sidekiq on a new application.
I spent some time familiarizing myself with the best practices and came across this...
Read more…
Posted
May 5, 2017 at 5:42 pm
I’ve been writing a lot of SQL lately, as evidenced by my last couple posts. I was working on a particularly long query the other day when I thought, “it would be nice I could write SQL using partials to manage duplicated logic.” One quick Google search...
Read more…
Posted
April 25, 2017 at 11:39 pm
In keeping with SQL tricks I wrote about a few days ago, here’s another technique that I’ve found useful recently.
Let’s say you want to return the greater of two date fields in your result set. If you know that both fields will contain a date, then...
Read more…
Posted
April 1, 2017 at 2:05 pm
I have a client that uses NetSuite, a cloud-based CRM/ERP system. NetSuite records customer information in a datbase table called (surprise!) customers
. The table is self-referencing, so you can have customers
with many subcustomers
by setting the...
Read more…
Posted
March 28, 2017 at 4:26 am
As I see it, there are five types of internal documentation needed for software teams.
(Often, a software team will produce external documentation for their end users, in the form of a help section, user guides, or a searchable knowledge base. But...
Read more…
Posted
March 18, 2017 at 8:10 pm
I was reading The Pragmatic Programmer recently, and was struck by something I hadn’t considered before.
Be sure not to confuse requirements that are fixed, inviolate laws with those that are merely policies that might change with a new management...
Read more…
Posted
March 10, 2017 at 10:10 pm
Professional web design is always collaborative. Even if you are the sole designer or developer on a project, you are in collaboration with your client. What you create together will always be constrained in some ways by your client, as it will also...
Read more…
Posted
March 8, 2017 at 2:13 am
I’m kind of in love with static site generators (Middleman in particular). For marketing and informational sites that don’t change very often, I get many of the benefits of my normal Rails framework development and deployment toolset, with a simpler...
Read more…
Posted
February 24, 2017 at 8:53 pm
I was recently working on a Rails client project where certain pages needed to display various record types and each collection of records needed to be listed on the page, and needed to be editable in-place. So for example, let’s say a company had...
Read more…
Posted
February 22, 2017 at 2:29 am
If you need to maintain redirects for old pages in a Middleman site, you can do so by adding something like this to your config file:
redirect "/my/old-page.html", to: "/my/new-page/"
If you’ve only got a few redirects, this isn’t too bad. But if...
Read more…
Posted
February 14, 2017 at 6:55 pm