Version Tolerant Binary Serialization With Microsoft Bond In C#

You’ve been there too. A month ago you wrapped up your first release. You were happy and went for a beer with your workmates. The next month things didn’t go so well. As you start integration testing again, you realize something has gone wrong. You dig down, and discover your app had serialized some useful data to disk not so long ago. Yet, as the new version does its thing, it crashes with a vengeance, when it tries to get that data back from the same place. As you sigh, and realize there won’t be any beer that night, you notice that those serialized bits of data have changed schema between deployments. You think – I do want the app to re-use that data without breaking… So how on Earth do I get around this?

Continue reading Version Tolerant Binary Serialization With Microsoft Bond In C#

How To Distribute Items Into Buckets In C#

The Partition Problem is a very old conundrum in Computer Science. The usual question goes: given some buckets of some capacity, and some items of some size, how can I distribute the items by the buckets in an optimal manner?

The answer to this is more complex than it seems at first glance, as it depends on what you mean by some buckets and optimal.

Continue reading How To Distribute Items Into Buckets In C#

Unit Testing, Code Coverage & Linting: Power BI Custom Visual Development Fundamentals #20

This video explains how to set up Unit Testing, Code Coverage and Linting on your Power BI Custom Visual.
This video is part of a series, please check the playlist below for the set.

Continue reading Unit Testing, Code Coverage & Linting: Power BI Custom Visual Development Fundamentals #20

What Is A NullReferenceException And How Do I Fix It?

TLDR;

You get a NullReferenceException when your code is trying to use a null variable. You’re either calling a method on that variable or accessing a property or something else.

The problem is that there’s nothing to call upon to begin with. Either you have never assigned anything to that variable or you have set it to null yourself before trying to use it. Or some external code is returning a null to you, which you are not validating before you using it.

There are many reasons for this exception to pop up…

Continue reading What Is A NullReferenceException And How Do I Fix It?