Make Money with TDD - 03

Money Splits And we're back! Let's remind ourselves (yeah yeah... me) of our requirements > 5 USD * 2 = 10 USD 10 EUR * 2 = 20 EUR 4002 KRW / 4 = 1000.5 KRW 5 USD + 10 EUR = 17 USD 1 USD + 1100 KRW = 2200 KRW 2.50 USD * 6 = 15 USD And now…

Make Money with TDD - 02

It's Euro Time! And onto the next requirement, and the reason I goofed and created a Money object initially... > 5 USD * 2 = 10 USD 10 EUR * 2 = 20 EUR 4002 KRW / 4 = 1000.5 KRW 5 USD + 10 EUR = 17 USD 1 USD + 1100 KRW = 2200 KRW 2.50 USD…

Make Money with TDD - 01

It's Money Time! Out of our requirements, let's start with the simple one > 5 USD * 2 = 10 USD 10 EUR * 2 = 20 EUR 4002 KRW / 4 = 1000.5 KRW 5 USD + 10 EUR = 17 USD 1 USD + 1100 KRW = 2200 KRW Multiple the money! This is actually one I don't…

Make Money with TDD - 00

Welcome to ... whatever the fuck this'll turn into. Preamble (post writing) This turned into ... a lot. Both in the content for this series of doing MONEY! What I found while working through this is that I had a lot of tangents about a lot of things. One of the big…

TDD Like You Mean It - 13

Not Done Yet! Jim Speaker [https://www.linkedin.com/in/jimspeaker/], someone who strongly applies most, if not all, of the practices I advocate, posted a version of FizzBuzz [https://www.linkedin.com/feed/update/urn:li:activity:6870728317012717568/] that demonstrates a lot of these practices. I liked most of…

Refactor to MicroObjects - 03

More Action It's time to get some more Rule Actions in place. Let's give ourselves a reminder of what our code looks like public Answer Transform(int source) { TurnCount turnCount = new IntTurnCount(source); IRule multipleOfThreeAndFiveRule = new MultipleOfThreeAndFiveRule(); if (multipleOfThreeAndFiveRule.Matches(turnCount)) return new FizzBuzzAnswer(); IRule multipleOfFiveRule = new MultipleOfFiveRule(); if (multipleOfFiveRule.…

Collections are Primitives

Once again, Twitter is the driver for a new blog post! Note: This is just a brain dump. No IDE opened, no re-read. Idea, typing, your eyes suffering. How do you do Collections in MicroObjects? I'm not sure how much I've covered it elsewhere; but no posts are popping up.…

Refactor to MicroObjects - 02

What's an input? Last time we transformed our returned values into Answers and used instances of those to be returned. The other primitive we can see is the type of source and quite a few hard coded values. Let's take a gander at the code again public Answer Transform(int…