Friday, December 13, 2013


Poorly written programs are one of the greatest bothers. I myself wrote one such program apparently with a query which ran good the first time, but stubbornly refused to budge the second time. Now I am sure there would have been a mistake on my part, something which I overlooked, but what followed this has been well a nightmare (literally) as I spent a whole 6 hours trying to figure out a solution.

So, like any other programmer, I looked up google. Randomly, I had an idea to dump all my result set into a CSV, and then upload the CSV to MySql. Not as easy as it sounds. My table had 30000 entries, should have taken anything from 10 to 30 minutes to upload it through the in-built MySql utility.

But lady luck it seems eludes me in constant perpetuity.

The utility made my MySql Workbench crash after running for 30 minutes. Twice.

So, I began to look for more ways to upload/convert csv data to MySql. Now, what I found next was smart and nice, but essentially crude.

For instance, there are 8 different columns in my table. I opened the CSV file in MS-Excel, and wrote a formula to combine the data from the 8 cells into a well formatted SQL insert statement.

And, voila! I now have 30000 insert statements running in batches of 100. I believe it will take around 30 minutes to execute, but my MySql Workbench isn't crashing, and more importantly I am getting some work done.

I hear there's some research going on self-correcting programs, or where you specify just the algorithm and the IDE generates a program for you, but I fear that it will put programmers like me out of jobs, and there will be a state of anarchy, as that will also be the day, when the machines rise against the humans. Though I am quite curious, as to whether it will end up like The Matrix or the Terminator!

 

 

Thursday, September 5, 2013


Science is one tough lady for a person to love. She is not only difficult, but treacherous- She will leave you when you need her the most. However, for most part, She is fun to be with. Eager to lead you on an adventure if and when you discover her. The affair for itself is oddly amusing- open for the world to know, and extremely secretive where only You and your Lady know the intricate details. More people have died loving her, than lovers in a conventional romantic relationship. They have fixated and spent maybe an entirety of a lifetime exploring just a single part of her. So much so for foreplay.

While at times frustratingly quiet, for it speaks without words. The universality of it transcends our life in perhaps every possible way.

Einstein once said that that the biggest mystery and perhaps the funniest thing about that mystery is that we are trying to figure out something of what we ourselves are a part of. It’s quite a simple an observation. Delving into the depths of it, it is maybe the most beautiful thing I have ever come across. Literally.

I am not a morning person, unless I have some business or lectures to attend to in the morning. I find mornings very unproductive. Everyone is busy with their lives. Going to jobs they do not love, working for people they do not like, speaking what they do not believe in, talking what is certainly not what they are thinking of.

Nights on the other hand, are quiet. Calm. Serene. Listening to violin, cello, piano or any piece of classical music, away from home, alone, taking in the cool wind is oddly overwhelming.

It has been about three months since I last updated. I scribbled- typed basically a lot of random notes and stuff. None of it makes sense. Why does it have to? Why does it always have to make sense? Why can’t we embrace the chaos? Maybe the biggest problem is that we try to make sense of chaos. That is the problem.

The problem is not chaos, but the way we look at it. In mathematics, either it’s a linear system or a non-linear system. Why the binary? Why not accept something for what it is rather than for what we are trying to project it as?

What is life’s greatest mystery that we are yet to uncover?

I was watching Person of Interest, a TV series that I never heard of and a friend suggested it quite recently. A character Mr Finch says, “I am hiding in plain sight Mr Reese, I am there for all to see, only nobody notices me”.

What secrets of the Universe lay hidden in plain sight? What is most apparent, yet no one has uncovered it? Is it still there, or has it been lost over centuries of squabbling over the trivial, or our own selfish need have made us so blind to what has been the obvious?

Run away. Ran far. Run till you can breathe no more, feel your legs will fall off. Run till there’s a searing pain in your stomach. Run till you can think of nothing else. Your mind is blank. That.
Just that.