Parallel Assignment

Here’s a cool trick for dealing with situations where you want to assign multiple values at the same time. The technique used is called parallel assignment and it looks something like this:   View the code on Gist.   If you’re working with game boards, this is super useful way to pass around board coordinates!!

Something to Lookout For

If anyone actually reads this, here’s an unusual circumstance to look out for… circular object references that cause Pry to go BSC. (For those who don’t know, Pry is a Ruby shell that can be used as a replacement for the default Ruby shell, IRB (like IPython for python people).) Today I witnessed a pretty strange […]

Merge and Rebase

Some notes on thee specifics of merging vs rebasing with Git. What is a Merge? When you merge one branch into another branch the branch being merged into receives a single commit that basically brings it up to the current state of the source branch. This commit is created automatically by git and essentially represents […]

Sublime Text 2 and RVM

Did you know it’s possible to run (aka build) your Ruby code straight from inside of Sublime Text 2? That’s easy, just make sure your code is saved as a .rb file and hit Command+B.  But wait, there’s more… Did you also know it’s possible to run your Ruby code straight from inside of Sublime […]

Building Mastermind

AppAcademy had us coding some games today! Specifically, Mastermind and Hangman. When my pair Brittney and I started this we had both never heard of mastermind; so that was the first challenge. Turns out mastermind is pretty straight forward AND it’s actually a really cool game. Let me explain the rules of mastermind first… You […]

Pairing and Balance

Under construction still… Today was Awesome.  In my past experiences I’ve found that pairs balance out as they work but with Kriti I think we balanced out as a whole.  To explain that a bit further… Kriti is incredibly strong with recursion problems … like straight up a bad ass (and I have a line […]

Interesting Code Project of The Day

Here’s a fun snippet of code we wrote today at AppAcademy. Basically the goal was to take a bunch of couples who were into swinging and swap all of their partners.  Yep, swinging.. as in: Swinging or (rarely) partner swapping is a non-monogamous behavior, in which singles or partners in a committed relationship engage in […]

What is a Day @ AppAcademy Like?

Today marks the first day of my sprint through San Francisco based AppAcademy. It’s a pretty interesting setup.  Basically, you’re paired with a random person everyday and work through a large suite of problems assigned for that particular day. To say the least, you and your pair bust ass HARD until the end of the day. […]

PostgreSQL, and a Gotcha on Mac OSX Lion

I recently setup my development system from scratch and one of the tasks is installing PostgreSQL as my apps are almost always deployed to Heroku and they <3 PG. As you may or may not know, Lion ships with a castrated Postgres installation which (if you don’t already know this (!!!!)) can make it challenging […]

PostgreSQL Backup and Restore Commands

Just a quick note: Backup: $ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql} Restore: $ psql -U {user-name} -d {desintation_db} -f {dumpfilename.sql} Lifted from this great post @ TGS