Code, coffee, music

Starbucks Powai is an ideal place to code a few hours away, sipping some not so great coffee (filter kaapi i brew at home beats ‘n’ number of CCDs and Starbucks  coffee hands down) and listening to good music. The WiFi connection leaves little to complain and the ambience is ofcourse superb. Recommended!
image

Advertisements

Birthday Concert 2013

So I have a wonderful thing to blog about today!

The annual Birthday Concert of the Indian Music Group was celebrated on 12th Jan in St Xavier’s Campus, on Saturday in the most splendid way. Here’s how:

(a) Classical Vocal performance by Pt. Sanjeev Abhyankar :

The concert begins with Pt Abhyankar’s introduction to the Raag that he will perform, a basic primer about the bhaav and lyrical interpretation of the raag, for the audience. He starts with Raag Shuddha Sarang, accompanied by extremely talented musicians on the harmonium, tanpura and tabla. The aalaap gradually grows into the main body of the raag, and Pt Abhyankar has his listeners in absolute thrall. He sings ‘Din ki Puria’ next, and explains that it is a variant of the much popular ‘Puria’ raag with a single note changed. I personally enjoy this performance more as the raag is familiar (Puria and the similar Puria Dhanashri, simply wow raagas, these !). The next song is a Surdas ki vaani, a classical piece by created by the great saint, about Lord Krishna. Pt Abhyankar ends his part of the concert with a beautiful bhajan and rises to greet the audience whose claps resound throughout the huge and St. Xavier’s auditorium.

(b) Classical flute performance by Pt. Rupak Kulkarni:

The evening had more to offer. After Pt. Abhyankar’s wonderful renditions, the audience were in for a surprise. Pt. Kulkarni, one of his disciples (It feels weird to use the term disciple, as Pt. Rupak Kulkarni himself is very young), Mridangam maestro, Shridhar Parthasarthy and Tabla wizard, Ustad Fazal Qureshi (son of the late Ustad AllaRakha) created a heavenly musical atmosphere. Everyone in the hall were happily lost in the lilting melody of Raag Madhuvanti. (again a familiar Raag, thoroughly enjoyed). Shridhar and Ustad Qureshi were at their best, occasionally playing a sawaal jawaab of percussion. Next up was Raag Bhinna Shadja (heard this one for the first time, but was no less magical than the other performances). The concert ended with a short dhun, where all the maestros contributed equally in making the finishing stroke memorable.

Next on my list: The JanFest (IMG’s flagship event) that sees the most established stalwarts of Classical music perform at the Xavier’s Quadrangle ! Excited..

 

I really liked this post.. Reblogging it therefore..

Making the Complex Simple

With the vast array of technology, language and platform choices available today, it can be very difficult to figure out where to best invest time in training your skills as a software developer.

I’m often asked advice on how to be a better programmer.

Most often the question someone asks is based on whether or not they should invest their time in a particular programming language or technology versus another.

I’ve been giving this quite a bit of thought lately and I’ve come up with what I think are the most important and timeless skills that a software developer can attain which will give them the best career opportunities and make them the most effective.

Skill 1: Solving Problems

problems

I’ve talked about the need to learn how to solve problems before and I’ve even given some steps of how to learn to solve problems, because I believe this skill is…

View original post 1,263 more words

Mood Indigo-2012 Day1

