feedburner

Subscribe

View Venkat Varkala\

Performance comparison C++, C# and Java

Cpp is the fastest, except the STL "hashmaps" test is a lot slower. The memory footprint of Cpp is also the lowest, which was expected. C# is quite fast (I would have been surprised, if C# were much slower than Java), but seems to have some problems with exception handling, matrix multiplications and nested loops. Java's hash maps are very fast and the exception handling is also very strong. If you sum it up, Java gets 5 wins against C#, C# gets 9 wins against Java and Cpp gets 11 wins against C#. This black and white comparison only takes performance into account, but other values like development speed and security are also very important issues today. In my opinion it goes much faster to develop complex apps with Java or C#, than with plain Cpp and the STL. Type safety and buffer overrun issues are also much weaker in Cpp, so you have to do more work, which takes more time and will cost some speed! So every language has its strong areas, Check out tommti-systems report for graphs

Java and .NET Security compared - .NET Wins

The Computer Science Department at the University of Virginia has published a comparative study of security in Java and .NET Java evolved from an initial platform with limited security capabilities, .NET incorporated more security capability into its original design. With age and new features, much of the legacy code of Java still remains for backwards compatibility including the possibility of a null SecurityManager, and the absolute trust of classes on the bootclasspath. Hence, in several areas .NET has security advantages over Java because of its simpler and cleaner design.

Google Talk Security Bugs

Sadly, the day Google Talk is released, I was able to discover some obvious bugs. I have Google Talk installed on my windows 2003 server. And I am connected to that server using remote desktop. I logged in GTalk. My friend connected to the same system using remote dsktop and found that I am logged in the GTalk instance for him too. He was able to chat and do everything. I am also able to change my status and sutff but its not reflected there. Yahoo is also installed on the server and Yahoo msngr gives a new instance for each remoted desktoped client. So, something to b worried abt...! This flaw looks similar to the Google Desktop flaw which indexes the files in the all the user profiles.

AJAX JavaScript

http://www.ajaxian.com/ has a very good list of showcases for interesting websites implementing AJAX. I like AutoComplete http://script.aculo.us/demos/ajax/autocompleter_customized some what like google suggest this could be used instead bluky junky SELECT html control.

Response.Write() in a Custom Control

Labels:

We should always use HtmlTextWriter class to output HTML formatted content. If you use Response.Write() instead if Writer.Write(), the text can appear either before or after all the page content. In other words, using Response.Write() ignores the page's control tree. The HtmlTextWriter class also has these following method. - AddAttribute - AddStyleAttribute - RenderBeginTag - Write - WriteLine 1) User Control Use Src attribute to specify the control path. 2) Custom Control Use NameSpace and Assembly to reference the dll in the bin directory

Cache Object Vs. Application State

Labels:

1. Items are automatically dumped from the Cache when memory resources become low, but if you add too much data to the Application State, the entire application is restarted. 2. No need for lock and unlock to avoid conflict, the cache object automatically handles synchronizing access to items stored in the cache. 3. The cache object supports expiration policies and file dependencies

Options for maintaining a state in ASP.NET web page

Labels:

Variables within a web form page do not do not retain their values between mutiple request. You have 3 options to do so in ASP.NET 1) Using View State Syntax: ViewState("myVar") = "Hello World" Scope: Only work for the same page when posting back to itself. 2) Using Session State Syntax: Session("myVar") = "Hello World" Scope: Work across mutiple pages with the default time out of 20 mins. 3) Using Application State Syntax: Application("myVar") = "Hello World" Scope: Maintain the value for the whole application. Shared by all users, so because of this you have to do lock and unlock when changing the value.

Web.config

Good article on web.config http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet04222003.asp

DataGrid Paging with SqlDataReader

Labels:

You cannot to utilize the default paging with a DataGrid that is bounded to DataReader. You must use a DataSet. That is, if you set AllowPaging to True but do not employ custom paging, you cannot bind a SqlDataReader or OleDbDataReader to the DataGrid Web control and implement paging. If you attempt to do so you will receive an error along the lines of: "To support paging, you must use an object that supports the ICollection interface."