Upgrade of the website license

The license for this website has been upgraded to Creative Commons CC-BY-ND 4.0 International. The copyright notice has been updated in Legal information.


GitHub repositories creation

Repositories for current projects were created on GitHub:
github.com/ordisoftware


Google Quantum Computing Playground

A quantum computer emulator:
www.quantumplayground.net

 


About Net Neutrality

Net neutrality is a broad subject open to debate, but an important step has been made in this area at the legal level as in France because the United States officially come to recognize the Internet as a neutral public service and providers do not have the right to discriminate, oppress or block the access and the flow without a court order.

Like any legislation, this is the theoretical part that remains to apply to all without exception, professionals as individuals and suppliers as users.

Indeed, despite its shortcomings, Internet allows to save lives and it is therefore an important technology because it helps to protect people and their health, and therefore the implementation of the Universal Declaration of Human Rights and the Constitution, and regardless of the lies that are peddled on it, this is an inevitable means of manifestation of knowledge and truth.

 


New version of the website

Update of the description of services:

 


Are interfaces evil or misused?

There are several considerations and practices concerning interfaces

Some developers say that interfaces can be used as a replacement of multiple inheritance mechanisms, which cause complexity and ambiguity. But each feature must be implemented each time it is declared: this is not an inheritance, this is a wrapper to the description of a part of a group of classes, like IDisposable. It is the same as a multiple inheritance with one implemented class and some abstract classes: it is a particular case which allows only one way hierarchy with interfaces as abstract connectors that describes services.

Some developers say that interfaces can be used to separate the access to an object of this instance. Historically, interfaces are a COM & DCOM heritage: they are used to manipulate components services, whatever objects are, where they are, and how they are implemented. Interfaces are not a replacement to multiple inheritance, they are something else.

Recommended articles:
A plea for full multiple inheritance support in .NET
A Typed Intermediate Language for Compiling Multiple Inheritance

Continue reading »


Design flaws of the singleton pattern

The paradigm

Consider this common singleton pattern implementation:

public class Singleton
{
static private readonly object locker = new object();

static public Singleton Instance
{
get
{
lock ( locker )
{
if ( _Instance == null ) _Instance = new Singleton();
return _Instance;
}
}
}
static private volatile Singleton _Instance;

private Singleton() { }
}

The problem is that you can inherit this class and create a public constructor if there is no private constructor. Furthermore, static members are allowed. This is no longer a singleton at all. Setting the class as sealed can be an acceptable solution, but you must implement singleton by singleton, i.e., more than ten lines. Thus, coding a such singleton can be the source of many errors and difficulties. Thinking with factoring is not only an agile principle, it is a mathematical theorem.

Defining a generic singleton

A generic solution is to check the absence of static members and that there is only one parameterless private constructor, or an exception is thrown. Singletons that inherit this class can't be inherited and must be sealed. Moreover, the implementation of singleton types are checked at program startup. Therefore, it is not the best solution, but the only thing to do is to create one parameterless private constructor, no static members, and seal the class.

  Generic Persistent Singleton Sample

Size: 53.4 KiB
Upload: 28 July 2009
Update: 8 September 2015
Last download: 19 April 2024
Total downloads: 571

Continue reading »


Work in progress

The Ordisoftware™ project started in January 2004.