Falsetto dude and the Fat man

A typical conversation between my wife and I: 

Playing Ne Me Quitte Pas by Nina Simone

Yoshi : Ow! What is that abomination? 
Amjith: It's a french song sung by the great Nina Simone.
Yoshi : It's a woman? Sounded like a dude singing in falsetto.
Yoshi : I'm leaving the room if you don't change the song.
Amjith: FINE. You play something then.

Yoshi puts on Ave Maria by Pavarotti. 

I wait for 2 mins.

Amjith: Hey! Your fat man seems to be yelling at Maria. 

Yosh leaves the room and I sleep on the couch.

The End

Scripting Tmux Layouts

Tmux is an awesome replacement for Screen. I have a couple of standard terminal layouts for programming. One of them is show below.

  • Vim editor on the left.
  • Top right pane has the bpython interpreter. 
  • Bottom right pane has the bash prompt. 

I have a small tmux script in my ~/.tmux/pdev file that has the following lines

selectp -t 0              # Select pane 0
splitw -h -p 50 'bpython' # Split pane 0 vertically by 50%
selectp -t 1              # Select pane 1
splitw -v -p 25           # Split pane 1 horizontally by 25%
selectp -t 0              # Select pane 0

In my tmux.conf file I have bound <prefix>+P to sourcing this file. So now anytime I want to launch my python dev layout, I hit <prefix>+<shift>+p. 

bind P source-file ~/.tmux/pdev

Downloading Specific Filetypes using 'wget'

I decided to prepare myself for the Intro to AI, a free online course offered by Stanford. I found the course website: http://www.stanford.edu/class/cs221/schedule.html and wanted to download all the slides. 

It's time to pull all the ppt files from that page.

wget -r -A.ppt http://www.stanford.edu/class/cs221/notes/ 

This created a tree of empty directories with one of them that had all the ppt files. Time to clean up the empty folders:

find -depth -type d -empty -exec rmdir {} \;

Ta-da! Empty folders are gone. 

Remember if you are typing a command more than once in succession there is a way to automate it. 

How to Find Local Tech Jobs

Looking for tech jobs can be daunting. Networking is touted as the magic bullet for job seekers. But where do you start?

Here are some robust ways to build your network.

Users Group:

User groups are typically monthly meetings for geeks who get together to talk about their favorite programming language or operating system. Usually they are accompanied with a mailing list which is used to announce the meetings, ask questions and post job openings. So sign up to the mailing list and start attending the meetups. They are full of really nice people who are willing to help. 

  • Utah Python - Utah Python Users Group
  • URUG - Utah Ruby Users Group
  • SLLUG - Salt Lake Linux Users Group
    • SLLUG-JOBS - Mailing list to announce job postings
  • PLUG - Provo Linux Users Group

Local Conferences:

Most cities have some tech conferences that are a great source for networking. I found out about a lot of the user group by going to one of the following conference.

UTOSC - Utah Open Source Conference.

HackUTOS  - Utah Open Source Project Day - Geeks, snacks and open source.

LaunchUp - A local entreneurship clinic. A great way to learn about the local start-up scene. You can meet new CEOs and fresh companies looking to hire tech talent. A must for job-seekers.

I hope this helps someone.

Contributing to Open Source

Last week I successfully submitted my first patch to an open source project and it was accepted. 

I like the bpython interpreter for all my python needs. It is quite handy for a python newbie like me. A few weeks ago I was in the middle of building an elaborate datastructure to learn list comprehension in python, when bpython crashed and took all the history with it. I whined about it on twitter and one of the developers of the project prompted me to submit a bug report. I was quite impressed by the fact that a core developer of bpython replied to my bitching on twitter.

After I filed the bug report, I decided to get the source code and poke around. I finally implemented a feature that saved the history after each command instead of waiting till the end of a session. 

The following factors were the main impetus that led me to contribute to the project. 

Project Hosting: 

The project was hosted on bit bucket which is a Github equivalent for mercurial. This makes it so easy to fork a project and issue pull requests, compared to the traditional source forge model of submitting patches in a mailing list. The social coding sites like Github and BitBucket have reduced much of the initial friction in starting an open source project.

Project Size:

This one has a huge impact when I decide to dive into the code. Traditional C projects tend to have a ton of files that are too big which is daunting for a beginner. The bpython project was written in python and had a total of 13 .py files. This makes it dead simple to make a quick change and run the project without compiling it. Again the choice of language has a lot to do with this. 

IRC:

