Wednesday, November 26, 2008
Thursday, October 30, 2008
What Every C# .Net Developer Needs To Know (2)
C and C++:
- What is a Virtual Function and why is it used?
- What is a friend function?
- What's the difference between an operator and an operand?
- What's the difference between the * and the & in C++?
- How do you dynamically allocate memory?
.Net Framework:
- What is a garbage collector and how does it work? (Memory management in CLR)
- What is the difference between Finalize() and Dispose()?
- Multithreading Vs Single-threading?
- Thread Vs Process?
- Whats a deadlock, how do you manage deadlocks?
- What is a Windows Service and how does its lifecycle differ from a "standard" EXE?
- 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?
- What is the difference between an EXE and a DLL?
- What is a PID? How is it useful when troubleshooting a system?
- How many processes can listen on a single TCP/IP port?
- What is the GAC? What problem does it solve?
- What is Reflection?
- What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?
- Are the type system represented by XmlSchema and the CLS isomorphic?
- Conceptually, what is the difference between early-binding and late-binding?
- What is the difference between Runtime, and Compile time?
- How many classes could you put in a dll?
- Is using Assembly.Load Static or Dynamic?
- When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?
- What is an Asssembly Qualified Name? Is it a filename? How is it different?
- Is this valid? Assembly.Load("foo.dll");
- How is a strongly-named assembly different from one that isn’t strongly-named?
- Can DateTimes be null?
- What is the JIT? What is NGEN? What are limitations and benefits of each?
- How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
- What does this useful command line do? tasklist /m "mscor*"
- What is the difference between in-proc and out-of-proc?
- What technology enables out-of-proc communication in .NET?
- When you’re running a component within ASP.NET, what process is it running within on
- Windows XP? Windows 2000? Windows 2003?
- What’s wrong with a line like this? DateTime.Parse(myString);
- Explain the use of virtual, sealed, override, and abstract.
- Explain the importance and use of each component of this string: Foo.Bar,Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d
- What benefit do you get from using a Primary Interop Assembly (PIA)?
- By what mechanism does NUnit know what methods to test?
- What is the difference between: catch(Exception e){throw e;} and catch(Exception e){throw;}
- What is the difference between typeof(foo) and myFoo.GetType()?
- Explain what’s happening in the first constructor and how is this construct useful?
- What is this? Can this be used within a static method?
- What are PDBs? Where must they be located for debugging to work?
- What is cyclomatic complexity and why is it important?
- Write a standard lock() plus “double check” to create a critical section around a variable access.
- What is FullTrust? Do GAC’ed assemblies have FullTrust?
- What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
- What does this do? gacutil /l find /i "Corillian"
- What does this do? sn -t foo.dll
- What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
- Contrast OOP and SOA. What are tenets of each?
- How does the XmlSerializer work? What ACL permissions does a process using it require?
- Why is catch(Exception) almost always a bad idea?
- What is the difference between Debug.Write and Trace.Write? When should each be used?
- What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
- Does JITting occur per-assembly or per-method? How does this affect the working set Contrast the use of an abstract base class against an interface?
- What is the difference between a.Equals(b) and a == b?
- In the context of a comparison, what is object identity versus object equivalence?
- How would one do a deep copy in .NET?
- What is boxing and unboxing, with examples, what is it used for?
- Is string a value type or a reference type?
- What is the significance of the "PropertySpecified" pattern used by the XmlSerializer
- What problem does it attempt to solve?
- Why are out parameters a bad idea in .NET? Are they?
- Can attributes be placed on specific parameters to a method? Why is this useful?
- How does assembly versioning in .NET prevent DLL Hell?
- What compiler switch creates an xml file from the xml comments in the files in an assembly?
- What is a satellite Assembly?
- How does assembly versioning in .NET prevent DLL Hell?
- In the NUnit test framework, which attribute must adorn a test class in order for it to be picked up by the NUnit GUI?
C#:
- The C# keyword ‘int’ maps to which .NET type?
- How do you escape a backslash in C#?
- How do you declare a two dimentional array in C#?
- If a method is marked as protected internal who can access it?
- Which “Gang of Four” design pattern is shown below? public class A { private A instance; private A() { } public static A Instance { get { if ( A == null ) A = new A(); return instance; } }}
- What is the default accessibility for a class?
- What is the default accessibility for members of an interface?
- What is the default accessibility for members of a struct?
- Can the members of an interface be private?
- Methods must declare a return type, what is the keyword used when nothing is returned from the method?
- Class methods to should be marked with what keyword?
- A class can have many mains, how does this work?
- Does an object need to be made to run main?
- What are the two return types for main?
- What is a reference parameter?
- What is an out parameter?
- What is a constructor?
- If I have a constructor with a parameter, do I need to explicitly create a default constructor?
- What is a destructor?
- Can you use access modifiers with destructors?
- What is an event?
- Are events synchronous of asynchronous?
- Events use a publisher/subscriber model. What is that?
- Can a subscriber subscribe to more than one publisher?
- What is a value type and a reference type?
- Name 5 built in types.
Tuesday, October 14, 2008
What Every C# .Net Developer Needs To Know (1)
I have been in so many interviews and was asked so many interesting questions that I have decided to collect those questions, I started this habit because I think every C# .Net Developer needs to know the answers to those questions, so whenever you have an interview or whenever you need to refresh your memory please stop by and answer these questions :).. I have answered all those questions previously however I will not include any answers to these questions nor will I mention companies’ names.
Warm-ups:
- What are the qualities of good code?
- How do you explain a complex technical term to a non-technical person? For example excel sheets?
- What's a recursive function?
- What is a bitwise operator?
- What was the first OOL?
- Is-a versus has-a relationships (with examples)
- Composition vs. aggregation relationships
- What is a Method Signature?
- What is strong-typing versus weak-typing? Which is preferred? Why?
General OOP Questions:
- What is an Object?
- What is a Class?
- Why OOP?
- What is a delegate?
- Overloading Vs Overriding with examples?
- What are the three most important features of OOP with examples?
- Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.
- Describe what an Interface is and how it’s different from a Class. Also Interface Vs Abstract Class?
- C# oop Vs. vb.net oop
- What is strong-typing versus weak-typing? Which is preferred? Why?
- Linked list, Hash table, Stack, Queue, Binary tree, Binary search tree: Explain?
- What's the difference between a linked list and an array?
- How would you describe encapsulation?
Algorithims:
- Write a function to find the middle node of a single link list
- What is the Big O notation?
- What is the best and worst performance time for a hash tree and binary search tree?
- What is the best and worst time for the operation 'equals' (Strings)
- Order the functions in order of their asymptotic performance
* 2^n, * n^Googol ( 10^100), * n!, * n^n - Implement an algorithm to sort a linked list. Why did you pick the method you did? Now do it in O(n) time.
- Write a code to delete any node in a link list. With all test cases and boundary conditionsThe Traditional Method
- Write a function to reverse a string
- Write function to compute Nth fibonacci number
- Print out the grade-school multiplication table up to 12x12
- Write a function that sums up integers from a text file, one int per line
- Write function to print the odd numbers from 1 to 99
- Find the largest int value in an int array
- Format an RGB value (three 1-byte numbers) as a 6-digit hexadecimal string
- Write a function that inserts an integer into a linked list in ascending order.
- Implement a linked list. Why did you pick the method you did?
- Describe advantages and disadvantages of the various stock sorting algorithms.
- Implement an algorithm to reverse a linked list. Now do it without recursion.
- Implement an algorithm to insert a node into a circular linked list without traversing it.
- Implement an algorithm to sort an array. Why did you pick the method you did?
- Write routines to read and write a bounded buffer.
- Write routines to manage a heap using an existing array.
- How would you find a cycle in a linked list?
- Describe the algorithm for a depth-first graph traversal
- How would you find the nth to last element in a linked list?
- Given two binary trees, find whether or not they are similar.
- You have a tree (not Binary) and you want to print the values of all the nodes in this tree level by level.
- Reverse a linked list iteratively, do it first with single pointers and then do it again with double pointers. Now do it again recursively but not tail-recursive, and then do it again tail-recursively. What do you do if it has a loop?
- How would you write qsort?
- Describe Sorting algorithms and their complexity - Quick sort, Insertion Sort, Merge Sort, Heap Sort, Bubble Sort, and Selection Sort
If you had a million integers how would you sort them and how much memeory would that consume? - Tree search algorithms. Write BFS and DFS code, explain run time and space requirements. Modify the code to handle trees with weighted edges and loops with BFS and DFS, make the code print out path to goal state.
- Remove the Duplicates from an Array.
- Reverse a string preserving the words in the string
Eg.Input = “Heros Happen Here”.Output = “Here Happen Heros”. - Find the deepest level in a tree and return its depth. Hints and assumptions: its a binary tree.
- An array of n number of elements for example from 0 --> n write a function that returns true if each element from 1-->n exists in the array once.
eg: {3,4,2,1} returns true{3,2,3,2} return false; - Implement a Queue Using 2 Stacks in order of Constant time..
Hint: you only need to implement the Enqueue and the DeQueue functionsAssumtion a stack class already exists the stack class has push, pop and isEmpty methods and i will use them here
Saturday, March 15, 2008
Microsoft Office SharePoint Server (MOSS)
I am supposed to learn MOSS asap because I have to work on a project that is MOSS based. I am intimidated and pressured but I think I will be able to master it soon enough and even blog my attempts and conclusions.
I am starting with a step by step workshop to grasp the basics of MOSS development. Then I have those videos that I will go through I will give myself a week or so to do it.
For as far as I know now MOSS is a web-based collaboration and document management platform from Microsoft that can be used to host web sites which can be used to access shared workspaces and documents. SharePoint functionality is exposed as web parts. These web parts are composed into web pages, which are then hosted in the SharePoint portal. SharePoint sites are actually ASP.NET applications, which are served using IIS and use a SQL Server database as data storage backend.
I am starting with a step by step workshop to grasp the basics of MOSS development. Then I have those videos that I will go through I will give myself a week or so to do it.
For as far as I know now MOSS is a web-based collaboration and document management platform from Microsoft that can be used to host web sites which can be used to access shared workspaces and documents. SharePoint functionality is exposed as web parts. These web parts are composed into web pages, which are then hosted in the SharePoint portal. SharePoint sites are actually ASP.NET applications, which are served using IIS and use a SQL Server database as data storage backend.
Thursday, February 28, 2008
XSL Rocks!!
I was reading a little about XSL (extensible style sheet language) on http://www.w3schools.com/xsl/ and I found that it is absolutely awesome! I completely got the whole thing and I realized that XSL will be one of my favorites soon; apparently XSL is XML-Based style sheet language! XSLT however –which stands for XSL Transformation- is the most important part of XSL and is used to transform an XML document into another XML document that is recognized by a browser by transforming each XML element into an (X)HTML element and it uses X-Path is to navigate through elements and attributes of the XML document.
Pretty cool huh! If you still don’t know much about XSL you should definitely start looking it up.
Pretty cool huh! If you still don’t know much about XSL you should definitely start looking it up.
Memories..(1)
What are the three most important features of OOP?
Encapsulation:
Encapsulation conceals the functional details of a class from objects that send messages to it.
Inheritance:
‘Subclasses’ are more specialized versions of a class, which inherit attributes and behaviors from their parent classes, and can introduce their own.
Polymorphism (Overloading, Overriding):
Polymorphism allows you to treat derived class members just like their parent class' members
What is a garbage collector and how does it work?
garbage collection (GC) is a form of automatic memory management.
Garbage collection is often portrayed as the opposite of manual memory management, which requires the programmer to specify which objects to deallocate and return to the memory system.it frees the programmer from having to worry about releasing objects that are no longer needed.
The basic principle of how a garbage collector works is:
Determine what data objects in a program will not be accessed in the future
Reclaim the resources used by those objects
Reference: http://en.wikipedia.org
Encapsulation:
Encapsulation conceals the functional details of a class from objects that send messages to it.
Inheritance:
‘Subclasses’ are more specialized versions of a class, which inherit attributes and behaviors from their parent classes, and can introduce their own.
Polymorphism (Overloading, Overriding):
Polymorphism allows you to treat derived class members just like their parent class' members
What is a garbage collector and how does it work?
garbage collection (GC) is a form of automatic memory management.
Garbage collection is often portrayed as the opposite of manual memory management, which requires the programmer to specify which objects to deallocate and return to the memory system.it frees the programmer from having to worry about releasing objects that are no longer needed.
The basic principle of how a garbage collector works is:
Determine what data objects in a program will not be accessed in the future
Reclaim the resources used by those objects
Reference: http://en.wikipedia.org
Labels:
Encapsulation,
garbage collector,
GC,
Inheritance,
OOP,
Polymorphism
Starting Over..
I am bored to tears, yes I am. I have been working for more than a year now and am wondering where did all the fun go? Its not as fun as it used to be, I have weird cravings for C and C++, I want to write something special, an awesome piece of a code, something that sweeps my brains away, and until am able to feed that urge,, until I do that I have decided to look back at the good times, remember all the theories, all the SCIENCE and stuff I used to love.
The majority of developers working today are working on fairly straight forward systems doing fairly simplistic things like tying up a gui to a database. For the most parts that means you don’t need to be a good software developer, broadly speaking it doesn’t matter if you don’t have an in-depth understanding of your programming language or lack a formal comp sci education.
However there is another world, a much more fun world in my opinion although others may disagree. A world in which you need to have expertise in your language, where you really need to understand what exactly your code is doing and often how it’s achieving it. A world in which you need to be a good software developer to survive and get the job done.
You may find this series pretty useful for any technical interview but I am writing it for the sake of pure enjoyment and for the sake of my poor soul before I become a total “tool expert” and not a programmer anymore:(.
I will start with bits n pieces of the old days’ memories...
The majority of developers working today are working on fairly straight forward systems doing fairly simplistic things like tying up a gui to a database. For the most parts that means you don’t need to be a good software developer, broadly speaking it doesn’t matter if you don’t have an in-depth understanding of your programming language or lack a formal comp sci education.
However there is another world, a much more fun world in my opinion although others may disagree. A world in which you need to have expertise in your language, where you really need to understand what exactly your code is doing and often how it’s achieving it. A world in which you need to be a good software developer to survive and get the job done.
You may find this series pretty useful for any technical interview but I am writing it for the sake of pure enjoyment and for the sake of my poor soul before I become a total “tool expert” and not a programmer anymore:(.
I will start with bits n pieces of the old days’ memories...
Subscribe to:
Posts (Atom)