tag:blogger.com,1999:blog-138646452024-03-13T23:17:54.048+05:30Chain of ThoughtsYet another Blog.Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-13864645.post-60252218879088941852011-06-05T11:46:00.002+05:302011-06-05T11:54:34.818+05:30Moving on...From the last couple of years, I have been more active <a href="http://www.cse.iitb.ac.in/%7Ekarthiksr/">here</a>, and more active in general.<br /><br />Life is indeed beautiful, and gets more and more beautiful everyday..Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com1tag:blogger.com,1999:blog-13864645.post-50376312634951416452009-02-20T10:10:00.006+05:302009-02-20T12:02:11.839+05:30School to careerPixar University's Randy Nelson explains what schools must do to prepare students for jobs in new media.<br /><object width="406" height="294"><br /><param value="flvPath=http://www.edutopia.org/media/randy_nelson/randy_nelson.flv&pPath=http://www.edutopia.org/media/randy_nelson/randy_nelson.jpg" name="FlashVars"><br /><param value="best" name="quality"><br /><param value="false" name="play"><br /><param value="http://www.edutopia.org/media/videofalse.swf" name="movie"><br /><embed id="video" type="application/x-shockwave-flash" src="http://www.edutopia.org/media/videofalse.swf" play="false" pluginspage="http://www.macromedia.com/go/getflashplayer" name="video" quality="best" flashvars="flvPath=http://www.edutopia.org/media/randy_nelson/randy_nelson.flv&pPath=http://www.edutopia.org/media/randy_nelson/randy_nelson.jpg" width="406" height="294"></embed><br /></object><br /><br />If you’re interested in learning more about one of the world’s truly innovative companies, watch <a href="http://www.edutopia.org/randy-nelson-school-to-career-video">this video</a> (it’s only 10 min).Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com2tag:blogger.com,1999:blog-13864645.post-17755225592422645702008-06-30T05:13:00.004+05:302008-07-27T14:26:57.174+05:30The Erlang ExchangeThanks to <a href="http://notdennisbyrne.blogspot.com/">Dennis Byrne</a>, I got the opportunity to attend and present at The <a href="http://www.erlang-exchange.com/">Erlang Exchange</a> in London, on the 26th and 27th June.<br />I thoroughly enjoyed those two days at the conference - lots of interesting sessions, lots of erlang gurus and a lot of technology enthusiasts.<br />I got to speak to a so many new people in those couple of days and had lots of interesting conversations.<br /><a href="http://s-r-k.blogspot.com/2008/06/erlang-exchange-2008-report.html">Here</a> is my account of the event as I saw it.Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com0tag:blogger.com,1999:blog-13864645.post-70951568383701252392008-06-27T23:10:00.003+05:302008-06-27T23:16:37.231+05:30Separation of concerns{ :<span style="font-style: italic;">tech_stuff</span> => <a href="http://s-r-k.blogspot.com">Concrete Abstractions</a>, :<span style="font-style: italic;">others</span> => <a href="http://karthiksr.blogspot.com">Chain of Thoughts</a>}<br /><br />I don't want to mix the two people in me... So let there be two blogs, one for each of myself.Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com3tag:blogger.com,1999:blog-13864645.post-64877852288722062432007-10-18T10:31:00.000+05:302007-10-18T10:39:04.304+05:30My fav roadNanda road is my favourite one - one of the few roads where its a pleasure to walk or drive. Good to know that there's an effort to do something about it <a href="http://savenandaroad.com/">here</a>.Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com2tag:blogger.com,1999:blog-13864645.post-67937674475288063792006-12-13T09:37:00.000+05:302006-12-13T10:02:54.513+05:30Snow at WorkProbably the snow had taken off for the weekend. We knew that it was round the corner because of the clouds and the wind.<br /><br />And promptly enough, on monday morning, just when we were having breakfast at the Hotel, it was back to work. It snowed and snowed, and continued to snow for hours together till afternoon. And what was left back was a whole new white picture of the place.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_Vrgi0W60jU8/RX99fZrjvUI/AAAAAAAAAAc/ndbvMyuvCok/s1600-h/SUC50006.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_Vrgi0W60jU8/RX99fZrjvUI/AAAAAAAAAAc/ndbvMyuvCok/s400/SUC50006.JPG" alt="" id="BLOGGER_PHOTO_ID_5007859289082281282" border="0" /></a><span style="font-style: italic;">and promptly enough...</span><br /></div><div style="text-align: center;"><br /></div>The old taxi driver says, "The sun'll come out soon and clean all this away". High hopes. But that that was just the beginning. For it again snowed after a couple of days, only heavier this time, accumulating more work for the sun. And also for a lot of people - people who clean the snow off the roads, the traffic police who'll have to be on the lookout for accidents, and so on.<br /><br />It was just beautiful! The way the snow settles down on the ..on practically everything, is a sight to see.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Vrgi0W60jU8/RX9_MprjvWI/AAAAAAAAAAs/ZkBcCY7TlUE/s1600-h/SUC50024.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_Vrgi0W60jU8/RX9_MprjvWI/AAAAAAAAAAs/ZkBcCY7TlUE/s400/SUC50024.JPG" alt="" id="BLOGGER_PHOTO_ID_5007861165982989666" border="0" /></a>With Christmas in the vicinity, all the trees and buildings are wonderfully decorated, and along with the snow adding to it, its all the more impressive. The festive mood strongly strikes one who walks through the streets.<br /><br />By saturday, the snow again took a break and the sun started. It took more than two days to clear all the backlog and now the streets are back to their original colours.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_Vrgi0W60jU8/RX9-RprjvVI/AAAAAAAAAAk/Neh2cEYYBfo/s1600-h/SUC50005.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_Vrgi0W60jU8/RX9-RprjvVI/AAAAAAAAAAk/Neh2cEYYBfo/s400/SUC50005.JPG" alt="" id="BLOGGER_PHOTO_ID_5007860152370707794" border="0" /></a><span style="font-style: italic;">hard work...</span><br /><br /></div>But I don't think its for long, though. The snow is just lurking behind somewhere and will soon be back I'm sure.<br /><br />P.S.: <span style="font-style: italic;">Click on the image for actual size</span>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com8tag:blogger.com,1999:blog-13864645.post-1162221446678353582006-10-30T20:35:00.000+05:302008-07-27T14:24:15.162+05:30Uniquely SingaporeMy Diwali this time was spent in a <span style="font-style: italic; font-weight: bold;">unique</span> way - in <span style="font-weight: bold;">Singapore</span>!!<br />Being my first visit outside India, it was a great experience.<br /><br />To begin with, here are a few facts and comparisons (<a href="http://en.wikipedia.org/wiki/Singapore">source</a>):<br />Singapore, though has a very short history (of about 600 years), established its identity in the guild of nations of the world.<br />It is a very small country compared to India, being 699 sq.KMs(190th largest country) and having about 4 million people.<br />India is the 7th largest and has 3,287,590sq.KMs and more than a billion people (!!) (<a href="http://en.wikipedia.org/wiki/List_of_countries_by_population_in_2005">source</a>)<br />But in terms of the GDP per capita, India(122nd place) is way behind Singapore(22nd place) (<a href="http://en.wikipedia.org/wiki/List_of_countries_by_GDP_%28PPP%29_per_capita">source</a>)<br />Tourism is one of the largest industries of Singapore, with about 9 million tourists in 2005.<br /><br />Singapore has a rich mixture of different cultures as it is mainly formed out of immigrants from Malay, Chinese, Indian, British among other places. From what I observed, the identity of singapore as a country has evolved as an amalgam of the different immigrants who have settled there.<br /><br />The importance given to small details which may seem insignificant to us Indians, hit me right on the face. Be it the roads, or the cleanliness, or the infrastructure effort that has gone into the architecture and planning, especially with respect to the tourists, it is commendable.<br />The blend of art and technology is visible everywhere. Its indeed very difficult to get lost out there, with all the indicators and helpful people. The creativity with which the places are built makes it a pleasure for tourists to spend time.<br /><br />Well, they do have their own set of problems, which I wont go into now, but on the whole, it is a beautiful country.My visit made me learn a lot about India too, along with, needless to say, Singapore.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3097/1236/1600/SUC50003.0.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3097/1236/400/SUC50003.jpg" alt="" border="0" /></a><br />I am not trying to compare two nations and rate them or anything of that sort. The few days that I have seen in singapore is very trivial to make any such comparison. And also, as obvious from the facts, the scale at which these countries operate is totally different.<br /><br />It was definitely a good decision to visit Singapore. Thanks to my sister who pushed for it the most, we decided to go in the last moment. I'll upload a few snaps when I get some time.<br /><br />Majulah Singapura!! (Malay:"Onward, Singapore")Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com13tag:blogger.com,1999:blog-13864645.post-1154715661722992332006-08-04T23:45:00.000+05:302006-08-04T23:51:01.780+05:30Hair Raising!!!<div style="text-align: justify;">No! I'm not talking about my visit to <a href="http://wonderla.com/">Wonder-la</a>. Yes, no doubt that was hair raising.<br />But I'm talking about literal hair raising - yes "<span style="font-weight: bold;">hair raising</span>".<br /><br />Well, there's nothing serious about it. I had grown my hair quite long till last week (It was almost starting to touch my shoulder). Everyone around me was quite surprised and i saw different kinds of expressions. Some were of the opinion that it was horrible and i should get it cut as soon as possible, but there was a minority of them who showed quite positive reactions to it :-). Some asked me if I had taken a vow or an oath that till I do something I wouldn't get it cut and some others teased me saying that my girlfriend had probably ditched me and i had lost interest in life. I was being compared to all sorts of people ranging from musicians to saints to film actors to mythological characters and what not! There were <span style="font-style: italic;">very very</span> few people who were totally indifferent to this and went on as normal.<br /><br />Nevertheless, i continued growing my hair till I felt like doing it. Honestly, there was no other reason at all. And there need not be.<br /><br />After about 6 months, one fine day I just went and got my haircut done and was back to my normal looks.<br />Now again all the reactions(fun ;-)) started. People who had liked my long hair started scolding me as to why I did this and lost my individuality! And others phewed sighs of relief and said that they could atleast see me now.<br />Again mixed reactions!<br />Anyway, my experiment ended here and I am "back to normal?"! Hahaha!<br /> <br /></div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com3tag:blogger.com,1999:blog-13864645.post-1152988195983376982006-07-15T23:43:00.000+05:302008-07-27T14:25:25.892+05:30Universe.random();<div style="text-align: justify;">How to destinguish a "true" random number from something else is often difficult to decide, since the concept of randomness is itself somewhat difficult to define. What is universally agreed is that any "random number generator" based solely on deterministic computation cannot be regarded as a "true" random number generator, since its output is inherently predictable. John von Neumann once famously said "Anyone who uses arithmetic methods to produce random numbers is in a state of sin", thus neatly summarizing the situation.<br />- Wikipedia (<a href="http://en.wikipedia.org/wiki/Random_number_generator">Random number Generator</a>)<br /><br />For eg., if you use a single random number generation algorithm and initialize it with the same seed twice, it generates the same sequence of random(??) numbers.<br />Yes, there are <a href="http://lavarnd.com/">random number generators</a> which use chaotic sources to generate "high quality" random numbers. But in the end, all they seem to use is the inherent randomness in the universe to generate random numbers.<br /><br />This is in fact pointing to something quite fundamental.<br />Is there anything thats actually random in this universe?<br />Look at this now:<br />What exactly is chaos? The name "chaos theory" comes from the fact that the systems that the theory describes are apparently disordered, but chaos theory is really about finding the underlying order in apparently random data (see <a href="http://www.imho.com/grae/chaos/chaos.html">here</a>).<br /><br />To look at an example,<br />The flapping of a single butterfly's wing today produces a tiny change in the state of the atmosphere. Over a period of time, what the atmosphere actually does diverges from what it would have done. So, in a month's time, a tornado that would have devastated the Indonesian coast doesn't happen. Or maybe one that wasn't going to happen, does. (Ian Stewart, Does God Play Dice? The Mathematics of Chaos, pg. 141)<br /><br /><a href="http://www.qubit.org/people/david/">David Deutsch</a>, in <a href="http://www.qubit.org/people/david/index.php?path=The%20Fabric%20of%20Reality">The Fabric of reality</a>, goes on to conclude that given enough computational resources, it is possible to build a virtual reality generator whose repertoire includes every physically possible environment (The Turing principle).That is what makes reality comprehensible. Which kind of says that the universe in itself is completely deterministic.<br /><br /></div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com5tag:blogger.com,1999:blog-13864645.post-1151077944162959262006-06-23T20:57:00.000+05:302008-07-27T14:27:40.717+05:30The "Right" choice!<div style="text-align: justify;">... or should I have said "<a href="http://sourceforge.net/projects/sahi">Sahi</a>"!!<br /><br />Recently I had to give a demonstration to the customer about our approach to functional testing in my project. So I gave a demo of how Sahi works and how intuitive and powerful it is - and needless to say, they were impressed. Not with my presentation skills obviously,(<span style="font-style: italic;">I know that i suck at those things</span>) but with the way Sahi works. Whether they will use it or not, I dont know, but one thing is for sure - I was even more convinced about this after the demo.<br /><br /><a href="http://www.sahi.co.in/sahi_tutorial.html">See</a> for yourself if you don't believe me. There are lots of Web automation and testing tools out there and I'm not trying to compare. But the choice of a tool should not come in the way of development or maintaining the application. It should have minimum interference with the application but still achieve the purpose. And you should be able to extend the tool to your needs. And I think Sahi goes a long way in achieving all this. It just works like a charm. Well, I won't talk about what all it can do... just visit <a href="http://sourceforge.net/projects/sahi">this</a> and have a look.<br /><br /><span style="font-style: italic;">Good job</span> <a style="font-style: italic;" href="http://narayanraman.blogspot.com/">Narayan</a><span style="font-style: italic;">!</span><br /><br /><br /></div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com1tag:blogger.com,1999:blog-13864645.post-1148053184524622152006-05-19T20:48:00.000+05:302008-07-27T14:27:18.500+05:30Of principles and prophets...<div style="text-align: left;">There is a lot of heated debate and protests going on against the storyline that indicated that Jesus Christ had married Mary Magdalene and that their union resulted in a bloodline that continues till date. (<a href="http://www.deccanherald.com/deccanherald/may192006/index205332006518.asp">here</a> and <a href="http://www.ibnlive.com/news/code-is-not-clear-yet-disclaimer-debate-hits-film/10915-3.html">here</a>)<br /><br />Such protests are not new. They keep happening every now and then, for books/movies and every kind of media. What is the root cause of such fanaticism in people?<br /><br /><blockquote>"...So in every religion you find there are the three stages: philosophy,mythology, and ceremonial. There is one advantage which can be pleaded for the Vedanta, that in India, fortunately, these three stages have been sharply defined. In other religions the principles are so interwoven with the mythology that it is very hard to distinguish one from the other. The mythology stands supreme, swallowing up the principles; and in course of centuries the principles are lost sight of. The explanation, the illustration of the principle, swallows up the principle, and the people see only the explanation, the prophet, the preacher, while the principles have gone out of existence almost - so much so that even today, if a man dares to preach the principles of Christianity apart from Christ, they will try to attack him and think he is wrong and dealing blows at Christianity. In the same way, if a man wants to preach the principles of Mohammedanism, Mohammedans will think the same; because concrete ideas, the lives of great men and prophets, have entirely overshadowed the principles.<br /><br />In Vedanta the chief advantage is that it was not the work of one single man; and therefore, naturally, unlike Buddhism, or Christianity, or Mohammedanism, the prophet or teacher did not entirely swallow up or overshadow the principles. The principles live, and the prophets, as it were, form a secondary group, unknown to Vedanta. The Upanishads speak of no particular prophet, but they speak of various prophets and prophetesses. The old Hebrews had something of that idea; yet we find Moses occupying most of the space of the Hebrew literature. Of course I do not mean that it is bad that these prophets should take religious hold of a nation; but it certainly is very injurious if the whole field of principles is lost sight of. We can very much agree as to principles, but not very much as to persons. The persons appeal to our emotions; and the principles, to something higher, to our calm judgement. Principles must conquer in the long run, for that is the manhood of man. Emotions many times drag us down to the level of animals. Emotions have more connection with the senses than with the faculty of reason; and, therefore, when principles are entirely lost sight of and emotions prevail, religions degenerate into fanaticism and sectarianism. They are no better than party politics and such things. The most horribly ignorant notions will be taken up, and for these ideas thousands will be ready to cut the throats of their brethren. This is the reason that, though these great personalities and prophets are tremendous motive powers for good, at the same time their lives are altogether dangerous when they lead to the disregard of the principles they represent. That has always led to fanaticism, and has deluged the world in blood...."</blockquote><span style="font-style: italic;">Quoted from:</span> <a href="http://www.ramakrishnavivekananda.info/vivekananda/complete_works.htm">Complete Works of Swami Vivekananda</a> Volume 6 (<a href="http://www.ramakrishnavivekananda.info/vivekananda/volume_6/lectures_and_discourses/the_methods_and_purpose_of_religion.htm">The Methods and Purpose of Religion</a>)<br /></div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com2tag:blogger.com,1999:blog-13864645.post-1146328749208759402006-04-29T20:58:00.000+05:302008-07-27T14:27:40.717+05:30Time to Synchronize...I came across a weird situation a couple of months ago when I was setting up <a href="http://cruisecontrol.sourceforge.net">CruiseControl</a> with <a href="http://subversion.tigris.org">Subversion</a>.<br />There is a Subversion server on which our source code resided and I was setting up Cruise on another machine which was supposed to be our <a href="http://martinfowler.com/articles/continuousIntegration.html">CI</a> build machine.<br />Steps I followed:<br /><ul><li>Download and install CruiseControl</li><li>Do an initial checkout from the repository into the Cruise projects directory</li><li>Change the sample config.xml to set the build interval, repository location, publishing results etc etc.</li><li>To verify, force a build. (or checkin to the repository and see that it kicks off a build)<br /></li></ul>I did all this, and it worked perfectly fine and the build was successful.<br /><br />But I found that later whenever some code gets checked in, cruise somehow was not picking up any modifications at all. After struggling a lot with the configurations and searching on the web I shot a mail to one of the people behind CC and quite soon, I had the answer.<br /><br />There was a simple mistake that was causing Cruise to behave randomly. The problem was that the system time on the Repository server and the time on the cruise control box was not synchronized. There was some 5-6 hour difference between the two. CruiseControl checks for modifications that have happened after a given time. So if the time is not synchronized, obviously it wouldn't find modifications!<br /><br />This is very important whenever CruiseControl and the Source repository are on different machines:<br />Make sure that the time/date on the cruise box is synchronized with the time/date on the repository box.<br />Btw, <a href="http://confluence.public.thoughtworks.org/display/CC/Frequently+Asked+Questions">This</a> may be helpful.Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com3tag:blogger.com,1999:blog-13864645.post-1143313060721111592006-03-25T23:52:00.000+05:302006-03-26T01:57:03.630+05:30Questions!!Last weekend I had been to <a href="http://en.wikipedia.org/wiki/Karwar">Karwar </a>with a few friends. We had a nice time there with lots of watersports like <a href="http://en.wikipedia.org/wiki/Coracle">coracling</a>, <a href="http://en.wikipedia.org/wiki/Canoe">canoeing</a>, <a href="http://en.wikipedia.org/wiki/Rafting">rafting</a>, <a href="http://en.wikipedia.org/wiki/Kayak">kayaking</a>, <a href="http://en.wikipedia.org/wiki/Windsurfing">wind-surfing</a> etc in the beaches of Karwar. In the evening, we went on a trek over a hill and landed in another beach, pitched our tents there and spent our night. It was just <span style="font-style: italic;">awesome</span>.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3097/1236/1600/meatkarwar.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3097/1236/400/meatkarwar.jpg" alt="" border="0" /></a><br />I couldn't sleep that night. I was just watching the stars and the waves and the forest. There were hills on three sides and the endless ocean on the other. It was a silent night with only the sound of waves. Lots and lots of questions in my mind. Questions about the why and how of the universe; questions which would have probably crossed the mind of most of us, but still remained as questions. Questions about the approach of science to explain the universe and the approach of spirituality for the same.<br /><br />Why do such questions come to our mind? Why does man want to explain the universe?<br />Why can't we get the answers?<br />- <span style="font-style: italic;">answers</span> anyone?Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com7tag:blogger.com,1999:blog-13864645.post-1136901393440453642006-01-10T18:47:00.000+05:302006-01-10T19:26:33.453+05:30The Downside(?) of Simple Design<div style="text-align: justify;">I was chatting with this friend of mine and he was telling me about his project. He was saying that the software that they (his team) are working on has evolved to a stage where adding new functionality to their application has become very simple. Probably it might at the most, just involve implementing an interface with a few simple methods.<br />The design is so simple that on a day-to-day basis, they wouldn't need to use any brains at all for working on that software. That set me thinking...<br /><br />Is it really possible that you can arrive at a stage where the design is so much maintainable, flexible, and whatever?<br />Maybe.<br /></div> But is it the time to stop thinking about the design of the software?<br />No.<br />I think That is the time to sit back and look at the design from one level higher. That might be the time to try to bring in some domain language. That might be the time to figure out a way to automate the day-to-day tasks. That might be the time to bring in a new paradigm to the software. Maybe AI, maybe functional programming. I don't know the possibilities.<br /><br />Bottomline: It is the time to take <span style="font-weight: bold; font-style: italic;">"The Next Step"</span>.Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com1tag:blogger.com,1999:blog-13864645.post-1129662017629698332005-10-19T00:20:00.000+05:302005-10-19T00:30:17.636+05:30Del.icio.us code<div style="text-align: justify;">I came across this <a href="http://www.bigbold.com/snippets/">snippets</a> site and I think its a damn good idea. You can store some interesting code snippets which you might have come across on the internet and it is available always. Very similar to <a href="http://del.icio.us">del.icio.us</a> but this is for code snippets. <br /><br />I have come across a lot of times when I say or hear other people say something like: "Oh! I had done this before somehow...but i seem to have forgotten it!" or "I had seen the soution to that when i was searching for something else but I dont know where on the web I found that code".<br /><br /><span style="font-style: italic;">Hmm...Why dont I come up with ideas like this which are very simple but are so useful?</span><br /> </div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com2tag:blogger.com,1999:blog-13864645.post-1129096857166310012005-10-12T11:19:00.000+05:302008-07-27T14:25:25.892+05:30The Cat ate my source codeThis post is related to my <a href="http://karthiksr.blogspot.com/2005/10/catchy-reality.html">previous post</a><br /><br />This one is from '<a href="http://pragmaticprogrammer.com/ppbook/index.shtml">The Pragmatic Programmer - From Journeyman to Master</a>' :<br /><br /><div style="text-align: justify;">Time for a little quantum mechanics with Schrödinger's cat.<br />Suppose you have a cat in a closed box, along with a radioactive particle. The particle has exactly a 50% chance of fissioning into two. If it does, the cat will be killed. If it doesn't, the cat will be okay. So, is the cat dead or alive? According to Schrödinger, the correct answer is <i>both.</i> Every time a sub-nuclear reaction takes place that has two possible outcomes, the universe is cloned. In one, the event occurred, in the other it didn't. The cat's alive in one universe, dead in another.<br />Only when you open the box do you know which universe <i>you</i> are in.<br /><br />No wonder coding for the future is difficult.<br /><br />But think of code evolution along the same lines as a box full of Schrödinger's cats: every decision results in a different version of the future. How many possible futures can your code support? Which ones are more likely? How hard will it be to support them when the time comes?<br /></div><br />Dare you open the box?Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com1tag:blogger.com,1999:blog-13864645.post-1128871635639659712005-10-09T20:03:00.000+05:302008-07-27T14:25:25.892+05:30'Cat'chy Reality<div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://images-eu.amazon.com/images/P/0552125555.02.LZZZZZZZ.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px;" src="http://images-eu.amazon.com/images/P/0552125555.02.LZZZZZZZ.jpg" alt="" border="0" /></a>I recently finished reading <a href="http://www.amazon.co.uk/exec/obidos/ASIN/0552125555/026-3671140-4796429">this</a> book. It is an awesome read if you are interested in what reality is and where modern physics is pointing to. It looks like the distinction between scientists and spiritualists is blurring away. The way you look at the world starts slowly changing. Especially the many worlds interpretation is a very interesting one. After reading it I have started thinking in that way unconciously.<br />Let me try to put it in as few words as possible:<br /><span style="font-weight: bold;"></span><br /><span style="font-weight: bold;">The Cat paradox</span><br />Imagine a box that contains a radioactive source, a detector that records the presence of radioactive particles, a glass bottle containing a poison such as cyanide, and a live Cat. The detector is switched on for just long enough so that there is 50-50 chance that one of the atoms in the radioactive material will decay. If the detector does record such an event, then the glass bottle is crushed and the cat dies; if not, the cat lives.<br />We have no way of knowing the outcome of this experiment until we open the box to look inside.<br />The whole experiment is governed by the rule that the superposition of both the outcomes of this is real until we look at the experiment, and that only at that <span style="font-style: italic;">instant</span> of observation does the decision happen and one of the outcomes is seen.<br /><br /><span style="font-weight: bold;">The Many worlds Interpretation</span><br />This theory says that both the outcomes of the experiment are equally real. The surprise is that according to this theory there is not one real cat but <span style="font-style: italic; font-weight: bold;">two</span>. There is a live cat, and there is a dead cat; but they are located <span style="font-style: italic; font-weight: bold;">in different worlds</span>.<br />Faced with the decision, the whole world - the universe - split into two versions of itself, identical in all respects except that in one version the atom decayed and the cat died, while in the other the atom did not decay and the cat lived.<br /><br />It sounds like science fiction but it goes far deeper that any science fiction. It is a truth stranger than any fiction.<br /><br /><br /></div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com4tag:blogger.com,1999:blog-13864645.post-1125235704370334302005-08-28T18:15:00.000+05:302008-07-27T14:26:45.363+05:30Capitalized!I had not blogged for quite sometime now. The reason is that I am now in Delhi (Gurgaon) for a week now and I was busy setting up stuff. We are put up in a hotel in gurgaon. We are here doing 'consulting' (whatever that means) for a client of ours.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/3097/1236/1600/P1010016.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/3097/1236/320/P1010016.jpg" alt="" border="0" /></a>This is my team standing in front of our office excepting one who is taking the snap. Will put up nicer snaps when I get the time to shoot. This project seems to be challenging in terms of client facing, communicating, convincing, etc. Lets see how it goes. But one sad thing is that I had to cancel my trip to Leh because of this project. But as long as there is something new to learn,I am for it.Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com3tag:blogger.com,1999:blog-13864645.post-1123396954687915412005-08-07T12:59:00.000+05:302005-08-07T12:12:34.693+05:30Face the Music<div align="justify">Most of the people around me listen to music while working. I see them with ear-phones/ headphones, nodding their heads, enjoying their music, and their work. Even I have tried that lots of times, and miserably failed. I have found that if I am in the midst of something serious and interesting, which requires a lot of my concentration, I just can't listen to music. If I am listening to it, I lose the hang of whatever I am doing and my mind gets involved in the music.</div><div align="justify">The music just takes over the whole of my mind and I sort of lose my context completely.</div><div align="justify">I don't know. It might be that I am poor at concentration, or it may be that I am more interested in music, or it might also depend on what kind of music I listen to.</div><div align="justify">But, whatever it is, this is how I am...</div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com7tag:blogger.com,1999:blog-13864645.post-1122968193374156802005-08-02T11:45:00.000+05:302005-08-05T10:15:37.333+05:30What is meant by Data?<div style="text-align: justify;">I saw a very interesting piece of code in the SICP. It took quite sometime for me to understand it completely. In fact, the meaning flashed to me today during my morning jog!<br /><br />In a programmer's perspective, what exactly is <font style="font-style: italic;">data</font>?<br />This is a very subtle concept. Very difficult to explain.<br /><div style="text-align: justify;">Data is something that is constructed and behaves in a particular way. i.e, What data is, is determined by how it behaves.<br />How do you say this programmatically? - Data is that which is defined by constructors and procedures, together with specified conditions that these procedures must fulfill in order to be a valid representation.<br /><br /></div> </div> <font style="font-weight: bold;">Example</font>: consider the notion of a 'pair' in lisp. A 'pair' is a way of glueing two pieces of data. This is how I will probably explain it:<br /><tt><br />(define z (cons x y))<br /></tt><tt>(car z) => x<br /></tt><tt>(cdr z) => y<br /><br /></tt><div style="text-align: justify;">We never actually said what a pair was, only that there are procedures <tt>cons</tt>, <tt>car</tt>, and <tt>cdr</tt> for operating on pairs. But the only thing we need to know about these three operations <a name="%_idx_1452"></a><a name="%_idx_1454"></a><a name="%_idx_1456"></a><a name="%_idx_1458"></a>is that if we glue two objects together using <tt>cons</tt> we can retrieve the objects using <tt>car</tt> and <tt>cdr</tt>.<br />The interesting thing is that any triple of procedures that satisfies the above condition can be used as the basis for implementing pairs. This is one such triple:<br /></div><br /><tt>(define (cons x y)<br />(lambda (m) (m x y)))<br /><br /><a name="%_idx_1470"></a>(define (car z)<br />(z (lambda (p q) p)))</tt><br /><br /><tt>(define (cdr z)<br />(z (lambda (p q) q)))</tt><br /><br /><div style="text-align: justify;">This point is illustrated strikingly by the fact that we could implement <tt>cons</tt>, <tt>car</tt>, and <tt>cdr</tt> without using any data structures at all but only using procedures. <font style="font-style: italic;">This blurs the distinction between 'procedure' and 'data'</font>. Procedure <---> data. Data <---> procedure. Hmm...I need to think.<br /></div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com3tag:blogger.com,1999:blog-13864645.post-1122639570813749992005-07-29T17:23:00.000+05:302005-07-29T17:49:30.816+05:30... and somebody had time for this.....All my earlier posts are quite big.. I want to keep this small:<br />Obviously you would have come across a lot of useless things on the net... but today I fell upon two of these things in a row.<br /><br /><a href="http://www.logogle.com/ggl.php?hl=ja&lo=SRK">http://www.logogle.com/ggl.php?hl=ja&lo=SRK</a><br /><br />and<br /><a href="http://webpages.mr.net/bobz/ttyquake/">http://webpages.mr.net/bobz/ttyquake/</a><br /><br />don't look at them unless you are hopelessly jobless ;-)Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com1tag:blogger.com,1999:blog-13864645.post-1122396886389604652005-07-26T21:28:00.000+05:302005-08-05T10:14:11.073+05:30Why?<div align="justify">Till now, I have mostly blogged about technical stuff. Today my mind is occupied with a lot of other things. This is the background:<br /><br />From the last one year I was working on a large project and somewhat hidden from most of the nitty-gritties of an organization outside the problems of actual delivery of software. From the last one month, since I rolled out of that project, I am opening my eyes to some of these things. I have a few observations to make: This is probably true for any consulting firm. </div><div align="justify"><br /></div><ul><li><div align="justify">The delivery phase is actually just one part of a very large process.</div></li><li><div align="justify">There is a lot of effort by a lot of people that goes in before an assignment actually comes through to the delivery stage. </div></li></ul><p align="justify">I was hearing one of our senior executives talk about these matters (and a lot more things). Everything was so tangled up. Each and every decision which tries to untangle some of these things, brings with it a few more knots as well. As a whole, it is a chaotic environment. If you consider all the multitudes of things that humans are trying to do in this existence, I don't see any sort of order in this at all. It feels as though people are trying to make sense out of nonsense. </p><p align="justify">This fact leads to a more general question. Why are human beings in general creating and getting involved in all these complicated situations? What is driving humans to create problems for themselves and solve them and get stuck in this never ending chain?</p><p align="justify"><strong><u>Money</u> </strong>- This is probably the answer for a vast majority but we see that beyond a certain level, it hardly matters. People sometimes take risks and are ready to lose money for <em>something else</em>.</p><p align="justify"><strong><u>Ego</u> </strong>- This is probably one factor which overtakes money. People can go to any extent to maintain their self image. Probably this is also one of the factors driving the free software movement. But I feel this is again not the end. There is <em>something else</em>.</p><p align="justify"><strong><u>Something Else</u> </strong>- I dont know what to call it. It involves the high level of <strong>passion </strong>exhibited by humans in whatever they are interested in. It is the infinite amount of <strong>creativity</strong> hiding inside every human, manifesting at various degrees. The push to do something new and special overflows from everyone given the conducive environment. When that push bursts out from within, neither money nor ego nor anything else can even come near it, let alone constrain it.</p><p align="justify">So, my conclusion is that we humans do what we are doing because <strong><em>we just can't help it</em></strong>. The knowledge/creativity/energy inside is trying to breakfree from all the limitations around. It is just the degree of manifestation that causes the differences between man and man.</p>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com5tag:blogger.com,1999:blog-13864645.post-1122142108643600952005-07-23T23:03:00.000+05:302008-07-27T14:26:11.977+05:30Communication with E.Ts - Yahoo!<div align="justify">This is my first experiment with ruby. Don't be too shocked! - the title is misleading. ok.. let me explain.<br /><br />I was trying out the interfacing of ruby with other languages like C/C++, Java etc and wanted an example. So, I downloaded the C API (<a href="http://libyahoo2.sourceforge.net/">libyahoo2</a>) for yahoo messenger with the idea of writing a wrapper for it in ruby. But I somehow couldn't get it working even after trying for almost a week after which I was too frustrated and gave up that idea. In the process, I looked at the C source code and ...hey! I said. Why not...? yes! you guessed it right! It looked as though I could write it in ruby itself from scratch!<br /><br />I started off soon. Now, Yahoo has its own packet strcture to manage communication between its client and server. Or, can you say its own <a href="http://martinfowler.com/articles/languageWorkbench.html">Domain specific language</a> in a very crude sense? whatever. I tried to build that packet structure but with no success. The yahoo server doesn't respond at all if the packet is not proper i.e. it doesn't say that I am wrong. This situation looked as though I was trying to communicate with an extra-terrestrial entity in its own language!<br />It was indeed a very tricky situation.<br /></div><ul><li><div align="justify">You don't have tests to tell you what to expect out of your code.</div></li><li><div align="justify">You don't know how near you are or how far you are to the solution until you actually get the right solution. </div></li></ul><div align="justify">But finally! after doing a little bit of trial and error and wishful thinking and all that, it <em>actually talked</em> to me! It started sending me the buddy lists, cookies and lots of things.<br /><br />After that it was all normal. I generalised the packet generation and cleaned up my code. Right now I just have made of it a sort of API which can be used to write any sort of client. I have written a small CLI client with just the basic functionality of logging in and sending/receiving messages and typing notifications. Now I am thinking of writing a web-based client using <a href="http://www.rubyonrails.org">ruby on rails</a> and <a href="http://www.adaptivepath.com/publications/essays/archives/000385.php">AJAX</a>.<br /><br />This was quite a useful experiment for me. It made me comfortable with ruby. I learnt a lot about how yahoo messenger works and in general how such asynchronous messaging works. I also recollected socket programming and multi-threaded programming and reading C code ;-).</div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com1tag:blogger.com,1999:blog-13864645.post-1120934364728884052005-07-09T23:50:00.000+05:302008-07-27T14:26:11.977+05:30Stony Spells<blockquote><p align="justify">"Take a true object-oriented language, such as Smalltalk. Drop the unfamiliar syntax and move to more conventional, file-based source code. Now add in a good measure of the flexibility and convenience of languages such as Python and Perl. You end up with Ruby. "<br /></p></blockquote><div align="justify">Don't look at my previous post and say that I am very fickle minded and keep changing languages. After all, programming languages are just ways to direct processes in a computer. As I am writing this, I am reminded of this definition from the <a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">SICP</a> book:</div><blockquote><p align="justify">"Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called <a name="%_idx_12"></a>data. The evolution of a rocess is directed by a pattern of rules called a <a name="%_idx_14"></a>program. People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells."</p></blockquote><div align="justify">The bottomline is that, I am trying to learn a new kind of spell - a spell of a precious stone.</div><div align="justify">I am just curious, people are praising ruby so much. Will try it out.</div><div align="justify">But it looks like, lisp has taken a very high place in my list of languages. By the way, I have some near-successful experiments in lisp. Will post them when they mature. Learning Ruby might actually help me go closer to lisp.</div><div align="justify">For the time-being, Ruby, here I come.</div>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com0tag:blogger.com,1999:blog-13864645.post-1119814336828897282005-06-27T00:27:00.000+05:302008-07-27T14:26:11.977+05:30The Hard and the Powerful<div align="justify">I stumbled upon Lisp recently and have started fiddling around with it. It seems to be an entirely new world altogether. Being a C/C++ and now a Java programmer, Lisp looks HARD. Nevertheless, I read a lot of good things about it <a href="http://www.paulgraham.com/">here</a>, <a href="http://mitpress.mit.edu/sicp/full-text/book/book.html">here</a> etc.. (and some bad things as well). After struggling a bit with the various implementations of lisp available, I narrowed down to <a href="http://clisp.cons.org">one</a> of them, got it running on my machine and started coding some simple "Hello World"ish programs and reading <a href="http://www.gigamonkeys.com/book/">this</a> book. </div><div align="justify"><br />I was a bit sceptical after seeing the extensive use of parenthesis and prefix notation ( One of the 'bad' things I've heard about lisp is this : Lots of Irritating Superfluous Parentheses). I almost felt that I was wasting my time on a complicated obsolete language. But I'm feeling a lot better now. I guess its just a matter of geting accustomed to it.<br />And maybe one more thing I miss is a good IDE with all the features like autocomplete, refactoring, etc. But that's not a fault of the language. Probably I have not come across one yet. However, thats not going to stop me from continuing with my Lisping. </div><div align="justify"><br />One thing is for sure: Lisp definitely IS a powerful programming language. </div><div align="justify"><br />Found this quote interesting:<br /></div><em><blockquote><p align="justify"><em>"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot."</em></p><p align="justify"><em>- Eric Raymond, "How to Become a Hacker"</em><br /></p></blockquote></em>Karthikhttp://www.blogger.com/profile/12371117580154188050noreply@blogger.com4