Wednesday, December 10, 2008

Keyboard stuff..

Was trying to play a song from notes (piyu bole) and since it seemed too fast for such a slow song, I looked up on the web to see how people actually play that song. Found an amazing
version: http://www.youtube.com/watch?v=atAzfF0M44s

Not beginner's stuff :).

Monday, September 15, 2008

Learning something new.

Looking at my wife churn out pleasant music on a keyboard with barely 2 weeks of classes, I wonder why I never invested any time in any of the creative fields (painting, sketching, music, photography...).

I think the basic issues for me are around
  1. Getting out of the comfort zone. The existing mental pathways are easier to go along with.
  2. Trying to look for "productive output".
  3. A belief that any new field requires a huge amount of practice and dedication.

Due to this I always ended up spending my free time on the next "scripting language" or "programming model" :). So taking a different view point and approach, I am going to:

  1. Focus on the joy of learning/exploring something new.
  2. Commit a fixed time (say 30hours) to a given field and see where it goes.

At the end of it if I can enjoy/appreciate music or photography more, it would be more than worth it. RK's tip is a very practical fallback :)

Friday, September 12, 2008

Windows workflow

Looking at the samples and having some vague discussions at work about workflows got me a little irritated and frustrated about whats going on.

Luckily someone pointed me to this book: "Essential Workflow" and I must say that it is one well written book. It explains the "concepts" behind it instead of dealing with some vague design surface or cooked up examples. Basically WWF is a 'programming model' for long running resumable programs.

With fundas in mind it is much easier to make a call on whether WF is a fit for a given context.

You can find a sample chapter here: Sample Chapter

Wednesday, August 27, 2008

Uri quirks..

