July 30, 2009

Referenc type are pass by value or reference?

No, you are wrong, Reference types are passed by Value by default, surprised?

Test(object R2)
//you call
object R1 = new object();
WriteLine(R1==null) //result false.

Reference type R1 is created on address y100 and its value is some another address called x100; // as we know refrence type refer to an address
now in method
Reference type R2 is created on a memory address y200,
and it is copied value of R1 ie. x100;
so when you reset R2=null. only value of the r2 set to null. means now its not pointing to address x100. but R1 still pointing to address x100.
NOTE: if value at address x100 is changed, both R2 and R1 will show that, because both pointing to the same address.

Pass-By-Reference ->
Test(ref object R2)
object R1 = new Object();
Test(ref R1);
WriteLine(R1==null) //result true.

now we are passing variable by Reference. now here address of R1 is passed i.e y100. so R1 & R2 both are pointing to y100. so if you change R2's value, R1's will also changed

Any issue please comment.

July 21, 2009

web 2.0 and aging metrics (Page views and unique visitors)

In modern era(web 2.0). When businesses are trying to create RIA (Rich Internet application) that give them experience of desktop application, rich user experience in turns more users; when there is continuous fight b.w Adobe, Microsoft to be front runner in the RIA ( flash vs silverlight).

I am always surprised when "Page Views" is still considered as a major metric while deciding the ranking or effectiveness of sites.
According to my experience two major companies still advocate page-view matrix, so the businesses around the world follow them, and create web 1.0 (term for old app) application. In the list of companies Alexa & Google is also a name, who's wonderful adsense tech is ages old to support the web 2.0.

I think this matric should be discontinued or should be substituted with a new one that will pace the internet application development. because only then companies will think out-of-the-box. I really admire Facebook for their wonderful interface, its very very user-friendly and don't care about the page impression/view. You can check your profile and wall very quickly so its saving your time too. comparatively out of age Orkut, which still believe in the page view. you have to spend a lot of time to check your scrap,pics etc. but i guess facebook got success because of user friendliness. Facebook is ahed but orkut could have more page views.
All the sites above google, yahoo, msn adnetworks should come up with new matric to give better view of site use.

"No of Unique Vistors" -> This is also a metric but i don't see its effect in near future. As all browsers chrome, safari, Internet explorer, FireFox, are coming with stealth mode(private browsing) . When you browse in this mode no cookie or history is maintained. so to track unique visitor will be a challenge. so tracking unique visitor is going to be challenge.

As all the metrics were defined Pre-Ajax (web 2.0) era. Now i guess its time to move on from these.
All the major companies Google, Yahoo, Microsoft & various ad-networks must come up with new metric to give new spark to the web 2.0 and Internet. Because page views are also significant measure of ads performance.
One of the effective metric is time spent on site.

i just posted my personal thoughts, if am wrong somewhere please correct me thanks.

July 18, 2009

Google not supporting web 2.0 ajax

Google :( naam to suna hi hoga :). Yes it has reach to 70% of internet users. it revolutionized the internet(search). But when industry is running toward web 2.0 (wiki). Now purposed 3.0.
then why Google still not supporting Web 2.0?

what is the exact reason behind it?
Yes Money $$.

Money to Google is Ads. And AdS (AdSense) in the Google are not Ajax supported.Google discourages/ penalties on use of "ajax refresh ads". Ads comprises 94%+ revenue of Google.
As various sites on internet today built for business revenue, ADS. so when we talk about ads on internet Adsense is the name that strike most.
So people develop their sites in view of AdSense , so they have to make sites with the ages back format i.e without use of Ajax.
So at one side Google is helping internet & other site not.
so its pushing us ages back with that old aged "refresh-on-each-click" model.
  • Search page old fashioned.
  • Orkut old fashioned.
but surprisingly G has something for its own Gmail. Gmail send ajax request and refresh the ads.

I wrote this, as i was planning to work on a site, but was in dilemma.

July 17, 2009

what is new in Visual Studio 2010 and the .Net Framework 4.0

Another version, Microsoft VS 2010 and Framework 4.0. I am still working on 2.0. I need to jump 3.0 and 3.5. Companies barely working on 3.5 version, because very less application are being developed for 3.5 version. Don't know when 4.0 will get speed. My whole carrier will go into updating myself for the new versions of Microsoft .net framework, visual studio and of course new Windows. But i guess thats life of a programmers. I am still on XP (loving it).
Anyways with invent of new systems Microsoft is coming with the a lot of feature that surely need developer and System to update. But features are great.
as from 2.0 to 3.5 we got Generics, Linq, entity-framework, WCF, WPF etc. so what's in 2010. & 4.0
here is answer.

jQuery - In 2010 major changes has been done for high performance and standard javascript standards compliant JavaScript IntelliSense engine. Microsoft and Jquery group working together to make developer life easy, so Visual Studio 2010 will be the first version of Visual Studio to ship JQuery as a native part of the ASP.NET solution

MVC - All features of "Preview release of ASP.NET MVC" included in Visual Studio 2010
2010 make very easy to build Model-View-Controller aka MVC sites.
n Visual Studio 2010 we deliver the next generation of ASP.NET web tools that make it easy for developers to use TDD to build Model-View-Controller (MVC) based web sites. Wizard based interface to creating views, generating test project for MVC solution. Various templates are given.

