Thursday, March 29, 2012

.Net interview questions: - Explain the five levels in CMMI?

There are five levels of the CMMI. According to the SEI,

Level 1 – Initial
At maturity level 1, processes are usually ad hoc and the organization usually does not provide a stable environment. Success in these organizations depends on the competence and heroics of people in the organization and not on the use of proven processes. In spite of this ad hoc, chaotic environment, maturity level 1 organizations often produce products and services that work; however, they frequently exceed the budget and schedule of their projects.

Maturity level 1 organizations are characterized by a tendency to over commit, abandon processes in the time of crisis, and not be able to repeat their past successes again.

Level 2 – Repeatable
At maturity level 2, software development successes are repeatable. The organization may use some basic project management to track cost and schedule.

Process discipline helps to ensure that existing practices are retained during times of stress. When these practices are in place, projects are performed and managed according to their documented plans.
Project status and the delivery of services are visible to management at defined points (for example, at major milestones and at the completion of major tasks).

Basic project management processes are established to track cost, schedule, and functionality. The necessary process discipline is in place to repeat earlier successes on projects with similar applications.

Level 3 – Defined
At maturity level 3, processes are well characterized and understood, and are described in standards, procedures, tools, and methods.

The organization has set of standard processes, which is the basis for level 3, is established and improved over time. These standard processes are used to establish consistency across the organization. Projects establish their defined processes by the organization’s set of standard processes according to tailoring guidelines.

The organization’s management establishes process objectives based on the organization is set of standard processes and ensures that these objectives are appropriately addressed.

A critical distinction between level 2 and level 3 is the scope of standards, process descriptions, and procedures. At level 2, the standards, process descriptions, and procedures may be quite different in each specific instance of the process (for example, on a particular project). At level 3, the standards, process descriptions, and procedures for a project are tailored from the organization’s set of standard processes to suit a particular project or organizational unit.

Level 4 – Managed
Using precise measurements, management can effectively control the software development effort. In particular, management can identify ways to adjust and adapt the process to particular projects without measurable losses of quality or deviations from specifications.

Sub processes are selected that significantly contribute to overall process performance. These selected sub processes are controlled using statistical and other quantitative techniques.

A critical distinction between maturity level 3 and maturity level 4 is the predictability of process performance. At maturity level 4, the performance of processes is controlled using statistical and other quantitative techniques, and is quantitatively predictable. At maturity level 3, processes are only qualitatively predictable.

Level 5 – Optimizing
Maturity level 5 focuses on persistently improving process performance through both incremental and innovative technological improvements. Quantitative process-improvement objectives for the organization are established, continually revised to reflect changing business objectives, and used as criteria in managing process improvement. The effects of deployed process improvements are measured and evaluated against the quantitative process-improvement objectives. Both the defined processes and the organization set of standard processes are targets of measurable improvement activities.

Process improvements to address common causes of process variation and measurably improve the organization’s processes are identified, evaluated, and deployed.

Optimizing processes that are nimble, adaptable and innovative depends on the participation of an empowered workforce aligned with the business values and objectives of the organization. The organization’s ability to rapidly respond to changes and opportunities is enhanced by finding ways to accelerate and share learning.

A critical distinction between maturity level 4 and maturity level 5 is the type of process variation addressed. At maturity level 4, processes are concerned with addressing special causes of process variation and providing statistical predictability of the results. Though processes may produce predictable results, the results may be insufficient to achieve the established objectives. At maturity level 5, processes are concerned with addressing common causes of process variation and changing the process (that is, shifting the mean of the process performance) to improve process performance (while maintaining statistical probability) to achieve the established quantitative process-improvement objectives.

Below is the figure, which will help you remembering the same.

Figure: - CMMI Levels

See the following video in c# using VSTS unit testing: -



Click for more Dotnet interview questions and answers

Regards,

Visit for more authors’ blog on Most asked Dotnet interview question

Tuesday, March 27, 2012

.Net interview questions: - Explain other ways preferable over finalize for clean up?

Problem with finalize is that garbage collection has to make two rounds in order to remove objects which have finalize methods.

Below figure will make things clear regarding the two rounds of garbage collection rounds performed for the objects having finalized methods.


Figure: - Garbage collection in actions

In this scenario there are three objects Object1, Object2, and Object3. Object2 has the finalize method overridden and remaining objects do not have the finalize method overridden.

Now when garbage collector runs for the first time it searches for objects whose memory has to free. He can see three objects but only cleans the memory for Object1 and Object3. Object2 it pushes to the finalization queue.

Now garbage collector runs for the second time. He see’s there are no objects to be released and then checks for the finalization queue and at this moment, it clears object2 from the memory.

