RabbitMq - First Hops

Get it, "Hops", 'cause "Rabbit". They "hop". HAH! ... I've started writing some code to explore an idea I've had bubbling around for... I think close to two years now. It's undergone a number of iterations, and discussions with a few people. It's finally reached a point I can start exploring the idea with code, seeing how it wants to be built. I say wants, much like other posts where I [Read More]

The Hotel Pattern

Welcome to the Hotel! The Hotel pattern is a UI pattern I've started using based off a few things. A big one is my disdain of existing UI pattern and the poor Object Oriented Design patterns they encourage and fascilitate. Another is the focus on software craftsmanship and XP practices. My XP practice includes Extreme Encapsulation. Many existing UI patterns are testable but they violate best practices and Object Oriented [Read More]

My Thoughts: Slow Tests are Bad Tests

My tests are slow! They were slow anyway... Part of the Ruthless Refactoring I've been doing while working on the HackerNews App has been to improve the performance of the unit tests. I easily shaved off a second from the tests during the "Clean Architecture" update. It ended up exposing (or more removing) a background thread action I had to wait on. It was a mocked network call, so took [Read More]

HackerNews - Windows Phone App

Following the example of the VBM on Android series; I'm going to develop a HackerNews Reader for the Windows phone/UWP. This should be interesting as I've never done a UWP app before. This will be my first foray into it! SO EXCITED!!! Getting Started Visual Studio 2017 is fresh; Jetbrains Resharper Ultimate is installed - Now I can work. Let's go through the entire flow - Mostly 'cause I [Read More]

My Thoughts: Spike to Refactor

When you're stuck on how to do TDD for a refactor; and can't find the test to drive the refactor you'd like to see; a spike can often help. What I've done are a spike w/o tests to figure out a solution and then figure out the tests required to drive the code to that solution. I did this recently with the Android HackerNews App. During the Clean Architecture [Read More]

JWT Token Validation in C#

(and not doing it wrong) A blog post directly tied to something I'm doing at work - Like researching something FOR WORK!!! Not just related to, or ancillary to; but actual research for actual work. Crazy, I know. The basic premise is that we're doing OAuth for our mobile app; which the server endpoints need to validate the token. The server is not the authenticating server. We'll need to share [Read More]

Android HackerNews App : Refactor to Clean Architecture

A philosophy I like and have made a(n unknowingly) passive effort to implement before is called "Clean Architecture". It's the idea of an application having dependencies that flow "outward". Go read The Clean Architecture by Uncle Bob; for the full picture. A simple way to state this is, "No Circular Dependencies". If A depends on B; B and nothing B depends on can have a dependency on A. It [Read More]

HackerNews Android - Let's not crash

As discovered in our last session - Opening a lot of connections breaks things. The creation of the OkHttpClient is done in HackerNewsNetwork#getClient... ugg... A get. Ruthless refactoring! As I was saying; the creation is done in HackernewsNetwork#httpClient. private OkHttpClient httpClient() { return interceptorObj == null ? new OkHttpClient() : new OkHttpClient().newBuilder().addInterceptor(interceptorObj).build(); } Obviously just spinning up a bunch of them. We need to keep a single client to [Read More]

Interface Overloading - TDD Against UI

WTF... ... is interface overloading. Or Overriding. I kinda toggle between the terms. Right now I'm favoring Interface Overloading; so that's what the title is. Interface Overloading Interface overloading is the process I've found in C# and JAVA to allow TDD when using Libraries and OS Systems. This should clearly not be the ONLY way. It's a mechanism I stumbled across while TDDing up an android app. I wrote this post [Read More]

Code Kata - Bowling BlackJack

As an exercise; I'm doing a CodeKata... well... working on extending a code kata via BlackJack. We've done the kata for Bowling. Now we're going to extend it to include BlackJack scoring. BlackJack is a fairly simple game to score. You have points between 1 and 11; you sum them. Right. Now make it do Bowling and BlackJack. Oh... As an added larf; Make it output FizzBuzz. Yes. I sometimes [Read More]