4 programming books available online - for free

No comments

Sunday, October 19, 2014

Software development books don’t come cheap and it’s fine. The author has spent countless hours and sleepless nights transferring his/her knowledge and should be compensated for it.
But some authors have decided to provide an online version of their book and in some cases even a free e-book you can download.
I found the book in the list below extremely useful and since I read them for free (legally free) I wanted to give something back in the form of a recommendation – so that both the author and and you might benefit from these good books.


Threading in C#

This is the only entry which is not a standalone book - It’s actually two chapters from C# in 4.0/5.0 in a nutshell book.
I’ve used (and still using) this book extensively both for learning new threading topics and as a reference. I found it to be easy to read and understand as well as extensive without being overwhelming.
It’s a must book for C# developers who need to write multi-threaded/task based/async code – which is about every C# developer out there.
Availability: Online, PDF

Introduction to Rx

Although not the newest book on the subject this book is still relevant. This book guide you step by step on the path of using Reactive Extensions (Rx).
For only a few dollars (or less) you can purchase a kindle edition of this book.
Availability: Online

Dive into Python

I’ve read this book when I’ve decided to learn IronPython a few years ago.
This book teaches by example - each chapter begins with a code example that shows an example of the chapter’s topic that is explained throughout  the chapter.
Availability: Online, PDF, Word and more.

Pro Git

If you never used a distributed source control before (you are using source control – right?) this is a good book to learn from.
It takes you step by step, not only explaining the various Git commands but also the concepts and overall picture of using a distributed system.
After reading a few chapters not only you’ll be able to set up Git and use it successfully but also gain a better understanding on why Git works this way and how to utilize it to benefit your project.
Availability: Online

That’s it for now - now go do some reading…

Upcoming conferences

1 comment

Thursday, October 16, 2014

As 2014 ends and the new year begins I have a few speaking opportunities planned right around the corner:



When: 3rd December 2014

I’ve enjoyed speaking at NDC London last year and I’m glad I was given a chance to speak at that great conference again. I’ll be speaking about unit testing concurrent and asynchronous code – the session to end all (read: some) excuses not to unit test.



When: 28th January 2015

I’ve been a long time speaker at the Agile Practitioners conference and this year I’m also a part of the organizing committee. I have a session planned “Designing with Tests”.



When: 18th-20th February 2015

I’m going to Canada to speak at ConFoo

I have two sessions planned – Who’s afraid of WinDbg?, and Unit testing patterns for concurrent code. This is my first time at ConFoo but I heard good things about this conference and I’m sure it would be fun to attend.


What a great way to start 2015 – three great conferences. If you happen to attend one (or more) of these conferences - drop by, say hello and let me know what you think about my talk.

Strongly typed localized strings in universal apps

No comments

Monday, October 13, 2014

Back in the old days when the need for localized string arose, I would add a new string and use AppResources to access the correct string in code.
In Windows Phone application (known today as Windows Phone Silverlight 8.0/8.1) I would do something like this:
public void SomeMethod()
    var localizedString1 = AppResources.MyFirstSring;
    var localizedString2 = AppResources.AnotherString;

In the new universal apps the story is a bit different:
  • Only strings are allowed in the resource files (which are .resw instead of .resx)
  • Using a directory for each supported language (i.e. Strings\en-US\)
  • Access to localized strings is string based
I can live with the first two (I actually prefer it that way) but I have huge problems with Stringly Typed API calls – it’s easy to get it wrong, and even worse a trivial rename can cause problems that would only show during application run.

Luckily a co-worker of mine has put together a T4 template that fixes this problem (thanks Noam):

<#@ template debug="false" hostspecific="true" language="C#" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Xml" #>
<#@ assembly name="System.Xml.Linq" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Xml.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ output extension=".cs" #>

<# string str = this.Host.ResolvePath("strings\\en-us\\Resources.resw");
    System.Xml.Linq.XElement resXml = System.Xml.Linq.XElement.Load(str); // Read a data file here. "%aaa%/string/en-us/Resources.resw"
   IEnumerable<XElement> appElement = (from dataElements in resXml.Descendants("data") select dataElements); #>

using Windows.ApplicationModel.Resources;

namespace UniversalApp
    public class StringsResourceManager
        private static readonly ResourceLoader _resourceLoader = new ResourceLoader();
        public StringsResourceManager()

<# foreach (var element in appElement) { #>  
        public static string <#= element.Attribute("name").Value.Replace(".","_")#>  
                return _resourceLoader.GetString("<#= element.Attribute("name").Value#>");
<# } #>

Using the class created from this template I can get from this:
public void SomeMethod()
    var resourceLoader = new ResourceLoader();

    var string1 = resourceLoader.GetString("MyFirstSring");
    var string2 = resourceLoader.GetString("AnotherString");

To this:
public void SomeMethod() 
    var string1 = StringsResourceManager.MyFirstSring; 
    var string2 = StringsResourceManager.AnotherString; 

Happy coding…
Related Posts Plugin for WordPress, Blogger...