Archive for the ‘.NET’ Category

Benchmarking numeric base conversion in C#, Java and Scala

A few days ago, I needed to encode numeric identifiers in a short and url-safe format. Something similar to what url shorteners use (e.g. jcsSXP in Encoding the ids in base 64 would work if an alternative alphabet is provided for the non url-safe symbols. But since I wanted to have only alpha-numeric characters, I chose […]

Binary Heap, Heap Sort and Priority Queue

In this post I share another code Kata : an implementation of a binary heap. Once we have the heap implemented, we will easily deduce a heap sort and a priority queue based on it. It takes about 100 lines of C# code.

Recursive and Iterative Merge Sort Implementations

I find merge sort elegant and easy to implement and to understand for both iterative and recursive approaches. In this post I’ll share a quick (and probably dirty) iterative and recursive implementations of merge sort. Both versions share exactly the same merge operation. The implementation takes less than 30 lines of C#.

Chirper: twitter clone WebApp with .NET front-end and Cassandra NoSql back-end

Chirper is the first open-source non trivial web application example with .NET/NoSql integration. Chirper implements a simple twitter clone that, unlike twitter :P, uses Cassandra as its only database. It would’ve been probably cooler to code Chirper it in Ruby or in Python but, unfortunately, this is already done. Chirper’s front-end is written in C# / […]

I see Deadlocks everywhere!

The free lunch is over and we definitely have to scale by adding more and more cores. Wether we like it or not, we’ll be coding and debugging multi-threaded applications in the near future. The bad news is multi-threading is hard to deal with. Really hard. What is surprising is that even some thick reference books […]