So if you notice that object2 was released from memory in the second round and not first. That is why the best practice is not to write clean up Non.NET resources in Finalize method rather use the DISPOSE.

See the following video in .NET which describes regular expressions & some practical demonstrations: -



Click for more important .NET interview questions

Regards,

Visit for more authors’ blog on interview questions and answers for Dotnet

Thursday, March 22, 2012

ASP.NET interview questions: - Can you differentiate between trace and debug in ASP.NET?

There is also a fundamental difference in thinking when we want to use trace and when want to debug. Tracing is a process about getting information regarding program's execution. On the other hand debugging is about finding errors in the code.

Debug and trace enables you to monitor the application for errors and exception without VS. NET IDE.

In Debug mode compiler inserts some debugging code inside the executable. As the debugging code is the part of the executable they run on the same thread where the code runs and they do not given you the exact efficiency of the code ( as they run on the same thread). So for every full executable DLL you will see a debug file also as shown in figure ‘Debug Mode’.

Figure: - Debug mode
Trace works in both debug as well as release mode. The main advantage of using trace over debug is to do performance analysis which cannot be done by debug. Trace runs on a different thread thus it does not impact the main code thread.

See the following video for how to Skip debugging in ASP. NET: -



Click for more ASP. NET Interview questions

Regards,

Visit for more authors’ blog on ASP. NET Interview questions

Tuesday, March 20, 2012

.NET interview questions: - Can you explain various roles in Six Sigma implementation?

Sigma means deviation in Greek language. Deviation means how much variations exist in a set of data. For instance let’s say in a software maintenance project out of 100 defects 68 defects are rectified to the mark and remaining bounce back that means your bug fixing process is on “2 Sigma” level. I had described only from bug fixing perspective. But this can be applicable to any process organization.

Figure: - SIX Sigma Values

Therefore, I should only have 3.4 defects in a million defects then I can say I am six sigma.

Attaining Six Sigma is team effort and cannot be attained individually. Driving Six Sigma itself in an organization is huge project as it involves lot of mentoring and change of attitude of the current workers. So when an organization wants to drive the Six Sigma way they appoint persons with certain roles as defined below. Executive Leadership includes CEO and other key top management team members. They are responsible for setting up a vision for Six Sigma implementation. They also empower the other role holders with the freedom and resources to explore new ideas for breakthrough improvements.

Champions are responsible for the Six Sigma implementation across the organization in an integrated manner. The Executive Leadership draws them from the upper management. Champions also act as mentor to Black Belts.

Master Black Belts, identified by champions, act as in-house expert coach for the organization on Six Sigma. They devote 100% of their time to Six Sigma. They assist champions and guide Black Belts and Green Belts. Apart from the usual rigor of statistics, their time is spent on ensuring integrated deployment of Six Sigma across various functions and departments.

Black Belts operate under Master Black Belts to apply Six Sigma methodology to specific projects. They devote 100% of their time to Six Sigma. They primarily focus on Six Sigma project execution, whereas Champions and Master Black Belts focus on identifying projects/functions for Six Sigma.

Green Belts are the employees who take up Six Sigma implementation along with their other job responsibilities. They operate under the guidance of Black Belts and support them in achieving the overall results.

See the following video on implement TDD (Test driven development) in c# using VSTS unit testing: -



Click for more important Dotnet interview questions

Regards,

Visit for more author’s blog on Most asked Dotnet interview question

Friday, March 16, 2012

ADO.NET interview questions: - Mention different ways to implement optimistic locking in ADO.NET?

Following are the ways to implement optimistic locking using ADO.NET:-
  • When we call “Update” method of Data Adapter it handles locking internally. If the Dataset values are not matching with current data in Database, it raises concurrency exception error. We can easily trap this error using Try. Catch block and raise appropriate error message to the user.

  • Define a Date time stamp field in the table. When actually you are firing the UPDATE SQL statements, compare the current timestamp with one existing in the database. Below is a sample SQL which checks for timestamp before updating and any mismatch in timestamp it will not update the records. This I the best practice used by industries for locking.
Update table1 set field1=@test where Last Timestamp=@Current Timestamp
  • Check for original values stored in SQL SERVER and actual changed values. In stored procedure check before updating that the old data is same as the current Example in the below shown SQL before updating field1 we check that is the old field1 value same. If not then some one else has updated and necessary action has to be taken.
Update table1 set field1=@test where field1 = @oldfield1value
Locking can be handled at ADO.NET side or at SQL SERVER side i.e. in stored procedures.
See the following video on SQL Server which describes difference between UNION and UNION All: -


Learn more on ADO.NET interview questions
Regards,
From more on author’s blog related to ADO.NET interview questions click and visit.

