One Performant Alternative of LINQ’s All Method

Recently, I came across the TrueForAll() method, which is a method of the System.Collections.Generic.List<T> class. To be honest, I hadn't used it before and I had not been interested in the difference between it and the.All() LINQ extension method. It turns out there are some big differences, so, as programmers, we can benefit from improving … Continue reading One Performant Alternative of LINQ’s All Method

Tiny tips: Git – Delete all local branches

This is one of the "Tiny tips" series.The purpose is to share little pieces of helpful practices and tricks that will make your work better and more pleasant.Take a look at the other tiny tips like Automate your environment, Use cheat sheets, Git merge without commit Perhaps most of you are working on a project where for … Continue reading Tiny tips: Git – Delete all local branches

The Frog, The Broken Window, And The Resistance

The Adaptivity There is a famous phrase from Albert Einstein which says that in this world survive not the strongest individuals, even not the smartest ones but those who are the most adaptive.And that is definitely true for most situations in life. Seriously, look at the cockroaches. They're so adaptive creatures and they can survive … Continue reading The Frog, The Broken Window, And The Resistance

Sheet music creation with JavaScript

I did this as part of my Master's Degree thesis. It is a pretty old and clumsy implementation (I admit it) and I should revise and re-write it with some modern JS framework, following the good practices and principles, etc. Nevertheless, my idea was to create a unified platform for every musician, where he/she can … Continue reading Sheet music creation with JavaScript

Depth First Search (DFS) in a Graph

Depth first search is an algorithm which searches or traverses all the vertices in a graph. It starts to traverse the graph based on a start vertex. The algorithm traverses the vertices in depth. As graphs can have cycles we should not visit any visited vertex twice. For this purpose the algorithm must know if … Continue reading Depth First Search (DFS) in a Graph

Breadth First Search (BFS) in a Graph

Breadth first search is an algorithm which searches or traverses all the vertices in a graph. It starts to traverse the graph based on a start vertex. The algorithm traverses the vertices from closest ones to farthest ones. As graphs can have cycles we should not visit any visited vertex twice. For this purpose the … Continue reading Breadth First Search (BFS) in a Graph

Gale–Shapley algorithm (Stable matching)

The algorithm we are going to explain is called Gale-Shapley algorithm after mathematical economist David Gale and Lloyd Shapley who described and analyzed in 1962. In this algorithm individuals are making choices that are all individually reasonable in order to come out with a globally acceptable solution also called stable matching. Let's clarify what stable … Continue reading Gale–Shapley algorithm (Stable matching)