The welcoming nature of the community around a project does a lot to encourage a new comer. The IRC channels are a great way to interact with the developers compared to a passive form of communication such as emails. I jumped on #bpython irc channel and started asking questions when I ran into an issue with bpython source code. People on that channel are really helpful and prompt in answering questions.

Persistence:

My first pull request was scrutinized by the core developers and some suggestions for improvements were given. During that process I learned a lot about code review and how to check for corner cases. Finally after I made all those improvements the pull request was accepted and merged with the main repo. So having a beginners mind (no ego) is an absolute must when getting started on any project. Don't be discouraged if your first attempt is unsuccessful. 

Now I'm proud to say my name is listed in the AUTHORS file of bpython project.

Synchronize Panes in Tmux

Tmux is an alternative for screen. For anyone who doesn't know screen, it is a terminal multiplexer which means, it allow multiple windows in terminal. It can split your window into multiple panes (vertical/horizontal), detach a session which can be attached at a later time. Detach/Attach is very useful for running a job in a remote server without having to keep the ssh open the whole time. 

Tmux can be configured by  ~/.tmux.conf file.
My prefix key is Ctrl-q.
Synchronizing panes:
If you want to send your keystrokes to all the panes in your tmux window: 
<prefix> :setw synchronize-panes
In my case I do:
Ctrl-q:setw synchronize-panes
This is immensely useful if you want to execute the same set of commands on multiple servers.

Coffescript - A Better Way to JS

I went to attend the URUG (Utah Ruby Users Group) meeting today because a little birdy said there will be some Javascript related presentations. 

I got to see an awesome presentation by Tad Thorley on Coffeescript. It's a minimalistic language that compiles to Javascript. Take a Javascript program and start removing unwanted literals from the syntax until you can't remove anymore, that's how a Coffeescript program looks like. 

Its the kind of minimalism that makes you appreciate the beauty of code. It combines the good parts of Python and Ruby syntax. There are some side-by-side comparisons of Coffeescript and Javascript code on the Coffeescript website.

Tad might post his slides (which are just short snippets of code) on github and I'll try to link it here.

Update: Coffee Script Presentation - https://github.com/phaedryx/coffeescript-presentation

Snowboarding @ Sundance

Just got back from Snowboarding at Sundance Ski resort. I fell down a lot less than I did during my previous times. I'm also doing a lot more toe turns which has always been an issue. I decided to try the blue slopes today which was good and bad. I got over my fear of going down the steep sections, but I also got too tired to enjoy the green sections of the run. I can tell that I'm getting a lot faster these days because the runs seem shorted (or quicker). One more season and I'll be a pro :). 

After our snowboarding session, I had a near melt down. I couldn't find my car keys in any of my jacket pockets and I don't have a spare key for that car anywhere. I checked with the lost and found with no success and I requested the security to jack the car door for me. Right when they asked me to sign some release forms and were about to insert the lever into my car window, Yoshi comes out of no where (she decided to retire after a few runs) and declares that she has the keys. It was a photo-finish ending for a great day. 

I just love the fact that my wife can save the day no matter how much I manage to screw up.

Have a Schedule

After wasting about 3 hours watching old episodes of The Office, I had a sinking feeling last night that I'm not working towards any of my life goals. 

  • Learn JS
  • Release mobile apps
  • Get better at Python
  • Do a startup or at least join one
But thanks to my thoughtful wife, I didn't freak out about it. She gave me some tangible ideas to remedy the situation (not one of those "You'll be fine"). 

So new plan:
  • Set short-term goals. 
  • Work on my stuff and report the progress every week to my buddy Vijay
This should keep me accountable and on track. To actually show some progress, I'm going to fix my schedule and follow Seinfield's Productivity Technique.
  • Tue (6-9)
  • Wed (6-9) - bonus day
  • Thu (6-9)
  • Sat (5-9)
  • Sun (1-5)
Phew! crisis averted. Now back to work.

Leaders are genuine

I had a chance to watch one of my role models in action today. He is one of the young, intelligent managers who rose to the top of the ladder pretty quickly. He managed to do that without creating enemies along the way which is pretty hard to do in big corporations. Everyone who has worked with him will attest to the fact that he deserves to be in the top and has nothing bad to say about him. 

Unfortunately I never got a chance to work directly with him, but watching him today made me realize why he is different from the other managers. It all came down to being truthful. Just being genuine to your fellow workers can mean a world of difference. When he tries to inspire someone, he is not the one to throw around some business lingo. He doesn't just say "We really appreciate all the work you are doing" or "Keep up the good work". That is just a terrible compliment. When he praises you for something, you know he really appreciates your work.

One lesson I learned from him today is "Be Genuine", and I shall try.