Got bitten by this as this i was using the Uri class to combine some parent child resources. Msdn states that Uri(uri, string) combines the base and relative uri's w/o giving details of what that means. The following examples show that combining two uri's is not obvious :).
(http://www.xyz.com/p1/p2, c1) => http://www.xyz.com/p1/c1
(http://www.xyz.com/p1/p2/, c1) => http://www.xyz.com/p1/p2/c1
(http://www.xyz.com/p1/p2, /c1) => http://www.xyz.com/c1
(http://www.xyz.com/p1/p2/, /c1) => http://www.xyz.com/c1
(http://www.xyz.com/p1/p2, ./c1) => http://www.xyz.com/p1/c1
(http://www.xyz.com/p1/p2/, ./c1) => http://www.xyz.com/p1/p2/c1

 
The gory details of the combination algorithm can be found at http://www.apps.ietf.org/rfc/rfc3986.html#sec-5.2.

Thursday, July 31, 2008

Understanding legacy code.

Most of the time in a software job is about understanding legacy code (any code which survived a few months is legacy :) ). Since this comes up everytime you move to a new team, I sat down to take notes. Surprising how often I forget to do few of the things that worked in the past. Hope you find these useful as well:
  1. Talk to the someone who already knows the codebase and walk through the main components on the board
  2. Play with the final product to get an idea of its features (becomes easy to correlate when you go through the code)
  3. Figure out how logging works in that product. Enable verbose logging (if available :)) and keep watching the tail of log as you play with the product
  4. Attach a debugger and step through the code while you use the product
  5. Run the unit tests under a debugger
  6. Go through the tests for a feature
  7. Go through the bug database by feature. This quickly gives a sense of what you are going to run into :) and a lot more.
  8. <>

Monday, June 09, 2008

Concurrency and coordination runtime

Anyone who has done any amount of async programming knows that it gets out of hand pretty easily. We are good at reasoning about sequential things and async code with its callbacks within callbacks approach breaks this view and makes it hard to reason about things like correctness and boundary cases.

MSR has come up with a different programming model intended to make async i/o based programming dramatically simpler (almost feels like sequential code). It is a library on top of .net and ships as part of robotic studio. For any serious async work, this is worth investigation:
  1. MSDN article
  2. Videos

Thursday, June 05, 2008

Thread local storage leak in Compact CLR

Its pretty easy to use thread local storage on the CLR using the LocalDataStoreSlot and the Thread.Get/SetData methods. The unfortunate part is that the LocalDataStore is not freed after the thread dies .(LocalDataStore is essentially the per-thread data store which is created the first time something is set in the thread storage).

This is a big issue as memory is short on devices and apps which use threadpool to process their work items (using TLS) will end up leaking a lot as thread pool keeps spawning/exiting threads based on load.

Update: this is an issue only with netcf 2.0, it has been fixed in netcf 3.5

Monday, June 02, 2008

Generators in python

Once in a while I used generators as a simpler way of writing an iterator. I did not realize how cool and powerful generators and generator expressions they were till I read this : http://www.dabeaz.com/generators/Generators.pdf - do read it, it will be worth your time.

Thursday, April 24, 2008

Archetype

Its surprising how often you encounter a new word and you find everyone around you using it. Was reading about Jung and archetypes recently and suddenly I find many people using this word in research paper titles and even in company meetings!!

Friday, April 18, 2008

Pangea day

I fully buy the idea that the world needs more of the "we are one" message and this is a great start: http://www.pangeaday.org/

The talk that started this: www.ted.com/index.php/talks/view/id/55 . I thought this was too fluffy till I watched the video.

Monday, March 03, 2008

Visual Studio Tip

Most people don't know that devenv can be made to play well with command line automation/test run debugging. Lets say you run your test suites using the following command:

E:\temp><testexe> <args>

If a particular test fails one way out would be to open the project file corresponding to the failed test and then modify its Debug -> Launch properties and do an F5 after setting up the right paths and working directory. I usually find this tedious on big projects, so this shortcut comes in handy:

E:\temp><vsinstall-dir>\VC\vcvarsall.bat x86
Setting environment for using Microsoft Visual Studio 2005 x86 tools. 
E:\temp>devenv /debugexe <testexe> <args>

I usually have a batch file for the first step. devenv setups a nice project with the right working directory and the launch exe etc. All you have to do is load the appropriate code file, put a break point, and F5 to debug your code!

Monday, February 11, 2008

Startups revisited.

Long time back I wrote a post on startups. Recently a couple of friends left the company to do their own thing again. So I thought this was a good time to look back and see how everyone's doing [This is incomplete, will update this as and when i get info].

New ones:

http://www.apunkadialogue.com
- Amit was one of the most ambitious and talented fellows i have ever worked with. I could not make much out of the site, but what the heck, I don't understand any of the other Gen Y stuff either :)

http://www.s3edge.com - Started by a couple of my ex-colleagues Abhishek and Venkatesh. They were so thrilled by the by the product that we have built (Microsoft Biztalk RFID) that they left the company to build solutions on top of it :)!


Companies still running:

http://www.carwale.com - This is doing great and in fact BusinessWeek has recognized Arun as one of the top 25 entrepreneurs in the Asian continent (blog link) ! This is cool stuff !!

http://www.quillpad.com - Rampi and KS keep churning out something or the other and this turned out to be a huge hit for them. It is easily the best transliteration tool out there!

Companies no longer running:

Thursday, January 31, 2008

Trick question - 1

Your customer says that none of their log files show any errors, so it must be the frameworks problem. What should be the first thing to ask ?

Answer: Do they actually log their errors to the logfiles or does the code just swallow them? :). This might seem funny, but i learnt it the hard way!

Tuesday, January 29, 2008

Seth books

Recently came across the seth books and felt intrigued by the way they have been written. After reading some excerpts on amazon, I ordered a couple of them: Seth Speaks and The Nature of Personal Reality

They are a fascinating read (still reading the second one) and they deal with nature of religion, beliefs, nature of the conscious mind and how personal beliefs (not just the religious ones) affect individual reality in a very deep way.

If you are not too religious, and are open to considering view points different from yours about life (and death), you owe it to yourself to read these books!