tag:blogger.com,1999:blog-38334924741184075162024-02-08T12:05:24.725-08:00Gopala Krishna's Tech BlogGopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-3833492474118407516.post-25294771082864628542019-04-02T12:24:00.003-07:002023-05-19T00:33:35.551-07:00Updates<div dir="ltr" style="text-align: left;" trbidi="on">
Post 2011...i started sharing technical content on my website at:<br />
<br />
https://gopala-krishna.com<br />
<br />
Please visit my website for exciting stuff on:<br />
<ul style="text-align: left;">
<li>Product Management<br /></li><li>Hacking</li>
<li>How systems work</li>
<li>What technologies are used to power a website</li>
<li>Algorithms</li>
</ul>
See you there!</div>
Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-25356347825238516112011-10-19T01:30:00.000-07:002011-10-19T01:30:58.106-07:00Tiny CLR<div dir="ltr" style="text-align: left;" trbidi="on">Recently i heard about tiny CLR which is smaller than .NET fraemwork CLR and even much smaller than .NET Compact fraemwork CLR <br />
<br />
This is primarily used in wrist watches and can be put on IC's (Integrated circuites) running on moblie processers like ARM.<br />
<br />
Heard that microsoft is trying to bring this microcontroller as a competition for Basic Stamp microcontroler and Java Stamp.<br />
<br />
Stay tuned! <br />
</div>Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-74601571326141892772011-10-16T23:56:00.000-07:002011-10-17T00:01:51.906-07:00Alphabetic programming Languages<div dir="ltr" style="text-align: left;" trbidi="on">Here are the programming languages named after Alphabets :<br />
<br />
A, B, C, D, E, F, G, J, K, M, Q, R, T<br />
<br />
As you know already,the most popular one is C Language!</div>Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-17341486476403224582011-08-22T04:57:00.000-07:002011-08-23T02:05:04.144-07:00Aspect oriented programming and Invisible Lanaguage programming<div dir="ltr" style="text-align: left;" trbidi="on"><br />
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 <br />
<div closure_uid_eudn7t="104">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)</div><br />
<div closure_uid_eudn7t="105">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 :</div><br />
<a href="http://compsoc.dur.ac.uk/whitespace/tutorial.php">http://compsoc.dur.ac.uk/whitespace/tutorial.php</a><br />
<br />
<div closure_uid_eudn7t="111">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 </div>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.<br />
<br />
<div closure_uid_eudn7t="113">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. </div><br />
<div closure_uid_eudn7t="114">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 :</div><br />
<div closure_uid_eudn7t="115"><a href="http://www.antlr.org/">http://www.antlr.org/</a></div></div>Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-15946894757549281212010-12-12T01:10:00.000-08:002010-12-12T01:49:57.169-08:00Interesting Database Management Systems<p$1>Recently I was looking for highly scalable database management systems (other than RDBMS) and the following ones caught my attention. </p$1><p$1><p$1><strong><span class="Apple-style-span" style="font-size: large;"><span class="Apple-style-span" style="font-size: small; font-weight: normal;"><br />
</span></span></strong></p$1></p$1><p$1></p$1><p$1></p$1><p$1><p$1><strong><span class="Apple-style-span" style="font-size: large;"><span class="Apple-style-span" style="font-size: small; font-weight: normal;"><br />
</span> </span></strong></p$1></p$1><p$1></p$1><p$1><p$1><strong><span class="Apple-style-span" style="font-size: large;">Object database management systems:</span></strong></p$1></p$1><p$1><p$1><b><br />
</b> <p$1>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 <br />
<p$1>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 @ <a href="http://www.db4o.com/">http://www.db4o.com</a></p$1></p$1></p$1></p$1><p$1><p$1><p$1><p$1><a href="http://www.db4o.com/"></a><br />
<p$1><strong><br />
</strong></p$1></p$1></p$1></p$1></p$1><p$1><p$1><p$1><p$1><p$1><strong><span class="Apple-style-span" style="font-size: large;">NoSQL database management systems:</span></strong></p$1></p$1></p$1></p$1></p$1><p$1><p$1><p$1><p$1><p$1><b><br />
</b> <p$1> 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. <br />
<p$1><a href="http://labs.google.com/papers/bigtable.html">http://labs.google.com/papers/bigtable.html</a><br />
<p$1><a href="http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html">http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html</a><br />
<p$1><a href="http://cassandra.apache.org/">http://cassandra.apache.org/</a></p$1></p$1></p$1></p$1></p$1></p$1></p$1></p$1></p$1>Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-81110827631686778862010-10-15T02:50:00.000-07:002010-10-15T02:50:24.712-07:00Interesting 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<br />
<br />
Not Everything in C# derives from System.Object<br />
<br />
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/08/06/not-everything-derives-from-object.aspx">http://blogs.msdn.com/b/ericlippert/archive/2009/08/06/not-everything-derives-from-object.aspx</a><br />
<br />
Does Value types always allocated on the stack ?<br />
<br />
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/04/27/the-stack-is-an-implementation-detail.aspx">http://blogs.msdn.com/b/ericlippert/archive/2009/04/27/the-stack-is-an-implementation-detail.aspx</a><br />
<br />
Another Important article by Alexandra Rusina which explains the difference between dynamic and object keywords usage<br />
<br />
<a href="http://blogs.msdn.com/b/csharpfaq/archive/2010/01/25/what-is-the-difference-between-dynamic-and-object-keywords.aspx">http://blogs.msdn.com/b/csharpfaq/archive/2010/01/25/what-is-the-difference-between-dynamic-and-object-keywords.aspx</a>Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-33896281812034915702010-03-10T15:00:00.000-08:002010-03-10T15:02:28.271-08:00Interesting Questions - Expert Answers Part 3This is the question i posed to Jeffery Ritcher on 6th March 2010<br />
<br />
<strong>Question ( Gopala ) :</strong> <br />
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.<br />
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 <br />
To Verify this i tried the following code on VS2010 ( .NET 4.0)<br />
<br />
int workerThreads1, completionPortThreads1; int workerThreads2, completionPortThreads2; int workerThreads3, completionPortThreads3;<br />
<br />
ThreadPool.GetAvailableThreads(out workerThreads1, out completionPortThreads1);<br />
//workerThreads1 = 1023 completionPortThreads1 = 1000<br />
<br />
ThreadPool.GetMaxThreads(out workerThreads2, out completionPortThreads2); <br />
// workerThreads2 = 1023 completionPortThreads2 = 1000<br />
<br />
ThreadPool.GetMinThreads(out workerThreads3, out completionPortThreads3); <br />
//workerThreads3 = 2 completionPortThreads3 = 2<br />
<br />
The results seems to be contradictary.Please Advise.<br />
<br />
<strong>Answer ( Jeffery Ritcher) : </strong><br />
<br />
Initially the thread pool has 0 threads in it. <br />
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.<br />
In .NET 4.0 the default is 1023 worker threads (instead of 25) and 1000 I/O threads.<br />
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).<br />
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.Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-4529215985787429272010-03-06T19:45:00.000-08:002010-03-06T22:07:32.286-08:00Microsoft patent on " The idea of zero"This is an interesting patent filed by Microsoft :<br />
"“an operator that returns true when two memory addresses are not equal”! <br />
Have a look at it @<br />
<br />
<a href="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">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</a><br />
<br />
Also, have a look at the "INTELLIGENT CONTAINER INDEX AND SEARCH" patent filed by microsoft 3 days back @<br />
<br />
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=microsoftGopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-44212425938731649552010-02-22T20:14:00.000-08:002010-02-22T20:19:34.105-08:00Moving E-mails from one account to anotherOften we need to move e-mails from one mail account to another. Here is the way.<br />
<br />
1) <strong><u>Source</u></strong> : YahooMail, AOL, Gmail <strong><u>Destination</u></strong> : HotMail<br />
<br />
Use <a href="https://secure5.trueswitch.com/winlive/">TrueSwitch</a><br />
<br />
2) <strong><u>Source</u></strong> : HotMail, AOL, Gmail <strong><u>Destination</u></strong> : YahooMail<br />
<br />
Use <a href="https://secure5.trueswitch.com/winlive/">TrueSwitch</a><br />
<br />
3) <strong><u>Source</u></strong> : HotMail, AOL <strong><u>Destination </u></strong>: Gmail<br />
<br />
Use Google’s built-in <a href="http://mail.google.com/support/bin/answer.py?answer=21288">MailFetcher</a><br />
<br />
4) <strong><u>Source</u></strong> : YahooMail <strong><u>Destination</u></strong> : Gmail<br />
<br />
First Transfer all your yahoo mails to hotmail using <a href="https://secure5.trueswitch.com/winlive/">TrueSwitch</a><br />
<br />
Then transfer mails from HotMail to Gmail using Google’s built-in <a href="http://mail.google.com/support/bin/answer.py?answer=21288">MailFetcher</a> <br />
<br />
Also you can use products like <a href="https://www.yippiemove.com/step/1/">Yippie Move</a> for moving emails from account to another but it is a paid service.<br />
<br />
Cheers!Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-54794377143597578742009-04-18T19:22:00.000-07:002010-02-23T16:39:54.818-08:00Instatiating an InterfaceRecently, I found out that there is a way for “Instantiating an interface” in C#. Here is the code.<br />
<br />
[ComImport]<br />
[Guid("DC1CB768-0BE5-4200-8D0A-C844BFBE3DE7")]<br />
[CoClass(typeof(Foo))]<br />
interface IFoo<br />
{<br />
}<br />
class Foo : IFoo<br />
{<br />
}<br />
<br />
static void Main(string[] args)<br />
{<br />
// Instatiating an Interface --- This works<br />
IFoo foo = new IFoo(); <br />
}<br />
<br />
Please let me know your comments.Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-14773441174329261562009-03-17T19:09:00.000-07:002010-02-23T16:39:13.279-08:00Interesting questions – Expert answers Part 2Here are some of the questions I asked to <a href="http://blogs.msdn.com/kcwalina/">Krzysztof Cwalina</a> (Reusable frameworks design guru & <a href="mailto:PM@Microsoft">PM@Microsoft</a>) on <u>17 March 2009</u>.<strong><u> </u></strong><br />
<br />
<br />
<strong><u>Question (Gopala)</u></strong>: In C#, why don’t we have a feature called “Extension properties” just like extension methods ? This feature is available in F#.<br />
<br />
I got a scenario during my development to add an extra property for System.IO.FileInfo class (like for example File Id)<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong>: It was just harder to add this feature to the language. Maybe at some point in the future.<br />
<br />
<strong><u>Question (Gopala)</u></strong>: 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?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong>: No, there is no easy way. Reflection is the only one I know. Just watch for performance<br />
<br />
<strong><u>Question (Gopala)</u></strong>: 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++?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong>: I don’t know/remember this design decision<br />
<br />
<strong><u>Question (Gopala)</u></strong>: As we know the only .NET language where we can use global variables is CIL …why global variables are not allowed in C#?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong>: Public static variables are global<br />
<br />
<strong><u>Question (Gopala)</u></strong>: 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.<br />
<br />
Some of the products I was talking about is:<br />
<br />
1. Microsoft enterprise library exception handling application block<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong>: Yes, this is a special case of a library for handling and logging exceptions.<br />
<br />
2. Most of the code samples from MSDN<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong>: 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.<br />
<br />
3. Some products(Applications) which are developed in our company.<br />
<br />
<u><strong>Answer(Krzysztof)</strong></u>: Applications might sometimes want handle Exception. The FDGs are for libraries<br />
<br />
<strong><u>Question (Gopala)</u></strong>: 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?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong>: This is described in the Framework Design Guidelines.<br />
<br />
Though I asked lot many questions I remember only these ones. <br />
Guys, Try to answer my questions or Feel free to put comments\ suggestions.Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com1tag:blogger.com,1999:blog-3833492474118407516.post-88276577380798925232008-10-31T18:41:00.000-07:002010-02-23T16:38:32.417-08:00Interesting questions – Expert answers Part 1Here are some of the questions i asked to <a href="http://blogs.msdn.com/kcwalina/">Krzysztof Cwalina</a> (Reusable frameworks design guru & <a href="mailto:PM@Microsoft">PM@Microsoft</a>) on <u>31 Oct 2008</u>. <br />
<br />
<strong><u>Question (Gopala)</u> :</strong> Is there any compiler available which can compile a code file (CodeFile.SomeExt) containing mixture of<br />
<br />
1. C# ( around 10 classes) <br />
2. VB.NET ( around 10 classes) <br />
3. IL code too (around 500 lines). <br />
<br />
If not, can we make one? By any chance does Microsoft is in the process of developing such compiler?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong> : As to mixing vb and C# code, it's tricky but can be done with ILasm and ILdasm. i.e ILDasm into IL and then combine the streams and them merge them with ILasm.<br />
<br />
<strong><u>Question (Gopala)</u></strong> : As .NET is open source (as per scott's Blog) can we spy on the code written to develop CLR and GC (algorithm and code)?<br />
As per my knowledge code for CLR is written in VC++ .I have gone through CLI and the shared source available in CodePlex but couldn't find the code written for CLR and GC.<br />
Also, if we get to know all the source code of .NET framework (CLR code etc) why .NET framework is not termed as pure open source?<br />
If this is not true, how much percent of the .NET framework is open source?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong> : Yes, the license of the framework source release allows you to inspect the code and learn from it. That's what it was intended for.<br />
<br />
<u><strong>Question (Gopala)</strong></u> : I have 1000 lines of C# code with me. I would like to figure out how many lines of code runs under CLR (managed) and how many lines of code doesn't ( unmanaged code if any) . I tried to spy on IL code and could be able to figure out keywords like managed and unmanaged. Is this the right way to figure out what I am looking for?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong> : C# is only managed code, so in 1000 lines of C# code, there are 1000 lines of managed code :-)<br />
<br />
<strong><u>Question (Gopala)</u></strong> : Any Certifications available in "Application Frameworks" development domain? Other than .NET Base class Library Forum is there any forum available on the net where we can find discussion about "Application Frameworks"?<br />
<br />
<strong><u>Answer(Krzysztof)</u></strong> : There are some cerfifications for for the whole .net framework. Just search for "Microsoft certification" and you should find something. There are no certifications just for the application framework that I am aware of.<br />
<br />
Though I asked lot many questions i could be able to remember only these ones. <br />
Guys,Try to answer my questions or Feel free to put comments\ suggestions.Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0tag:blogger.com,1999:blog-3833492474118407516.post-22063965597265860042007-02-14T17:02:00.000-08:002010-02-23T16:37:29.244-08:00Welcome to my technical blog !Now onwards I will start delivering my <u>technical knowledge through this blog</u> instead of delivering it through my website.<br />
<br />
Still, you can access the old content like Windows hacking, Linux OS related stuff on my website @<br />
<a href="http://gopalakrishnaiitb.faithweb.com/comp/compstuff.htm">http://gopalakrishnaiitb.faithweb.com/comp/compstuff.htm</a><br />
<br />
Temporarily you can access my website @<br />
<a href="http://gopalakrishnaiitb..faithweb.com/">http://gopalakrishnaiitb..faithweb.com/</a><br />
<br />
Soon i will be deploying my website to a dedicated host<br />
<br />
Cheers!Gopala Krishnahttp://www.blogger.com/profile/08730151301817480886noreply@blogger.com0