As the title of this blog suggests I am extremely audiophilic. I am simply crazy about good music (and I have no qualms about stating this very often 😛 ).. Mood Indigo is the Annual Cultural Festival of IIT Bombay and it is pretty much the largest Cultural festival of India, attracting participants and artistes all over the world. I love MoodI because of the amazing music concerts it has. Wasn’t disappointed this year either.MoodI day 1 had these wonderful treats for musiclovers:

  • MI Studio :  This was a fusion music recital featuring two unique and extremely fascinating instruments, the Jaltarang played mesmerisingly by Sandeep Dicholkar and the Hang played by a Slovenian gentleman whose name eludes me. Ragas played on the JalTarang were Kirwani and ShivRanjini. The Hang ( I didn’t know such an instrument existed until I actually saw it ) can be used to play rythm as well as melody. The Slovenian gent’s dexterous fingers did such an amazing job that it almost felt like two instruments being played in sync, one rythm and the other leads(melody). This ended with an amazing jugal bandi of the two instruments.(loosely based on ShivRanjini)
  • Trania and Snehashish Majumdar: Trania, a 3 member band collaborated with Mandolin and guitar player, Snehashish to create some fantastic jazzy Indian Classical (yes, it is as amazing as the name sounds 🙂 ). Snehashish who has been playing Classical raagas on his guitar/mandolin since a long time teamed up with Trania to jazz up the atmosphere with novel improvisations. Definitely a #win
  • Talavya: Talavya as the name suggests, is about ‘taala’. This 5 member band headed by the son of Pt Divyang Vakil, takes tabla playing to a new level. With four tablas and one harmonium, they played a rich variety of taalas (rythmic cycles), including vilambit, madhya lay, dhrut and finally ending with a superb crescendo of ati-dhrut. A sonorous harmonium melody (desh raag I think) kept playing in the background giving the tabla playing a good melodious base.
  • Pt VishwaMohan Bhatt: Vishwa Mohan(winner or more appropriately charmer of the world) indeed, he is a living example of what human genius can achieve. Pt Vishwa CREATED the instrument he plays. Adding many more strings to an acoustic guitar (taking the number from 6 to 20 !), he designed the ‘Mohan Veena’ or ‘Slide Guitar’. He played Raag Maru Bihaag beginning with a slow aalaap and then increasing the tempo gradually, soaring gracefully to the dhrut and finally with a ‘gamak'(which was an ode to thunder clouds, he evoked the sound and feel of the thunder, rain and lightning in the most amazing way possible). Next he sang (yes, he can sing too, wasn’t aware of it before) a Maand, Kesariya Baalam, a folk song from his native Rajasthan. Then came two beautiful numbers from his Grammy award winning fusion musc album, ‘A meeting by the river’ (collaboration with Ry Cooder). Pt Vishwa signed off with Vande Mataram and Jana Gana Mana. Mohan Veena totally rocks ! 🙂 And Pt Vishwa is a true ‘Sultan of Strings’ (Dire Straits fan 🙂 ), he looks like one too and he plays like the Greatest Sultan Ever !! Only two of my friends I know appreciate and enjoy Classical music as much as I do, both of them were out of town. Had to go alone therefore, nonetheless, enjoyed it thoroughly.

Shantaram #NowReading

I had always wanted to read this book, but was always daunted by the size of it. Not that I am afraid of big books, but I prefer to begin reading them when I know I can read them slowly and peacefully, taking in a page, savoring it and then musing on its splendor (well only if it is a book worth savoring, of course 😉 ) Shantaram is one book definitely worth savoring. This almost autobiographical account of an Australian gentleman (the writer, Gregory David Roberts, once the most wanted man in Australia for armed robbery 😛 ) traces his journey through life after he escapes from his high security prison cell and ends up in Mumbai with a forged passport. He befriends his travel guide, Prabaker and explores the famous (and the not so famous) places of the city, falls in love with a pretty but mysterious woman,Karla, visits the travel guide’s village at his behest and ends up spending six months there, gets rechristened as ‘Shantaram’ (as he is blessed with peaceful happiness according to Prabaker’s mother), gets drunk and robbed of all his money on his way back, and ends up living in a Mumbai slum. Even after making enough money to get out of the filthy slum, he continues to live there and develops a deep and unexpected connect with the people there. Eventually he is befriended by Abdel Khader Khan, a mafia boss (fondly known as Khaderbhai, and an intriguing character himself). I have read only this far, and it has been one hell of a ride ! I am really looking forward to know how the story unfolds. The book has amazing pieces of thoughtful musings and words of wisdom that keeps reminding Shantaram to rise to become the man who he isn’t but indeed wants to be.. Here’s a couple of such pieces:

“Sometimes we love with nothing more than hope. Sometimes we cry with everything except tears.”

“Love is the opposite of power. That’s why we fear it so much.”

Checking if two strings are anagrams in Python (Also for checking if a list has duplicates)

Python has two really nifty datatypes namely strings and lists that can handle a variety of tasks. For eg: if you want to check if two strings are anagrams.

Convert the string to lists, an iterable can be converted into list by list()

Sort both lists and simply check if they are equal.. Done !

To check if a list has duplicates, sorting the list comes handy again. We can simply sort the list and then check if consecutive elements are equal if so, we can directly say that we have duplicates! Easy wasn’t it? 🙂

