Categories
Coding

Unit Testing, should we bother?

I little while ago I had a discussion with a respected colleague who took a different view to me on unit tests. He proposed that writing tests at the unit level means more code to write and maintain, whereas testing functionality in bigger blocks yields the same benefits with less overhead, plus unit tests don’t […]

Categories
Coding Technology

.Net 9 Preview 7

I’ve been getting up close and personal with .Net 9 preview in the last couple of weeks. Preview 7 was launched on 13th August 2024, so I thought I’d ping out a quick & easy summary of what’s in it… (Useful links at the bottom of the page) Support for UUID version 7 New Guid.CreateVersion7() […]

Categories
Coding

Xamarin Android Date Picker

Flicking through Mastering Xamarin Forms by Ed Snider recently I noticed that the instructions for adding an Android date picker seem to be missing – the iOS ones are there. Ed does include the code for the Android version in his downloadable examples but they use the old, deprecated, Android.App Dialog Fragment and Fragment Manager […]

Categories
Coding

Bad Habits

Watched Kevlin Henney’s talk on ineffective programming habits last night. Interesting talk, engagingly presented. His call to not put the word ‘Exception’ at the end of exception classes raised an eyebrow. He was specifically talking about .Net & it flies in the face of Microsoft’s explicitly stated best practice (“and?” is his response to that […]

Categories
Coding

Maintainable vs Correct

Joe Eames recently put up a poll on Twitter asking whether developers thought the correctness of code was more important than maintainability. I voted for maintainability but many responders disagreed. Given the constraints of a 140 character tweet I thought I’d write a blog post to clarify my thinking… Right up front I should say […]

Categories
Coding

C# 9 init

I really like the looking of what’s coming in C# 9. My favourite features so far scratches an itch that previously just wouldn’t go away. When creating a class with readonly properties prior to C# 9 you had to write something like this… … which is fine in as far as it goes but you […]