Tuesday, April 2, 2019

Updates

Post 2011...i started sharing technical content on my website at:

https://gopala-krishna.com

Please visit my website for exciting stuff on:
  • Product Management
  • Hacking
  • How systems work
  • What technologies are used to power a website
  • Algorithms
See you there!

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 :

http://compsoc.dur.ac.uk/whitespace/tutorial.php

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 @http://www.intersystems.com/cache/index.html
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 @ http://www.db4o.com


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.
http://labs.google.com/papers/bigtable.html
http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html
http://cassandra.apache.org/

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

http://blogs.msdn.com/b/ericlippert/archive/2009/08/06/not-everything-derives-from-object.aspx

Does Value types always allocated on the stack ?

http://blogs.msdn.com/b/ericlippert/archive/2009/04/27/the-stack-is-an-implementation-detail.aspx

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

http://blogs.msdn.com/b/csharpfaq/archive/2010/01/25/what-is-the-difference-between-dynamic-and-object-keywords.aspx

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 @

http://appft1.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PG01&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.html&r=1&f=G&l=50&s1=%2220040230959%22.PGNR.&OS=DN/20040230959&RS=DN/20040230959

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

http://appft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsearch-adv.html&r=120&f=G&l=50&d=PG01&s1=microsoft&p=3&OS=microsoft+search&RS=microsoft

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.

Cheers!

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.

[ComImport]
[Guid("DC1CB768-0BE5-4200-8D0A-C844BFBE3DE7")]
[CoClass(typeof(Foo))]
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.