Friday, April 11, 2014

A Taxing Day

Finally sent in my tax return today. Unfortunately, for some idiotic reason, nonresident aliens in the US cannot file their taxes online. I have half a mind to charge the postage to the IRS.
The catharsis of finishing off my taxes was unfortunately interrupted by a rather annoying discussion at dinner - another instance of loud, emphatic ignorance confident about their knowledge of finance. "Bankers are evil.. they contribute nothing to society.. the whole of Wall Street is ethically wrong[sic]... they produce nothing.." - etc., etc., etc.

The exact workings of the financial crisis were then explained to me - it never ceases to amaze me that people are ready to believe that they have perfectly understood something that eluded some of the best minds in the world. Very, very few people can claim to understand the recent crisis - a few central bankers, a couple of professors and doctoral students at Yale and Chicago, and perhaps some people at the US Federal Reserve. That's it.

I, being the utter imbecile that I am, was foolish enough to argue. I should have known that this particular variety of self-assured ignorance comes accompanied - almost invariably - by an ego that is incapable of handling any opinion contrary to the first one that it accepts. Confronting such a person is a nuclear option; one must tell them that they are utterly and completely wrong. And doing so is difficult - one must decide to tear down someone else's ego in public. I quickly changed tack and started talking about something else. Phew.

I'm going to try and write a post describing the financial crisis in a couple of days. It will likely be an amateurish attempt, but I do want to put my ideas - rather, the ideas I have gleaned from my conversations with Andrew Sinclair - down on paper.

For now, Adios!

Tuesday, April 08, 2014

Stocks, luck, unscrupulousness, and taxes

Had some very heated discussions about the stock markets, morality, and taxation this afternoon.

I despise it when people who don't really understand something are so passionate in their beliefs on the issue. This seems to happen mostly because the person in question has some deep-seated beliefs that are strongly validated or rehashed by the argument. "Rich people are bad", or "making too much money is a sign that you're stealing from the poor" seemed to be the concepts that underlied most of the arguments today.

The stock market is not just a gambling house; if you want to describe it as "informed gambling" then almost anything is a gamble. If you enter any system (and actually put your hard-earned money into it) without understanding what you're doing, there's a good chance you're going to lose it. Stock market regulations are not perfect, just as legal systems are not perfect. Some people have gamed the system to make money in insidious ways that will soon (hopefully) be outlawed 1. No doubt others will come up with even cleverer methods to make money. But that doesn't mean that the stock markets themselves are somehow morally wrong.

All of this seems to stem from a basic idea that (a) rich people are bad, and (b) rich people seem to make lots of money from the market: cue the "inequality is growing" tagline - which is something I'm not entirely sure of in any case 2,3. Something, they say, must be wrong. Surely, the big, bad, rich people are using this corrupt system to make even more money. No.

Bad people may be rich, but if you make the argument in reverse, you are simply, logically, absolutely, thus congruently, wrong. Saying that some rich people make lots of money from the market is right; that's how many of them made their fortunes in the first place - they're rich because they're good at making money.

There was also a claim made that rich people are "bad" because the infrastructure that they stand on, that allows them to get rich, is inherently "bad" (and it influences said rich person), because it is (clearly) aimed at making money and nothing else. Note the implicit assumption that making money is automagically a bad thing. Don't even get me started.

There's a lot more I want to say about this, but I really should do more research before I do so.


References:
[1] http://www.reuters.com/video/2014/04/03/reuters-tv-breakingviews-michael-lewis-unplugged?videoId=303233495&videoChannel=117766
[2] http://www.cbpp.org/cms/?fa=view&id=3629
[3] http://www.hoover.org/publications/policy-review/article/123566

Monday, April 07, 2014

Restart

It's been quite a while. I'd actually forgotten about my old blog.

A friend of mine told me he found it the other day. I don't suppose anyone else even looks at it anymore. Going through the posts, I can see how much and how little I've changed - I truly regret not keeping this blog updated - so many moments missed, soon to be forgotten. I suppose facebook took up that part of my life - when I wanted to say something, I just posted it there. But it's not quite the same. Not quite the same.

