You are on page 1of 6

Candidate:

Total Score:
Interview Decision:

Technical Questions List


E = Easy, M = Medium, H = Hard
The concept is that we escalate within each category, choosing one from E, M, and H so that the other set is
available for a further interview.

GENERAL
H3. When will it explode?

ASP.NET (Self Assessment: Section Total: Section Avg: )


E1. Describe the difference between inline code and code behind in ASP.NET pages? In .NET 2.0?
Inline code is C# or VB directly on the aspx page while code behind uses a separate file (.cs or .vb
respectively).
E2. What is the ViewState?
A hidden form field that stores information about the controls to allow them to maintain their state
between postbacks.
E3. What is the difference between using Server.Transfer and Response.Redirect? What are the
side-effects?
Server.Transfer transfers the page processing to another page while Response.Redirect instructs the
clients browser to request the other page. Transfer stays on the server and thus requires no round
trip to the client and back while also maintaining a reference to the transferring pages members for
use in the transferred page. However, the clients browser history is ignorant of this transfer and
clicking on the browsers back button would have unexpected results.
M1. What is the difference between a DataSet and a DataReader? Which one is disconnected from
the database? How would you get data into a DataSet?
A DataSet is an in-memory representation of a relational database as complex as the programmer
desires. It is disconnected from the original data store and can handle multiple selects and
manipulations. To get data into a DataSet instantiate a DataAdapter most suited for the data store and
call its Fill() function. A DataReader is connected to the original data store and allows read-only,
forward-only access to the data. Incidentally, a DataReader is used behind the scenes by a
DataAdapter.
M2. What are all of the different ways for you to persist data between Post-backs?
Form fields, ViewState (directly), hidden html elements, ASP.NET HiddenFields, Session variables,
Application variables, query string, cookies, Profile properties, persisted files, database
M3. What were the 3 built-in Data Controls included in the .NET Framework 1.1? Of the 3, which is the
fastest to develop with? Which provides the capability for the richest user experience?
Which provides the best execution performance?
DataGrid, DataList, and Repeater. DataGrid is the fastest to develop with as most important functions
can be accomplished with Visual Studios WYSIWYG editor. The Repeater solely dependent on
html/css for its layout so it can appear any way the developer choose however, the DataList is almost
as configurable and has the ability for inline editing. The Repeater has slightly better performance
than the DataList and far greater performance than the DataGrid.
H1. What are the different types of Session management options available in ASP.NET? How are
they implemented? What are the consequences of using each?
InProc, State Server, SQL Server. InProc stores session info in memory on the local ASP.NET worker
process. State Server stores session info outside the ASP.NET worker process and is managed by a
Windows Service. SQL Server stores session info in a SQL Server database. InProc would not work if
using a server farm as session info is not shared amongst different servers. Session variables stored
in a State or SQL Server need to be serializable.
H2. Are you familiar with Typed DataSets? Please compare and contrast the differences between
using the standard DataSet and a Typed DataSet?
Yes, I am familiar with them. Typed DataSets allow access to a DataSets fields as strongly typed
members of that object. This prevents the need for writing type conversions before using a fields
data as well as allowing those fields to show up (e.g. in Intellisense) as properties of the DataSet at
the slight cost of maintaining a DataSets schema within the project.

C# (Self Assessment: Section Total: Section Avg: )


E1. Does C# support multiple inheritance?
No. Implementing multiple interfaces is not the same as multiple inheritance.
E2. Whats the top .NET class to which everything in the Framework is derived?
System.Object
M1. What are the differences between Java and C#? (If Appropriate from the candidates resume)
Someone go to town here
M2. How do you create an event for one of your classes? What kind of class would you implement
to accompany a custom delegate/event?
Define a public delegate. Define an event of the delegate type previously defined. Create a method
that checks to see if an instance of that events delegate has been instantiated and, if so, call the
event. A class derived from EventArgs is normally accompanied with the event that provides
important information internal to the class raising the event.
M3. What are generics? What are the benefits of using them?
Generics provide the ability to perform functions on classes without the generic class knowing of
what type those classes are. The most common use of Generics is the List<T> class which replaces
the ArrayList class. Generics are type safe in that you define the type that will be stored in the List
and only that types members are available when accessing an item from the List. This eliminates
performance hits and errors associated with casting items in an ArrayList in order to use them.
M4. What are the differences between the public, protected, internal and private class member modifiers?
Public is visible to any other class, protected is available to inheriting classes, internal is available to
classes within the same namespace, private is only available within the class it is declared.
M5. What is the difference between the String and StringBuilder classes? When would you want to use
one over the other?
The String class is immutable, so when concatenating two Strings together you are really creating a
new third object in memory. StringBuilder offers a mutable alternative which allows you to
concatenate strings more efficiently.
H1. What is the difference between ref and out parameters?
Ref parameters should be assigned a value by the caller before the method is executed and may be
modified by the callee. Out parameters must be assigned a value by the callee during the method
execution.
H2. What is the difference between static and non-static class members?
There is one instance of a static variable per class. Whereas for non-static variables each object
instantiated contains its own instance. Static methods can be called without instantiating the class,
non-static methods can not. Static constructors will automatically execute before any static variables
are referenced or before any instance of the class is created. Non-static constructors execute each
time a class instance is created.

