Monday, October 15, 2012

In the good old days...

I recently had a few chats with a certain math hating economist who believes sociologists are the root cause of all evil. As someone heavily relying on math, this made me start thinking. Then the further knowledge that she had not heard what UNIX was got me thinking if I'm starting to become a relic of the "good old days" (not before I screamed blasphemy a number of times, and tried to find the computer equivalents of holy water and a cross. Albeit, I couldn't, but I could use suggestions!). Further along this line of thinking, I remembered a discussion I had with one of my closest and oldest friends on his birthday. That the last time I saw his entire face was more than a decade ago. Since then, a rain-forest of hair has ravaged what remains of his face, it is rumored that parts of it haven't seen sunlight in years.

The key point of all this is the sensation of getting old. Some of you may have been a part of my discussions on turning 25 and being on the wrong part of the 20s. As my sister tells me, the 30s are worse, I worry about friends getting married, she worries about them having kids. But as she just got on the "right" side of that fence, she can taunt the others peacefully for some time. But, that inescapable feeling is starting to take hold that I'm going the way of mainframe programmers. Those of you who haven't heard of mainframes, read that line about UNIX again, and remember that as soon as I find that holy water and cross, I'm coming for you.

I grew up a part of a glorious generation that saw computers, phone and mobility take hold. When we were kids, TVs were bulky and bulgy, phone calls meant you sat in one place tethered to a wall, and no one got tense if you didn't call to update about your plans every instant, or post an update anywhere. The beauty of this time was that we go to choose whether we want to go outside and play, or stay in and explore this new virtual world. Like many, I chose parts of both. The generation before mine mostly chose the former, while the ones after me choose the latter. Unfortunately, I believe that a generation that sees both as equal options may not come again. It is not for me to judge whether either is better, but I'm a big believer that "both" is always better. Later generations may see different options, but I don't think they will see such a life-changing one till we invent interstellar or time travel.

It's my time to head into the world of adults, and try to earn a living. But the adolescence I'm leaving behind fondly is crystallizing into my "good old days", and that rocking chair on a front porch is getting closer. Now I'm off to fight my next battle against the evil rocking chair, so get off my lawn you pesky kids!

Wednesday, October 10, 2012

Mehkhaana


waise hi itne ghum diye zamaane ne ae ghalib
zara si hansi bhi kyun cheente ho
dilon ke jaam ko chhod kar, zahar ke kalash kyun peete ho
itne lamhe zaayar kiye to sahi, kuch lamhe khushi mein jeete kyun nahin

वैसे ही इतने गम दिए ज़माने ने ऐ ग़ालिब
ज़रा सी हंसी भी क्यूँ छीनते क्यूँ हो
दिल के जाम छोड़ कर ज़हर के कलश क्यूँ पीते हो
इतने लम्हे ज़ायर किये तो सही, कुछ लम्हे ख़ुशी में जीते क्यूँ नहीं 

Balance

I'm a big fan of the now cancelled series Scrubs. I'm a bit like the main character, so I'll start with a line he said at the end of an episode. It's meant to make a point, so don't take any literal meanings out of it :)
JD says, no one understands the importance of sex better than someone who isn't having any. Similarly, I feel that no one understands the importance of balance better than someone who doesn't have one.

Now since I'm done with the titillating opening, lets get down to business. Every natural system in this world has opposing forces, and it may seem like it strives to achieve a balance. I'm not an expert, and there are 2 opposing lines of thought on that, but you may consider this balance a choice of a higher power, or a freak of coincidence that's one of the infinitely many possibilities that have an interesting residual in our universe, and on this planet. The overall fact remains that this leads to an important observation, that balance is essential for something bigger to emerge out of simpler forces.

Some people confuse this balance to be stable. In reality, no interesting system we know about has a stable balance, or in more technical terms, a stable equilibrium. They manifest as unstable equilibria, with small ranges of stability that our world seems to reside in. In fact, as someone who writes simulations, that's the region we strive to achieve, and trust me, it's pretty hard to achieve.

This analogy carries over to our lives and our minds too. A balance is important, not just for ephemeral things like happiness, but even for basic sanity and survival. Your body and mind do not take kindly to extreme conditions. But again, it'd be naive to assume there isn't wiggle room. In that vein, I've spent long parts of my life oscillating between excesses of work and fun. A side note, oscillations are interesting manifestations of turbulence in physical systems, but differentiating actual ones from spurious implementation induced strokes is very hard work.

