Thursday, October 14, 2004

I feel like a worm. Not in the slimy sense, but in the coming late sense.

 

Let me explain, there was this one time when my family went driving through the country to drop off an uncle of mine at some relatives’ place. (We weren’t exactly fond of long drives for no particular reason, but that time it just happened.) The family we were visiting had a nice farmhouse. After some walking around, I happened to find my brother sitting at the corner of a balcony looking down at some chickens pecking away in back yard.

 

And for some strangely philosophic moment (I usually don’t associate these things with my brother :-) ), he looks at me and says – Rosh, you know all the things they say about getting up early and all, right? Early to bed and early to rise makes you… and early bird gets the worm and stuff? And I say – yeah. And he says – look at what the worm got for getting up early.

(Duh?) And he continues – so the moral must be that if you are worm, don’t get up early.

 

Well, it did have a sense of reason to it… in a sense. This happened years back and for some reason I was reminded of that, feeling weary as I came in to office near afternoon.

 

The reason I am writing about all this is because all that is going to be changing. < inset background score: time they are a changin’ here >  I am going be a worm no more. Someone at Microsoft is transferring to Singapore and is giving away his cycle at a garage sale – I think I am going to be picking it up. It’s got a nice set of Shimano (shimano.com) gears on it. And when I have a cycle I am going to get up at six and will go cycling in the mornings. So there.

I guess.

 

 

On a different note, I have been looking at various university websites the past few days for interesting research in computer science. I was hoping to find some interesting work in languages research to integrate better data handling models into languages – something along the lines of what COmega tries to do. I was a little disappointed to come up with next to nothing.

 

 

I read this book recently, called the ‘Curious incident of the doing in the Night-time’. It is a curios book written from the perspective of a 15 year old suffering form some form of autism. It starts of with a dog being killed in the neighborhood and the kid trying to play detective to find the killer. I wouldn’t recommend reading it, unless you are in the mood to have something bothering you for a while. The book .. well, I better not say much about it. There was this one thing in the book which has been running in my head for a while now – this book if full of descriptions of how the protagonist sees various things in his life.

 

In this part he remembers himself when he was smaller. His teacher would show him a jar of (lets say cookies) cookies and ask him what was in it. And he would say cookies. She would then turn over the jar and a pencil (or something else) would fall out. And then when she asked him what was in the jar, he would say pencil. Then if the she asked him, what his mother would say if she was asked what was in the jar, he would still answer pencil. He could not understand why that was wrong. For a long time he did not realize or understand that other people had minds, and this was hard for him.

 

In a paradoxical kind of way, that is how many of us behave from time to time. There is point at which we reach the borders of our imagination about how others would react to something, because our perception of how they should react is so strongly biased by what we personally know.

 

On a different note, and this one is about cocktails – I am still nowhere about learning the basics about how drinks mix well.

 

However here is a little tip: cranberry juice and orange juice mix well together and go well with some vodka. There is something missing here in this combination and I can’t really put my finger on it.

Also, maracuja (passion fruit) and vodka topped with 7up or sprite and some ice is a reasonably pleasant drink.

Thursday, October 14, 2004 4:23:29 AM (Eastern Standard Time, UTC-05:00)  #    Comments [5]  | 
 Thursday, September 30, 2004
  Mish Mash 

Aah! its good fun to be blogging after a long time now. I had a sort of internal deadline a few days back and life seems generally peaceful since.

 

Which gives me room to write about lots of things that I had been meaning to write about.

 

Hyderabad and life

 

Hyd has so far been a fun place to be in. I stay in a one bed room apartment that is about 3 to 4 kilometers from office. It is a nice locality with few houses that are well distanced from each other. There is a lot of open land and a nice backdrop of rocky terrain.

 

Having done little other that computerese the past few years, it is good fun to be maintaining a house and to be figuring out some cooking. Also one of the newly picked up interests is cocktails. I have not been drinking too many yet, but I am beginning to realize that there is this entire subculture to preparing and inventing cocktails which would be good fun to explore. This blog may well stop being about computing totally and be one about cocktails in the tear future. Like one of teh books I picked up about cocktails said “learning a lot about being the reason why people have a good time“.

 

The thing about making cocktails is that its really hard to get the right ingredients when you are starting out and there is no really easy way to experiment and learn – things start seeming uniformly good or bad after a few drinks.

 

I am also (by my own definitions) beginning to turn into a master chef. I keep having vague sentiments about being a chef or a bartender as an alternate career track. Since I am a relative new comer to drinking alcohol (yes) and to cooking, both of these might take a while – however I am looking forward to evenings with friends and home made cocktails.

 

