When you can't solve a problem, consider injecting new information

I used to come across linear algebra problems in math class that seemed impossible to solve. Consider trying to find the value of x, y, and z given this set of two equations:

4x + 3y + z = 8
x + y = 2

If I plug this into Wolfram Alpha, all it can tell me is "y = 4 - x". That doesn't solve for x, y, and z like we want. The problem is intractable.

Something is wrong with the Internet

When I was younger I believed in the Internet. I believed the Internet was a brave place, where knowledge and culture was disseminated freely. I saw it as a place where you could tap into unparalleled knowledge and improve yourself.

Sometimes you make a git commit, but there's a typo or syntax error in there by accident. I normally use git rebase -i HEAD~2 and then through the magic of vim I'm fairly productive at squashing the two commits together.

But wouldn't it be nice if there was a way to run one command to squash your most recent commit (which probably has a useless message like "typo" anyway) into the next most recent? Lucky for you, there is now!

Copy ssh key in one command

This is absolutely brilliant

cat .ssh/ | ssh 'cat >> .ssh/authorized_keys'

All credit to Matt Might

Working more efficiently with rails migrations

I've been working on a major schema refactor on a rails application recently, and time and again I've had to reset my database because of some syntax error or another in my migrations. I'm changing schemas and moving data between columns, which makes the migrations really fragile.

It's also been fun learning about the rake tools that allow you to manage database migrations. In particular, three rails commands have come in handy:

In praise of the spreadsheet

Spreadsheets are amazing. They are arguably a Turing-complete programming language (only stretching the definition slightly). There are definitely as many spreadsheets as people in the world, and I'd even guess there are over a trillion actively used spreadsheets out there somewhere.

Parkinson's Law

I just found out about "Parkinson's Law", which simply stated says that "work expands so as to fill the time available for its completion". Students, take note! You could spend hours in the library procrastinating on Facebook and saying you don't have time to hang out with your friends, or you could hang out with your friends and then do the work on a deadline and get it done decisively.

Subscribe to RSS - productivity