Honestly, I'm in a field that spends a lot of time and money teaching their members about work-life balance, and then go right off expecting you to ignore it. After looking at the recent incidents in the world, I'm starting to believe this problem isn't just localized to computer science. Over the past month, I read multiple headlines along the lines of disgruntled person goes to a public place and shoots a bunch of people. In one notable exception, the person responsible even survived, and is enjoying media coverage of his now red hair. Maybe it's just me or the effect of media focus, but I feel that the incidence of such events is on the rise. Again, I'm not an expert, but some reasoning suggests that there's a reason for these extreme actions. Every assailant in these cases had extreme cases of stress, having either lost jobs, or  hope in their PhDs. So you can see why it hits a little close to home, I'm in the 5th year of the latter myself.

People are likely to suggest that these are outliers, resultants of some other extreme actions along with an inordinate response. Coincidentally  simulation folk are very familiar with these too, these are indicative of a case where that unstable equilibrium suddenly loses the second word, and becomes just unstable. That happens because some of the underlying forces and assumptions that made things balance, are violated, resulting in an increasing oscillation leading to blowup. In laymen terms, that means that what was keeping you sane, just stops, because your brain just can't balance the forces exerted on you anymore.

Like any decent scientist, I'm inclined to offer an explanation, so let me start with something that I heard a while before I came to USA. I was always told that Indian people here are lonely. After coming here, I realized that's not the case, it's just that the primary model of society is nuclear families and individuals, the latter slowly becoming the dominant set. In my opinion that is the primary cause of this increasingly extreme outbursts of stress.

So, in the early 20th century, right up till the 70s, the primary model of existence was families. People lived in big families, and had a large set of cousins they knew about. Well, ok, maybe not in the cities, but at least in towns. And this model still exists largely in most Asian countries, where these sort of outbursts are not as common. But the fact remains families were, and still are, major balancing forces in our lives. Then somewhere down the line, the baby boomer generation came. They moved out, did great things. Slowly and steadily, that model became the norm, and we started to ignore families, to express individualism. Before you get the idea that I'm trying to prophesize the importance of families, I'm not. I'm simply offering a line of reasoning, and I don't intend the choice of one over the other. So, getting back, individualism prompted people to do great things, since removing family commitments from our lives opens up a lot of extra time and motivation, since the primary focus of our life is work. But, there is no such thing as a free lunch. Earlier generations still had the support of the family they left behind, that foundation. Increasingly however, that foundation is getting eroded, because extended families and people you cared about are becoming an ever smaller set of people. These people help you snap out of depressing thoughts festering in your brain, lines of thought that are better left alone. Social isolation makes you delve exactly into these lines of thought, except, a lot of people don't have any tether at all, meaning they can drown in them. The result is what you see in the headlines, because depression/stress and anger never make for a good combination. I've seen people shoot others over trivial car accidents, so don't underestimate the power of that deadly cocktail.

Granted I took some liberties with rigor, that line of reasoning should hold, so I'll move on to the other part of my discussion. Unstable equilibria, turbulence, they're very interesting phenomena. They may oscillate wildly, and seemingly randomly, but there's always a pattern. The economic issues straining society are becoming ever more prominent. With general public unrest in a lot of places, the chances of a spark igniting this tinderbox are huge. And if you think the natural state of society is stability, well, you didn't really get the point. It's well established that physical systems prefer higher entropy, or more simply put, more variations and chaos. Add weapons to that equation, and the results aren't going to be pretty.

Before you start thinking I'm going to recommend buying gold and making basements to stock supplies and weapons to defend against the coming apocalypse, let me point out that I'm not Glenn Beck. All I'm saying is that increasing volatility is making our society unstable, and the only reliable force we know of is family. So it only makes sense to try and return to that model, at least until we can come up with a better one. What's obvious, is that the current path is becoming untenable, and something needs to be done. The world is heading towards a realignment, and such transitions are never peaceful or painless, lets hope me and you come out of it in one piece. 

Sunday, July 8, 2012

Art, music and games

It's been a long time since I wrote my last entry, suffice it to say it's been a helluva ride. And since in the next year I'm going to be trying to graduate with a PhD, I'm not sure what my frequency of posting will be, so lets give this a shot.