One Click Deployment - IDE provides a wizard, dialogs and design surfaces that make it simple for developers to identify the components of a website that need to be deployed and make it easy to handle the process of moving them from the development machine to the web server, One Click Deployment come as heaven for developers as often moving from development to production various changes need to be done in config file like removal of trace, debug and local database/development connection. There is feature to set custom transformation when moving from development to production. so those will be applied every time.

Silverlight,- Integrated support for silverlight, full debugging support for silverlight applications. existing content can be used on aspx pages very easily. Guess SL 3.0 will also be made native in the final release.

Windows® Azure ™ - Support of Azure tools in 2010. Windows Azure Tools provide the means to create services and applications within the framework of Visual Studio. That includes a project model specifically for Windows Azure, as well as the debugging capabilities of Visual Studio. With Visual Studio, you can build a package containing your service, and use Windows Azure Tools to deploy the package to Windows Azure through the Windows Live Developer Portal.

Parallel Development support: what does it mean.
The .NET Framework 4.0 also provides the core framework support to build parallel applications through technologies such as P-LIINQ and parallel language semantics and framework components. Visual Studio 2010 provides integrated parallel development support. In Visual Studio 2010 the debugger is aware of the parallel nature of code and can present the state of the application execution during debugging across the different parallel execution units. The debugger also has custom displays for parallel code such as task & thread windows and a “multi” or “cactus” stack view window that graphically shows the execution path of the individual tasks.
Vs 10 also got "parallel capable performance analyzer" that helps you to extensively instrument you code to visually see the concurrency issues that are in your applications (WOW).
& this is the one of few new feature of 4.0, all rest are enhancement to Wxx technologies.

Modeling with Code: Thats the feature i was searching in previous versions, its very great feature, may be its already part of rational packs, but with Vs it makes life easy of developer, PM & architect. What is it?
While working with existing code. its very tough to examine real code as model, understand the impact of the changes,
So 2010 has very good integration with code. Now real code can be examine as model & see real code assets. So it creating a full architectural picture of existing code; understanding how they fit together; understanding how they “work.” This leads to better information about using, re-using, or discarding existing code. The Architecture Explorer provides architects and developers a mechanism for visualizing code assets in a number of ways including graphs, stacked diagrams and dependency matrices.
this feature is part of VS team suite
More UML Support.

so now from model you can validate whether presentation directly talking to DB layer. It can also be enforced. (WOW). it will save a lot of man days.

“No-Rrepro” Bugs: Another great feature of team suite.
what the hack it is -> From designing an application through developing code, finding bugs that can’t be reproduced is a common problem – the “no-repro” bug.

  • Visual studio 2010 can specify the exact state of the build used by a tester and allow a comparison to the state of the build used by the developer when trying to reproduce the bug.
  • It has tool "Microsoft Test Runner" case.
  • When the test case is started the Microsoft Test Runner takes a snapshot of the system data, including OS version and Service Pack and other pertinent system data.
  • As the test is being run the tester can use the tool to capture images of the application under test, or even partial or full screen video of the test being run.
  • If an issue is discovered, the tester can create a new bug in Team Foundation Server and attach these artifacts.
  • When attached, the screen capture video is fully indexed with the test steps as bookmarks, making it easier for the developer to see what went wrong on the tester’s machine.
  • All of these artifacts help to eliminate the no-repro scenario, and help build a better bridge between development and test.
Test Impact Window : The new Test Impact View window enables a developer to view a list of tests that need to be run as the result of a code change. The developer can toggle between an Impacted Tests view and a Code Changes view.
• The Impacted Tests view provides a list of tests that need to be run and which code changes are covered by each of the tests.
• The Code Changes view provides a list of code changes and which tests must be run in order to validate each of them.These two views provide a easy way to discover what tests must be run in order to validate the changes to the code base without having to run all of the tests. This ensures that all changes are tested effectively

many more features: F# support, ajax extension,

Training Kit is here: http://blogs.msdn.com/onoj/archive/2009/05/22/visual-studio-2010-and-net-framework-4-training-kit-vs10.aspx

Follow updates : http://twitter.com/onojw

currently beta1 download available.

--Compiled from Microsoft® docs.

July 05, 2009

Nokia n97 review, not even stand near iPhone

Nokia n97 launched user review
Last week i previwed the most hyped Nokia n97 with great eagerness. But my eagerness came to halt even after using it two minutes. n97 is just new wrapper on existing 5800 eXpress music phone with a physical keyboard, processor speed increased a bit from 369 Mhz to 434 MHz. Same 128mb Ram. n97 is very sluggish like 5800.
User Interface is not smooth at all and not that much clear. It is stated as iPhone killer, but seriously it will be insult of iPhone to compare to that. I am not obsessed with the iphone, but salute the innovation. A physical keyboard inclusion is good, but not worth to buy this $700 device. if you really want to possess a Nokia smartphone of current benchmarks. wait for the company to release some worthy device.

Suggestion : Do not BUY......... Palm - PRE is good option.

User Interface : **
Innovation : *
Speed : **
N/W Strength : ****

Other Phones in this category that you can consider, top to bottom priority wise..

Iphone 3GS OR Palm-Pre (multi backgroundn apps)
Iphone 3G
Black berry Storm 2 (Yet to launch)
Samsung Omnia-2 (Yet to launch )

HTC and other windows phones still have miles to go before they come to comparison.