I'm going to try and update this blog every day from now on, even if it's a short, boring post. There are so many things I want to write about, so many wonderful memories I want to share - I'll see if I can do justice to the topics I choose.

I'm going to start with some events from last Friday and Saturday. Wish me luck!

P.S. I did notice the missing apostrophe in "it's" in many of my earlier posts. Don't know how that happened; I'll try to fix them as soon as I can.

UPDATE: Didn't even manage a week. Missed two days on the 9th and 10th. I'll keep recording days missed here to discourage laziness.

Thursday, June 23, 2011

Real Estate Stuff

I'm building a website for a relative of mine, who runs a real estate business.

Check it out - raghav sen real estate (most of his work is in Kolkata).

I'm going to try and use some stuff from this article on design - hopefully, I won't make a mess of it.

Sunday, August 15, 2010

Time's up !

Leaving for Yale tomorrow.

I started packing _today_.

I think I'm finished - which is not really an encouraging statement because I thought I had finished packing many times today.

My mother's sending lots of ready-to-eat food.. the customs people will probably think I'm trying to open a restaurant or something..

Wish me Luck ! (well, with 91CR on my side, luck is my lady.. hehe..)

Thursday, August 05, 2010

Convert a character to hex using javascript

There are lots of massive solutions to this - here's a 0.2 second solution ( I am posting this because I saw this )

"x.charCodeAt(0).toString(16).toUpperCase()" is the hex of x. Use charCodeAt(i) for a full string (parseInt otherwise).

I realize that this is trivial. It is stupid. It can be done in many ways, most of which are ridiculously easy.

Unfortunately, people are failing to do even this. Meh, more proof for the FizzBuzz statistic.

Friday, July 30, 2010

The margin-top problem (and solution !)

This is one of the more irritating CSS errors* around - you put something inside a div - and the div takes on the margin-top of its child element.

(*This isn't really an error - it's technically the correct behaviour, but not what a programmer would expect.)

To illustrate - here's a page with multiple divs, with margin-top:0px specifically assigned for the divs.

The page looks like this : [link to page]
The margin-top problem


It should actually look like this : [link to page]
Solved margin-top


Here's an example of the CSS used:

body {
 margin:0;padding:0;text-align:center;background:#222;
 font-family:"Times New Roman", Times, serif;font-size:16px;
}

#box1,.other {
 width:1000px;
 margin:0px auto;
 background:#EEE;
 border-bottom:2px red solid;
}

#box1 {
 height:270px;
 margin-top:0px;
}

.other {
 height:150px;
 margin-top:0px!important;/*makes no difference*/
}


And some of the HTML :
<div id="box1">
 <h1>This h1 tag should have a margin-top. Instead, the div gets it.</h1>
</div>

<div class="other">
 <p style="margin-top:50px;">Text in a styled p tag with a margin-top : again, the parent div takes it.</p>
</div>


To solve this problem, just add a padding-top:1px or a border - any padding or border affecting the top of the parent element will resolve the issue.

As you can see, chrome has this problem. I have tested it on FF, Opera and IE8 with the exact same results.

Tuesday, July 27, 2010

Dead Code Olympics : Part 1 - Internet Explorer 6

The web has come a long way since the time of spacing gifs and tables inside tables inside tables (repeat ad nauseam) - however, a great many developers and users have not.

I'm going to list one of the most irksome practices of these curious creatures:

Internet Explorer 6

IE6 ! Gadzooks, forsooth ! Quite possibly the biggest burden on the internet right now. IE6 was provided for free with WinXP, and has cost developers and designers a fortune in antidepressants.

IE6 can change HTML when CSS is changed.. don't believe it ? See this :

In Chrome
In Internet Explorer 6
Notice the arrow ? Now, (Bruce Lee style) look at what its pointing to. "ct" ?? What's that ?

Well, "c" and "t" are the last two letters of "contact" - IE6 is simply repeating the end of the previous line.
If you hover over "ct", you get a hover effect on "contact".