Tuesday, March 13, 2012

.NET interview questions: - Show CMMI in details?

CMMI stands for Capability Maturity Model Integration. It is a process improvement approach that provides companies with the essential elements of effective process. CMMI can serve as a good guide for process improvement across a project, organization or division.

CMMI was formed by using multiple previous CMM process. Below are the areas which CMMI addresses because of integrating with CMM process:-

Systems engineering: - This covers development of total systems. System engineers concentrate on converting customer needs to product solution and support them through out the product life cycle.

Software Engineering: - Software engineers concentrate on the application of systematic, disciplined, and quantifiable approaches to the development, operation, and maintenance of software.

Integrated Product and Process Development: - Integrated Product and Process Development (IPPD) is a systematic approach that achieves a timely collaboration of relevant stakeholders throughout the life of the product to better satisfy customer needs, expectations, and requirements. This section mostly concentrates on the integration part of the project for different processes. For instance it’s possible that your project is using services of some other third party component. In such situation the integration is a big task itself and if approached in a systematic manner can be handled with ease.

Software Acquisition: - Many times organization has to acquire products of other organization. Acquisition is itself a big step for any organization and if not handled in a proper manner means just calling for disaster.

Below is what CMMI call about.

Figure: - CMMI

See the following video which describes Simple Unit Testing: -



Learn more on interview questions and answers for .NET

Regards,

From more on author’s blog related to Most asked .NET interview questions click and visit.

Wednesday, March 7, 2012

.NET Interview Questions: - Mention LeaseTime, SponsorshipTime, RenewonCallTime and LeaseManagerPollTime?

This is a very important question from practical implementation point of view. Companies who have specific requirement for Remoting projects will expect this question to be answered.
In normal .NET environment objects garbage collector manages lifetime. However, in remoting environment remote clients can access objects, which are out of control of garbage collector. Garbage collector boundary is limited to a single PC on which framework is running; any remote client across physical PC is out of control of GC (Garbage Collector).
This constraint of garbage collector leads to a new way of handling lifetime for remoting objects, by using concept called as “LeaseTime”. Every server side object is assigned by default a “LeaseTime” of five minutes. This lease time is decreased at certain intervals. Again, for every method call a default of two minutes is assigned. When i say method call means every call made from client. This is called as “RenewalOnCallTime”.
Let’s put the whole thing in equation to make the concept more clear.
Total Remoting object life time = LeaseTime + (Number of method calls) X (RenewalTime).
Then default Remote Object Life Time = 5 + (1) X 2 = 10 minutes (Everything is in minutes)
When total object lifetime is reduced to zero, then it queries the sponsor that should the object be destroyed. Sponsor is an object, which decides should object Lifetime be renewed. So it queries any registered sponsors with the object, if does not find any then the object is marked for garbage collection. After this garbage, collection has whole control on the object lifetime. If we do not foresee how long a object will be needed specify the “Sponsorship Timeout” value. Sponsorship Timeout is time unit a call to a sponsor is timed out.
“LeaseManagerPollTime” defines the time the sponsor has to return a lease time extension.
View the following video on Garbage Collector, Gen 0, 1 & 2 asked in C#.Net interview: -


Learn more on interview questions and answers for .NET

Regards,

From more on author’s blog related to Most asked Dotnet interview question click and visit.

Thursday, March 1, 2012

ASP.NET Interview Questions: - Show Post Cache substitution?

This is one of the asked ASP.Net Interview Questions during the Interview by the Interviewer.
Post cache substitution is used when we want to cache the whole page but also need some dynamic region inside that cached page. Some examples like QuoteoftheDay, RandomPhotos, and AdRotator etc. are examples where we can implement Post Cache Substitution.

Post-cache substitution can be achieved by two means:







Figure: - “Writesubstitution” in action
You can see we have a static function here “GetDateToString()”. We pass the response substitution callback to the “WriteSubstitution” method. So now, when ASP.NET page framework retrieves the cached page, it automatically triggers your callback method to get the dynamic content. It then inserts your content into the cached HTML of the page. Even if your page has not been cached yet (for example, it's being rendered for the first time), ASP.NET still calls your callback in the same way to get the dynamic content. So you create a method that generates some dynamic content, and by doing so you guarantee that your method is always called, and it’s content is never cached.



Figure: - Substitution Control
Figure: - Substitution in Action
Below is a sample code that shows how substitution control works. We have ASPX code at the right hand side and class code at the behind code at the left hand side. We need to provide the method name in the “methodname” attribute of the substitution control.

View following video on Web.config transformation in ASP.Net: -



Learn more on ASP.NET interview questions

Regards,

From more on author’s blog related to ASP.NET interview questions click and visit.