Mildly Internet

Latest Posts

# March 12, 2016 | life

Sydney in the Summer

News Year’s Eve in Sydney on the beach. What could be more splendid. Yes I realize I’m posting these three months late.

Read more...
# February 05, 2016 | code

Conditionals Are the Screams of Missing Objects

In object oriented programming we dislike the idea of type checking - thing.is_a?(ClassWeKnowAbout). We prefer to just send messages to objects and not care what class they are. In Ruby a conditional - if / else / end - is a type check. Don’t believe me? Consider the following code:

Read more...
# February 03, 2016 | code

Rust with Ruby

I’ve been writing a bit of Rust lately and I was super curious to see if I could embed Rust within Ruby to optimize some hot spots in a few programs I’d written. To test this out I implemented a Sudoku solver in Ruby using a simple brute force approach - very slow and very memory intensive. Nothing fancy or elegant. But an excellent candidate to see how much faster I could make it go.

Read more...
# December 02, 2015 | business

How Expensive Are Your Meetings?

I think too few people realize how much money and productivity their meetings drain. A one hour meeting with eight people is eight hours of lost work time - a full day of one employee’s time.

Read more...
# November 05, 2015 | life

Oregon Coast

Recently decided to drive up the Oregon coast as part of a longer road trip from Tahoe to Seattle. Encountered some beautiful rain and fog that made for a surreal driving experience.

Read more...
# November 04, 2015 | code

Profiling Rails Boot Time

Is your Rails app starting to feel sluggish when running common start up commands like server, console and rake? Let’s take a look at debugging rails applications that take a long time to boot.

Read more...
# May 06, 2015 | life

Vancouver

Recently I took a short trip out to Vancouver, Canada. Saw the Canucks beat on the Maple Leafs. Wish I had taken a few more pictures. Overall, I enjoyed my brief stay. Next time I visit I’ll hopefully get the chance to put together a list of must see / do activities.

Read more...
# December 22, 2014 | code

Three Sum

Given an array and a value, find if there is a triplet in the array whose sum is equal to the given value. If there is such a triplet present in the array, then return true. Else return false. For example, if the given array is [-12, 3, 5, -2, -10, 19, -1] and given sum is 0, then there is a triplet (-2, -1 and 3) present in array whose sum is 0.

Read more...
# December 16, 2014 | code

Tailing Logs in Capistrano

Quite often you might find yourself wanting to tail the logs for your remote servers. SSHing into the remote machine and manually tailing the logs is a bit cumbersome, so I’m going to show you how to do it with Capistrano (v3).

Read more...
# December 05, 2014 | business

Skip the Product Roadmap

Product Roadmaps are dangerous. By committing to a long term roadmap (several quarters in length) you are choosing to make decisions several months down the road with only the data you have today. In those months things will change - priorities, customer base, cash flow. Key personnel may leave your organization, or due to unexpected success your team may now be much larger. Being stuck to a rigid plan make its hard to adapt to these kinds of changes.

Read more...
# November 05, 2014 | code

Bower & the Asset Pipeline

One of my biggest gripes with Rails as of late has been the way third party assets are treated. To upgrade a front-end dependency I have to delete the old file and copy the newer version by hand. In 2014 this just feels a little weird, especially when tools like Bower exist.

Read more...