However, you can stop this from happening - just change the width of the parent div, or the border, and the effect goes away.

Such is the power of IE6.

Kneel. Or you will be knelt.

- Debayan Gupta

Saturday, July 24, 2010

Getting ready to move..

Spent the last few weeks finishing up all my projects (my backlog is always twice of what it should be).

Over the last two days I had to deal with no less than four FizzBuzz-challenged "developers" who mucked up my carefully optimized code by "removing obviously unnecessary lines" - I nearly ended their obviously unnecessary lives before my brain kicked in - at which point I simply decided to charge extra.

It really is rather sad to see the sheer number of programmers who, simply put, cannot code. This problem is compounded by the fact that most of these people are under the impression that they are experts.

Pooh.

Wednesday, April 21, 2010

I sense a Censor

Censorship: It tends to get irritating very, very quickly.

Indian censors really take the cake - they replace "hell" with "heck" in the subtitles. Which works in most movies, but not something like "Bedazzled".

"Paragraph one states that I, the Devil, a not-for-profit cooperation, with offices in Purgatory, heck, and Los Angeles, will give you seven wishes to use as you see fit"

What the heck ?

Not only do they get stuff wrong all the time (it really is quite obvious that the people writing the subtitles have no knowledge of English), but I mean seriously ! Censoring SUBTITLES ?!! (and mixing up "lichen" and "lycan" )

They're been cutting out crucial scenes from movies for a long time (anything "too gory" or "showing too much skin") - but allowing shows like Splitsvilla to continue - which do you think is worse for our innocent, naive little minds ?

And you know what ? This is helping increase piracy. I watched this movie a couple of months ago - and I liked it, but it seemed that some scenes were cut off (there was an obvious break in continuity), so I went and bought a DVD. Guess what - that was censored too.

So I ended up having to download the bloody thing, just to watch the whole movie. Which I PAID for. And it wasn't a sex scene. It wasn't very gory (I've seen stuff a lot worse on TV). And it certainly should not have been censored.

So just for the heck of it, I decided to find out how many people ended up downloading/ buying from pirates even after they had bought the DVDs, or had decided not to buy originals because they would be incomplete.

I asked 16 of my friends - here are the results :
2 - usually buy
3 - always download because its cheaper, and easier to get.
11 - download pirated stuff because its better.

And guess why its better ? 
  1. They're compressed to 700MB or so (not everyone wants to get a hi-def - they'd rather watch the movie first, see if they like it, and then maybe get a better resolution)
  2. They're out first - movies are often released much, much later in India, so people who really, really, want to watch, people who can and will pay, people who are anxious for the film - will download a hall cam record.
  3. They are complete ( Indian censors substituted "courtesan" for "whore" throughout the movie Original Sin - which is pretty funny, especially in places like "you liar ! Thief ! Courtesan !" )
But that's all right. We don't need FTV to spoil our minds. Or bad language (most parents would be quite.. surprised to know how many swearwords their children are aware of). Or words like "hell".

May you burn in heck.

Saturday, April 17, 2010

How to survive interviews

My aunt came over to my house today, and I was subjected to over an hour of learned monologue (with my aunt, its always a monologue..). I had spent most of the time thinking about Elin Nordegren the Floyd-Warshall algorithm, but I noticed an ant on my wrist, and was startled into listening for over ten seconds.

Apparently, her daughter's college is having mock job interviews (conducted by their placement cell). They are to

  • wear ironed clothing
  • shave
  • shun jeans
  • wear pleated pants
  • (girls) wear salwaar suits
  • hold their noses up at a constant 30 degrees
  • act in a manner expected of a dapper 70 year old Englishman in the 1830's
  • generally, be a cowardly *&^$ with a bad attitude.
It is quite evident why these particular imbeciles are stuck with jobs at college placement cells (bad ones at that !) - they have no idea whatsoever of how to give an interview. ( and no, dear residents of America, its not "inner-view" )

An interview is your chance to give your employer a glimpse into the best of you. The best of you. Doing the same, stupid thing as the other four hundred candidates (who have all been to the same career counselling classes as you ) is not going to help.

