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.

Why do I hate Gnome?

I've been using Ubuntu Linux on my netbook for the past couple of days and I'm quite pleased with the whole experience, except for the initial issues (I just won't trust the auto-update).

Ubuntu uses the Gnome desktop environment by default with a little bit of tweaking. Gnome UI designers have a sense of aesthetic cognizance to their designs. I've always appreciated the crisp icons and the polished dialogs. I've been known to throw around the word stunning, quite generously, while describing Gnome. 

All these initial infatuations almost made me forget the reasons why I abandoned Gnome a few years ago. I  hate the absence of a central control center to tweak the default behavior of Gnome. There is however a severely handicapped version called gconf-editor which is like a terrible cousin of Windows Registry. So now if you want sloppy focus on gnome that doesn't raise your window when you click on it, you just have to do the following simple steps:

  1. Open gconf-editor
  2. apps
  3. metacity
  4. general
  5. raise on click (uncheck)
Quite intuitive wouldn't you agree? 

Oh you want to enable compositing, so your gnome-do can have some slick skins, here's how you achieve that: 

  1. Open gconf-editor
  2. apps
  3. metacity
  4. general
  5. compositing_manager (check)
Why? Why would you think this is more intuitive than having a simple GUI driven control center? I'm told this was a conscious choice by Gnome developers because giving choices tend to confuse their users.

If you think your users are idiots, only idiots will use it.

No wonder Linus was pissed at Gnome and started recommending KDE.

Education from unlikely sources

I've never understood the meaning of the term "Pearls before Swine" and never bothered to look it up (laziness mostly). I've chalked it up as an unfunny comics strip that is obscure. 

But today I read a blog post by Linus (yes, the creator of Linux) about his experiences at a Night before Oscar Party. It is hilarious, you should go read it, NOW. The title of the blog was "Pearls before Swine". This time I decided to look up the meaning of that term and I don't regret doing so. I think it'll come in quite handy in the future. :)

Pearls before Swine (from Wikipedia): 

things (such as pearls) should not be put in front of people (or in this case, swine) who do not appreciate their value

Ubuntu and I have some trust issues

I've been exclusively using Meego on my netbook and I was moderately happy with what it provided. So I did what any self-respecting hacker would do - I tried to make it better. Well, we all know how that usually ends. I managed to uninstall every single kernel in the system and rendered the system unbootable. Taking this as an opportunity I decided to try a grown-up OS. Enter Ubuntu into the picture.

I've heard nothing but great things about Ubuntu and I fuckin' hated it. Why? Because it was stealing all the limelight from the ever superior Mandriva (my favorite distro). So I got the installation process going which was smooth but surprisingly it didn't give me the option to keep my old partition, it was an all or nothing approach (grown up OS my ass). I had all my "stuff" backed up, so I decided to repartition my disk. It even detected my Broadcom wireless card and offered to install a proprietary driver for it. Wireless was working and the visual candy was stunning. I've never seen such a beautiful font set on my computer before. All the visual components looked hand crafted and the notifications were done with style. It was just a gorgeous piece of artwork. Visually stunning (if you didn't get that part already). 

I was quite pleased with the decision to go with Ubuntu and was having some fleeting thoughts about replacing Mandriva on my desktop. Around 15 minutes in my playful prodding and poking, I was notified that Software Updates were available. After it successfully installed the updates and rebooted the computer (some Kernel updates were involved), I couldn't connect to the internet anymore. The network icon wouldn't show up on my system tray anymore. After some googling I managed to find the "Additional Drivers" program which installed the Broadcom Drivers once again. But this time it would show me the available networks but wouldn't connect to any of them. The system update had successfully screwed over the authentication routine for connecting to WPA2 networks. I tried to plug in my network cable to the ethernet port only to find out the system hadn't recognized the existence of an ethernet port. Are you kidding me? Have you heard of a little thing called hot-plugging? I've been spoiled by Mandriva that can automatically choose between the wireless card and the network cable on the fly, depending on which was available. Now I had to muck around the network interface files to even get my ethernet card detected. How hard is it to develop a Central Control Center that can manage your hardware? After getting that to work, I tried at least 10 different methods described on various forums to get the wireless chipset to work again without any success. I gave up after 10 hours of tweaking and started trying other OSes. Here is a list:
  • Fedora looked nice but wouldn't connect to internet. Same problem as Ubuntu, but this time, it wouldn't offer to download proprietary drivers. 
  • Mandriva image hangs up in the middle of booting (I'm personally embarrassed by this). Btw, Mandriva has to be the ugliest of all the OSes. Seriously man, you gotta up the ante a little bit if you want to stay in this game.
  • Mint OS same as Ubuntu, only it looked even more gorgeous. I might try this out in the future. 
I should've tried Arch Linux but I was too tired at this point. So I did what any self-respecting hacker would do..... I re-installed Ubuntu and rejected the offer to auto-update my system. Now I have wireless internet and a usable desktop that looks pretty.

Ubuntu had so much potential. I will always remember today as the day I almost replaced my desktop Mandriva with Ubuntu. Maybe next time.

Five hours of Aikido and Javascript

It was a good day for Aikido. We started at 10am and went till 4pm with an hour break. My joints are sore but my mind is exuberant. 

I actually managed to get more than 2 hours of Javascript learning after that. I'm quite impressed by the features of Javascript. Passing a function to another function as a parameter, returning a function, a function inside a function, anonymous functions (lambdas), wow, its a surprisingly powerful language for doing web development. I haven't even reached the section about closures yet. 

I'm a little blown away by Javascript.  

Hiatus from Hapkido

After realizing that I only have 2 days per week (and weekends) to work on my side projects, I decided to axe one of my hobbies. Unfortunately Hapkido got kicked out (no pun intended) of my schedule. Sad day. I really enjoyed Hapkido and I hope I can get back to it once things settle down a little bit.

So what am I going to do on these free Wednesday nights? I have a few ideas:
  • Snowboarding
  • Learn Javascript
  • Learn Titanium and port pTimer to Android and iOS.
Lets see how this turns out.