In all honesty, I've always been a mediocre gamer, delving into different games sometimes, but never so good as to hold delusions of earning my livelihood through them, or boast about my skills. In the past month, finally being relatively free motivated me to try once again. Oh that relatively is so loaded a word. I played the usuals, Crysis, Modern Warfare, even the new Max Payne. Ignoring the fact that I ran through these games like a 100m dash (that's the way I do things, the black plague way), I didn't quite like them as much as their predecessors, with the possible exception of Crysis. Don't get me wrong, games have become quite breathtaking, especially if you have the right hardware. But they've lost some of their soul, so to speak. Visual brilliance has taken precedence over other aspects. But I know there'll be some who'll point out that my sample set's quite skewed to make that call. And I agree. The next game I played, was the one that made Bioware famous, Mass Effect. And damn was I surprised. I'm a guy who started playing games when they were designed for things with much less compute power than your not-smart phone. I've played SpaceWar, when it was still new, and that's been a badge of honor of sorts. They made me take up computers as a serious hobby, but that's a whole other story. Speaking of stories though, games have always been very linear, checkpoint oriented cause any other kind of story or choice would be prohibitive to code up. Plus, they were never very complex, only basic shells to assist the protagonist in blowing things up. Mass Effect seems to be the other kind. Yes, there's still a lot of blowing things up, but there are actual choices, ones that make a difference in how your game progresses. Story controls the game, rather than the other way around. Lovers of RPGs, don't take offense, but anything that just helps your character gain points doesn't really count. I expect the hordes of WOW (that's World of Warcraft to you non-gamers) followers to take immense offense to that line, but I'm saying it as I see it. Heck by the end of the game, it had handled complex issues like homosexual relationships, relationships in general, life, death, and a bunch of other things with great sensitivity and panache. That's something you don't usually expect from a bunch of geeky coders looking for aliasing lines at 1080p.

All of which seems to suggest that games are maturing, dare I say, as an art form. Mass Effect is a statement if there ever was one, and the tree or graph like elements in its story where what you choose to do actually makes a difference, is very new, at least to me. I'm sure there are other games which are doing a similar job, maybe even better. The icing on the cake was a background track at the end by Clint Mansell (http://youtu.be/WE8Rhmy8v0E). I'm a big fan of the guy, very few people have the talent to make such haunting music with very little. If you listen to this one, it only has a piano and a string quartet playing. If you don't know who he is, try seeing the movie Requiem for a Dream. I still haven't, but that track speaks louder than most pieces of art I've seen (http://youtu.be/hKLpJtvzlEI). Honestly, as a grad student of limited means, this game offered more value for money than any movie or book I've seen in the recent past.