Microsoft

 

Working at Microsoft is different compared to many places you would work in India. Other than the technology, and the other stuff that I could go on about endlessly - like my manager potentially filing for nearly two dozen patents this year - at Microsoft the senior guys tell you things like “plan things so that none spends the three day weekend at office”. Its nice to be in a place like this. Its highly individualistic, you are given ownership, you are expected to run your own show, accomplish more five fold of what you would do at another place and do it in style – and have time for things like learning to be a bartender. :)

 

More Life

 

I have been having conversation with all sorts of people. Its hard to find people who believe in computers for love of the machine and logic. Its even harder to find believers. Lovers and believers... I am also beginning to realize that talking to people who have a life outside of computers can actually be fun, strangely. :) And in computing I have been some smart folk and some of the prostrate masses as well...

 

I had a conversation with a couple of folk some days back, who believed something to the effect that Windows should not penetrate the academia, because if it does, 'people will not learn anything'. The argument was that since windows is easy to use and that the IDEs and such were fairly complete people would never understand how the underlying things ever worked. The argument was also heavily biased towards the command line and how Windows does not encourage you to use the command line even though the command line is intrinsically better. That kind of talk gets a rather more measured response from me these days that the push-comes-to-shove responses of some time back. Its actually an interesting exercise to see how people can cling onto opinions because they implicitly see a certain safety in having them, as opposed to letting go of them.

 

Today there was conversation about piracy with some other folk. Should Microsoft be cracking down on piracy legally because piracy does actually causes material harm? My stand that was that it shouldn’t as things are right now. I feel that some pieces of software (not just from Microsoft) are actually rather expensive for the Indian-rupee economy. Piracy would be far better handled if prices for certain pieces of software were actually reduced hand in hand with awareness about what offers and alternatives are available. The user groups and the communities can and will play a very large part in this. Once I think the systems are in place, and they are getting in place as we speak – there are offers and options available that people simply don’t know about – then might be a better time to tighten the legal crackdown on piracy.

Can we ever completely eliminate piracy? I don’t think so – but that is not necessarily we are trying to achieve. We can easily make a large portion of the people who are presently not using legal software to start using legal software by making them see value in it. There are simple value propositions like free upgrades and patches for legit systems, possibly vendor provided antivirus packaging, support, merely the fact that you are doing something morally correct which when know would change the minds of many people. Will there always be freeloaders? Yes, but that is not the problem that we are trying to solve here.

 

Learning

 

I spend some time with someone at Microsoft showing how to use the fabled windbg. Really interesting. I guess I am so impressed because I haven’t used a debugger very much at all in the past. Most of the code I have been writing has always been debugged with some variant of the ever useful printf-debugging. I wish I was doing that with Govind Kanshi at Bangalore.

 

Among new pieces of information, there is a new public drop of Monad beta available. Take a look.

 

More Microsoft  

 

Microsoft is full of internal websites about every conceivable things in the org. We have HR, Library, internal resources etc etc lots of the standard stuff. Then the interesting stuff like websites for each group – like one about the debuggers, one about sfu, one (or more) about every conceivable product that you can think of. Its like a whole ecosystem in here comparable to that outside.

 

Microsoft also still has a small company attitude inside in the sense that a lot of decisions and flexibility is left to the choice of those who wield, rather than be dictated randomly by a higher authority.

 

The peace that I mentioned at the start of this post maybe changing – my project is going to be part of Longhorn… what good fun.

Thursday, September 30, 2004 6:25:41 AM (Eastern Standard Time, UTC-05:00)  #    Comments [14]  | 
 Monday, August 30, 2004

Time, wither goest thou.

 

I got my first mail from the great Somasegar today.

http://www.microsoft.com/presspass/exec/somasegar/

 

I also got mail from Jim Allchin today

http://www.microsoft.com/presspass/exec/jim/

 

Neither of these were directly to me, they were to a group alias, but all the same – its one of those feelings to see mails in your inbox from these folk.

 

I also helped get my first piece of code checked into the great windows source tree. Mind blowing! If I break the windows build things could get hot here real quick :-) I also had part of my NEO today (New Employee Orientation).

 

