Well Christmas, that traditional time for giving has just gone past. However the TechieSimon blog has nothing to give, apart from strange blog posts. So I thought I’d be cheeky instead. To somewhat belatedly celebrate the time of giving I’m going to do some (metaphorical) asking: For the next few blog posts I’ll talk about some of the things that I’d love Microsoft to add to the C# Language.
My first wish is for a nullable dot operator. Continue reading “The Nullable Dot (Post-Xmas C# Wishes, Part 1)”
In my very first TechieSimon article, I went on about how great Open XML was. Today I’m going to prove it – by showing how a month ago, I was able to use Open XML to make an edit to a PowerPoint document that I couldn’t easily do in PowerPoint. Continue reading “Open XML – 1, PowerPoint UI – 0”
While I was writing the Maths for Programmers course, I was constructing some examples to illustrate overflow and noticed a strange pattern. I was working with the number 255, which is the biggest number that can be stored in an unsigned byte, and is represented in binary by 1111 1111. The idea was to use the unsigned byte data type and show the results of calculating 255 + 255 and 255 * 255 – both of those will cause an overflow.
Now 255 + 255 gives 510. And 255 * 255 gives 65,025. Look at what these numbers look like in binary. Continue reading “A Strange Binary Pattern”
Last time I asked you what the output would be from this code….
double zero = 0;
double minus = -1.0e-400;
double big = 1.0 / zero;
double minusBig = 1.0 / minus;
Console.WriteLine(zero == minus);
Console.WriteLine(big == minusBig);
catch (Exception ex)
Continue reading “Zero Equals What???”
Yay! My Pluralsight course on Math for Programmers has just been published.
To quote Pluralsight’s write up on their blog…
Continue reading “Math for Programmers Published!”
A short filler article this week, to show off a photo I took last summer of the train departure screens at Canning Town station in London.
Continue reading “Showing the Commuter Your Errors”
When I was at university our very forward thinking lecturer (Dr Bacon as I remember) introduced us to the most amazing up-to-date programming environment: C on UNIX. Storing an item in a collection meant declaring an array, or if you are really being adventurous, using malloc to dynamically allocate memory. That was it. Back then it was practically state of the art. As well as making for the kind of excellent training that you curse at the time but realize 10 years later you should be eternally thankful for having been made to do it.
What a difference from today when the .NET Framework comes with so many collection classes out of the box that Continue reading “The Two Types of Collection”
When my partner (not a programmer) first saw the Windows 8 Start Screen, with all the big flashy icons, supposedly replacing the old Start Menu, her reaction was ‘wow cool!’ She was somewhat less amused 10 minutes later at the discovery that there was no convenient start button to click, and definitely irritated when she discovered how hard it had become to shut the computer down. She no longer uses Windows 8.
Continue reading “The Windows 8 Start Screen: Is It Really Evil?”
If you wrote a class that had more than one responsibility, chances are that your colleagues would be pouncing on it in your next code review, eagerly pointing out what a terrible programmer you are because you’ve broken the single responsibility principle. So if single responsibility is great for classes, why do we so happily accept apps and services that have more than one responsibility? Continue reading “Single Responsibility Apps”
Last time we had a look at how Microsoft reinvented
the wheel the Visual Studio UI into a colourless ‘metro’ version. This time I’m going to look at some lessons we can learn from the story.
The first lesson is: Know the limits of a good idea. Continue reading “Visual Studio Monochrome – Part 2”