People talk a lot about art evolving and experiments being done with new visual media. I've been to very weird installations which I couldn't make any sense of, but which a lot of people praised immensely. It might be time to consider games as an art form, but only if it's taken out of control of resolution jocks who only care about getting 60fps at highest quality settings. That's an insult to what a game's supposed to be. The resolution, visual quality serves to immerse you in a virtual world, much like CGI is supposed to do for movies. When it's used as a crutch and made a major selling point, it's stupid. Yes I know you're thinking Michael Bay and Transformers and laughing, but there are other offenders too, even Apple sometimes (http://www.thedailybeast.com/articles/2012/06/15/5-reasons-i-hate-my-new-macbook-pro-a-geek-s-critique.html) (yeah I'm a little prone to Apple bashing). Graphics is and always has been an enabler, not an end, and unfortunately that's what some people would like it to be. But overall, games are getting better and more interesting, at least the non-iPhone kind. And that's where I have a bigger problem with Apple and iPhone gaming. It encourages those same toy like games where you grind your finger against the screen. No depth, just mindless droning. Sure, instead of carpal tunnel, you'll get something else. But if iPhone gaming becomes the norm, it'll kill this rising art form, and that's something I have a problem with, cause it'll kill something that's been more than 2 decades in the making. 

Thursday, March 8, 2012

An ode to rebuttals, writing in general, and to things unsaid


There are some things that need to be said,
But the words escape me,
The thoughts are there in my head
But the verses escape me

... to be continued

Wednesday, March 7, 2012

Talaash


This verse is actually in Hindi, transliterated

Kis zameen ko dhoondhta hai tu
Kis aasmaan ki talaash hai
Sab to hai, bas yahin, tere saamne
Aankhein phere rehta hai kyun

Thanks to Google's transliterate tool, here's it written in Hindi:

किस  ज़मीन  को  ढूंढता  है  तू
किस  आसमान  की  तलाश  है
सब  तो  है , बस  यहीं , तेरे  सामने
आँखें  फेरे  रहता  है  क्यूँ

Tuesday, August 16, 2011

Emergence of chaos

It's been a long long time since I wrote one of these, but reading James Gleick's book Chaos got me thinking about all that is going on these days and how much you can apply it to them, albeit in an abstract manner, since I obviously lack the mathematical skills to model it accurately.

Let me start off by introducing this one equation that started a lot of it, the Logistic Difference Equation. It may sound complicated, but all it says is that x_next = alpha * x * (1-x), where x is anything you're modeling. What many scientists found was that choosing different values of alpha can lead to wildly varying behaviors, behaviors which are actually observed in diverse fields such as weather, populations, economics etc. I'll give one small example of populations, that if alpha is small, populations remain constant, or decline, but if alpha rises above a certain threshold, it can rise explosively. Now this is a very simplistic model, but it shows what "non-linearities", i.e. functions that are not a straight line, are capable of.

Why it applies in the current context is because of the attempt to control a number of highly undesirable developments happening these days. The economy is going to hell, education is starting to suffer in a number of notable countries (I know that more than most :P). As a result or otherwise, politics is becoming much more extreme. Since the USA is too easy an example, I'll take my home country, India. Currently, a notable gentleman by the name of Anna Hazare is leading a crusade to wipe out corruption from India, starting with the government. While some may applaud, and others may scoff, my interest for the time being is to see if his approach is viable or not. For a thorough critique of his methods, try reading Greatbong's blog post about it. So Anna's idea for rooting out corruption is to create a body above all others, whose members are not elected, but nominated from the notable members of society. This body, headed by a "Lokpal" would bring forth charges against officials and try them. Now, most engineers would notice the lack of feedback in the system, meaning the system would function wonderfully if we assume the members of this board to be unaffected ghosts bereft of all feeling and earthly connections, i.e. those who cannot be swayed by us common, corrupt folk. However, if an error enters the system, e.g. a corrupt person becoming a Lokpal, can have drastic consequences, since it's very hard for the system to filter out this error. Herein lies the nonlinearity and the scope for drastic and dictatorial repercussions. Like the logistic difference equation, specific values of alpha make this an amazing system, some bad ones have the possibility of making this a mistake of Nazi proportions...

The same idea applies to economics, since this idea owes much of its origins to economics. Markets, the US economy and consequently the dollar are suffering like an enemy of Chuck Norris/Rajnikant. People are quite upset about this brouhaha and want something to be done, what this something should be varies considerably from person to person. The core of the problem is, and still remains, that the US economy does not make enough money to finance the expenditures of its people. Like it or not, that's the plain simple truth, don't believe me, look at the labels on anything sold in the USA and see what percentage is actually made there. Made in the USA is a very rare label to see these days. The one thing that's held the US up is the dollar, since being the world's reserve currency, no one wants to see it depreciate, in spite of rampant injections of fresh dollars. This is one of the reasons that USA has been able to recover atleast partially from the housing bust while other like Greece have not, as borrowing is a lot easier when you can print the payments without seeming loss of value. To those who might not understand this, just imagine a supply-demand system, where the supply of any commodity becomes almost unlimited, what would happen to its price. Truth be told, smaller scale vibrations like this have happened in the world economy in the past, it's just that things could be brought back under control much easier than today, cause the world's economy was simply in much better shape. This time it's so bad, because the USA is stretching the limits of its borrowing power (again, like it or not, it's the truth, see China's reactions, they're the biggest debt provider to the USA), and its people are not yet ready to accept that their spending is beyond their means. Similar situations unfortunately exist in a lot of the developed world. So this time the nonlinearity could be brought to heel, or could spiral out of control.

Why I keep harping about this nonlinearity is cause I work on simulations, and know that like an experimental simulation code, the point where your simulation becomes unstable and explodes is usually preceded by small oscillations in either direction, i.e. the situation becomes better, then worse, then better, then even worse and so on. These oscillations increase in amplitude and at a critical point, take over the system and every bit of expected behavior is overturned. Unfortunately for us, very little is understood about such systems, yet all of nature, physics, and even human behavior is completely non-linear. We have managed so far by approximating these, since our "alpha's" have been small, but it seems like we're quickly getting to the point where these oscillations could escalate into chaos. After all, doomsday prophecies don't always have to mean that the world ends literally...