A good haircut ? A good idea, especially if you're a hairdresser. But it is certainly not the main thing.

Ridiculously expensive clothes ? Again, missing the point.

Surprise surprise, there is no magic formula. No really, act surprised. Because there are lots of "institutes" which provide "personal interview consultancy services". And they earn a lot of money.

The only real way to give a good interview is, as clichéd as it sounds, is to be yourself. You would be surprised at the number of people who cannot do just that.

Most people are merely following the herd, with no idea of what they really want to do. They have no real plans for the future - this is not to say that they are not capable of intelligence. That is what's really sad - these people possess the capacity for thought, but are unable to utilize it because of a variety of reasons.

Can you think ? Would you get punched by Bruce Lee for looking at his finger instead of the Moon ?

What are you good at ? Can you lead a team ? Do you want to ?

Make sure you have the drive, the ambition, and the _power_ (for the lack of a better word) for it to make sense for them to hire you. You should add value to their organisation.

Remember - you are giving this interview to get into a job, where you will be expected to perform, and perform in a way that will do justice to the expectations that you have raised during your interview. Are you ready to do that ?

Be honest. Be intelligent. Know what you want.
Don't waste their - and what is infinitely worse - your time.



PS. I know where the extra "is" is. I put it there.

Monday, July 20, 2009

Moonbeams from the Larger Lunacy

40 years since the first Lunar Landing, and we still don't have a bus service to the Moon...

Saturday, February 07, 2009

Once Upon A Time

Abhishek Das is dead.

6-FEB-09

He was a student of St. Xavier's College, Kolkata, in the second year of B.Sc. Computer Science Honours. I didn't know him very well.

I do not wish to elaborate. If you have an insatiable urge to know more, go here.

It is so easy, so very simple, to say "may he rest in peace". A generic phrase for A Generic Death (that is what it is for most of us) - just another statistic for the highways.

Soon, we shall all forget, and Abhishek will not touch our lives again, save in memory.

I cannot offer him much, for he no longer needs the things we can give him.

Auf Wiedersehen,
Abhishek Das

Saturday, November 29, 2008

Mumbai Mayhem

No more words. Truth. Just simple truth.

  1. The NSG commandos have captured and interrogated a terrorist from the Taj.
  2. He has revealed his name, the names of many of the others involved, as well as their objectives.
  3. All of the terrorists were Pakistani nationals, with two possibly holding British passports.
  4. They came from Karachi.
  5. They were planning to reduce the Taj and the Oberoi to rubble in a 9/11 style set of blasts (multiple references to 9/11 were there in the confession)
  6. The boat they came in was actually an Indian boat which had been seized by Pakistani Marine Police (unconfirmed, but the Pakistani Marine Police has been refusing to return seized Indian fishing boats and trawlers for the last 12 months - if the boat was really one of these, then one must suspect that these attacks were in the planning stage even then)
  7. They had orders to "kill till the last breath", and enough ammunition to obey those orders.
  8. The explosives they carried were not the only ones they had access to : more had been shipped in earlier.
  9. All of them had received extensive training in using firearms.
  10. Their target was the Indian economy, and they aimed to destroy the country's symbols of prosperity, and reduce international trust in the country.
On top of all this, the Government of Pakistan is being exceptionally cagey. It is obvious that the American and British Governments will not agree to the fact that current Democracy in Pakistan (for the most part) is tacitly supporting the terrorists attacking India, because well.. "How can it be ! Its Democracy !" .

It is a democracy The American and British Governments helped set up - and now, if it turns out that it is aiding and abetting terrorists, they will lose face ( its a matter of Pride, you see - what matter the lives of a hundred stupid Indians when the very pride of the Queen, God bless Her Soul, is on the Line ?). And, currently, they are simply in a state of childish denial -" I helped make this, so it can't possibly be bad". Sadly, Countries, unlike Children, cannot afford to be juvenile.