An interesting method to do this I came across online was to make a letter histogram. Given two words, we want to determine if they are anagrams.. Lets make an int array of length 26(corresponding to each letter of the alphabet) all initialised to zero. Traverse through the first string, increment each corresponding integer variable, next traverse through the next list and go on decrementing the corresponding integer values.. If finally all elements are zero, we say we have anagrams, else we don’t.. Easy right? 🙂

Local and global variables in Python

Variables defined within a function are local to that function and cannot be accessed outside the function. Local variables are very loyal to their parent function and live and die with them. Now suppose I define a variable num1=0  outside functions, it is global. A global variable can be accessed within a function but cannot be modified, unless we declare the variable to be ‘global’ by explicitly mentioning so within the function. eg:

global num1
num1 = 5

Variables local to a function cannot be accessed outside a function and will throw an error if we try to do so. Global variables are an easy way to manage handlers without a lot of programming overhead.
Anytime we want to assign a global variable within a function, we must declare it as global in the function. If we try to reference a global variable within a function, without declaring it as global (a mistake obviously), we get an error. However, if we just assign a global variable without declaring it as global (again a mistake ofcourse), Py assumes it is just a local variable and doesn’t throw an error, but the result will be wrong.

Python 1

I am trying to learn Python and I think sharing what I learn on my blog will not only serve as a quick reference for me in future but will also help those who are always on the lookout to find and learn fun things. So here goes my first post, a summary of a few very simple things I have learnt.

Event driven programming: This means your program will not run forever, rather it will run for sometime and then wait for an ‘event’ to occur like a mouse click or a text input or a button press and so on. The program flow then passes to a ‘handler’ specific to that event who knows what to do in case its event is fired.
Lets look at an example, this is from a module called simplegui. Yes Python functions are housed in these nifty little packages called ‘modules’. I think that’s really very cool.

So I import simplegui module saying

import simplegui

Then I have 3 timer functions in this module namely:

mytimer = simplegui.timer_create(delay in ms,myhandler) which will create and return a timer object

mytimer.start() which will start the timer

mytimer.stop() which will stop the timer.

So if I define a function like

def myhandler():
print "Hello Sir"

and I create and start a timer object, I will have “Hello Sir” printed at regular intervals ! BTW printing something like “Hello Sir” is just a trivial example, I can make anything to trigger at regular timings with the power of timers in my hands. Mwahaha !

A few notes: When a handler runs, no other the event handler can be run, so if another event occurs while a handler is running, the event just gets into the event queue and waits to be pulled out of the queue after the current handler finishes executing. So the queue does the trick.

Cafe Leopold

I had some work to do with friends in CST on a Saturday morning. And what better excuse than this to check out the unexplored spots of the city. Imromptu plans were made and soon we were on our way to this quaint but very popular hotel.

Cafe Leopold:

This place is one of the oldest and most well known cafes in Mumbai. Leopold too was set up by an entrepreneurial and (I am guessing) foodie Irani gentlemen in 1871. This restaurant was one of the unfortunate targets of the dastardly terrorists who attacked Mumbai in 2008. Wounds of that fateful evening still remain on the cafe walls. But that perhaps is a symbolism for the spirit of Mumbai. No matter how badly she has been hit in the past, she just refuses to give up.

“It doesn’t matter how hard you get hit, but it is about how hard you can get hit and still keep moving forward”

Seen here is one of the bullet holes

This interesting contraption is something they call a ‘beer tower’ This 5 feet tall cylinder is filled with.. wait for it.. yes, BEER !! 😀 Fill your pints according to your pace. We curiously stared at the tables hosting this mammoth, quite a few of them got drained before we expected. Leopoldians surely love their beer.

 

 

 

 

 

 

Psst.. I am a teetotaller, so I had to settle for this little Mocha Frappe, which was absolutely yummy.

 

 

My friends ordered a Club Sandwich which had huge portions of chicken sausage. They claim it was the best club sandwich ever. The restaurant has a very lively feel to it and is a great hit among foreigners, the menu too is very international but caters to Indian tastes also. We finished with the ‘Leopold Special Cheesecake’ for dessert which was definitely the kind of dish you would want to go to Leo again and again for.

Leopold is one of those restaurants in Mumbai that have retained a distinctive character and aura. Everything that you see here right from the glasses, plates, beer mugs have a history of their own and speak volumes about Mumbai and her cosmopolitan and welcoming character. Definitely a must visit place.