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