RSS

Serial number control in WPF application with smart paste logic

Comments 3/26/2012 3:57:14 AM / Posted by Eugene Martynov in Software Development

Today I had a task to create serial number control in WPF application.

The requirements:

  1. There are five text box fields;
  2. Each text box should allow to enter only 4 symbols;
  3. The control should be smart when user copies the whole code to the first text box.

Tags: wpf , serial number control

Factory as Dependency Injection anti-pattern

Comments 3/24/2012 1:47:44 PM / Posted by Eugene Martynov in Software Development

The most common (erroneous) attempt to fix the evident problems from newing up DEPENDENCIES involves a factory of some sort. There are several options when it comes to factories, and I’ll quickly cover each of the following:

■ Concrete Factory
■ Abstract Factory
■ Static Factory

Tags: dependency injection , inversion of control , factory , patterns

Benefits of DI (Dependency Injection). Job interview tip.

Comments 3/18/2012 2:22:24 PM / Posted by Eugene Martynov in Software Development

DI helps by enabling loose coupling. Specifically, we gain the benefits listed in the table.

Tags: dependency injection , inversion of control , patterns , job interview

Passing Parameters (C#). Job interview tip.

Comments 2/5/2012 3:32:45 AM / Posted by Eugene Martynov in Software Development

In C#, arguments can be passed to parameters either by value or by reference. It seems to be quite simple and I want to review typical questions according the topic.

Tags: c# , job interview

Polymorphism (C#). Job interview tip.

Comments 2/4/2012 11:05:22 AM / Posted by Eugene Martynov in Software Development

I continue the series that explain typical questions on the coder's job interview.

Another primary concept of object-oriented programming is Polymorphism. It allows you to invoke derived class methods through a base class reference during run-time.

When a derived class inherits from a base class, it gains all the methods, fields, properties and events of the base class. To change the data and behavior of a base class, you have two choices: you can replace the base member with a new derived member, or you can override a virtual base member.

Tags: c# , job interview

Copyright © 2011 Eugene Martynov, CSS Templates by Inf Design