Ports and Adapters - Struggling back to Beginner's Mind

I have to admit it: I've been struggling over the last two days. 

I'm working on a write-up of a Walking Skeleton for Lazydoro, together with sample code for its Ports and Adapters architecture.

I often create a Walking Skeleton at the start of an application. Lazydoro is now in its fifth version,  there's already a finished working version, and it's difficult to 'un-know' how it evolved. Trying to create what I might have written at the start has been quite a challenge

The process has been valuable, though. I think I understand Ports and Adapters better through working on my sample code and explanation, and it's had another benefit.

I've set up an automated deployment process which I'll be able to use for future MicroPython projects.

Automating deployment

Some applications can be deployed as a single file, but small modules are easier to read and test. lazydoro now consists of 9 files in a three-directory tree, and deploying a new version manually has become a real pain and is prone to error.

The new process uses a gist on GitHub which deletes all the files from a MicroPython-based board. It's always possible that your code relies on a file that you deployed a while back but have now forgotten about - a common cause of 'It works on My Machine'. 

Deployment to an empty file system is the safest way of avoiding that.

There's more to the deportment task than that, and I'm documenting the whole malarkey.

What's coming

I'm not sure how soon I'll have all the sample code ready, but you'll get to see three things:

  1. The automated deployment process
  2. The Walking Skeleton, and what you risk without one
  3. Ports and Adapters in an Embedded Application, and how that architecture helps with unexpected change.
Meanwhile I will be posting a short article about a simple technique for making stack-able breakout boards using strip-board. It's a very simple trick I forgot to apply to lazydoro until this morning; the buzzer break-out board now look much neater. 


Popular posts from this blog

Controlling a Raspberry Pi Pico remotely using PySerial

Five steps to connect Jetson Nano and Arduino

Raspberry Pi Pico project 2 - MCP3008