We have a testable DirectoryWatcher; now what? Given that the DirectoryWatcher can only watch files in a single directory, we can extend this to a whole directory tree. Perhaps the best way to achieve this is with composition (in the…
Watching a directory: testability
Previously, I introduced DirectoryWatcher but it was woefully untestable. Tight coupling to the file system is something that would be at odds with a microtesting practice as described by “Geepaw” Hill. I agree with him and nearly always avoid extraneous…
Let’s do DHCP: diagnostic events
There is always something new to do with the DHCP server sample. Today we will look at how to add diagnostic events. After all, any good server technology intended to run in real world production scenarios needs observability. One approach…
Let’s do DHCP: sockets
After our foray into DHCP options, we are ready for the last piece of the puzzle — actually sending and receiving data on a socket. First, we need to encode the high performance receive pattern. I’ve decided on an async…
Let’s do DHCP: options
Last time we built our DHCP buffer with header fields. For a fully formed DHCP message, we also need to support DHCP options. Each option has a tag byte specifying its type, a length byte, and a number of data…
Let’s do DHCP: intro
We’ve been talking about high performance datagram scenarios but have so far used a contrived sample of sending mostly fixed size strings — not so realistic. That will change today, as we turn to one of the more famous datagram…
Building an adventure game: part 4
Welcome to the fourth and final installment of my adventure game saga. We made it up to Day 15 last time. Let’s finish this up now. Day 16 I don’t like that the method to add an item to a…
Building an adventure game: part 3
I last left off on Day 8 of my adventure game project. We continue from Day 9 today. Day 9 After warming up with a simple rename, I decide I don’t like how TextConsole and InputLoop interact. If I want…
Building an adventure game: part 2
Previously, I recounted day 1 of my adventure game project. Let’s continue. Day 2 This was a short day. First I observe that it isn’t really necessary for the caller of Game to pass the MessageBus, so I change that.…
Building an adventure game: part 1
I have written before about my early experiences with text adventure games and about how I built a GW-BASIC translator to convert one such example game to C#. It was a fun challenge but was admittedly more of a compiler…