Andrew Latham

Introduction

Analyzing code to look for irregularities most commonly done with language specific Style Checks is a method of discovering things about the code and possibly some pointers to resolving issues.

Andrew Latham

IPv6 is an evolution not an expansion of IPv4 and will require some people to learn to change. We can't be haunted by 30 years of CIDR wrecking the internet. In each and every organization I work with that fails to understand IPv6 I like to create documentation or a wiki page about the organizations stance on IPv6.

Andrew Latham

Python the programming language and versions

Over the many decades Python has become a very stable language. From version to version more things are alike than different. In the last fire or more years people new to the industry have shown their cards by claiming it can't be done.

Not that hard

As I continue to hear sob stories about how hard everything is I keep reaching back to https://www.tomaz.me/2011/12/03/lessons-learned-while-porting-libcloud-to-python-3.html as you can see from the page the date and content show that it is not hard to support various versions if that is a goal.

Personal exp...

Almost exactly three years ago in 2014 I did a fast conversion of Ansible to work with Python 3 in PR 8322 which ended up in a land of personal preferences and overly complex solutions to simple problems. I have worked on converting other projects like PyPXE and Saltstack. In each case I hit walls where confusion is apparent and in every case I am supplying working tested code to prove it works.

Take away

Write better software, think about the future and the past. Work on problems like anything is possible because it is. Develop good clean interfaces and standard APIs in such a way that the software could be written in any version of any language and operate the same. Think before you code.

This rant was brought to you by Andrew Latham in a frustrated situation attempting to understand the lack of effort.

Andrew Latham

When using Linux and maybe some other systems there are reserved key combinations and other interfaces that let you interact with the kernel directly. Read more at https://en.wikipedia.org/wiki/Magic_SysRq_key

Examples

Reboot

ALT + SysRq + b

Shutdown

ALT + SysRq + o

Forcing Reboot

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

Force Shutdown

echo 1 > /proc/sys/kernel/sysrq
echo o > /proc/sysrq-trigger
Andrew Latham

Devops without the extra parts

You want to deploy code onto a server into a certain directory. You have SSH to the server and it has Git installed. Your desired destination is /home/user/public_html/production/

Python Testing

Testing is not hard, don't make it hard.

Andrew Latham

Working on https://github.com/lathama/Adynaton I have setup some testing that runs every time and I want to talk about it. I have worked on software in industries that could benefit from testing, coverage and style checks but the organizational impact causes testing to be a pretty harsh hurdle. Some amazing work has gone into bypassing testing in many industries. Here in this post I am discussing some testing, coverage and style checks that lower the bar and make it easy to use. The testing does not stop the operation or development. The code coverage report is useful. The style check is more of an indicator than anything else. This is a discussion and a process. Enable everyone from support to operations with that warm fuzzy feeling that testing is the new norm. Show the developers that testing is not a blocker.

Andrew Latham

I often reach back to http://camendesign.com/web-dev/website_optimisation_measures when discussing issues people have in their personal or business website. Too often I see local businesses like a restaurant with no information at all or hidden away as text on an image.

A restaurant should have at minimum the following information as text on the web page.

  • Name of the restaurant
  • Address including the City, State, Country
  • Hours of Operation aka when they are normally open and normally closed. We all know holidays and or emergencies happen.
  • Description of food style
  • Phone number or contact form to seek more information.

Optionally maybe:

  • Menu as text
  • Photo of storefront
  • Parking information