This was originally published on Medium on May 22, 2016. archiving here as no longer pushing on Medium.
So I think my Python is improving for sure. In the last couple of weeks I’ve used new style objects, properties, and setters to create objects to hold Orion node data. In short, applying what I read at the start of the year in Fluent Python.
However more importantly I feel up to the challenge of addressing the lack of support for turning on SSL verification, and using Request-Mock for unit testing with the orionsdk module. So I’ve started on the PR and more importantly I’ll be turning some of the examples into unit tests and adding some more of both.
Currently reading books and focusing on a few small side projects seems to be the way forward. I started reading Think Python last night and also got a second Python TDD book to read, as the other I read did not seem to give me more insight than reading StackStorm docs and other examples.
In the Uk the Open University does not seem to have any official courses purely on Python, so reading seems to be the only way forward for now….
This was originally published on Medium on May 7, 2016. archiving here as no longer pushing on Medium.
So I’ve been programming in Python on and off for what must be close to 15 years now. However until the start of this year it’s all been odd side projects for useful tools outside of work. Now I’m writing Python automation code for the StackStorm platform as a increasingly large part of my day job. Some of this is for private packs, but thankfully quite a lot is for Open Source packs in st2contrib.
So the question is how do I step up my programming to the next level, looking at the graph for st2contrib on GitHub I’ve written just over 4k LOC. With time I seem to be remembering more about how Python works and my Pull Requests seem to be decreasingly getting stylistic comments about things that need to be addressed before merge. What has helped so far other than the great support from the Stormers and other members of the community?
It seems to be the following:
- Using Pylint on all code
- Using Flake8 on all code.
- Reading and applying parts of PEP8.
- Reading about good docsting practice and applying it.
- Making use of the test framework in StackStorm.
These are only some of the tools out there, so what could help for the steps? I’m currently reading about Test Driven Development which helping for sure. However writing tests first is not yet second nature, but what else can help lay the ground work for the next step change?
May be its time to refresh the basics? While I found the last Python book very interesting, it was not immediately helpful. It’s more opened my eyes to ideas that will be useful some time later.
I will continue improving how I work with testing. At least I’m making sure I’m not leaving myself with a raft of legacy code that I can refactor and most importantly test while I’m learning more.
As I’m sure this is a process that will never end! And in the not too distant future I’ll say with increasing confidence that I’m a programmer/developer/engineer doing DevOps instead of recovering Cisco network engineer!