Wednesday, October 19, 2011

Tiny CLR

Recently i heard about tiny CLR which is smaller than .NET fraemwork CLR and even much smaller than .NET Compact fraemwork CLR

This is primarily used in wrist watches and can be put on  IC's (Integrated circuites) running on moblie processers like ARM.

Heard that microsoft is trying to bring this microcontroller as a competition for Basic Stamp microcontroler and Java Stamp.

Stay tuned!

Sunday, October 16, 2011

Alphabetic programming Languages

Here are the programming languages named after Alphabets :

A, B, C, D, E, F, G, J, K, M, Q, R, T

As you know already,the most popular one is C Language!

Monday, August 22, 2011

Aspect oriented programming and Invisible Lanaguage programming

The Progamming world has been progressing very fast and we can see lot of innovations in past few decades. The programming world started with structured programming languagues ( like C ) and slowly progressed to object-oriented programming ( like C++ Java C#) .... for many years programmers are very much used to write programs in object oriented languages and slowly the programming mindset has chaged..Programmers became lazy ( lazy of typing programs in english) and started thinking about
generating the source code instead of manually writing the source code. Then Aspect oriented programming is born(code Generation and code Injection) and now a days programmers are using code generation and code injection for generating UI's, Generating Compilers (for Ex: ANTLR) and Generating Data Access Layers (NHibernate, Entityframework etc)

In this era of aspect oriented programming, many companies and universities are still using english alphabets to write code (almost all progamming languages uses english alphabets and words rite..for ex C# C++)...have you ever thought of writing programs using your our own mother tounge language alphabets? (like in Telugu, Hindi etc)? Have you ever thought of writing programs using non-Alphabet characters (like @#$%^ etc)...Have you ever thought of writing programs only using white spaces and tabs ? ( Invisible code :))...Here is an interesting programming  language using which we can write programs with Whitespaces and tabs. It was developed by folks in durham university. have a look at it at :

This programming language is very useful for the purpose of secret messaging especially for security establishmentss...Instead of sending the message directly we can use this programming language and send messages or code which is totally 'Invisible' . Also, I hope some day we all will get a chance to code
in our own mother tounge language characters ( Telugu Hindi etc). I heard about some of these compilers and execution environments which are already in the pipeline. Though this languages doesn't mean much to indians they might be very useful for the countries where English is not the official medium of instruction.

There is another interesting product called ANTLR which was developed by Terence Par. If we know grammatic descriptions for a language we can construct the corresponding compiler, interpreter and translator for a variety of target languages like C++ C# and Java. Suppose we know the grammatic descriptions of a X Language then we can construct the corresponding compiler and interepreter for that X Language and start coding in that X Language.

Pretty interesting right!.. Hope some day all programmers stop using the available programming languguages and start writing the compilers and interpreters for X language and will start coding in that X Language which is the language of our choice :).... This kind of solutions are particularly useful in the code generation process. Hava a look at ANTLR at :

Sunday, December 12, 2010

Interesting Database Management Systems

Recently I was looking for highly scalable database management systems (other than RDBMS) and the following ones caught my attention. 

Object database management systems:
ODBMS products like Cache claim that it can run SQL 5 times faster than relational databases. They also enable extraordinary transaction processing speed, massive scalability, and real-time queries against transactional data with minimal maintenance and hardware requirements.Have a look at Cache ODBMS @
There are also other good ODBMS products like Gemstone, Cerebrum, db4o of which db4o is an open source, fully functional ODBMS with nice documentation. Have a look at it @

NoSQL database management systems:
 These databases are referred as structured database management systems, which scale horizontally and don’t need fixed table schemas. They can service heavy read/write workloads when compared to traditional RDBMS.   Some of the popular NoSQL database management systems include Google’s BigTable, Amazon’s Dynamo, and Apache Cassandra.

Friday, October 15, 2010

Interesting Myths about C# : 1) Not everything in C# derives from Object 2) Does value types always allocated on the stack ??

Here are the links for some of the nice articles written by Eric Lippert.. The design engineer at Microsoft's developer Division

Not Everything in C# derives from System.Object

Does Value types always allocated on the stack ?

Another Important article by Alexandra Rusina which explains the difference between dynamic and object keywords usage

Wednesday, March 10, 2010

Interesting Questions - Expert Answers Part 3

This is the question i posed to Jeffery Ritcher on 6th March 2010

Question ( Gopala ) :
As per your words i got to know that, when  CLR intializes the threadpool gets initialized with  zero threads ..Also, the the threads are created and used but they are not destroyed instead retained in the threadpool for later use.
But in some articles( For ex : In " C# Threading handbook" by Tobil Titus) i have found out that CLR Intializes the theadpool with 25 ( defalut, and we can change this value) threads
To Verify this i tried the following code on VS2010 ( .NET 4.0)

int workerThreads1, completionPortThreads1; int workerThreads2, completionPortThreads2; int workerThreads3, completionPortThreads3;

ThreadPool.GetAvailableThreads(out workerThreads1, out completionPortThreads1);
 //workerThreads1 = 1023 completionPortThreads1 = 1000

ThreadPool.GetMaxThreads(out workerThreads2, out completionPortThreads2);
// workerThreads2 = 1023 completionPortThreads2 = 1000

ThreadPool.GetMinThreads(out workerThreads3, out completionPortThreads3);
//workerThreads3 = 2 completionPortThreads3 = 2

The results seems to be contradictary.Please Advise.

Answer ( Jeffery Ritcher) :
Initially the thread pool has 0 threads in it.
However, the number of worker threads in the pool can grow to 25 per CPU (by default). 25 was the number for earlier versions of the CLR.
In .NET 4.0 the default is 1023 worker threads (instead of 25) and 1000 I/O threads.
The CLR doesn’t like to create threads but, if there are work items queued up, it will quickly create up to min threads (2) and then it will slowly create more threads up to the max threads (1023).
GetAvailableThreads returns the number of threads that the thread pool could use for doing work if work gets queued up. This number changes all the time. This number does not include thread pool threads are currently doing work but these threads could return and more thread pool threads could initate doing work and this is why the number changes all the time.

Saturday, March 6, 2010

Microsoft patent on " The idea of zero"

This  is an interesting patent filed by Microsoft :
 "“an operator that returns true when two memory addresses are not equal”!
Have a look at it @

Also, have a look at the "INTELLIGENT CONTAINER INDEX AND SEARCH" patent filed by microsoft 3 days back @

Monday, February 22, 2010

Moving E-mails from one account to another

Often we need to move e-mails from one mail account to another. Here is the way.

1) Source : YahooMail, AOL, Gmail       Destination : HotMail

    Use TrueSwitch