I also have selected a house at Hyderabad. A reasonable two bedroom flat, about a kilometer from office. The weather in Hyd is rather moderate these days. Lots to say, no time :-(

 

Monday, August 30, 2004 10:23:22 AM (Eastern Standard Time, UTC-05:00)  #    Comments [10]  | 
 Thursday, August 26, 2004

So this is my first post after getting into Microsoft.

 

Do you remember that old joke about Wendy? The one where this guy gets a tattoo that says his wife’s name Wendy and then notices someone else’s Wendy tattoo which reads ‘Welcome to Jamaica, have a nice day’. That’s a little like what MS has been like if you shift that metaphor to an intellectual plane.

 

The first two days has been disillusionment of sorts – now the fun is coming back: I am part of a team (I need to check, if I can mention the work on the public network) that is fairly into the thick of things right now. And I am one of three devs who are working out of Hyderabad, with believe a few people in Redmond as well.

 

The sheer amount of stuff that hits you as new is mind boggling; esp in comparison with other places where I have worked where by now nothing would have got off the ground. Here I was hit with a mountain of work. If you are a certain kind of person you would actually enjoy this – I have responsibilities form day 1 and I have a complete set of ownership on the entire code base that that is assigned to me. And its interesting in the sense that it spans over diverse technologies like WMI, COM, MMC, C#, C++, IAS, IIS, various authentication mechanisms (NTLM, Certs, Kerb), RPC, NT Services and on and on. All this and more – and what’s better, I am already writing code. (Of course not all new hires get to code from day 1, but…). And the best part is that its all mine – its my baby to write and create. I compare this with other places where my ownership was limit to a web page or two, or where there is no sense of owner ship and personal style or worse - where you ownership is limited a word doc! Deepak, used to be right – at Microsoft you are flung into the water and expected to swim – and it’s such good fun.

 

I actually have a lot to say, but I am really out of time. I need to go now and I haven’t had much free time, or I would have liked to write more. I also must say that I can also see here parts of that  same Microsoft where Kraig Brockschmidt could have written ‘Mystic Microsoft’ or Adam Barr could have written his ‘Proudly Serving’. Its all that and yet there is so much more… I am only beginning to explore this place that shows signs of terrestrial intelligence. :-)

Thursday, August 26, 2004 9:22:52 AM (Eastern Standard Time, UTC-05:00)  #    Comments [7]  | 
 Saturday, August 21, 2004

Hi Folk, firstly, sorry for not being around in the blogosphere for a while. Life has been changing far too rapidly, with castles building up in the air and floors collapsing beneath my feet rather too often, in the past month or two.

 

Life is settling now and I have things to say -

 

I am joining Microsoft Corporation. I will be working as a developer at the Microsoft India Development Center (IDC) at Hyderabad, on the Windows team, starting Monday Aug 23rd 2004.

 

On a personal note, there is a feeling of peace now. I had too many things I had been keeping up with recently – two user groups in different cities, a lot of community stuff, some insanity related to job shifts, following up frantically on the far corners of technology from design of VMs like Parrot and Scheme interpreters to CLR internals, language design, compilers, distributed systems, SOA and protocol architectures, getting under the hood of more things than I care to mention and a personal life that was spinning round and round. Of course, I was always also trying to keep a day job and a blog as well. All things seem to be settling now, or at least seem to be finding their own relative peace.

 

I am looking forward to the intellectual charm of the high halls of technology. The plan right now is to slow down for a few months, enjoy the company and the work, and to learn. Take a sabbatical from my thought-chataquas, relax on a few things and enjoy the blissful calm and peace of being a developer on a tight project at Microsoft.

 

For a while I might be rather quiet. Then maybe start working up speed towards those nagging ideas that come by and hold my mind and say “Roshan, I am not going to let you go until you have me solved”. I am not sure what they are going to be right now, but I have a feeling that they might have something to do with dynamic languages and a certain runtime…

 

Come gather 'round people

Wherever you roam

And admit that the waters

Around you have grown

And accept it that soon

You'll be drenched to the bone.

If your time to you

Is worth savin'

Then you better start swimmin'

Or you'll sink like a stone

For the times they are a-changin'.

 

...

 

The line it is drawn

The curse it is cast

The slow one now

Will later be fast

As the present now

Will later be past

The order is

Rapidly fadin'.

And the first one now

Will later be last

For the times they are a-changin'.

 

Bob Dylan

The Times they are a Changin’

1963

 

Saturday, August 21, 2004 7:50:10 AM (Eastern Standard Time, UTC-05:00)  #    Comments [211]  | 
 Wednesday, July 21, 2004
  Alan Kay 