The lashkar-e-toiba leader gave speeches in public in Pakistan without fear of attack ( you see, even thought the Lashkar is a banned group, they have renamed themselves the Jama'at-ud-Da'wah, and the banning of this new(!) group is apparently held up by red tape, and as the fellow speaking said that he was the leader of the jama'at, and not the lashkar, they didn't want to arrest him).

The Pakistani Foreign Minister, when interviewed by Prannoy Roy, put forth a slew of badly constructed lies ( I mean, if you're going to lie and misdirect and be generally disingenuous, you might as well try to do it well). The Pakistani Government has gone on a U-turn, after saying that they will send the ISI chief to India - they have decided not to (maybe his double isn't ready yet, or his cover story still has a few patches which require a few more people to be killed before it is watertight). The Pakistani foreign minister interview with Prannoy Roy.

Thursday, November 27, 2008

On Terror

The recent attacks in Mumbai have resulted in a massive furore over the sheer level of incompetence shown by the police and the intelligence division. I find these accusations foolish, and a complete waste of time. India is an incredibly diverse country with a massive, massive population, and its almost impossible to keep track of your own children, let alone unknown vigilantes.

The blasts that are now taking place all over the country are a disgrace to whatever religion these "terrorists" claim to follow - in this matter, I have a bone to pick with the BBC; they keep talking about "Islamic militants" and "Hindu militants". They are no longer Muslim or Hindu - they are militants using the names of these religions to hurt, maim and willfully destroy lives, so I request that the BBC calls them "terrorists", and just that.

I, sadly, have little knowledge of Islam; but even I know that one has to win the Greater Jihad before one can fight the lesser jihad. And even I know that fighting and hurting people in the name of religion , is definitely "lesser".

I am a Hindu, and as far as "Hindu terrorism" is concerned, I find that phrase to be an impossible one. Hinduism is not so much a religion as a mindset : a soulset would be nearer the truth, but utterly incomprehensible to most. Hinduism has no doctrines, no laws, no concept of heresy, no chains at all. It believes that every religion is correct, and that "swadharmanishtha" - belief in one's own faith is among the most respectable of virtues (ie., ceteris paribus, a devout christian is more respectable than a not-so-devout Hindu).

You do not need to go to a temple to be a Hindu. You need not perform rituals. You can eat beef. You can live, you can die, but the one thing a Hindu is expected to do is this : the right thing. A true Hindu cannot hate, for he or she would believe that everything is god - even the one they hate is but a manifestation of god.

I find it quite ridiculous that "Hindu terrorism" is taken seriously. They are either Hindu, or terrorists : they cannot be both. I could speak on for hours about various old incidents (Babri, etc.) - and there are many stories to tell, about how there was really not much tension at all, until some "leaders" turned up and stirred the mob, and the mob did as mobs do : mobbed.

It had nothing to do with Hinduism or Islam - Imagine an orator speaking to a group of uneducated British Christians, all farmers and clerks and what we so easily generalise as "common men". Imagine this orator telling them that a hedonism-based club bas been built over the birthplace of Jesus Christ. Now imagine that this mob is directly in front of this site, mysteriously armed (these are "common men and women").. do you want to imagine ?

We must not allow these events to sow mistrust within us, for that is the objective of these "terrorists" - unlike attacks elsewhere, where fear is the objective, these attacks in India have a different target : our trust. We live in India, a country where one almost always has people from three different religions within earshot.

These attacks are aimed at our bonds : to make us lose the trust which allows all of us to live in harmony : and we cannot afford to lose that peace, because then, there will be war, and this war will never end, because trust, once broken, is difficult to reforge.

Difficult. And I'm lazy, and I'll finish by B.Sc. in some time; so here's a little note : I would prefer it if my elders left me a world to live in, as opposed to a battleground. I would like to be able to worry about having to choose between specializing in AI or IT, rather than worrying about what religion the fellow sitting across me follows. I would like to live.

Hmm. Personally, looking at your track record, my dear elders, "leaders" and politicians.. I dont' think most of us will have a chance to do so.

Oh well. Its nice to be immortal like me. Too bad it only lasts until I die.


*praying for absinthe

Debayan Gupta