Succinctly series of free books for programmers

I have recently come across an intreresting project by Syncfusion, a company providing software components for the Microsoft platform.

<td width="200">
  <img src="//" width="120" height="160" />

  <img src="//" width="120" height="160" class="alignnone" />

The have created a series of books for programmes called the Succinctly series. The goal of the series is to create 50-100 pages ebooks covering various topics. Each book should give you an introduction to the topic inc a succint way, so you do not have to read thick books or spend time finding relevant blog post covering the selected topic.

All the 20 books covering topics like Data Structures, iOS, Windows Store apps, F#, Git, Gis, HTTP, JQuery, Knockout.js ann many more ale completely free and promise to stay free forever, including all the updates. They are all available in PDF and Kindle format.

[Read More]

Detecting encoding of uploaded file in ASP.NET MVC

Uploading a file in ASP.NET MVC is very easy, but there is no easy way to detect the encoding of a uploaded text file. However you can use the fact if you try to read the file with a wrong encoding, you get an DecoderFallbackException. So how do you put everything together?

First, get a stream of the uploaded file.

public ActionResult FromCSV(HttpPostedFileBase file)
    if (file != null && file.ContentLength > 0)
        var stream = file.InputStream;
[Read More]
Web  ASP  Csharp 

Generating all permutations of a list … how hard can that be?

While reading an article that had nothing in common with programming I came upon a sudden need to find a way to generate all the permutations of a list, or more exactly a string (it is just a list of characters). As lazy as I am I tried to google a few examples of C# code that does exactly that. I was horrified that programmers could come up with the complicated ways I found. Not to mention programmers writing a ton of unit test and classes before actualy writing the code that solves to problem.

The problem is naturally recursive. All the permutations of a list of n items consit of each of the n items combined with all the permutations of the list without the actual item. So if you have a list of let’s say items (a,b,c), all the permutations are (a+permutation((b,c)) + (b+permutations((a,c))) + (c+permutations((a,b)).

First I came up with F# code to solve it, after some yield googling:

[Read More]

AppHarbor: great place to start your .NET project

If you want to host your .NET project on the Internet, there are classic ASP.NET webhosting on one side of the spectrum and Microsoft Azure on the other. If you are looking for something in the middle, take a look at AppHarbor.


AppHarbor is a flexible and scalable .NET Platform-as-a-Service, that you can even use for free, limited to one web or worker role. It runs in AWS and is quite similiar to Heroku.

Variety of Add-ons

There are many add-on supported by AppHarbor, including SQL Server, MongoDB, RavenDB, MySQL, Memcacher … Many of these ad-ons offer free versions so you can test them for free. If you run into some problems, you can use the support forums or StackOverflow.

[Read More]
Web  Csharp 

Visual Studio Achievements: a bit of gamification to your programming

Gamification is a great concept that works really well for some people, including me. Gamification may very well be the reason for success of projects like StackOveflow or Duolingo.

Visual Studio Achievements

Visual Studio Achievements is Visual Studio plugin that rewards you for good practices like having 1000 localized values (Localization Master) and even for bad practices like writing a single line of 300 characters long (Scroll Bar Wizard). For some of the achievements you need to have FxCop installed, but the majority get awarded without the need for it.

You can find out interesting information about your programming, check out my profile.

[Read More]