.NET Unit Test Tooling in 2018
It is 2018, and I have only just learned about the fantastic FluentAssertions framework. Seems like a nice time for a quick review of unit testing tools for .NET. Personal preferences: NUnit, FluentAssertions, Moq.
It is 2018, and I have only just learned about the fantastic FluentAssertions framework. Seems like a nice time for a quick review of unit testing tools for .NET. Personal preferences: NUnit, FluentAssertions, Moq.
There is a positive a trend of developers doing more of their own testing, going beyond unit testing. However, if independent testers are cut out of the loop, then surely many applications will suffer. Case in point: a user unexpectedly entering a decimal temperatures and military time in a citizen science data collection application.
The TERN data collection application supports the Texas Estuarine Research Network's citizen science efforts on the Gulf coast of Texas and has been in operation since 2016. The code and testing were 99% all on my own, in spare time on weekends. I had tried to recruit some help with this open source project, but other than a couple of early code commits, I was unsuccessful in that regard.
Packer is a cross-platform tool for scripting out virtual machine images. Put another way: use it to create new virtual machines with fully automated and repeatable installations. No clicking around. Some of the benefits:
Recently I installed MongoDb using Chocolatey, and was surprised to notice that the executables weren't placed into the Chocolately path. Chocolatey uses a shimming process to automatically add executes to PATH. This is really quite nice.
I can imagine scenarios where I have command line executables that weren't installed by Chocotely that I would like to add to my path easily. Or a scenario like this where I want to address something that someone forgot to build into the choco package. Thankfully manually calling the shimgen executable to create a new shim is quite trivial:
c:\ProgramData\chocolatey\tools\shimgen.exe `
--output=c:\ProgramData\Chocolatey\bin\mongodump.exe `
--path="..\..\..\Program Files\MongoDb\Server\3.6\bin\mongodump.exe"
The only key thing to notice is the relative path constraint.
One of my very first technical blog posts was about running OpenSSH on Windows - written over 14 years ago. Recently I was playing around with Microsoft's port of OpenSSH, which has officially achieved version v1.0.0.0 beta status. Installation was pretty easy, but I ran into a little problem: needing to set "user" group permissions. This little gist has my final script. For reasons of my own I didn't feel like running the chocolatey install, so I don't know if it has this permission problem.
The plovers gather in their southern haunts. The long journey north. Migration.
Another backyard success: breeding habitat for the Gulf fritillary butterfly. This medium-sized orange butterfly, while less famous than the Monarch for which it is sometimes mistaken, is a beautiful part of our landscape. Like the Monarch, its caterpillars can only eat from one type of plant ("passionflower") and they have a long-distance migration: across the Gulf of Mexico to southern Florida.
This purple passionflower in these photos only bloomed once or twice this summer, but one or more adult females clearly knew what was what and laid some eggs. I have counted as many as 8 visible caterpillars/pupae of multiple sizes at once (including the one trapped by a spider), and there were probably more that were hiding under leaves and around stems.

The serious nature of air pollution did not truly hit me until a family wedding in Austin, Texas in the late 90's. That year the pollution was so severe that older family members were warned by their doctors not to attend. As a kid from the suburbs, I didn't have to deal with the reality of "bad air" that millions of people in the urban cores breath day in, day out. As a person of faith, I began to awaken to the manifest injustice of suburban commuters contributing more than their fair share to pollution, from the tailpipe and the power plant. What had been a mere academic awareness suddenly turned visceral.
I had just upgraded NuGet packages - a seemingly innocent thing to do.
Everything compiles fine and I tried to run my ASP.NET WebAPI service. Testing
in Postman works fine, but when I try to let the browser call an endpoint (any
endpoint), I get a mysterious 500 server error with a rather unhelpful payload
message of {"message":"An error has occurred."}. However, even with Chrome
accessing the service, a breakpoint in the endpoint showed me that the code was
executing fine. The problem is clearly occurring inside the ASP.NET engine when
trying to send the response back to the browser.
The Yellow-rumped Warblers and Dark-eyed Juncos have been back and enjoying our back yard for several weeks now. This year, the warblers have decided to trust our bird bath - we've frequently seen them drinking and bathing over the past several weeks. While the Blue Jays have still been coming round, and we've had several sightings of Orange-crowned Warbler and Ruby-Crowned Kinglet this fall, I hadn't seen a Bewick's Wren in quite some time. Thus I was delighted to see this guy a few days ago. The light isn't very good, and the window is a bit dirty, but the ID is clear.

Bewick's Wren foraging in a crapemyrtle
