Interview Tips Interview Tips, Interview Questions and Answers

20May/100

.NET interview: What is the difference between a Thread and Process?

A process is a collection of virtual memory space, code, data, and system resources. A thread is code that is to be serially executed within a process. A processor executes threads, not processes, so each application has at least one process, and a process always has at least one thread of execution, known as the primary thread. A process can have multiple threads in addition to the primary thread. Prior to the introduction of multiple threads of execution, applications were all designed to run on a single thread of execution.

When a thread begins to execute, it continues until it is killed or until it is interrupted by a thread with higher priority (by a user action or the kernel’s thread scheduler). Each thread can run separate sections of code, or multiple threads can execute the same section of code. Threads executing the same block of code maintain separate stacks. Each thread in a process shares that process’s global variables and resources.

16May/100

.NET Object Serialization – How can I optimize the serialization process?

How can I optimize the serialization process?

The first call to a Web Service takes long because XmlSerializer generate an assembly optimized for each type in memory.

To optimize the serialization process pregeneration of serialization assembly with Visual Studio or sgen.exe is needed.

Implementing serialization separately can also increase the performance.

What is Formatters? Explain the binary formatter and the SOAP formatter.

A formatter determines the serialization format for objects.

.NET framework provides Binary formatter and SOAP formatter which inherit from the IFormatter interface

The Binary Formatter

It provides binary encoding for compact serialization for storage or socket-based network streams.
It is not appropriate for data to be passed through a firewall.

The SOAP Formatter

It provides formatting that can be used to enable objects to be serialized using the SOAP protocol.
The class is used for serialization through firewalls or diverse systems.

11Mar/100

Interview Question :: garbage collector in .NET?

When should you call the garbage collector in .NET?

Garbage collection is a process of releasing the memory used by the objects, which are no longer referenced. This is done in  different ways and different manners in various platforms and languages. We will see how garbage collection is being done in .NET.

17Feb/100

asp.net interview questions: state management

  1. What is the lifespan for items stored in ViewState?
    Item stored in ViewState exist for the life of the current page.  This includes postbacks (to the same page).
  2. What is ViewState?
    ViewState allows the state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.  ViewState is used the retain the state of server-side objects between postabacks.
  3. What are the different types of Session state management options available with ASP.NET?
    ASP.NET provides In-Process and Out-of-Process state management.  In-Process stores the session in memory on the web server.  This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server.  Out-of-Process Session state management stores data in an external data source.  The external data source may be either a SQL Server or a State Server service.  Out-of-Process state management requires that all objects stored in session are serializable.
  4. What does the "EnableViewState" property do?  Why would I want it on or off?
    It allows the page to save the users input on a form across postbacks.  It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser.  When the page is posted back to the server the server control is recreated with the state stored in viewstate.
25Jan/100

Interview Question: The one who has better things to do

An interviewer checking her e-mail, looking at you but not paying any attention to what you say. Some people are forced to participate in the interview process even if they have no interest in doing it, so don't take it personally.
What to do: Answer the questions and be friendly. Try to hold conversations with this distracted interviewer and hope you can win her over -- hey, it can't hurt to have someone who likes you. But this interviewer either made up her mind before she walked into the room or doesn't intend to give much feedback about you, so do your best but don't take her disinterest personally.

16Jan/100

Interview Tips, Know Who You Are

As a job seeker, you must define your strengths and hone a message (your unique selling proposition). This is called branding. Branding is a process that clearly defines who you are and what clear benefit you bring to an employer.

On Idol, almost everyone who begins the show is a decent singer. Those who know who they are early in the show always enjoy a huge advantage over those who haven't a clue, even though they may be better singers. Those who understand this principle include Sanjaya, Blake Lewis and Melinda Doolittle, to mention three. Sorry, but none of them is a "great" singer. They did know their strengths and they stayed with them, often maddenly so. But in the end, look where they are now. They know who they are, what they do best and they never strayed from that path.
In many ways, this is not about finding and molding raw talent, it's about finding and marketing talent that's already well-branded. I believe the interview process is much the same. The branding should occur long before you walk into the interview room.
Too many job hunters try to get through the interview by merely giving the "right" answers. The real issue: They haven't a clue about who they really are or what they bring to a company.

If you can't do that, then please watch "American Idol" next week. You'll see the fate that awaits the next fallen Idol who failed to learn this message in the singing world.

21Dec/090

What Every .NET Developers Ought To Know

    1. Describe the difference between a Thread and a Process?
    2. What is a Windows Service and how does its lifecycle differ from a "standard" EXE?
    3. What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
    4. What is the difference between an EXE and a DLL?
    5. What is strong-typing versus weak-typing? Which is preferred? Why?
    6. Corillian's product is a "Component Container." Name at least 3 component containers that ship now with the Windows Server Family.
    7. What is a PID? How is it useful when troubleshooting a system?
    8. How many processes can listen on a single TCP/IP port?
    9. What is the GAC? What problem does it solve?