Programming Concepts/OOAD-OOP (Self Assessment: Section Total: Section Avg: )


E1. Please explain what is commonly known as a three-tier application architecture?
Presentation (or User Interface/Experience), Business, & Data tier
E2. What are the different ways in which code implementation is reused in OOP?
Answers we are looking for are inheritance and delegation or an explanation of both of these
concepts. Answering with polymorphism is wrong as it utilizes overloading versus reusing code
implementation. Interfaces are wrong because there is not implementation of methods/properties
being reused.
M1. Imagine you have a closed Library (meaning you cannot see or change the code) with 2 classes, A
and B. You have been instructed to create a class named C to inherit the functionality of both A and
B such that clients of C can expect all of the behaviors of A and B. How would you implement this
scenario?
Within C, instantiate A and B expose all the public members of both A and B and delegate each call to
C to A or B. An acceptable answer would be to inherit from either A or B and wrap the other as
previously explained.
M2. What is the difference between an interface and an abstract class?
An interface can contain member declarations, but no implementation. An abstract class can contain
implementation. Neither an interface nor an abstract class can be instantiated. A class may
implement multiple interfaces, but may only inherit from one class, abstract or otherwise.
M3. What is the difference between overloading a method and overriding a method?
Overloading a method is when you declare a method with the same name, but a different signature
(parameters). Overriding a method is when you reimplement a method that has been inherited from a
parent class.
M4. What are the benefits of using Interfaces?
H1. Are you familiar with Design Patterns? What patterns have you seen that are built-in to the
implementation of the .NET Framework?
Yes, I am. Some examples are:
- the different DataAdapters use the Adapter pattern
-
H2. What do the terms boxing and unboxing mean?
Boxing is when a value type is converted to a reference type, and unboxing is the opposite.
H3. How does garbage collection work in .NET? What are some advantages and disadvantages to
automatic gargage collection?
The .NET runtime will automatically detect when a resource is no longer referenced and deallocate its
space in memory. If the resource has a destructor then this will be executed prior to the deallocation.
Automatic garbage collection frees a developer from having to worry about manually allocating and
deallocating memory. This in turn eliminates the possibility of developer error that could lead to
memory leaks. However, garbage collection does not immediately detect when a resource is
unreferenced and therefore does not immediately deallocate memory when it is no longer used. The
garbage collection background process also requires use of some additional system resources.

Algorithms (Self Assessment: Section Total: Section Avg: )


E1. How would you page through a large number of records?
blah.
E2. How would you code a Bubble sort?
blah.
E3. How would merge two sorted arrays to a new sorted array?
Blah.
E4. Given a string with numbers and letters, create a csv of all the numbers.
Blah.
E5. Convert a string of numbers to an int without using built-in functions.
Blah.
E6. FizzBizz. Given an array of numbers, write out the array but replace any number divisible by 3 with
Fizz, any number divisible by 5 with Bizz, and any number divisible by both 3 and 5 with
FizzBizz.
Blah.

SQL (Self Assessment: Section Total: Section Avg: )


