I've been remiss in posting my videos. The last two talks went really well
- Platonic Solids of Quality
As people who produce awesome stuff, there are a lot of tools we can use to work less and simplify our workflow. This talk introduces many techniques from Agile Testing and other sources so we can all do more things faster.
- Functional Programming and Django QuerySets
This talk is a quick overview of Python iterators and why to use them, then combining iterators in Functional Programming (vs procedural and object oriented programming). Lastly I show how to use these ideas in order to better understand and test Django QuerySets.
I have another talk video somewhere, but it's about using Selenium for testing and thus has rather a bit of profanity in it. No link.
Thanks to Don Westland for recording-editing these for me!
Showing posts with label quality. Show all posts
Showing posts with label quality. Show all posts
Tuesday, November 1, 2016
Monday, September 5, 2016
talk: Platonic Solids of Quality
(This page is bit.ly/jta-platonic )
Slides: John Tells All: Platonic Solids of Quality
Video: Platonic Solids of Quality, John Tells All
Detailed outline on Workflowy
Thanks to Don Westland for the A/V, Marcel for organizing and the picture, DataScience Inc for the hosting, and Keith B. for the presentation and the smooooth scotch.
Slides: John Tells All: Platonic Solids of Quality
Video: Platonic Solids of Quality, John Tells All
Detailed outline on Workflowy
Thanks to Don Westland for the A/V, Marcel for organizing and the picture, DataScience Inc for the hosting, and Keith B. for the presentation and the smooooth scotch.
Friday, June 17, 2016
Quality DevOps: installing and verifying Network Time Protocol (NTP)
I lurve Ansible. It lets me install or update software on one or 100 instances, easily. The entire system becomes a set of scripts to run and run and run again until I get things exactly the way I want them.
In today's devops ecosystem, where "infrastructure is code", how do we test our infrastructure?
Ansible gives us one way to do this. When we install or update a service, run a service-specific command to make doubly sure that things are working as expected. If something's not quite right, Ansible will abort and we can figure out what went kablooey.
Save the following into "ntp.yml" and run with ansible-playbook -vvi myhost ntp.yml
Thanks to phillipuniverse !
# ntp.yml -- install NTP time sync daemon
# Adapted from https://gist.github.com/phillipuniverse/7721288#file-ntp_playbook-yml
#
# USAGE: ansible-playbook -vvi myhost ntp.yml
#
---
- hosts: all
become: yes
gather_facts: no
tasks:
- name: Install NTP
apt: package=ntp state=present update_cache=yes
tags: ntp
- name: Make sure NTP is started up
service: name=ntp state=started enabled=yes
tags: ntp
- name: verify NTP synchronized
command: timedatectl status
register: ntp_result
failed_when: "'synchronized: yes' not in ntp_result.stdout"
tags: ntp
handlers:
- name: restart ntp
service: name=ntp state=restarted
In today's devops ecosystem, where "infrastructure is code", how do we test our infrastructure?
Ansible gives us one way to do this. When we install or update a service, run a service-specific command to make doubly sure that things are working as expected. If something's not quite right, Ansible will abort and we can figure out what went kablooey.
Save the following into "ntp.yml" and run with ansible-playbook -vvi myhost ntp.yml
Thanks to phillipuniverse !
# ntp.yml -- install NTP time sync daemon
# Adapted from https://gist.github.com/phillipuniverse/7721288#file-ntp_playbook-yml
#
# USAGE: ansible-playbook -vvi myhost ntp.yml
#
---
- hosts: all
become: yes
gather_facts: no
tasks:
- name: Install NTP
apt: package=ntp state=present update_cache=yes
tags: ntp
- name: Make sure NTP is started up
service: name=ntp state=started enabled=yes
tags: ntp
- name: verify NTP synchronized
command: timedatectl status
register: ntp_result
failed_when: "'synchronized: yes' not in ntp_result.stdout"
tags: ntp
handlers:
- name: restart ntp
service: name=ntp state=restarted
Monday, May 30, 2016
Django trick: keep "runserver" from crashing on Python syntax error
When developing Django, the "runserver" command is convenient. It runs our appserver, and reloads itself when we change our app's source code. We can have a rapid "edit stuff then see what happened" cycle.
However, runserver it has an annoying habit. If we're typing so fast that we add a Python syntax error into our code, the command will crash. We expect that when we fix the syntax error, we can see our results, but it doesn't work. The appserver has crashed, and is no more.
The following workaround works wonders. If we add a syntax error, "runserver" will crash, and this loop will wait for a moment then re-run it. We can now type as fast as possible all the time, and Django will always show us what we want to see. Or, what we give it, which sometimes is enough ;)
while true; do ./manage.py runserver; sleep 15; done
However, runserver it has an annoying habit. If we're typing so fast that we add a Python syntax error into our code, the command will crash. We expect that when we fix the syntax error, we can see our results, but it doesn't work. The appserver has crashed, and is no more.
The following workaround works wonders. If we add a syntax error, "runserver" will crash, and this loop will wait for a moment then re-run it. We can now type as fast as possible all the time, and Django will always show us what we want to see. Or, what we give it, which sometimes is enough ;)
while true; do ./manage.py runserver; sleep 15; done
Friday, August 28, 2015
slides: Practical Python Testing
The talk at The Black Tux last night went really well! Here are the slides:
- Practical Python Testing (google docs)
and me:
- Practical Python Testing (google docs)
and me:
Thursday, August 13, 2015
How and why we use DevOps checklists - Server Density Blog
In the health care and airline industries, simple checklists save thousands of lives. Here are several clear examples how the same technique is used in DevOps:
How and why we use DevOps checklists - Server Density Blog
How and why we use DevOps checklists - Server Density Blog
Thursday, July 23, 2015
talk: Better Browser Tests with Selenium
Nicer Browser Tests with Selenium presentation
me presenting at the Python Meetup on 7/23:
Youtube videos of Python3 and Nicer Browser Tests
Thanks to Esther for putting everything together, Hulu for sponsoring, Philip for helping, and Carl Mullins for the video!
Thursday, July 9, 2015
TIP: tweak number of Gunicorn workers
Count number of Gunicorn workers
$ pgrep gunicorn.*work | wc -l
5
Add another worker by signaling the Gunicorn master
$ sudo pkill -TTIN gunicorn.*mast
Verify another worker has appeared
$ pgrep gunicorn.*work | wc -l
6
Decrease the number of workers, verify its effect
$ sudo pkill -TTOU gunicorn.*mast
$ pgrep gunicorn.*work | wc -l
5
$ pgrep gunicorn.*work | wc -l
5
Add another worker by signaling the Gunicorn master
$ sudo pkill -TTIN gunicorn.*mast
Verify another worker has appeared
$ pgrep gunicorn.*work | wc -l
6
Decrease the number of workers, verify its effect
$ sudo pkill -TTOU gunicorn.*mast
$ pgrep gunicorn.*work | wc -l
5
Subscribe to:
Posts (Atom)



