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!
First post in ages, last weekend we visited the National Museum of Scotland and I took the camera (and used it) for once.
So my blog now has a new domain name, gravatar and header image and after a trip down south to see Hadrian’s Wall for the first time. In the coming weeks I’m hoping to start posting some new content! This may end up not being the case, but well stranger things have happened!
So installing Ubuntu onto an 2006 Mac Mini (macmini1,1) is really hard, mainly down the bugs in EFI preventing booting of USB sticks or CD’s that are available for download from Ubuntu and this Mini not 64 bit CPU but 32 bit!
So things to remember:
- This mac mini is x32 and not an x64 CPU! So do download the right image!
- Install rEFInd (this is really important, as
- Follow these instructions to create an USB stick.
So I now have StackStorm installing, which is taking some time on almost decade old system. Later I do plan to do an re-install with the server (instead of desktop version), but at least wireless works out the box, which it did not do last time I tried in 2003 with linux and wireless.
So I’ve been using Apple’s Aperture photo management and editing application since just after I got an SLR in 2007. So it was with great sadness I learned last year that it would be going away and replaced with Photos (along with iPhoto).
So I need to find another photo management & editing product or just give in and use the new Photos for everything. Which I don’t really want to do as I very much like the power of Aperture to make the most of photos shoot in RAW.
So some first thoughts based on photos I took today on my Canon EOS-M:
- It’s very grey, layout is not as slick (i.e. large & cluttered) as Aperture.
- Flagging and rating being different things is likely to be more powerful, but confusing for now.
- Folders and collections look like they will take a little mastering.
- Had to do a Google search to figure out how to upload to Flickr.
- Making adjustments was rather different from Aperture. Which will take some getting used too.
The results can be found here, this is going to take some getting used too and concerned what will happen to all the images I’ve got in Aperture in the long run.