"The protean nature of the computer is such that it can act like a machine or like a language to be shaped and exploited. It is a medium that can dynamically simulate the details of any other medium, including media that cannot exist physically. It is not a tool, although it can act like many tools. It is the first metamedium, and as such it has degrees of freedom for representation and expression never before encountered and as yet barely investigated."
(Alan Kay, 1984)

 

 

Alan Kay was awarded the ACM Turing Award for 2003 –

http://www.acm.org/awards/taward.html

 

“For pioneering many of the ideas at the root of contemporary object-oriented programming languages, leading the team that developed Smalltalk, and for fundamental contributions to personal computing.”

Wednesday, July 21, 2004 1:42:09 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 
 Monday, July 05, 2004

My Collected Articles

I decided to collect urls of some of my longer entries here, things I think are of lasting significance and have put them up with some of my other articles. Some of the blog entries need a little more polish before they can be considered as standalone articles though. If there is something that you are looking for, chances are that you may find it here:

http://www.thinkingms.com/pensieve/homepage/articles/articles_tech.htm

 

JRuby

I didn’t know that this beast existed. This is a Ruby port to the JVM.

http://jruby.sourceforge.net

JRuby is a pure Java implementation of the Ruby interpreter, being developed by the JRuby team.

JRuby is free software released under a dual GPL/LGPL license.

JRuby is tightly integrated with Java to allow both to script any Java class and to embed the interpreter into any Java application.

 

A Little Ruby, A Lot of Objects

This is good fun to take a look at. This also talks a bit about Ruby’s meta-class hackery :-)

http://web.archive.org/web/20030618203059/visibleworkings.com/little-ruby/

This is a draft book titled A Little Ruby, A Lot of Objects. It's in the style of Friedman and Felleisen's wonderful The Little Lisper (now called The Little Schemer), but on a different topic. From the preface:

 

Welcome to my little book. In it, my goal is to teach you a way to think about computation, to show you how far you can take a simple idea: that all computation consists of sending messages to objects. Object-oriented programming is no longer unusual, but taking it to the extreme - making everything an object - is still supported by only a few programming languages.

 

Can I justify this book in practical terms? Will reading it make you a better programmer, even if you never use "call with current continuation" or indulge in "metaclass hackery"? I think it might, but perhaps only if you're the sort of person who would read this sort of book even if it had no practical value.

 

The real reason for reading this book is that the ideas in it are neat. There's an intellectual heritage here, a history of people building idea upon idea. It's an academic heritage, but not in the fussy sense. It's more a joyous heritage of tinkerers, of people buttonholing their friends and saying, "You know, if I take that and think about it like this, look what I can do!"

 

Schemers.org

A website about Scheme

http://www.schemers.org

 

Another American Pie Spoof : Bye Bye Mr CIO Guy

This is titled “Bye Bye Mr CIO guy” and is performed by Pat Helland, David Chappell and Don Box at the Europe TechEd. This is just hilarious. I highly recommend this for your free time.

http://channel9.msdn.com/ShowPost.aspx?PostID=11950

Monday, July 05, 2004 2:14:30 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
 Sunday, July 04, 2004

Are you the sort who finds these automated download installers irritating? I like them in spirit that they let you download only the files that you need, instead of downloading a huge installer upfront. However if the downloader + installer combo is there so that it prevents you from physically acessing the installation files, then it is rather irritating.

 

MS has released the Visual Studio 2005 express editions. These are betas of lightweight versions of Visual Studio. I had a look at one of these at a friend’s desk it was pretty amazing. They seem much more developer friendly than previous version of VS. They have a certain limited support for refactoring as well.

 

However the issue is that the express editions have an installer than does the downloads the installation files, does the installation and deleted the files. You need to provide you passport id to the website to be able to download the installer. My guess is that MS wants to know who all are actually evaluating their product. Which is all fair – but the issue is that after this installer automatically downloads the files required, I have no way of actually accessing them – the installation is automated.

 

This has been really irritating me and for a genuine reason - I would like to install the express edition and play with it at my home machine. However, I don’t have the sort of bandwidth required to download it at home. At office I do have the  bandwidth required, however I don’t want to clutter my work machine with beta-ware.

 

I would like to download the actual installation files at office and take them home somehow.
That is what this post is about.

 

Examining the Installation Process

 

A little peeking at the installer showed that it runs as a process called ‘setup.exe’. That is good.
Setup.exe goes on to display two progress bars, one for downloading some files and one for instllaing them.

 

After a careful look you realize that is downloading the .Net Framework 2.0 using the BITS api of windows. The BITS api is the Background Intelligent Transfer Services api that windows uses for downloading things like patches, in such a way that it uses only unused bandwidth of your system and does not hog bandwidth from any other running applications.

 

