Rick Barry used the “Granny Shot” to propel himself to seventh on the all-time list for free-throw shooting percentage, but when Shaquille O’Neal was asked to adopt Barry’s strategy as a way to lift his woeful performance at the free throw line, he famously rejected the notion.
“I’d rather shoot 0% than shoot underhand,” Shaq was reported to have said. “I’m too cool for that.”
Sometimes I feel like people say the same thing about Gherkin syntax and by extension behavior-driven-development (BDD).
I’ve been having some fun with Flutter lately and want to share a crude little example of how to use the Provider pattern for managing app state. What I like about the pattern is the straightforward nature with which it enables widgets to communicate with each other. Also, I like being able to tell the StatelessWidget to redraw itself rather than implementing those widgets as StatefulWidgets and saddling those UI elements with the added responsibility of tracking when to redraw.
I started using Vagrant for local development when I realized it was a waste of time configuring my code to be able to run on Mac. At the time I was beginning to build a continuous delivery pipeline in the AWS cloud. The CI servers I needed were going to run in a Linux-based environment and although most of the code was in Python, which lets you isolate things with virtual environments, there still is a need to interface with the operating system.
I started using Vagrant for local development when I realized it was a waste of
time configuring my code to be able to run on Mac. At the time I was beginning
to build a continuous delivery pipeline in the AWS cloud. The CI servers I
needed were going to run in a Linux-based environment and although most of the
code was in Python, which lets you isolate things with virtual environments,
there still is a need to interface with the operating system.
Jumping through hoops on a Mac to get a few Python libraries to build
successfully wasn’t always fun. Even less fun was navigating those same hoops
once again because the system the code that now runs perfectly on a Mac, is a
sea of red on Linux. At some point I figured it out. Who cares if the
application runs on OSx? It is not a Mac app.
Installing salt in a docker container and running it in masterless mode, allows you to use your existing salt infrastructure to provision containers. See the following Dockerfile.
CodeBuild might not be the continuous integration server that everyone moves to in droves, especially as a standalone service, but I think there are use cases for it that exist outside of providing a test and build infrastructure. Short-lived compute instances.
Let’s use djangorestframework create a REST endpoint to register new users.
We’ll assume you have already set up a virtual environment and it is activated.
To install Django and some other things pip install a requirements.txt file that looks like this one, which is part of a working example on Github.
Back in the day, I could do my dependency injection the old fashioned way — through the constructor. But Robolectric versions above 2.0 put an end to all that. So I created a test project to prove the merits of dependency injection using RoboGuice and Robolectric 2.2.