2) Source : HotMail, AOL, Gmail    Destination : YahooMail

    Use TrueSwitch

3) Source : HotMail, AOL       Destination : Gmail

    Use Google’s built-in MailFetcher

4) Source : YahooMail     Destination : Gmail

     First Transfer all your yahoo mails to hotmail using TrueSwitch

    Then transfer mails from HotMail to Gmail using Google’s built-in MailFetcher

Also you can use products like Yippie Move for moving emails from account to another  but it is a paid service.


Saturday, April 18, 2009

Instatiating an Interface

Recently, I found out that there is a way for “Instantiating an interface” in C#. Here is the code.

interface IFoo
class Foo : IFoo

static void Main(string[] args)
    // Instatiating an Interface --- This works
    IFoo foo = new IFoo();

Please let me know your comments.

Tuesday, March 17, 2009

Interesting questions – Expert answers Part 2

Here are some of the questions I asked to Krzysztof Cwalina (Reusable frameworks design guru & PM@Microsoft) on 17 March 2009.

Question (Gopala): In C#, why don’t we have a feature called “Extension properties” just like extension methods ? This feature is available in F#.

I got a scenario during my development to add an extra property for System.IO.FileInfo class (like for example File Id)

Answer(Krzysztof): It was just harder to add this feature to the language. Maybe at some point in the future.

Question (Gopala): How to find out the size of a reference type (preferably with nested reference types)? Is there any operator like sizeof which calculates the size of a reference type?

Answer(Krzysztof): No, there is no easy way. Reflection is the only one I know. Just watch for performance

Question (Gopala): Why C# doesn’t allow method level static variables? Is there any alternative approach to use method level static variables in C# just like in C++?

Answer(Krzysztof): I don’t know/remember this design decision

Question (Gopala): As we know the only .NET language where we can use global variables is CIL …why global variables are not allowed in C#?

Answer(Krzysztof): Public static variables are global

Question (Gopala): In your design guidelines you have mentioned not to catch exceptions of type “Exception” (i.e. Generic exceptions) and instead we have to catch exceptions of specific type. This is a good practice but I have seen lots of products (including Microsoft products) don’t follow this guideline.

Some of the products I was talking about is:

1. Microsoft enterprise library exception handling application block

Answer(Krzysztof): Yes, this is a special case of a library for handling and logging exceptions.

2. Most of the code samples from MSDN

Answer(Krzysztof): This is good point. I don’t think the samples should do it. I think they do it for simplicity, but samples should show good practices.

3. Some products(Applications) which are developed in our company.

Answer(Krzysztof): Applications might sometimes want handle Exception. The FDGs are for libraries

Question (Gopala): I heard that initially interfaces were used in the design of ASP.NET provider model and later on most of the interfaces were replaced with abstract classes. What is reason behind this core design change?

Answer(Krzysztof): This is described in the Framework Design Guidelines.

Though I asked lot many questions I remember only these ones.
Guys, Try to answer my questions or Feel free to put comments\ suggestions.