Saturday, June 23, 2018

Quality Code in Practice

Developers like to write code. They like to type fast, to work fast, and deploy fast. This is fine. We all like this, it's fun!
A more high-level view is that as a business, as a team we want to deliver value fast. This is harder: which value to what audience are we serving? If we deliver buggy code to the client, no one is happy. If we make some users happy but our core audience is not served, then we haven't really delivered on our goals. Our goal as professionals, as entrepreneurs, is to find/create an audience, and serve that audience by giving them value.
In practice, "clean" code helps us work fast and also deliver value to our audience. Clean in this case meaning free of bugs, clearly designed, and of a design which directly meets the needs of our audience.
Automated workflow tools can help us move forward. They run very quickly, giving us positive feedback that what we write is legible and missing the most egregious errors. The basic categories of tools are 1) surface-level syntax, 2) language-centric analysis, 3) project-based unit and other tests.
For a recent project, this is our top-level Makefile.  It lets us as developers get rapid feedback on the quality of our project. Also, having a single file lets these tasks be repeatable by a Continuous Integration system, so we can be confident things don't break if we had too much coffee and committed something without running tests.

all:

auto-fix:
git ls-files '*.py' \
| xargs autopep8 --in-place --aggressive

lint:
flake8

clean:
find . -name '*.pyc' | xargs rm

run:
cd cj ; ./manage.py run

test:
pytest

Monday, June 18, 2018

Easy Docker

This talk was given at the LA Django meetup in DTLA on 6/19/2018. My thanks to Anthony at Gridspace for sponsoring! Also thanks to Marcel for inviting me again.

This page is http://bit.ly/jta-easy-docker

The slides are in Googledocs, source code is in Github => https://github.com/johntellsall/easy-docker


Thursday, June 14, 2018

Testing Pyramid and Feedback Loops (Platonic Solids of Quality)

This talk was given 6/14/2018 in sunny downtown Santa Monica, at Carbon Five.  Rit Li's Testable group is all about, well, testing, especially for webapps. Given my focus on being an expert at "quality, dev, and devops", this group is perfect for me!

Here's the event link => https://www.meetup.com/testable/events/jsjqjpyxjbkb/

Here are the slides, in Google Docs => Testing Pyramid and Feedback Loops

This page is http://bit.ly/jta-platonic2 ,  I'll add more to it as different versions of the talk appear. Please send me photos!


Thursday, June 7, 2018

Appearances June 2018

hi all!  Here are upcoming events at which I'll be speaking

- 6/7: private event, talking about Infrastructure as Code on a panel

This is going to be fun! I haven't spoken on a panel before. The audience is a bit different, C-level executives. I won't have any slides filled with dense code, but I will have a cat t-shirt. My goal is to sip wine, be quiet, and support my fellow speakers.

- 6/14 at Testable LA, I'll be talking about the Testing Pyramid and Feedback Loops.  Feel free to come by and say hi! Meetup link => Testable LA: Monthly Meetup

This talk is an expansion of my Platonic Solids of Quality work. In this update I'll skim over the Testing Pyramid, then enumerate the different Feedback patterns we use to write code but also steer the ship of our company.

The traditional Testing Pyramid has higher-level UI tests on top, medium-level API tests in the middle, and small Unit Tests on the bottom.  Tests higher in the pyramid run more code, but also give less specific feedback about exactly what's going on.  Low level unit tests are great in that they're super fast, easy to write, and allow us to validate exactly which inputs correspond to exactly which outputs. In practical, for-real, professional projects, how much effort should be spent at which types of tests? How do we as a team achieve our goal with the least amount of chaos and drama?