Monday, July 16, 2012

Requests

At Hacker School, there is a week where we all divide into groups, choose an open source project, and make a contribution. Group sizes vary based on interest in a project and you can have subgroups within the groups.  My group chose to contribute to Requests, an easy to use HTTP library in Python.

We submitted a couple of documentation patches and a few code patches:

1) Documenting SSL client certs

2) Documenting Logging

3) Differentiate between two different types of Timeout errors. Before fix, two types were presented as one.

4) Fix infinite loop on wrong Digest Authentication

5) Add needed casts when POSTing data and files

Friday, July 13, 2012

Emoticons!

I didn't know you can express yourself with emoticons on github until I saw this on one of my Pull Requests:

:sparkles::cake::sparkles:

Thanks Kenneth for bringing this to my attention :)

Checkout this sheet for some ideas.

I think my favorite might be the squirrel wearing the Fedora hat :)

Sunday, July 1, 2012

Debugging iOS Network Traffic Remotely

In iOS 5, Apple added a remote virtual interface tool that allows you to capture network traffic received by an iOS device from your computer. This is super helpful when debugging media applications, and you need to see what packets are actually received on the device. Thanks Apple!

For this you will need:
  1. MAC computer (I had Xcode 4.2.1 when I tested this)
  2. USB to iOS device connector
  3. A iOS device (must be iOS 5+)

Instructions are easy!
  1. Plug the iOS device into your MAC.
  2. Launch iTunes, and click on Serial Number once. It will turn into UDID. Command-C to copy
  3. From a terminal, type the following:
%rvictl -s [device's UDID]

Starting device [device's UDID] [SUCCEEDED]

To see a list of all virtual devices, use the command below:
%rvictl -l

Current Active Devices: (Example)

 [1] 0a439a06d606d6a293ead9b44546b7fb86110e70

Now, a virtual interface has been created for your iOS device. To double check this, run 'ifconfig'. You should see a line in the output similar to below:
%ifconfig
rvi0: flags=3005<UP,DEBUG,LINK0,LINK1> mtu 0

You can now launch 'Wireshark' and start capturing on interface rvi0. You should see a capture of all network packets received and sent by that device. The device does not need to be jailbroken.
You can capture your MAC computer's network traffic as well if you'd like. Just launch a second instance of wireshark. You can do so from the command line:
%wireshark -i [interface]

An alternative I found on the internet for capturing network traffic from devices (though I haven't tested this):
  1. Plug your mac into a wired network connection
  2. Enable internet sharing from your wired network connection to your wireless network connection.
  3. Have iOS devices connect to the new network available from sharing.
  4. Point wireshark at your wireless NIC and run captures.

Friday, June 29, 2012

How to find the wireless password on Mac OS X

I keep forgetting how to do this and I always have to look it up.  So writing a reminder note...


1. Launch Spotlight. Command (⌘) Space will launch Spotlight so you don't have to use the mouse




2. Click on Keychain Access Application


4. Click on the System tab. It's in the top left. The default is login. See pic below




5. Find the SSID of key that you are trying to recover and double-click on it


6. Select the 'Show Password' checkbox
7. Enter your admin password 
 And viola! You have the password.

Monday, June 18, 2012

Working with Github

Here are a few commands I use when working with Github:

Delete a local branch:

First switch to another branch, then:

git branch -D <branch name>

Delete a branch from Github:

git push origin --delete <branch name>

Pushing a branch to Github:

git push origin <branch name>

Updated a branch you forked with changes from the original project:

Track the project and create a tag for it, so you can access it by that tag.
git remote add <tag name> <github url>

Fetch the changes

git fetch <tag name>

Merge the changes from a specified branch

Note: This will merge the changes in the specified branch into whatever branch you're currently on. You can check which branch you're currently on by doing 'git branch'.
git merge <tag name>/<branch name>

Example, pulling from git-extras project:

git remote add git-extras git://github.com/visionmedia/git-extras.git
git fetch git-extras
git merge git-extras/master

Thursday, June 14, 2012

Hacker School: Week 1

I'm so excited to be attending Hacker School and to be in NY!!!

And to the contrary of what everyone said about New Yorkers, they have all been really nice.

It has been an amazing first week at Hacker School and Etsy. Etsy has a fun office and conference rooms full of crafts.  And they gave us an amazing warm welcome:



Etsy also has Eatsy's on Tuesday and Thursday which they've graciously invited all Hacker School students too! I'm loving the culture of this company. Their VP of engineering, Marc Hedlund, stopped me in the hallway to chat with me about how school is going. He was very down to earth, and I appreciated the time he took from his busy schedule to make sure everything is going well. This would be a fun company to work at.

And now to Hacker School.  I love the model of unstructured schooling they provide. You pick what you are interested in and you dig deep, and they have mentors to guide you along the way.  It's the type of learning environment for self-motivated people. Though I think if you are truly interested in a topic, you will be self motivated. We have daily check-ins to help keep us on track. One of my items is to contribute to open source projects, and that's what I did in week 1.

I had never contributed to open source before, and I've never really interacted with github. But now you can follow me at github  and see my progress :)


For my first couple of projects I picked a project called git-extras and of course the famous git, because I love git!

And to my ex-work team. Sorry it took a while to get the blog post up. It was an intense week. I miss you guys! Hope you enjoyed the pics I promised! More posts to come...

Wednesday, June 13, 2012

First Post :)

My first post on my first blog. Here goes...

I've always wanted to document the interesting issues I face while programming. So I'm finally doing it after many years of "I should document this somewhere...".

Happy Reading :)