What Great .NET Developers Ought To Know

Your Ad Here

What Great .NET Developers Ought To Know

Everyone who writes code

* Describe the difference between a Thread and a Process?
o A process is a collection of threads (at least one) sharing the same resources (virtual memory, security context etc.).
A thread is an entity in a process that can actually be executed on the CPU.
* What is a Windows Service and how does its lifecycle differ from a “standard” EXE?
o A Windows Service is a program that conforms to the rules of the SCM (Service Control Manager). The main difference is that it does not need a logged on user to activate it.
* 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?
o Ok, I admit I had to check the MSDN documents for this.
The maximum virtual memory for a 32-bit system is 4GB of which 2GB are availble to the user processes (3GB running a special configuration).
This affects system design when when designing for memory intensive applications such as databases, enterprise applications etc…
* What is the difference between an EXE and a DLL?
o An EXE is an EXEcutable that contains an entry point and instructions to execute. A DLL only contains pieces of functionality to be used by an EXE (or another DLL).
* What is strong-typing versus weak-typing? Which is preferred? Why?
o strong-typing means a strict enforcement of type rules with no exceptions as opposed to weak-typing which allows well defined exceptions (such as assigning an int to a float in C++).
While strong-typing can prevent many type errors, weak-typing is much more developer “friendly”.
I assumed the preffered enforcement mechanism depends on the application at hand…
* Corillian’s product is a “Component Container.” Name at least 3 component containers that ship now with the Windows Server Family.
o I really have no idea what a “Component Container” is.
* What is a PID? How is it useful when troubleshooting a system?
o Process Identifier. I have never used it myself but I assume it can be used to kill the process or for loggingdebugging purposes.
* How many processes can listen on a single TCP/IP port?
o I am not 100% sure but I think the answer is One.
The result of two or more processes listening to the same port would be erroneous since they’ll be “stealing” each other’s revieved information.
* What is the GAC? What problem does it solve?
o Global Assembly Cache. It resolves DLL hell, versioning etc…

Mid-Level .NET Developer

* Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.
o Interface-oriented programming means defining and working strictly through interfaces.
Object-oriented programming means defining defining a program using relationships between objects a classes (inheritance, polymorphism etc.)
I’ve heard the buzz about AOP (aspect-oriented programming) but I have yet to study what exactly does it mean…
* Describe what an Interface is and how it’s different from a Class.
o An interface defines a contract without implementation. A class implements an interface.
* What is Reflection?
o Reflection is used to query .NET assemblies and types for information. It can also be used to create type instances, invoke methods and even emit .NET code at runtime (Reflection.Emit).
* What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
o I’ve never used .NET remoting but I assume the difference is that remoting is not as interoperable as web services.
* Are the type system represented by XmlSchema and the CLS isomorphic?
o No.
* Conceptually, what is the difference between early-binding and late-binding?
o When using early-binding the call information is known at compile time.
When using late-binding the call information is only known at runtime.
* Is using Assembly.Load a static reference or dynamic reference?
o Dynamic reference.
* When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?
o For loading assemblies from given file or folder (such as plugins etc).
* What is an Asssembly Qualified Name? Is it a filename? How is it different?
o The Assembly Qualified Name contains the assembly name, version and public key token and thus allows
versioning and singing as opposed to a simple filename.
* Is this valid? Assembly.Load(”foo.dll”);
o No because “foo.dll” is not an assembly qualified name.
* How is a strongly-named assembly different from one that isn’t strongly-named?
o Strongly-named assemblies are signed using a privatepublic key pair which helps with code verification.
signed assemblies could be placed in thee GAC.
* Can DateTimes be null?
o No because it is a structure and not a class.
* What is the JIT? What is NGEN? What are limitations and benefits of each?
o JIT means Just In Time compilation which means the code is being compiled just before it is supposed to run.
This means longer startup time (because the code takes some time to compile) but more efficient compilation (since the compiler has more information about the target system etc.).
NGen is used to pre-JIT code which yields faster startup time but the compiler produces less efficient code because it has less information.
* How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?
o It divides the objects into three generations.
The first generation is used for short lived objects and is collected often (its cheap to collect it).
The other two generations are used for longer term object.
Non-deterministic finalization means that it is not known when the object’s finalizer is called since it is called when the GC decides to collect the object and not when the object falls out of scope etc.
* What is the difference between Finalize() and Dispose()?
o Finalize() is called by the runtime (the GC) and Dispose() is called by the user.
* How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
o The using statement defines a scope at the end of which a given object will be disposed.
Using the ‘using statement’ helps not to forget disposing of a disposable object.
IDisposable is an interface used to define a way to dispose of objects in a deterministic manner.
When the ‘using statement’ scope ends the Dispose() method is automatically called on the given object.
* What does this useful command line do? tasklist /m “mscor*”
o It shows all the processes that loaded a DLL with a name matching the given pattern. In this case we will see all the processes using the .NET framework.
* What is the difference between in-proc and out-of-proc?
o out-of-proc requires marshaling between two processes and thus slower.
* What technology enables out-of-proc communication in .NET?
o Remoting.
* When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?
o The ASP.NET worker process.

Posted in Labels: kick it on DotNetKicks.com |