E1. What SQL statement is used to extract or get data from the database? What would you use if
you only wanted unique values?
SELECT or SELECT DISTINCT for unique values.
E2. What is the syntax of the INSERT statement within SQL?
INSERT INTO TableName (column1, column2,n) VALUES (value1, value2,n)
E3. What is the difference between the varchar and nvarchar data types?
Nvarchar stores Unicode strings, and varchar stores non-unicode strings. As a result the nvarchar
data type uses twice as much space to store the same length string.
M1. If you were to write an INSERT statement without specifying the fields of the table to which you are
inserting, what will SQL do to insert the values you provide? What would happen if you provide
fewer values than there are fields?
SQL Server will attempt to insert the values in the field order in the tables definition. Should any
fields be omitted, null will be inserted (if any of the fields are set to NOT NULL an exception will be
thrown)
M2. Please explain the differences between an inner join, a left outer join, and a full outer join?
An inner join will return only records from both sides that match the criteria in the ON clause. A left
outer join will return the same as an inner join and also returns any records from the left table that
has no match in the right table (null will be returned for any right table columns). A full outer join
returns the same records as an left outer join as well as any records from the right table that has no
match in the left table (null will be returned for any left table columns).
H1. In a stored procedure, assuming you have a table with an auto-incrementing column called ID, how
can you return the ID value of a newly inserted row?
SELECT Scope_Identity(). SELECT @@IDENTITY is not acceptable as any variable designated with
@@ is a SQL Server global variable and @@IDENTITY could contain the identity of another insert on
the same or a completely different table.
H2. What is the difference between a WHERE clause and HAVING clause?
A HAVING clause is used in combination with GROUP BY to set up conditional filters based on
aggregate functions. A WHERE clause is used to compare non aggregate fields.
H3. How could you get a list of the scripts currently executing against a Sql Server?
Connect to the SQL Server using SQL Server Profiler.
Database Concepts (Self Assessment: Section Total: Section Avg: )
E1. What are the 2 types of KEYs within a database?
Primary and foreign.
E2. What data types can be used as PRIMARY KEYs? Which one is ideal? Why?
Any non-binary data can be used. Numeric data types, especially int, are preferred due to its speed in
indexing. The exception to this is the uniqueidenitifier data type which when you need to guarantee
this record is unique from other records in different tables or different databases.
M1. Can you explain the concepts behind normalizing a database?
Normalizing a database removes recurring data to separate, related tables eliminating redundancy.
The benefits of this are:
- Faster sorting and index creation
- A larger number of clustered indexes
- Narrower and more compact indexes
- Fewer indexes per table (improving performance for INSERT, UPDATE, and DELETE operations)
- Fewer null values and less opportunity for inconsistency
M2. Imagine you have a report which is taking 5 minutes to construct, and you find that the query used to
generate the report has 16 separate join operations within it. What steps would you take to optimize
this report?
Best answers will assume they know nothing about the current database configuration even ask
questions about it. Keys for which you are looking are using indexes, de-normalization, separate
reporting database w/ batch processing, reducing joins by seeing which join operations are
redundant (i.e. joining to a table and then to another when the first could have been joined to the
third), seeing which join operations have no columns in both the select and where clauses,
eliminating text fields in join operations, utilizing views to reduce the number of joins in a single
operation, eliminating the use of user defined functions
M3. What is an index? What are the advantages and disadvantages of using indexes? What is the
difference between a clustered and non-clustered index?
An index is a sorted structure defined on one or more columns in a table to speed lookups against the
column(s). The primary advantage is faster lookups, and some disadvantages are slower inserts and
extra disk space required to store the index. A clustered index is dictates that the data will be stored
in a table will be physically ordered according to the index definition. Whereas a non-clustered index
sorts the data outside of the table and has references back to the physical locations of the data. A
clustered index requires less disk I/O since the index and data are stored in the same physical
location, and is therefore faster.
H1. What does it mean to normalize a database to the 3rd Normal Form? The 4th? The 5th?
1st Normal Form (1NF): All column values are atomic (columns do not contain multiple values and
there are no repeating groups).
2NF: 1NF plus every non-key column is fully dependent on the entire primary key (all column values
describe only this specific entity described by the primary key. Lets say a table has an OrderID and
OrderItemNumber as its primary key and also has an OrderDate and ProductDescription columns. In
this scenario you dont need the OrderItemNumber to find out the date of the order and thus the table
doesnt satisfy 2NF).
3NF: 2NF plus all non-key columns are mutually independent (this typically means calculated
columns from values in other columns in the same record).
4NF and 5NF: If any candidate knows the Boyce/Codd 4th and 5th normal forms by name hire them
immediately.
H2. What aspect of database programming uses the acronym ACID? What are the four
characteristics of transactions referred to by the acronym ACID?
Relates to programming transactions. Atomicity (either the entire transaction completes or none of it),
Consistency (once the transaction is completed the database is left in a state consistent with its
rules), Isolated (each transaction is independent of other transactions), Durability (the transactions
effects persist even in the event of a system failure).
H3. Imagine you have a multi user application that is performing poorly under a heavy load. Youve
narrowed down the problem to a piece of code that is making a call to retrieve some data from the
database. What are the things you would look for to try to improve the performance of your
application?
There are a ton of potential answers to this. Here are some possiblities:
- Use stored procedure instead of inline sql.
- Cache results from the database if possible.
- If the stored procedure performs a select, update or delete then make sure that the fields in the
where clause and joins are indexed.
- If the stored procedure performs an insert look for any indexes that may be unnecessary.
- Use the nolock statement to query tables that are highly trafficked, but are not often updated.
- Denormalize if possible.
- Eliminate unnecessary fields and joins.
- Eliminate any OR clauses in favor of UNIONs.
- Enable full-text search for complicated text searches.
- Add query hints.
- Apply Chucks patented Sql Doubler.

