Blockchain vs Tangle – Which One is the Future?

January 20, 2018

Altabel Group's Blog

The year of 2017 was memorable for the crypto craze. Nothing has changed from that times and still, there is a lot of excitement about cryptocurrencies today. Optimists believe that Bitcoin will fundamentally alter payments, economics and even politics around the world. The most optimistic supporters even started mortgaging their houses in order to buy Bitcoin. Pessimists claim Bitcoin is a bubble and inevitably will suffer a collapse. Whatever happens to Bitcoin, technologies underpinning cryptocurrencies will still be truly transformational structures, ones that could have an impact the way the Internet did 20 years ago.

Every cryptocurrency works under a certain technology. Which one is going to come out on top in the future? Will they coexist and function as completely different systems? To answer these questions it is necessary to go deeper into the subject. So, what exactly are Blockchain and Tangle?

Blockchain is cryptographically secured distributed data storage…

View original post 443 more words

SQL Server Performance Debugging Tips

February 27, 2016

ing Indexes current database by Index Advantage

Source: SQL Server Performance Debugging Tips

Understanding Polymorphism in OOP Languages: Abstract Classes vs. Interfaces

February 27, 2016

Found an awesome post in LinkedIn blog. It has been explained very well on this regard. Can’t control sharing to the followers: 🙂

Here you go…..and hope you would love reading!

Courtesy to : Jason Roell

C# 7 feature request #1… extension attributes

January 13, 2015

Jon Skeet's coding blog

Last week I learned that using static is going to be the syntax for importing static members (including extension methods) in C# 6. That fulfils a feature request I made in September 2005 (my fourth ever blog post, as it happens). With a feature request turnaround of 10 years, I figure I should get put everything I could ever want out there now… (Just kidding really – more seriously, I’m really pleased to see this change in C# 6, relative to both C# 5 and the earlier designs of C# 6.)

Last week at CodeMash, Dustin Campbell demonstrated one Roslyn DiagnosticAnalyzer for ArgumentNullException and friends, and I demonstrated one I’d written for the JetBrains InvokerParameterName attribute. (Dustin’s isn’t available online yet; I’ll edit this post when it is.) The two diagnostics check largely the same thing: some parameters are “special” in that the argument for them should be…

View original post 399 more words

Classroom phrases

January 11, 2015

How to Praise Your Students – Nice list of 100!

Zeboniso's Weblog

Ибораҳои синфї

Зебониссо Муродова
Муаллимаи забони англиси
Мактаби тахсилоти миёнаи умуми №1 шахри Сарбанд

Хеле хуб мешуд,ки сўҳбатҳои аввал (ибораҳои синфї) дар дарсҳо бо забони англисї мешуд, то ин,ки хонандагон бо ибораҳои англисї одат кунанд. Масалан, агар шумо ибораи let’s begin-ро истифода баред шарт нест,ки ин ибораро аз ёд кунад.Агар шумо ин ибораро дар аввали ҳар дарс истифода баред, он гоҳ хонадагон мазмуни онро мефаҳманд ва аз худ мекунанд. Баъдтар агар шумо калимаи begin-ро шинос кунед хонадагон аллакай медонанд, кай дар куљо ин калимаро истифода бурдан даркор.
Ба хонадагон ибораҳои синфиро мувофиқи қобилияти синну сол омўзонидан даркор.Мо метавонем дар рўзномаи деворї ибораҳои синфиро (Classroom expression) яъне ( Hello, Good morning, How are you May I come in? May I read? May I come to the blackboard? I am ready for the lesson. ) бо забони англисї нависем ва ба девор овезонем, то ин ки ҳамаи хонадагон бо он шинос шаванд…

View original post 1,504 more words

NHibernate 3.0+ rounding a decimal data to 5 decimal places

March 14, 2014

Note: Precision is the number of digits in a number. Scale is the number of digits to the right of the decimal point in a number. For example, the number 123.45 has a precision of 5 and a scale of 2.

