µObjects: No Nulls

Maintainability By Refusing null Our goal as software developers is to produce code that can be easily maintained. This is frequently a challenge; as writing good code is hard. µObjects is a way of Object Oriented Programming that I've found gives us this. There are a number of ways that µObjects improve the maintainability of code and the elimination of null is what we'll look at today. µObjects strongly discourage [Read More]

µObjects - What the hell are they?

What is a µObject (micro-object)? It's a tiny object. Not a small object with a single responsibility - A µObject does one thing. Let me show with a simple example. If we have a method with a guard clause and then it does something; say Write "Hello World". class Sample{ void WriteNonEmptyString(string toWrite){ if(string.IsNullOrEmpty(toWrite)) return; Console.WriteLine(toWrite); } } This is a nice, concise method. Cyclomatic complexity [Read More]

HackerNews UWP - The Whole Item (almost)

In the last post we got the Title of the UWP app passing up the app. But it's not part of the app. There's no trigger for the app to LOAD the data. We have the mechanism; but where from? Today we'll get the data load triggered from the screen loading. This will involve actual network activity... so we'll see how we can bring in UI tests. Ui Test Project [Read More]

CodedUI Tests and Windows Hello in UWP

Using Visual Studio CodedUI Automated Tests for logging in via Windows Hello / Micrcosoft Passport! We're implementing the ability to use Windows Hello, or Microsoft Passport, to log into our app. The exact mechanism of how we handle credentials isn't important here. As the title suggests, this is about using the CodedUI tests for getting Automated Tests in place. We had a short struggle around getting the CodedUI / UIMap to recognize [Read More]

Yegor's Elegant Objects Posts

In Elegant Objects Vol 1 most chapters have an associated blog post. I've read the book and as clear by my review, I'm a big fan. A lot of co-workers and colleagues want to borrow one of my copies. To help give some insight into the contents of the book; I've compiled the links to the blog posts here. With this post, linking to all of Yegor's posts, it'll give [Read More]

UWP HackerNews - Displaying An Item

Since we're now able to TDD up the entire app; showing our wrapped control. Sounds like time to display a story title. I've re-worked the naming; not behavior; of the VBM pattern. It's now the Hotel UI Pattern. Same basic idea; but with a metaphor! Check out the new description of it for a little more detail/reasoning. A Title The Items have a title; we're gonna display a title! [Read More]

My Thoughts: Double Constructor for Dependency Injection

I know I'll have disagreement on this; and I'm happy about that. One of the mechanisms I use for... what I can only call "Dependency Injection" or "Inversion of Control"... is to have multiple constructors. In the ideal I just have a single constructor. This constructor takes all the arguments... or in the example below; an argument. class MyClass{ public MyClass(Thingy thingy){ ... } } This prevents MyClass from having to use [Read More]

UWP HackerNews: Network Items

I'm back to the UWP app after not too long of a break; and we really just need to get some things happening. I guess I'm more working to plan out the flow of the project. This is now fairly similar to a project for work I'll be helping lay the foundations of. I've got the idea behind the core network functionality. Honestly, for the next app; I'm going to [Read More]

Android HackerNews - Trying to get to a Story

I'm not sure where this post is going to go. I'm checking my pre-planned posts and ... there's none for the Android HackerNews Reader. This is kinda sad as I was enjoying being able to just sit down and start up on the project. Now I've gotta THINK... bleh... terrible. Anyway - Thinking about what I've done... and of course LOOKING AT THE CODE - I see that I've still gotta [Read More]

HackerNews UWP : Getting Some Data

When we last left our brave little app... And if it's trying to be on the windows platform; you know it's indeed brave - It had just configured it's network layer and is looking to expose it to the wider world! I spent a few hours staring at the black magic of Refit and found how it's creating the instantiated interface. And that it'd be a bit of a pain [Read More]