Bob Nadler, Jr. Bob Nadler, Jr.

Don't miss a post! Subscribe to my mailing list.

No spam, ever. Unsubscribe at any time.
Copy-Paste

xclip for Ubuntu

Published over 6 years ago less than 1 min read

Awhile back I wrote about pbcopy for OS X. These days I find myself using Ubuntu quite often and missed having pbcopy. Turns out there is a package called xclip that does the same thing on Ubuntu! Give it a try!

Read more →
Whooping Crane migration

Rails Data Migration Results

Published over 6 years ago 1 min read

When writing data migrations, it can be useful to know the number of records that were updated / created. If you run your migration in a Rails console, ActiveRecord will print out the database response object like this for PostgreSQL:

2.1.5 :008 >
Read more →
Copy-Paste

OS X pbcopy

Published over 7 years ago less than 1 min read

OS X has a nifty utility program named pbcopy that I just learned about which can be used to copy things to the system clipboard.

For example: cat foo.txt | pbcopy or pbcopy < foo.txt will copy the contents of foo.txt onto the system clipboard.

...
Read more →
Iceberg

Iceberg Classes and Inheritance

Published over 7 years ago less than 1 min read

Better developers than I have written about iceberg classes and why they are a code smell. I’d like to talk about a specific kind of iceberg class I’ve recently come across. This type involves inheritance. Here’s an example of what I mean.

class Job
Read more →
Rollback

Database Tests with Rollbacks in Clojure

Published almost 8 years ago 2 min read

I recently purchased a beta version of Eric Normand’s Intro to clojure.test screencast. In it, he demonstrates how to use the use-fixtures function to set up and tear down state for tests. The function can be used for :each test run, or :once. For...

Read more →
Welcome to Hoboken

Hoboken: A Sinatra Project Generator

Published over 8 years ago 1 min read

I'm a huge fan of the Ruby web library, Sinatra. I think its biggest strength is that it allows me to structure my applications to fit the problem at hand, instead of trying to shoehorn my problem to fit a pre-determined structure.

A couple of years...

Read more →
Setting up home

Setting Up Middleman with Jasmine

Published over 8 years ago 2 min read

Currently, my favorite tool for generating static websites is Middleman. I recently wrote my version of the TodoMVC app using Middleman and KnockoutJS. I wanted to use Jasmine for my unit tests and had a little trouble setting it up. Here are the steps...

Read more →
Scoreboard

GitScore Parts 2 & 3

Published almost 9 years ago less than 1 min read

Here are parts 2 & 3 to the GitScore project. They are a follow-up to an earlier post. I originally intended the screencast to be two parts, but I had to split up part two so that I would be under the allowed YouTube length. I've also put the example...

Read more →
Shadow Stormtrooper vs. Storm Shadow

Delegation in Python

Published almost 9 years ago 1 min read

At my current client, we use Python. The other day I needed to wrap a class from the requests library, specifically a response object. I wanted to add a couple of custom methods to the class and have the other methods delegate to the original object...

Read more →
Scoreboard

GitScore Part 1

Published almost 9 years ago 1 min read

UPDATE: Parts 2 & 3 are now done.

Recently I've been playing around with Screenflow, creating screencasts illustrating how I build Sinatra applications in Ruby. My goal was to create a few well-polished screencasts, but finding the time is hard. In...

Read more →