Microsoft Security Essentials

by Rick 13. January 2012 11:11

Back in the Windows XP x64 days there was only one compatible virus scanning option, Avast.  I've been a loyal Avast user ever since.  Recently, however, they've been making it harder to locate the free version on their website and are regularly inundating users, of the free version, with upgrade prompts for the professional, paid, version.  Think about it, the other for profit virus solutions, too, have to, regularly, come up with ways to generate money from their customer base, usually in the form of a subscriptions.

Up until a couple months ago I would have redirected users looking for a free option over to Avast.  I recently, however, stumbled upon Microsoft Security Solutions. an unobtrusive, easty to use, completely free security solution.  Microsoft earns its money elsewhere and has no need to try to regularly convince the end user to upgrade to a "professional" version.  It is primarly because of this unobtrusiveness that I have switched my recommendation.  Check it out.

Tags: , ,

Systems | Security

.Net Developer Interview Questions

by Rick 6. September 2011 18:40

Incase you end up with one of those interviewers that actually thinks a vocabulary quiz is a good representation of programming ability.

Object Oriented Programming

What are the three pillars of object oriented programming?

This question can be asked in any number of ways.  I've received this question as generically as, "What can you tell me about object oriented programming?"  Basically what the interviewer is looking for is a list of the three following terms and their definitions.

  • Encapsulation means that a group of related properties, methods, and other members are treated as a single unit or object
  • Inheritance describes the ability to create new classes based on an existing class
  • Polymorphism means that you can have multiple classes that can be used interchangeably, even though each class implements properties or methods in different ways

What is a virtual funtion?

In object-oriented programming, a virtual function or virtual method is a function or method whose behaviour can be overridden within an inheriting class by a function with the same signature.

Are you familiar with any design patterns?

What is the difference between a class and an object?

An object is an instance of a class.  Classes contain definitions of properties and functions.  Objects use these properties and functions.  Classes do not hold any information, while objects do.


List the page lifecycle events, preferrably in order.

This is a pretty standard question and it's also part of the MCTS test as well.  I'm not going to go into any detail here, just following the link in the question for more detail.

What is view state?

View state is the method that the ASP.NET page framework uses to preserve page and control values between round trips. When the HTML markup for the page is rendered, the current state of the page and values that must be retained during postback are serialized into base64-encoded strings. This information is then put into the view state hidden field or fields.

What are some potential issues with view state?

The ASP.NET view state imposes two performance hits whenever an ASP.NET Web page is requested.

  • Serialization and deserialization of view state occurs on all page requests.
  • The __VIEWSTATE hidden form field adds extra size to the Web page that the client must download.

What is session state?

What is application state?


List and define the access modifiers.

  • public
    • Public access is the most permissive access level. There are no restrictions on accessing public member.
  • protected
    • A protected member is accessible within its class and by derived class instances.
  • internal
    • Internal types or members are accessible only within files in the same assembly.
  • private
    • Private access is the least permissive access level. Private members are accessible only within the body of the class or the struct in which they are declared.

List the three ways a question mark, '?', can be used in C#.

Which keyword prevents a class from being inherited?

When applied to a class, the sealed modifier prevents other classes from inheriting from it.

What is an abstract class?

Use the abstract modifier in a class declaration to indicate that a class is intended only to be a base class of other classes. Members marked as abstract, or included in an abstract class, must be implemented by classes that derive from the abstract class.

How many base classes can a class in C# inherit?

A derived class can have only one direct base class. However, inheritance is transitive. If ClassC is derived from ClassB, and ClassB is derived from ClassA, ClassC inherits the members declared in ClassB and ClassA.

Additionally, a class may implement more than one interface.

What are generics?

Generics introduce to the .NET Framework the concept of type parameters, which make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code.

For example...

var fakeList = new List<int>();

The data type "int" in the above example is a generic.

What is a delegate?

Delegates are used to pass methods as arguments to other methods.

What is a static class or property?

A static member of the class is a property, procedure, or field that is shared by all instances of a class.

When/why would you use an abstract class or an interface?

An abstract class defines characteristics of an object type, specifying what an object is.  An Interface defines capability, establishing a contract of what an object can do.


What is the difference between the TRUNCATE and DELETE keywords?

TRUNCATE removes all rows from a table without logging the individual row deletions.  TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.

What are the differences among the various joins?

How is GROUP BY used?

What is the difference between HAVING and WHERE?

HAVING is kind of like a WHERE clause for GROUP BY statements.

Which is more efficient, inline sql or a stored procedure, and why?



.Net | C# | LINQ | Interview Questions | JavaScript | jQuery | SQL Server | T-SQL

Extending JavaScript Strings with LINQ Style Contains Method

by Rick 24. August 2011 12:10

Similar to my previous post about extending JavaScrpt arrays to include a shuffle method... Any JavaScript object can be extended using the prototype object.  The following line of code deomonstrates how to extend JavaScript string objects to include a LINQ style contains method.  The function will return true if the string contains the input, or false, if it does not.

String.prototype.contains = function(input) {
     return ~this.indexOf(input)

var rickLeitch = "Rick Leitch";

if(rickLeitch.contains("ck Le")) {
     // Do Stuff

Tags: , , , , ,

LINQ | JavaScript

Randomly Shuffle a JavaScript Array

by Rick 19. August 2011 14:05

For one reason or another, I needed to randomly shuffle an array in JavaScript.  Using the prototype object, one is able to add custom properties and methods to all instances of native, and custom, objects.  The code below extends the Array object to include a shuffle function and demonstrates its usage.

Array.prototype.shuffle = function () {
     var tmp = [];
     while (this.length)
          tmp.push(this.splice(Math.random() * this.length, 1));
     while (tmp.length)
     return this;

var array1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
var array2 = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19];


I've encountered at least one knee jerk reaction that suggests... "DON'T MODIFY OBJECTS YOU DON'T OWN!?!"  I tend to take advice like that with a grain of salt.

Tags: , , , , , ,


Search Tables for Column Name

by Rick 12. August 2011 07:53
Depending on the level of convolutedness, one may, hopefully rarely, be required to search for all tables containing a particular column name.  I found myself in this situation today.  Refer to below T-SQL.
FROM		sys.sysobjects AS so WITH(NOLOCK) INNER JOIN
			sys.syscolumns AS sc WITH(NOLOCK) ON =
WHERE		(so.xtype = 'U') AND ( = N'Column_Name')


SQL Server | T-SQL