Problem: One of our team member was trying to to insert data into a SQL Server database from an application that is using NHibernate ver. 3.1. The format for a decimal datatype value is being forced to decimal(16,5) always, regardless of the SCALE defined for the column (ex: DECIMAL_VALUE1 decimal(16,6) in the SQL Server table. This results in decmial values being truncated before being written to the SQL Server database.

Here is the sample sql profiler trace:

exec sp_executesql N’INSERT INTO TEST_TABLE( DECIMAL_VALUE1, DECIMAL_VALUE2, LONG_VALUE1) VALUES (@p0, @p1, @p2); select SCOPE_IDENTITY()’ , N’@p0 decimal(16,5),@p1 decimal(16,5),@p2 bigint’, @p0 = 9.94434, @p1 = 9.94434, @p2 = 5583

Hence, the gotcha is that NHibernate by default sets the SCALE to “5”, if we haven’t told any SCALE in entity mapping class for the particular property.

The reason behind: [NH-1594] – When setting property in hbm type=”Decimal(precision, scale)” – “DECIMAL(19,5)” is always generated Ref:

Solution: Enforcing scale to “6” in the fluent mapping or .hbm like below, it works great.

Map(x => x.DECIMAL_VALUE1).Scale(6);

<property name=”DECIMAL_VALUE1″ scale=”6″ />

Happy coding!

.NET GAC (Global Assembly Cache) folder location

March 6, 2014

Hope, some of you still think that the default GAC folder is c:\windows\assembly [%windir%\assembly] as such. But there is a BIG “NO”.

Yes, starting with the .NET Framework 4, the default location for the global assembly cache has been changed.


In .NET Framework 4.0, the GAC went through a few changes. The GAC was split into two, one for each CLR. The CLR version used for both .NET Framework 2.0 and .NET Framework 3.5 is CLR 2.0. There was no need in the previous two framework releases to split GAC. The problem of breaking older applications in Net Framework 4.0.

To avoid issues between CLR 2.0 and CLR 4.0, the GAC is now split into private GAC’s for each runtime. The main change is that CLR v2.0 applications now cannot see CLR v4.0 assemblies in the GAC.

.NET 2.0 GAC:

  • c:\windows\assembly – Non-native 32bit and 64bit assemblies.

.NET 4.0 GAC, below are the folders.

  • c:\windows\Microsoft.NET\assembly\GAC_32 – Non-native 32bit assemblies.
  • c:\windows\Microsoft.NET\assembly\GAC_64 – Non-native 64bit assemblies visible only on 64bit Windows.
  • c:\windows\Microsoft.NET\assembly\GAC_MSIL – Non-native MSIL (AnyCPU – 32bit & 64bit) assemblies.


While trying to load assemblies from the GAC, the CLR first looks at the GAC specific to the platform. If it is unable to find the same, it then moves to the GAC_MSIL.

Happy reading! 🙂


Navigate to the .NET Framework source online from VS.NET IDE!

February 26, 2014

Most of you knew that Microsoft recently launched a browsable version of the .Net reference source code at

This would help great and get us the insight over how all of the .NET code has been written. For example,
if you would want to see how String.IsNullOrEmpty() and String.IsNullOrWhiteSpace() has been implemented, here you go.

public static bool IsNullOrEmpty(String value) {
return (value == null || value.Length == 0);

public static bool IsNullOrWhiteSpace(String value) {
if (value == null) return true;

for(int i = 0; i < value.Length; i++) {
if(!Char.IsWhiteSpace(value[i])) return false;

return true;

Interesting, right!

Reference: Have a look @ Scott Hanselman's blog:

Below is the code excerpt from Scott Hanselman’s blog:
BONUS: Community Visual Studio Extension for navigating into the online .NET Framework source from VS.NET IDE.

Here’s an exciting bonus. Community member and fabulous coder Schabse Laks has created a Visual Studio extension for VS2010, 2012, and 2013! This extension sends calls to Go To Definition (or pressing F12 on a symbol) directly to the code online (when it’s .NET Framework code, not yours).

You can download this companion “Ref12” Visual Studio Extension now! Just Goto Definition on any .NET type we have source for and it’ll launch your default browser so you can explore the .NET Framework source yourself! Thanks Schabse!

Enjoy exploring!

Static vs. Singleton Classes – FAQ

February 22, 2014

Just I had gone through an articles over about Static vs. Singleton Classes and related FAQ.Thought of sharing to the wordpress community.

The below excerpt is taken from the link :


Question: Why can’t we use a static class instead of singleton?

  • One of the key advantages of singleton over static class is that it can implement interfaces and extend classes while the static class cannot (it can extend classes, but it does not inherit their instance members). If we consider a static class it can only be a nested static class as top level class cannot be a static class. Static means that it belongs to a class it is in and not to any instance. So it cannot be a top level class.
  • Another difference is that static class will have all its member as static only unlike Singleton.
  • Another advantage of Singleton is that it can be lazily loaded whereas static will be initialized whenever it is first loaded.
  • Singleton object stores in Heap but, static object stores in stack.
  • We can clone the object of Singleton but, we can not clone the static class object.
  • Singleton can use the Object Oriented feature of polymorphism but static class cannot.

Question: Can the singleton class be subclassed?
Answer: Frankly speaking singleton is just a design pattern and it can be subclassed. However it is worth to understand the logic or requirement behind subclassing a singleton class as the child class might not inherit the singleton pattern objective by extending the Singleton class. However the subclassing can be prevented by using the final keyword in the class declaration.

Question: Can there be multiple instance of singleton using cloning?
Answer: That was a good catch! What do we do now? To prevent the another instance to be created of the singleton instance we can throw exception from inside the clone() method.

Question: What is the impact if we are creating another instance of singleton using serialization and deserialization?
Answer: When we serialize a class and deserialize it then it creates another instance of the singleton class. Basically as many times as you deserialize the singleton instance it will create multiple instance. Well in this case the best way is to make the singleton as enum. In that way the underlying Java implementation takes care of all the details. If this is not possible then we will need to override the readobject() method to return the same singleton instance.

Question: Which other pattern works with Singleton?
Answer:There are several other pattern like Factory method, builder and prototype pattern which uses Singleton pattern during the implementation.

Question: Which classes in JDK uses singleton pattern?
Answer: java.lang.Runtime : In every Java application there is only one Runtime instance that allows the application to interface with the environment it is running. The getRuntime is equivalent to the getInstance() method of the singleton class.

Enjoy reading.

Courtesy: Mainak Goswami

NHibernate Vs Entity Framework 6.0 – A Comparison

December 3, 2013

Here is a nice comparison table for NHibernate and Entity framework 6.0. This is the result of my searching and reading, to get to know over the evolution of Entity Framework (the latest is V6.0). Enjoy reading!



EF 1.0 to EF 6.0

Current version


V 6.0

Year released

 Hibernate (JAVA) 2001/ NHibernate (.NET) 2005



.NET 1.1 and above/Mono

.NET Framework 3.5 SP1 and above

Open source


Yes from 6.0


Both supports 1 to 1, 1 to many, and many to many

Both supports  1 to 1, 1 to many, and many to many

Rich domain models



Ordered and unordered sets collection. Indexed options. It even has an immutable, indexed list



Mapping private fields (yet) or can you directly use a dictionary class



Collection supports

IDictionary<T,T>  IEnumerable<T>


Supporting ENUM


Yes from 6.0

Vendor support /Providers:

SQL Server/Azure, SQLite, PostgreSQL, Oracle, Sybase, Firebird and DB2

All the DB providers are built-in

SQL Server or SQL Azure,

Code first


From EF 5.0

Code-based mapping

NHinernate 3.2 with Fluent-NHibernate

From EF 6.0

Supporting custom types and collections



Query flexibility

HQL/QueryOver/Criteria API/Native Vendor specific SQL (3.2 with the above & lot more)

LINQ/Entity SQL/Native SQL/Commercial  provider for ORACLE


Uses Listeners/Configuration properties

ServiceLocator pattern

Async/await support


EF 6

Built-in support for automatically reconnecting to the database



.NET 4.5 support


Yes (with improved performance)

Batch processing

With “Future”


Creating a DBContext with an existing open connection



Spatial support

Need 3rd party



Poor, but can get lot of support over forum



Support second-level caching

Yes from EF6


“NHibernate has a very rich event model, that exposes more than 20 events, either for synchronous pre-execution or asynchronous post-execution”.

Entity Framework only has two event-based extension points: ObjectMaterialized and SavingChanges

Tracking Changes


While both default to change tracking at the unit of work level, Entity Framework also offers self-tracking entities.

Able to map SQL views



Querying SSAS OLAP cubes



Interception of queries/object creation



API Methods

Save, Update, SaveOrUpdate, SaveOrUpdateCopy, Replicate and Merge,


Lazy loading behavior

One an relationship by relationship basis

For the entire context