Python Improvement Pondering….

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….

How to Step up my Python programming to the next level?

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!

Installing Ubuntu onto a MacMini1,1 is really hard!

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.

Thinking about migrating from Aperture to Adobe Lightroom

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.

Something new for the Networking tool bag – Sergeant Clip

Today on Twitter I noticed that @fryguy_pa posted the following yesterday.

This is the which looks like something really useful for the networking tool bag. In fact I’m going to order both a 6 and 12 port versions tonight.

Completing CCNP Security – Study notes for SISAS (300-208) – Part 1

I was half way towards completing CCNP Security when they announced the retirement of the current exams and I did not have the enough time to complete study for SECURE prior to the last day to test. Given that old exam passes expire after 3 years and my ASA Security specialist certification expires after only 2 years, I have to pass the remaining 2 new exams before Nov 2015 and no later than Jan 2016 to keep a Cisco security certification without having to to sit further 2 exams.

As has often has been the case with Certification changes, the self study texts have not been published and no public information on availability is on the Cisco Press website (link). In fact the page it’s still referring to the February 2012 refresh and not updated yet. I have been informed that new texts should be out in the sometime in the Fall (aka late Q3 or early Q4?) as they have meet significant delays.

There is of course the official course, but I much prefer the self study route with practice exams. Given that the information is spread around, I’m attempting to pull together some notes and a list of books that I can read to keep study moving forward until official (or other) texts have been released.

The first starting point of course is the Exam Description for SISAS (300-208), so given strong focus on ISE and BYOD I’ve chosen to read Cisco ISE for BYOD and Secure Unified Access: BYOD Network Security with ISE as a starting point and following up with a Lab or evaluation environment for ISE.

What’s in your Networking Tool bag?

For most of the last 6 years, I’ve either not been allowed physical access to our hardware in the DC (a long story from my previous job) or I’ve been working in the same Data Centre as my desk, with no remote locations. So the need to have the tools of my trade with me while doing work based travelling has been very limited (or non-existent).

However last year the company I work for was acquired, and now I’m finding myself in the position that I’m travelling more and need to work in other DC’s while out & about.

So I need to travel with tools, and I’m wondering what’s in your networking tool bag? My laptop bag is small (and mostly light), so I’m hoping to not go too OTT.

My starting list is as follows:

  • Assorted RJ45 Cat5e cables (mainly short (0.3m to 2m – Grey & Blue) + joiner & cross-over adaptor.
  • Cage Nuts and bolts (enough to rack 3 to 5 devices).
  • Small Torch (LED).
  • USB Serial Adaptor (need a new one as current seems to not work with Windows 8) + DB9 adaptor & RJ45 Roll over adaptor (Thanks to WTI).
  • Multi-bit screw driver (with ~10 bits).
  • Some USB cables.
  • Cage Nut insertion tool.
  • USB 10/100 Ethernet.

This is in-addition to the normal stuff (laptop, Lync headset, headphones, USB charger, phone cables, ect).

However I do know I need to find good ear protection. I’ve been spoilt by my home DC having the main cooling plant out of the data rooms. Where I was working on Thursday was loud. Thank goodness there were disposable ear plugs available.