Bert was me on Monday
In the morning, I went to the "Writing & Running Tests in Docker" talk
This suffered from the all-too-common "techno-incompatibility problem": the presenters laptop wouldn't connect to the lecterns projector system (and then other laptops wouldn't display either.) After a bit of faff [find the right adapter, and reboot the lectern electonincs], we were off.
The first observation is that the work for the talk was in github (https://github.com/arugifa/ep2018-workshop) and that each commit was an itteration in the workshop - from nothing to simple testing, to tox, to docker.
Sadly, the delay cut out the very bit I was interested in: building the test environment, rather than the docker environment.
Iin essence, there are 2 solutions for 2 situations:
- Unit tests: Build a test container, based on the service container. This just tests the service container, and mocks all calls to anything external to that container.
- Integration tests: Build a container that tests the whole system. This assumes that the units are working correctly. This works best using two Docker Compose files to build both the service and the testing-container.
The afternoon was attending the "Get your documentation right" tutorial.
The basis of the tutorial is given in https://www.divio.com/en/blog/documentation/, or this image:
This is one mans crusade, one mans vision, on how to structure and categorise documents.... and resoundingly docs for code/services - recognising that there is some documentation that exists outside this structure.
The talk was good: Daniele Procida was an effervescant speaker, mobile, and inclusive... and spent the second half of the tutorial getting us to offer suggestions for a participants documentation
Opening session - Die Threads (D.Beazley)
In interesting talk on what an asyncronouse threaded system could be like (see https://github.com/dabeaz/thredo)
The Naive Programmer: Another Daniele Procida talk, and certainly not what I expected!
This talk first defined programming as a "creative craft", and then exampled three artists that were very naive.... yet had a quality that made their output remarkable in it's own right.
The cororaly, therefore, is that not all programmers are sophisticated, and not all good code comes from sophisticated programmers.
Decorators: Gift or Curse?
This talk was absolutely packed, and could have been really good - but the presentation style made it hard to follow.
I *think* I followed what decorators are, and where they can be used..... however I'd need to actually create some & have a good reason to try them to be sure.
The bulk of the afternoon was spent social networking, mostly trying to get a clearer understanding of Pytest, and decorators (I'll do a post on decorators.... which is how I finally wrapped my head around them!)
From Zero to Azure with Python, Docker Containers, and VS Code.
I chose this talk because I use VS Code, docker, and Python..... and it sounded simial to Zero to Jupyterhub.
In practice, it was a very simple run-through using a couple of VS-Code extensions to create files.
Python, Docker, Kubenetes, and Beyond?
This sounded almost the opposite to the above talk. Interestingly, whilst the previous talk was pretty empty, this one was standing-room only.
This atually just covered the ground we've already done with Noteable.... however it was good to confirm there's nothing new and nothing we've missed.
Opening session - PyPI: Past Present and Future (Nicola Harris)
An interesting talk covering the history of PyPI, and how the new system came into being.
Nothing partiularly new for me, but fascinating to see just how big PyPI is, and what it takes to run it!
Making deployable apps
A simple wee talk that essentially wend it way to writing dokerised apps
"More than yiu ever wanted to know about python functions" - Mark Smith
I'm looking at my scribbles for this talk (never ask a programmer to write: they make doctors look neat!)
Python 3.6 introduced: 'f' strings - see https://cito.github.io/blog/f-strings/
So - we're all happy with how we define a function?
def xxx(reception, message)
... and how we normally call it (this is positional parameters):
xxx('1234', "foo") # reception=1234, message=foo
However we can also pass the params in specifically named.... which means they're effectively named parameters):
xxx( recipient='1234', message="foo")
xxx( message="foo", recipient='1234')
You can mix & match your passing convention:
xxx( recipient='1234', "foo")
xxx( '1234', message="foo")
However, ther whole mix'n'match thing can go wrong:
xxx( "foo", recipient='1234') ## fail!!
- the foo goes to recipient as a positional assignment, then the named assignment tries to make it 1234 - and python fails.
He then talked about forcing some arguments to be named; about methds verses functions, about variable scope, about returns, and even more that had me bamboozled!
Sensible tests in Django
Talks about unit test, and talks about how we should tests UNITS, not ORM stacks
Talks about common mistakes (over-testing, tests not wide enough, using too-simple mock data)
Talks about using djando.test
Citizen Science with Python - Ian Ozsvald
This is the sort of talk I love: kinda abstract, but grounded on real work.
In this instance it started with using Open Data to find new corolations, then talked out gathering data to make corolations... and then some challenges with data-gathering.
A good & fun speaker.
"Get Productive with Python in Visual Studio Code" was simply a slight variation on "From Zero to Azure with Python, Docker Containers, and VS Code."
"Writing good error messages" was no more than a series of examples where error messages were less than helpful, thus showing how to be better. More a salutory reminder rather than anything new.
Friday afternoon kinda fell apart: "How to hire a developer" became "Quart a asyncio alternative to Flask" (which I ducked), and "A taxonomy of Decorators" became "How async and await ended up in Python".... which was good (fortunately I'd done event-driven stuff in Perl a few years ago - so the base concepts didn't lose me)- still hurt my head & lost be by the end :)
My final talk was supposed to be "Proper testing in Django", which had changed into "Creating a Culture of Software Craftsmanship" - Fun, and a pleasent way to end the week..