Fork me on GitHub

Project Notes

The Explainer - Python Version

This sample implements a Python version of the Explainer Protocol.

The Explainer is totally inspired by Natalie Silvanovich’s Hardware Excuse Generator

Generate Protocol Stubs

This generates the explainer_pb2.py protocol implementation.

$ protoc -I ../protocols --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` ../protocols/explainer.proto

Install and Tests

$ pip install -r requirements.txt

Test Drive - Python Client and Server

I don’t have a python server implementation yet, so using the ruby version Start the server in one console window..

$ cd ../ruby
$ ./explainer.rb
ShiFu is waiting to explain all of your problems...

Now try the python client in another:

$ python explain.py

Here's some help:

Describe your problem in a sentence, using the text "REASON" where-ever you'd like a good excuse inserted

e.g. "Glitching was not a viable attack because of REASON"

$ python explain.py "Your phone is probably crashing because of REASON"
Your phone is probably crashing because of minor ESD damage to coil
$ python explain.py "Your phone is probably crashing because of REASON"
Your phone is probably crashing because of thermal effects in the resistor R3
$ python explain.py "Your phone is probably crashing because of REASON"
Your phone is probably crashing because of internal resistance of the antenna
$ python explain.py "Your phone is probably crashing because of REASON"
Your phone is probably crashing because of residual capacitance caused by the USB connector
$ python explain.py "Your phone is probably crashing because of REASON"
Your phone is probably crashing because of the EEPROM inducing current in the pull-up resistor

Credits and References

About LCK#49 gRPCPythonMessaging
Project Source on GitHub Return to the Project Catalog

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.