Simple egg timer on Linux for Pomodoro technique

Recently I have started evaluating the Pomodoro Technique which I found quite interesting. I am still evaluating the technique and not yet concluded on whether I should continue using it. To implement pomodoro technique, you need a kitchen timer or egg timer. Since I use pomodoro for my programming work, I obviously don’t want to use a physical timer. I couldn’t find a decent timer for linux especially one that works well with Xfce. Read On →

Circular linked list – An implementation using C#

In this post, I will explain about creating a circular doubly linked list using C#. .NET framework provides a doubly linked list implementation in System.Collections.Generic.LinkedList class . But this class is not providing the behavior of a circular linked list and it is very tough to extend for supporting circular linked list requirements. In a normal doubly linked list, each node will have a link to its previous and next nodes. Read On →

What Great .NET Developers Ought To Know (More .NET Interview Questions and Answers) – Part1

In this series of posts, I will try to answer the questions posted by Scott Hanselman here. This part we will be seeing the first set of questions he has given under Everyone who writes code heading. Q) Describe the difference between a Thread and a Process? A Thread is a small unit of code in execution. A process is an instance of program which will have multiple threads running. A process can host multiple threads. Read On →

ADO.NET best practices – Reading data from data reader

I have seen many people using DataReader incorrectly. In this post, I will try to explain some good practices that can be followed when reading from a data reader. Consider the following problematic code, SqlDataReader reader = /* ... */; while (reader.Read()) { string userName = reader["user_name"].ToString(); int age = int.Parse( reader["age"].ToString() ); /* ... */ } reader.Close(); How many problems can you figure out from the above code? Read On →