The funny thing is that when I am watching the download happening I notice that there is this folder created called

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP

It is here that the framework is being downloaded. The download file is shown as “bit< something>.tmp“. The funny thing is that filemon does not show the setup.exe as the process that is writing to this file. My guess is that work done by the BITS api is not tracked as IO done by the process that made the request to the API.

 

However, this should be the part that is of interest – The framework 2.0 installation is downloaded into the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\wcu\dotnetframework

It would be named dotnetfx.exe. So that is one file that you need to save.

 

The other file that should be saved is vcssetup.exe in the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\

 

Both these files will appear when the BITS api has completed. Ie is when the first progress bar has completed. The second progress on the same page is the one that tracks the progress of the framework installation. At this time the installation files are ready copy out.

vcssetup.exe – 28.9 mb

dotnetfx.exe – 24 mb

 

The framework installation is spawned with the following command line switches –

dotnetfx.exe /q:a /c:"install.exe /q /watsongenman=gencomp18.txt"

 

I figured that out courtesy of the log file maintained by setup.exe which is called dd_vsinstall80.txt. It can be found in the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\

 

One thing that was puzzling me was that two exes appeared after the progress bar completed. The progress bar only said that that the framework is being downloaded. The second exe is called vcssetup.exe. I don’t know when it downloaded vcssetup.exe.
Files are
C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\wcu\dotnetframework\dotnetfx.exe

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\vcssetup.exe

Anyway the framework installation requires a reboot. After the reboot I noticed that both files have been deleted. The installer starts again and then the BITS api runs a second time. This time the file that appears in the download folder is again called vcssetup.exe !! The folder name is same as before :
C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP\

I have two copies of this file now and I think I need to do a file comparison to see what the difference is. I expect the first one to be a dud.

 

I think with these dotnetfx.exe and vcssetup.exe files, it should be possible to install the express editions and be able to copy the installation files around. I am afraid that they may not work if the original setup.exe had created some registry entries that these installers check for before running. If that is the case then I may have to go through this whole process again, but this time with regmon running. That will be a pain.

 

The vcssetup.exe was run by the installer with the command line args –

C:\DOCUME~1\< user name>\LOCALS~1\Temp\VSESETUP\.\vcssetup.exe "C:\DOCUME~1\< user name>\LOCALS~1\Temp\VSESETUP\.\vcssetup.exe" /q:a /c:"install.exe /q /watsongenman=vs_setup.dll.txt /msipassthru MSI_ARGS_FILENAME_BEGINC:\DOCUME~1\< user name>\LOCALS~1\Temp\tmp21.tmpMSI_ARGS_FILENAME_END"

 

I am not sure what any of that means right now, but I might need that to do another installation with the installer.

 

Ok I just ran windiff on the two versions of the vcssetup.exe file.. surprise surprise.. they are both the same. But how can that be? Does the installer actually the download the same ~30mb size file twice?

 

While the file was being downloaded the second time I did do a ‘ipconfig /release’ and the download did not seem to progress, so it does seem like they are actually doing a download a second time. (Damn I should have started a packet sniffer to check).

 

Trying to do the install with the Installer files

vcssetup.exe – 28.9 mb

dotnetfx.exe – 24 mb

 

I ran vcssetup.exe on a machine where I already had .Net 2.0 installed (the version that came along with Monad) and the installer refused to run saying that .Net 2.0 is not installed. I am guessing that this is a later build of .Net framework 2.0.

 

Ran the framework installer and it complained that an incompatible version of itself is already installed. Fair enough (considering that 2.0 is sill under development).

 

And bingo it works.

 

To Summarize

 

If you want to install VS 2005 express editions on a system where you down have a fast enough internet connection, this is what you need to do to get the installation files –

 

Start the installer program that does the download for you. At the point in the installation where it says that the download has completed and that the installation process is starting you should copy out the contents of the folder

C:\Documents and Settings\< user name>\Local Settings\Temp\VSESETUP

 

Specifically, you should find 2 files

vcssetup.exe – 28.9 mb

dotnetfx.exe – 24 mb

 

These should let you install the VS on any other machine of your choice. This entire process is applicable for VC# installation – however I would expect that similar approach exists for the other parts as well.

 

The information provided in this blog is for informative purposes only and is intended to help people who are facing a genuine issue. I am not responsible for any misuse of this information.

Sunday, July 04, 2004 1:14:02 AM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  |