Problem statement — Before operating on any collection, we check if the collection is null or empty. Null check is usually done by comparing with Null value.

Solution — To check if the collection is not empty, there are multiple ways. The most common way is to check if collection count > 0. Another way is to check if the collection has at least one element by checking Collection.Any() which returns true when it finds first element.

Analysis —

Consider ‘integers’ is collection of integer numbers, if I need to check if it is empty or not, our first method…

This is 2nd part of ‘C# 7.0 Features — let’s explore’ article. You have missed the previous one, I would recommend reading that one first.

5. Passing method result as ‘ref’

Have you ever thought you can get function-result as ‘reference’?

Consider, you have an array of integer numbers. You want to replace a number from an array but without knowing the position of replacement. How can we do that without using the in-built method? To replace a number, I should know its position or you must tell me the address location of that element so that I can change…

Although C# 7.0 was released in March 2017, there were many features of this version I was unaware of. After amazing experience with C# 6.0, I was waiting to explore C# 7.0 features as well. However, I was also waiting to get at least one problem statement to switch to C# 7.0. Fortunately, I came across such issue and I decided to explore the efficient way to handle that.

The problem was the API I was using required 3 ‘out’ parameters and every time I had to access that API method, I had to first declare 3 variables above the…

  • Requirements Engineering — BDD Example Mapping

In one of our retrospective meeting two months back, we were looking at RQ statistics of our freshly delivered stories. There was a chart showing in which phase we discovered the bugs.

Bug report by phase

The chart was impressive as we caught big chunk of bugs before delivery(after feature testing) and there were very few bugs that we received from system test team. However, there was one entry that caught our attention — Requirement bugs. There were quite a few.

What does that mean? We started the discussion. The story was not correctly described? The acceptance criteria…

Since there are hundreds of articles available over the internet, I need to mention the reason of writing something on same topic. We know Garbage collection mechanism, we know IDisposable and we know using keyword. So lets answer few questions before we start reading the article

  1. If there is an exception thrown from code in Using block, does the object still get disposed?
  2. If destructor can take care of disposing un-managed objects, why do we need Dispose method?
  3. Can I use ‘Using’ block on any class or is there any pre-requisite?

If you want to find answers to these questions…

A year before, we used to follow usual Agile process of backlog refinement and planning. The PO used to refine the story with team, team used to raise queries to get further understanding and the story is ready to pull for next sprint.

Now, we have a special entry in our Definition of Ready (DoR) — The IPSoVI of the story is performed. Why so? What is IPSoVI? How we are benefited by this technique?

What is IPSoVI?

To understand this technique thoroughly, go through the free Udemy course — Software testing using Innovation techniques.

I — Idea

P —…

Unit testing is testing the behavior of single unit (e.g. class). It helps to detect class level issues early. It also serves as first level of regression when other developers are modifying the code.

The simplest example can be implementing the Add() method in calculator and testing the output for different inputs.

Add feature in Calculator

If we write few simple unit tests for this function, those can be

There are hundreds of articles online on this topic. Then why am I writing one? The motive behind writing on this topic is the answers I receive when I ask the questions on events and delegates.

I conduct interviews of C# developers having 3–7 years of experience. After initial discussion, the first C# question I ask is ‘what are events’?

The interview questions flow like this-

  1. What is delegate? — Correct answer
  2. What is event? — Average answer
  3. Are they related? Yes. How? — No answer/Average answer
  4. Tricky question — Can we do same operation as event through delegate? …

When we see audition episodes of music/dance reality shows, they first show entry of thousands of participants and then compilation of selected performances. Do you really think these celebrity judges audition thousands of performers in two days? Not really. There are almost 3–5 rounds before the final round with celebrity judges. There are different judges for first few rounds. These judges are called ‘proxy-judges’ and this pattern is called ‘proxy’ pattern.

What problem they solved?

  • ‘Scrutiny of valid performances to save celebrity judges’ time’ as they are expensive and they charge by hour.
  • Judging so many performances in limited time…

When we wanted to plug in an electronic device have three pin plug, we looked for a switch with three pins. However, the place we were at, there were all two pin switches. Now, we could not really get rid of third pin in our device. So we decided to buy an accessory that would allow us to plug three pin device to two pin switch. That accessory is called ‘Three pin adapter’. How it solved our problem? It was having two pin connector at one end and three pin switch at other end. …

Dipak Gawade

Software geek, blogger. Passionate about learning new concepts and share knowledge.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store