OPTIONAL SECTIONS

HTML/HTTP (Self Assessment: Section Total: Section Avg: )


E1. What is the difference between the GET and POST methods for submitting form data?
Using GET, the form name/value pairs are passed in the query string. In POST they are passed in the
message header.
E2. What is the difference between the HTML 4.0 Standard and the XHTML Standard?
- All tags must be closed in XHTML
- Tags and attributes are lowercase in XHTML
M1. What tags are used to embed a Media Player (or ActiveX control) into an HTML Page? What
tag would you use to set properties for the player?
Use <object> in IE and <embed> for Mozilla-based browsers. If using <object> then <param> tags are
used if using <embed> properties are passed as attributes on the <embed> tag.
M2. Please explain what URL Encoding is.
H1. What are the 8 Methods for making HTTP Requests?
GET, POST, and PUT are most common with OPTIONS, DELETE, TRACE, and HEAD are also
available.
H2. What HTML Tag/Code would you use to redirect a user to another page automatically?
<meta http-equiv="refresh" content="5" url=some-domain /> where content is the number of
seconds to wait

JavaScript (Self Assessment: Section Total: Section Avg: )


E1. What are the two ways to add a comment in JavaScript Code?
// for single line and /**/ for multi-line
E2. Name the different ways to add JavaScript code to an HTML page?
In-line in an html event attribute, in-line using a <script> tag and external using a <script> tag with the
src attribute set.
M1. How would you redirect a user to another page using JavaScript?
document.location or window.location
M2. How would you pop up a Modal Dialogue box in a web page to display information?
alert(message);
M3. What does the acronym DOM stand for?
Document Object Model
H1. What code would you write to put a message in the browsers status bar?
window.status = message; return true;
H2. How do you find an element in a form within a web page in order to manipulate it?
document.getElementById(elementId)
H3. How do you implement image preloading?
Within a <script> tag write the following for each image you wish to preload:
var myImage = new Image();
myImage.src = path to the image;

Cascading Style Sheets (CSS) (Self Assessment: Section Total: Section Avg: )
E1. Which CSS property controls the text size?
font-size
E2. What are the different ways to include styles in a web page?
- Reference an external css file with <link rel=stylesheet type=text/css href=relative or absolute
path/myStyles.css />
- In-line using the <style> tag
- In-line using the style attribute within an element
M1. What styles can you use to show or hide part of your HTML page?
display: none|inline|block|etc; or visibility: visible|hidden|collapse; (the difference being that elements
hidden with visibility: hidden: still take up space on the page while display: none; does not).
M2. If you have 2 styles with the same class defined within your style-sheets, which one will take
precedence?
The last one defined.
H1. What are the 4 pseudo-classes or sub-classes of the Anchor (a) tag?
a:link, a:active, a:hover, a:visited
H2. What is the difference between using the dot(.) syntax and the pound(#) syntax to precede a name in
your CSS file?
The dot (.) syntax signifies a class and any element with its class attribute set to the classs name will
be matched. The pound (#) syntax signifies ID matching so any element whose id attribute is the same
as the #name will be matched.

You might also like