Xamarin.Forms: ListView with Images Kata
I record a Kata as I write a Xamarin.Forms app from scratch:
Azure | Xamarin | DevOps | F#
I record a Kata as I write a Xamarin.Forms app from scratch:
I have been avoiding the concept of Monads in my journey to learn F#. However, I know that sooner or later, I’m just going to have to man-up. As a result, I have been trying to qualify the need to leverage F#’s Computation Expression. My current conclusion is that a Computation Expression within F# can …
Continue reading “F#: Computation Expressions (Bank Account Kata)”
I really do enjoy writing F# code. In fact, I enjoy it more than C# or XAML. I feel as if I’m spending my mornings doing Soduku. This post will go over my thought process as I attempted to construct a deck of cards. My first attempt was the following: The following output was generated: …
In previous posts, I have discussed my implementation details for the Bank Account kata. This post will provide details on how I property-based test one of my functions. Specifically, I show the source code for testing a deposit. Here are the types: The function is below: The following code is a property-based test for the …
Continue reading “F#: Bank Account Kata (Property-based Tests)”
In the Bank Account Kata (vol. 1 & 2) video, I expressed disappointment on how I implemented my handlers. The handlers were the following: Let’s look at the first function: The function above did not read as well as I would like. As a result I refactored the function to fully embrace pattern matching: Here’s …
In the previous Bank Account kata, I attempted to implement happy path logic using a function-driven approach to later discover my types that would complement them. Note that my initial implementation did not cover edge case scenarios. For example: Can one withdraw an amount that exceeds their balance? Can one deposit absolutely nothing into their …
I wrote some F# code for handling bank account transactions. I wrote the program by using a function driven approach instead of a type driven approach. The main handlers are the following: The supporting functions that back the handlers are as follows: Here are the types: The entire program is below:
I decided to move on to the next stage of the Business Rules kata. Again, I decided to go function first instead of type first. I followed the same design pattern that Mark Seeman had introduced to me. Thus, I wrote the following solution:
I rewrote a kata after being inspired by Mark Seeman’s answer:
The following is my first attempt at implementing the Business Rules kata: Note: I did not validate any of my logic with unit tests yet.