benfalk.com

my travels through time.

Fast Active Record Setup

Was doing some prototyping today that required some deeper knowledge of how active record transactions work. From doing my spike I found a great light weight setup to tinker around with Active Record and felt it should be shared.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'active_record'

ActiveRecord::Base.logger = Logger.new(STDERR)

ActiveRecord::Base.establish_connection(
  :adapter => "sqlite3",
  :database => ":memory:"
)

ActiveRecord::Schema.define do
  create_table :widgets do |table|
    table.column :name, :string
  end

  create_table :bits do |table|
    table.column :widget_id, :integer
    table.column :name, :string
  end
end

class Widget < ActiveRecord::Base
  has_many :bits
end

class Bit < ActiveRecord::Base
  belongs_to :widget, touch: true
end

Mumble Bot With Ruby

Last week my brother wanted to make a Music Bot for mumble that would stream music from di.fm. He found a pretty cool project that was started in ruby for a headless client. Here is the link to that project. Being a ruby inclined person this seemed like a chance to relax and do some code tinkering.

Watch Your Burn Rate

Straight from a Google search “define: burn rate” — ‘the rate at which an enterprise spends money, esp. venture capital, in excess of income.’ This really isn’t a term I have heard of before for that context, and I am here to tell you it’s something you’ll want to be mindful of.

"Investors don't want to see this"

Working From the Console

So about a month or so ago I made the switch to doing development fulltime on the console. The road hasn’t been exactly easy and there are times when I feel like going back.

Valley of Fire Weekend

Had an amazing time this weekend at the Valley of Fire. For those of you who have not been fortunate enough to visit, it is probably the coolest state parks I have been at to date.

Shame on Me

I have really been terrible at keeping up on this blog. Never really quite recovered from Christmas to get back into the swing of things. Any excuse I muster is really nothing more than that, an excuse.

Busy Busy Busy

The last week or so has been busy and I feel bumbed out that I have neglected my blog so much. It hasn’t been a terrible time though; in fact quite the opposite!

Google Analytics CLI - Part 3

Finished up the research on how to authenticate with Google for limited input devices. For reference that information is found here. I have been designing out a flow for the application to detect if it needs an authentication token and alert the user through the standard error with directions on what to do to and then begins checking for the user’s approval.

I haven’t make to much progress, but I am happy with what I have accomplished so far =)

TDD - It Means ‘Test Driven Development’

It’s probably only been the last couple years that I have really fallen in love with TDD. It helps keep your focus on quality by letting you write code that you wish you had. The implementation doesn’t matter, in fact it is the least of your concern. That is the beauty of TDD.

Hydroponic Peas

Here at the Fluencr office we have had a trusty peace lilly plant since the first week we moved in. My wife recommended it to us as they are known to help pull odors out of the air and so far it has been an amazing plant. Then a couple weeks ago by business partner decided to grow his own plant in the office, a pea plant.