Acer NIC mystery and a short panic

Acer NIC

This morning as I was chatting with @skepticalcowboy my internet failed. After some struggle (in vain) trying to get my wireless network adapter back up and running and encountering some very strange behavior, I went through the litany of steps everybody who depends on their computer goes through when they fear the worst:

  • When did I last backup?
  • What is and isn’t backed up?
  • Dropbox, Github, Google Music, Mozy, external hard drives, USB flash drives, and even that tiny USB key you keep under your pillow. Check everything.
  • Okay? Okay. Breaaaathe.
  • Now what’s the problem, again?

Right, no internet. [Oh, and shit, I didn't move the car! -- I ran and literally moved the car as the ticket vehicle was parked next to it.]

I scrambled to find a ethernet cable (remember those?) and got online minutes before my conversation with @nextbigsound.

Which was great!

Afterwards I tried the usual things, and a few Google searches (waters heavily populated with red herrings due to ubiquitous problems that Acer computer seem to have with wireless cards). Finally I contacted the friendly @AcerService.

Which was useless. Friendly. But useless.

I was about to start shopping for a new NIC, but at this point I got my head back. I popped out the NIC, blew on it, and snapped it back in.

Which fixed everything. Of course. A great reminder of my youthful days of electrical engineering and the hardware equivalent of “just … restart.”

Acer laptop wireless card

Posted in Digression | Tagged , , , , , , , | Leave a comment

virtualenv for a nltk project with ipython configuration

On a new Ubuntu machine, I needed to use NLTK. This serves as a quick reference for myself, and maybe you’ll find it useful as well.

> mkdir bananaproject
> cd bananaproject
> virtualenv ENV
> source ENV/bin/activate

I created a new folder for my project, and a new virtualenv for it. Virtualenv comes in  damn handy for managing portability and dependencies on multiple python projects. The last command activated the virtual environment, so subsequent commands are now taking place within it.

> pip install yolk
> yolk -l

I installed yolk, which then tells me what I have installed and ready to use in my virtualenv. I use this to check dependencies before I can install NLTK.

> sudo apt-get install python-numpy
> pip install pyyaml

Numpy is a package I’m okay with having installed system-wide, not just in this virtualenv. Pyyaml on the other hand I installed just for this project.

> mkdir ENV/src
> cd ENV/src
> wget http://nltk.googlecode.com/files/nltk-2.0.1rc1.zip
> unzip nltk-2.0.1rc1.zip
> cd nltk-2.0.1rc1
> python setup.py install

Self-explanatory. Of course, the link to NLTK will soon be outdated; the latest can be found at http://www.nltk.org/download. The virtualenv was activated while I ran the install.

At this point I thought I was done, but when I started ipython and tried to import nltk, I got an import error. I need to tell ipython about the python executable I’m using and the changes to sys.path.

This is only necessary because of the way I set up my virtualenv and the order in which I have installed things. A simple alternate is to to use a virtualenv with the --no-site-packages option, and then install ipython afresh for that project.

This post came in handy: http://blog.ufsoft.org/2009/1/29/ipython-and-virtualenv. However, it was written in 2009, and I’m using ipython 0.12. A slight variation is necessary for ipython >= 0.11.

> vi ~/.ipython/virtualenv.py
[ Use this, or a variation thereof: https://gist.github.com/1176035 ]
> ipython profile create

The profile create command tells ipython to create default config files, which we can then play with. The command will tell you where the ipython_config.py file has been created, and in it we need to find this line:
c.InteractiveShellApp.exec_files = []
and change it to:
c.InteractiveShellApp.exec_files = ['virtualenv.py']

Now whenever I start ipython, the virtualenv.py script will be executed, which will set my sys.path variables the way I need them. I can now happily import numpy and import nltk in ipython.

In [1]: import nltk
In [2]: phrase = nltk.word_tokenize("That was easy.")
In [3]: nltk.pos_tag(phrase)
Out[3]: [('That', 'DT'), ('was', 'VBD'), ('easy', 'JJ'), ('.', '.')]


Posted in Coding | Tagged , , , , , , | Leave a comment

Quora Answer: The Must-Hear A.R. Rahman Song

This feels like double-dipping, but it took so long to write this Quora answer it must be acceptable to post it on my blog as well.

“Which is the best AR Rahman song that one must hear for sure?”
My answer on Quora (along with other answers, of course) is at http://qr.ae/7Qvh9, and I’ve reposted it here:

Rahman’s music for the 1995 movie Bombay has been one of the most commercially successful albums in his home country India, and the best selling film soundtrack of all time. It has been recognized on various must-listen lists, including the UK Guardian’s Top albums to Hear Before You Die.

But since you asked for a song, not an album, I’ll nominate one of the songs from this album: कहना ही क्या / kehna hi kya.

Kehna hi kya is one of its most memorable and popular songs, and found its own independent success on the radio. It got additional recognition from the UK Guardian, beyond the other tracks on the album, on their Top Songs to Hear
(misspelled as “kehma hi kya”). Anecdotally speaking, it was ubiquitous in India in the 90s, and is still heard frequently today.

Kehna hi kya wins my vote also because it includes a vocal solo by A.R. Rahman himself, so one gets a taste of him both as a composer and a singer.

The movie Bombay is the story of the love between a Hindu man and a Muslim woman. The story leads up to a turbulent period in the early-1990s, escalating to the inter-religious Bombay Riots in which the Babri Masjid (mosque) was destroyed and hundreds of people were killed.

The song carefully uses language (Urdu-esque) and invokes images (like the veil in the excerpt below) that the audience associates with Muslim culture, but without any actual religious content. The images themselves are beautiful and passionate.

Excerpt:

Sharm thodi thodi humko aaye to nazarein jhuk jaayen
Sitam thoda thoda humpe shok hawa bhi kar jaaye
Aisi chali, aanchal ude, dil mein ek toofaan uthe
Hum to lut gaye khade hi khade

Translated (my own translation; I’m no language scholar but I disliked others I found):

A little shyness came and caused my eyes/gaze to fall downward
(But) even the wind tortures/teases me,
Blowing in such a way as to throw off my veil,
– and (likewise) a storm blows/rises in my heart,
Just standing there my heart was stolen.

The lyrics were written by Mehboob Kotwal.

You can download the song from Amazon:

  • http://www.amazon.com/dp/B002HT3YUA/ref=cm_sw_r_tw_dp_J4rhpb1D0SBTE
Posted in Indian Subcontinent | Tagged , , , , , | Leave a comment

Tagore on Translations

The following is a taste of Rabindranath Tagore’s thoughts on language and translations, taken from a speech he gave when traveling in China in 1925:

“Languages are jealous. They do not give up their best treasures to those who try to deal with them through an intermediary belonging to an alien rival. You have to court them in person and dance attendance on them. Poems are not like gold or other substantial things that are transferable. You cannot receive the smiles and glances of your sweetheart through an attorney, however diligent and dutiful he may be.”

Tagore describes his experiences studying translated works of European authors, and his efforts at learning German. He says that he was cursed in that he understood meaning too quickly: once he was able to understand enough to infer the author’s intent, he was able to skip over the nuances and details of the language. In this way he read Heine “like a man walking in sleep crossing unknown paths with ease.”

His limited understanding of German was insufficient for other works like Faust.

“I believe I found my entrance to the palace, not like one who has keys for all the doors, but as a casual visitor who is tolerated in some general guest room, comfortable but not intimate.”

In the end, Tagore says, Goethe and other remained unknown to him.

“This is as it should be. Man cannot reach the shrine, if he does not make the pilgrimage.”

Read prose and appreciate it in its original language, insists Tagore. Read my poetry in the original Bangali and only then can you judge it truly.

“So you must not hope to find anything true from my own language in translation… I am gratified to hear from you that you are convinced that I am a poet because I have beautiful grey beard. But my vanity will remain unsatisfied until you know me from my voice that is in my poems.

“I hope that this may make you want to learn Bengali some day.”

 

Reference:
Rabindranath Tagore, Talks in China. Rabindra Rachanavali Series, Rupa 2002. [Link]

Posted in Indian Subcontinent, Reading Log | Tagged , , , , | Leave a comment

Spotted on the Mangala Express

Spotted while traveling on the Mangala Express, from Ernakulum in Kerala to Panvel near Mumbai.

Mangala Express

Mangala Lakshadweep Express

From the window

A continual backdrop of green, of coconut trees, of bill- and graffiti- covered walls, small colorful buildings with peeling paint, and lines of drying laundry. Signs and messages in indecipherable Malayalam.

A woman in sari drinking a soda. a 4-foot tall pile of discarded drinking water bottles. Endless forests of coconut trees. Kids playing badminton. A group of women being lectured by a large fat woman in a black top. A sign for RSS, the first I’d spotted. Rivers and rivers, passing periodically. Two peeling towers looming over a train station. Kids playing cricket. Long endless fences separating residential neighborhoods from the railroad tracks, too far between stations to have any bills or graffiti. Regularly spaced rows of planted coconut trees. A large sign for CPI(M): a red hammer and sickle alongside a square-shouldered man in white and two hands shaking.

Clothes hung up to dry, everywhere and on everything, including a railroad crossing liftgate. Crowds of cars waiting for the train to pass, spilling across lanes to take up the entire road, waiting a furious and frustrating traffic jam with cars in the other directions. Four kids in the middle of a long endless dirt field, waving happily at the train. Huge piles of coconut, piles of gravel, and piles of lumber logs, trash, uprooted shrubs, large rocks, and stacked 10-gallon drums of mystery. A lady washing clothes by a river, pausing briefly to watch the train pass.

At station stops

Vendors running with good to load onto the train; groups of men stretching their legs. A man selling halva in small clear-plastic wrapped blocks. Small kiosks selling water, soda, dried banana chips, and packaged snacks. Several men standing together with perfectly matching moustaches. A group of women in burkas, chattering.

Inside the train

Salesmen walking the isles, hawking their goods: vada, daal vada, chai, coffee, samosa, pakora, break pakora, water, soda, an omelette lunch, egg biryani dinner, pav-wara, bhel masala, cheap necklaces and trinkets. A man with a tall stack of books: children’s coloring books, political books, religious books, mostly in Malayalam — he leaves a pile in each area, and comes back a long while later after they’ve been perused, hoping for a sale. A man selling large cloth sheets, for use as bedsheets or perhaps even dhotis.

A young woman struggling awkwardly with the climb down from the top berth, facing the wrong way but finds footholds with her husband’s help. A couple in a berth: the woman’s head on his lap, his head nodding rhythmically in sleep, their fingers intertwined. A lady with the air of academia, reading a book in Malayalam with stern gold spectacles low on her nose. A smelly young boy mildly escorted out of sleeper class to coach chair.

Observed entire conversations held in hand gestures and head motions, and then, eventually, joined in.

(Click to view complete gallery)

Posted in Indian Subcontinent, Pafnuties | Tagged , , , , | Leave a comment

Stepping back

In the last few weeks I have left my job, sold or given away most of my stuff, and moved out of my apartment. There are no specific future plans or job I have in mind; many friends (and mostly, my family) are confused by these seemingly irrational decisions.

The Past and the decision to leave. I moved from Boulder for my job with Axiom, an information management and IT consulting firm. I had my own office, a management role, a technical role, and the position looked pretty good on paper. My apartment was amazing: biking distance from work, and a walk from downtown and my gym and the BART train stop. Lots of space, lots of toys. A fast car.

With all these comforts, it should have been no surprise that I got comfortable. But I was surprised. These ‘things’ I had attained did not — and do not — match those things which I value in life and career. I seemed to have taken the right choice at every step along the way, but when I stepped back it was clear I was walking down the wrong path.

But actually, that last paragraph is misleading. It implies I somehow lost the forest for the trees and then had some awakening epiphany. That’s not true at all.

  1. I didn’t know when I started where the hell I was going. Like most people, I figured out all of my current career goals by first making some relatively arbitrary choices, and then correcting along the way.
  2. Even when one has some specific destination in mind, it is rare to be able to walk directly towards it. I found, as surely most others do, that you have to walk a ways in some other direction first. There are other priorities in life (like family), and practical constraints (like loans), and fun stopovers (like sports).
  3. And what’s the hurry? I know the 20s are considered by some to be ‘prime’ years of one’s career, but they are ALSO a prime time to do other things. Like enjoy life. I’m not shooting for the Field’s medal — there’s no time limit on my career goals.

The decision to make these changes in my life was actually very un-dramatic: planned long ago, gestated over many months, and timed for execution based on a many factors.

[A couple more comments on the decision. First, for most people in the world, a comfortable, secure, paying job is a dream come true, and this translated to a certain amount of guilt about the fact that I hated it.  Second, I didn't hate my job. In fact, I acquired invaluable skills, gathered strong experience, and dealt with countless 'real-world' issues. I had simply reached a plateau, and therefore it was time to leave. In the end, I got impatient, like high school's senioritis, and easily found fault with my situation.]

The Future and my next destination. “I have no idea what I want to do with my life, but I have a pretty good idea of what I want to do next.” Ha! I freely confess to having made that same statement many times in my life, and although I say it with more confidence each time, I know that I’m likely to make it again with some new path in mind.

So, while my next intended destination may continually evolve, there are some quintessential observations that I can share. (While life goals constitute many things, I’m referring specifically to career-related goals here.)

  1. I’m ambitious, and I’d like my choices to better reflect this strong sense of ambition.
  2. For the immediate future, I am in a position to take some risks: I have few financial obligations and no dependents, and no geographical constraints. This window of opportunity is limited, and I’d like to take advantage of it.
  3. While I’m not able articulate succinctly those features of my career that I value over others, my last job provided some valuable insight. In the future, I must strive to understand my own enigmatic values, learn to balance them in a more healthy way against the values held by my family and my influential peers, and select my goals accordingly.
  4. I realize that the aggressive moves I had made coming out of college diluted slowly over time to safe and static positions. One could compare this to an innovative startup that had some decent success and then stopped taking risks. This is a lesson learned; I must strive to stay dynamic.

I may write a post later about what I think I’ll be doing next, career-wise and other-wise, but I don’t think that’s important for what I wanted to say in this post.

The Present. I’ll be flying to India to spend some time with family. In particular, to spend time with my paternal grandmother, mataji, who is 94 years old and has an unbelievable story to share. I will also take a few weeks to travel in India, a trip that is long-overdue.

I’m networking with fiends and business contacts in the SF Bay Area, establishing some connections that might translate into business ideas or job opportunities in the future. Since I’m not immediately in need of work, I’m able to do this without awkwardly inserting requests for help into the conversation, which makes it all pretty pleasurable.

I went skydiving.

I’m reading books that I’ve been wanting to read for a long time, both fiction and technical. I’m solidifying skills picked up over the years by strengthening my fundamentals, which often get glossed over to meet the needs of some project that must be done by some deadline.

I’m helping prepare for the wedding, which is no small matter in Indian culture… even for a relatively small, relatively rushed wedding such as my brother’s. I’m (once again) learning about development, geopolitics, and identity issues in the Indian subcontinent.

For a reading break, I read “The Third Thing” by Donald Hall. It reminded me to slow down and keep perspective about time and values as they relate to life decisions.

Slow down.

Posted in Digression | 3 Comments

Discovering the ‘Argumentative Indian’ in me

From “India: Government & Politics in a Developing Nation” by Hardgrave, Jr. and Kochanek [link]:

In the aftermath of decolonization following World War II, theorists and statesmen saw the problems of poverty, economic stagnation, accelerated socioeconomic change, ethnic upheaval, and the need to create and sustain political order and legitimacy as a unique set of challenges that confronted the new states of Asia and Africa on their way to modernization and development. By the early 1970s, however, the advanced industrial societies of Europe, North America, and Japan were themselves convulsed by similar challenges as rapid technological change, global energy crises, raw material shortages, and a deteriorating environment found governments straining to satisfy rising expectations in a world of diminishing resources. It became increasingly evident that the problems of change and institutional adaptation were not the product of some isolated process of transformation from traditional to modern, agrarian to industrial, or developing to developed, but a continuous process of social, political, economic, and psychological adjustment to persistent pressures and challenges generated by alterations in the internal and external environments. There was no final social or political order that somehow would be reached by a magical process of “development” or “modernization,”, but a constant set of challenges that would continue to test human ingenuity in adapting to changing political, social, economic, and institutional imperatives.

With a trip to India imminent, my interest in Indian foreign policy, current affairs, and politics is revived. This book, which contains the above as one of its opening passages, has a direct style which I find informative. Yet there’s something about it that I find slightly disturbing.

To take one example, the description of Hinduism as having “a quality of resignation, of passiveness and fatalism…  [a] religious belief that has manifested itself in the political attitude of the many Indians who simply accept the government they have as the one they deserve” may be interesting, but it makes me feel defensive. Both theologians and historians could take issue. All the Hindus that I personally know fall far outside this generalization. But it is just a generalization, and the authors know that, and other readers must realize it, too. I’m also aware that my sample of Hindus is not representative of the population, and so on and so forth. So okay, I need to relax and let my hackles down.

Or should I? “Despite the creation of Pakistan, partition did not solve India’s communal problem. India still has one of the largest Muslim populations in the world.” Wait — is that saying that the population of Muslims in India are a problem? That’s as abrasive to me as if someone discussing US history were to claim the black population was a problem. Communal conflict due to diversity — any type of diversity — is a result of attitudes and prejudices, not the presence of the minority population. Was this an accidental miss-phrasing? Perhaps, but not one you would ever catch Amartya Sen making.

In contrast to Sen’s portrayal of India, this book – at least as I read each of them — this book is far less confident in the country’s future, using words that betray a wary skepticism that its challenges can and will be met. “India’s masses are an awakening force that has yet to find coherence and direction”, it notes, and “the image of spiritual, Gandhian India pales before continuous agitation, intermittent rioting, and a rising level of violence.” Especially considering my copy is an old edition (1993 — ancient history in the fast-moving sub-continent), there is nothing in these words that I could fairly contest. But…

… But even Edward Luce (“In Spite of the Gods”) alternated his doubts and pessimism of India with a sense of awe; he seemed ultimately to feel that the worst of it all was temporary turbulence in the rise of a great nation. Perhaps Hardgrove and Kochanek will do the same later in the book, but they certainly aren’t yet. [I'll check back in when I'm further in.]

I should perhaps be reading the latest edition (2007, I think), but I find it provocative (in multiple ways) to read this one. I like reading a book and stopping frequently to argue with it in my head. It keeps me on my toes. Sure, a lot has changed since 1993, but history is as interesting as current affairs, and it is true that many of the “old” problems in India remain problems today. Perhaps I’ll get even more out of this older edition than the 2007, and I can always read the 2011 when it comes out.

Posted in Indian Subcontinent, Reading Log | Tagged , , , , | Leave a comment