Category Archives: Featured Posts

Resources for Learning Ruby & Ruby on Rails

Over the past couple of months, I’ve been “hitting the books” pretty hard when it comes to Ruby and Ruby on Rails. Here are a number of resources which I have found to be useful and would recommend to other Ruby newcomers:

Tutorials/Guides and Documentation:

Screencasts, etc:

Good programs to code with:


Sublime Text 2

Github Tools:

Tower (mac)

Console Tools:

iTerm 2 (mac):

I highly recommend zsh (used in conjunction with prezto) for your shell

A Card “Force” Using Unintuitive Mathematical Odds

“A card force is one of any number of methods used in close-up magic to apparently offer a subject a free or random choice of card, when in fact the magician knows in advance exactly which card will be chosen. This can then be revealed later in the trick.”

Premise: We have a set of three cards, all of which are known to us. We attempt to force a specific card on the unsuspecting participant by instructing them to randomly point at one of three cards, which are all laying face down. Theoretically, they have a one in three chance of picking the correct card randomly. If they point at the desired card, we immediately instruct them to flip it, effectively “forcing” the card on them in one try. If this works on the first try, the trick will be especially impressive. However, if it doesn’t work on the first try, we still have a fall-back method:

If they point at one of the other cards, instead of telling them to flip the card, we pretend that they’re playing a game of elimination and we simply remove the card, instructing them to point again. If they point at the next incorrect card, we instruct them to remove it, leaving one final card: the correct one.

Potential downside: If they point at the desired card on the second step, then the “force” fails,
because when we remove it, the end card will actually be the incorrect one.

Cards used: Ace of Hearts (the desired card), Queen of Clubs, and 8 of Spades

Approximate Results After 2000 Simulations:
Times ended on Ace of Hearts: 1322 (0.661)
Times ended on Queen of Clubs: 339 (0.1695)
Times ended on 8 of Spades: 339 (0.1695)

Click here to run the simulations yourself using javascript

Odds of picking the right card during the first step: 1/3. If incorrect card is chosen on first step, we pretend it’s an elimination game and remove the card, leaving only two cards, the desired card, and the incorrect card. At this point, you might think there is an even 50/50 chance they will choose the correct card, but in reality, the odds of them choosing and eliminating the desired card are still 1/3 because it hasn’t been touched. The odds of them choosing and eliminating the second incorrect card, however, have increased to 2/3. This is unintuitive, but the simulation shows it to be true.

Because of the fact that we know which cards are which, we can effectively double our seemingly low 33% odds all the way to 66% simply by using this card force method.

The only unsolved problem is, how do you handle a dead end where someone chooses the wrong card, and then the right card on the second step?

Hot Air Balloon Ride

This past Saturday, I went on a hot air balloon ride! We went over a mile high, and it was awesome!

My business partner, Chris Tingom, came along (he rode in the other balloon) and he took a video of the experience, and a few photos. I took a video as well, but he beat me to the punch in getting something up online, so I’m just going to show you his stuff for now. At some point, I’ll eventually get mine all edited and up online for viewing, but that could be a while.

Balloon Ride

Balloon Ride

Balloon Ride

Litmus Test for Door to Door Sales

If I ever get down on my luck, I’m totally going to start a business selling “No Soliciting” signs from door to door.

The way I see it, it’s practically a guaranteed sale…

“Sorry, we’re not interested in whatever you’re selling! In fact, we hate door to door sales people!”

“Well in that case, you’ll love this sign!”

The best part about it is that if they don’t buy the sign, you can just come back every week until they do. After all, they don’t have a sign saying you can’t!

Boot up Windows before you even log in

If you don’t use any Windows XP login security, then you can skip this article. Otherwise, if you are like many Windows XP users who have to enter a password every time their computer sluggishly boots up, then read this!

Ok. Here’s the scenario:

You have to wait 2 minutes while your computer turns on. You have to sit in front of your computer during this whole time because once it finally gets to the login screen, you have to type in the password. The computer then crunches numbers for another 2 minutes while it loads a wide variety of programs (MSN messenger, your Norton Antivirus, your Microsoft Office shortcut bar, etc…). Finally, after like 5 minutes, you have access to your desktop.

How would you like your computer to load all those programs *before* you ever have to enter your password? You could press the button to power up your system and go get a cup of coffee. Five minutes later, you come to your desk and type in your password. BAM! Instantly dropped to the desktop! Your programs are already running and all systems are a go!

Here’s how to do it:

  1. Download Microsoft’s free TweakUI tool and install it.
  2. Click your Start button, go to your Programs menu, and select Tweak UI from the “Powertoys for Windows XP” folder.
  3. In the TweakUI window, double-click the “Logon” item in the left-hand column to expand it.
  4. Click on the “Autologon” item underneath the “Logon” section.
  5. Check the box that says “Log on automatically at system startup”
  6. Click the “Set Password” button and enter in your windows login password
  7. Click OK and close Tweak UI.
  8. Download this .reg file and run it. When it asks you if you want to merge it with your registry, choose “Yes”.NOTE: If you feel queasy about merging a reg file with your registry, you can also add it by hand. Go to Start > Run and type in “regedit” and press OK. Browse to [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionRun] and create a new String Value. Name it “Lock Computer on Startup“, and set the value to “rundll32.exe user32.dll, LockWorkStation

Presto! You’re done!

Now, when you boot up your computer, it will automatically log you in to your desktop and start up your programs. However, it will still secure your system, requiring you to enter your password to access it.