How this tester learned
to write code

Joep Schuurkes @j19sch

some things about myself

1987

1995-1999

1999-2004

2006

Apple Macintosh

science over math in high school

degree in Philosophy

tester 'by accident'

languages I have used

Bash

Java

JavaScript

Perl

Python

SQL

TypeScript

VBA for Excel

other things about myself

1995

1999

1999-2004

2004

2005

Windows PC

SUSE linux

formal logic

LaTeX, debian linux

python tutorial

and it gets even worse

vim

... and worse

smallsheds.garden/my-talks

The value of another's experience
is to give us hope,
not to tell us how or whether to proceed.

- Peter Block

three stories

how I got started

how I impressed myself for the first time

how I finally learned some dev skills

the story of how I got started

Perl (2011)


while (<$tpl>) {
  my $tplln = $_;
  chomp $tplln;
  foreach my $group (keys %sfile) {
    if ($sfile{$group}[0] == $i) {
      if (index ($tplln, $sfile{$group}[1]) != -1
            && $sfile{$group}[2] eq 'skip')
      	{
        $tplln = "";
      } else {
        $tplln =~ s{$sfile{$group}[1]}{$sfile{$group}[2]};
      }
    }
  }
  print $req $tplln or die "Kan niet schrijven naar $req.";
}
			

why did I learn?

to make my own life easier

what did I learn?

start with a small first step

I can do this

the story of how
I impressed myself for the first time

VBA for Excel (2013)


'Apply filter criteria on columns to be filterd
Dim j As Integer
For j = LBound(ArrColNames) To UBound(ArrColNames)
  If InStr(ArrCritsRaw(j), ";") <> 0 Then
  ' Multiple criteria present, so only select possible
      Dim ArrSplit() As String
      ArrSplit = Split(ArrCritsRaw(j), ";")
      Selection.AutoFilter Field:=ArrColNames(j), Criteria1:=ArrSplit,
			    Operator:=xlFilterValues
  Else
    ' Single criterium present, so select, deselect, empty, notempty,
		' greater/smaller than possible
      Selection.AutoFilter Field:=ArrColNames(j), Criteria1:=ArrCritsRaw(j),
			    Operator:=xlFilterValues
  End If
Next j
			

why did I learn?

to avoid mind-numbing RSI-inducing work

what did I learn?

just dive in

make a small change, test, repeat

the story of how I finally
learned some dev skills

Python (2015)


def test_create_new_app(app_name):
  print "Creating project with name " + app_name

  project_id = ProjectsAPI.create_new_app_sync(username, apikey, app_name)
  print "Project with id " + str(project_id) + " created."

  check_project_details_in_sprintr(project_id)
  check_project_and_svnproperties_on_teamserver(project_id)
  check_events_in_platform_analytics(project_id)

def check_project_and_svnproperties_on_teamserver(projectid):
  svnrepo_uri = teamserver_url + projectid

  assert (teamserver.check_if_repo_exists(svnrepo_uri) is True)
  assert (teamserver.check_if_repo_contains_mpr(svnrepo_uri, app_name) is True)
  check_if_svn_properties_are_set(svnrepo_uri, projectid, app_name)
  check_if_silent_conversion_svn_revision_property_is_set(svnrepo_uri)
			

why did I learn?

I was invited to

what did I learn?

clean code: naming, structuring, refactoring

developers have skills and heuristics too

to summarize

why I learned

make my life easier

connect with developers

have fun

what I learned

start small and dive in

small change, test, repeat

write clean code

you have

two testing super-powers

that will help you

super-power #1:

being ok
with not knowing

Keep calm and learn on
Changing stuff and seeing what happens

super-power #2:

trying out stuff
to see what happens

some practical things

sites

CodeAcademy
HackerRank

books

Java for Testers - Alan Richardson Code - Charles Petzold

games

Human Resource Machine TIS-100
Factorio
How to draw an owl

thank you!

smallsheds.garden
@j19sch