Page 1 of 4

ActiveResource Errors Aug 9

Learning about ActiveResource Errors

I’m working on a TransferMembership action that creates new wine club memberships in a handy new subscriptions service based on current memberships in our application. One of the things that was confusing me is...


Optimizing Query Specs Jun 21

TLDR;

Tests were taking a while but I cut them down from half a minute to 1/3 of the time

Before:

Finished in 25.59 seconds (files took 4.84 seconds to load)

After

Finished in 4.61 seconds (files took 4.82 seconds to load)

Post mortem


Accessing the right database Jun 19

Wiping my freaking Database

I spent a good hour or two getting a scrubbed copy of the production db on my machine, then I ran my freaking tests and POOF, all gone in a few seconds. What had happened was, my test and development databases were the...


Explicit block arguments Jun 19

Quick note on block argument syntax

I was passing in a @data array of arrays from the controller and accessing the contents per item like so.

@data.each do |item|
  puts item[0]
  puts item[1]
  puts item[2]
end

BUT!!!!! I can be more descriptive...


ActiveRecord average with `limit` method Jun 19

Taking the Average with a limit method

User.create(spending: 100)
User.create(spending: 200)
User.create(spending: 900)

User.average(:spending) # => 400

Accessible Websites for Visually Impaired Jun 6

There’s a ticket to improve websites for visually impaired. Initially, I figured it would take a lot of work, but then I realized I don’t really know how to create an accessible website. I’m checking out some sites to get a better idea of what it...


Efficient Database Tasks Jun 6

Learned about generating a rolling revenue windows for a user and I was taught a few points I didn’t consider at first:


Pull Requests for a Better World May 5

via GIPHY

PRs, a response from a noob

One of the things I’m learning to do is write better pull requests (PRs). I’ve gotten through the basics of Git so now I can think about what’s actually happening on a higher level i.e. that we are collectively...


Week 8 Review Apr 3

Goals Review


Raising errors

One way to control execution flow in Workflows involves raising errors and rescueing it in the main run method. This pattern can be used when...


Week 7: Review Mar 24

Goals Review


Revamping the notes

I decided to just write my notes and look them over weekly instead of dumping a bunch of stuff every day. It was getting to be a bit tedious...


Next page