Writing Accessible Go julia ferraioli Open Source @ Google - - PowerPoint PPT Presentation

writing accessible go
SMART_READER_LITE
LIVE PREVIEW

Writing Accessible Go julia ferraioli Open Source @ Google - - PowerPoint PPT Presentation

Writing Accessible Go julia ferraioli Open Source @ Google @juliaferraioli Transcript: http://bit.ly/accessible-go-transcript Hi, Im julia Writer of code for people who write open source code Gopher for a few years Frequently


slide-1
SLIDE 1

Writing Accessible Go

julia ferraioli Open Source @ Google @juliaferraioli

slide-2
SLIDE 2

Transcript: http://bit.ly/accessible-go-transcript

slide-3
SLIDE 3

@juliaferraioli

Hi, I’m julia

Writer of code for people who write

  • pen source code

Gopher for a few years Frequently understatedly described as “stubborn” AKA “stubborn AF”

slide-4
SLIDE 4

Vision-impaired off-and-on for the past two years

slide-5
SLIDE 5

GIF by Jim Haseloff: http://bit.ly/2uCJYCj

slide-6
SLIDE 6

Uhhh...

slide-7
SLIDE 7

@juliaferraioli

Intermittent failures are the WORST

slide-8
SLIDE 8

I was/am (intermittently) disabled

slide-9
SLIDE 9

“[Disability] is a complex phenomenon, reflecting the interaction between features of a person’s body and features of the society in which [they live].”

  • World Health Organization
slide-10
SLIDE 10

Think about your tool set

CC-by-2.0 image of a workbench by Sam Beebe: https://flic.kr/p/bU9r8t

slide-11
SLIDE 11

Demo

slide-12
SLIDE 12

We make products accessible, but not the processes by which they are built

slide-13
SLIDE 13

CC-by-2.0 image of drill bits by massmatt: https://flic.kr/p/Vw398F

Accessible tooling is not enough

slide-14
SLIDE 14

Some hard-earned lessons in writing accessible code

slide-15
SLIDE 15

@juliaferraioli

OK

a, b := Vector{1, 2, 3}, Vector{4, 5, 6} a, b, _ = swap(a, b) c := Vector{7, 8, 9} total, _ := add([]Vector{a, b, c}...) Group code blocks logically

slide-16
SLIDE 16

@juliaferraioli

NOT RECOMMENDED

a, b, c := Vector{1, 2, 3}, Vector{4, 5,\ 6}, Vector{7, 8, 9} a, b, _ = swap(a, b) total, _ := add([]Vector{a, b, c}...) Group code blocks logically

slide-17
SLIDE 17

@juliaferraioli

a, b := Vector{1, 2, 3}, Vector{4, 5, 6} a, b, _ = swap(a, b) c := Vector{7, 8, 9} total, _ := add([]Vector{a, b, c}...)

  • Keep your variables close to where they are used
  • Same with interfaces, struct, type declaration

Group code blocks logically

slide-18
SLIDE 18

@juliaferraioli

Keep names short

var a, b Vector OK var vectorA, vectorB Vector NOT RECOMMENDED

  • Fast to listen to
  • Easier to navigate around
  • Less effort to type
slide-19
SLIDE 19

@juliaferraioli

Make names meaningful

var total, scaled Vector OK var tVec, sVec Vector NOT RECOMMENDED

  • Meaningful names reduce cognitive load
  • A light form of self-documenting code
  • Reduces the amount of jumping around in the codebase
slide-20
SLIDE 20

@juliaferraioli

Use pronounceable names

var total Vector OK func add(...) OK var tVec Vector NOT RECOMMENDED func addAllVecs(...) NOT RECOMMENDED

  • Screenreaders can read them
  • Takes less time than pronouncing a string of letters
slide-21
SLIDE 21

@juliaferraioli

Use new lines intentionally

  • New lines are your code’s paragraph breaks
  • Don’t use them too much or too little

a, b := Vector{1, 2, 3}, Vector{4, 5, 6} a, b, _ = swap(a, b) c := Vector{7, 8, 9} total, _ := add([]Vector{a, b, c}...)

slide-22
SLIDE 22

[Add image here]

@juliaferraioli

Be consistent

  • Pick styles early
  • Update your code
  • Keep enforcing them

CC-by-2.0 image of bricks by Joost Markerink: https://flic.kr/p/CzNd9S

slide-23
SLIDE 23

Why do any of this?

slide-24
SLIDE 24

@juliaferraioli

[Add image here]

Disability can be invisible

CC image of doorways by MaZzuk: https://flic.kr/p/2jTdEk

slide-25
SLIDE 25

[Add image here]

@juliaferraioli

Disability isn’t binary

CC image of lightswitch by Paul Comstock: https://flic.kr/p/3g9Y74

slide-26
SLIDE 26

[Add image here]

@juliaferraioli

Accessibility is for everyone

Image of the Earth from SPAAAAACE

slide-27
SLIDE 27

Public domain image of a curb cut from the sidewalk to the street

The curb cut effect

slide-28
SLIDE 28

@juliaferraioli

Curb cut effect

Built for a single population or purpose Serves the needs of

  • thers as well
slide-29
SLIDE 29

[Add image here]

@juliaferraioli

Curb cuts for your code

  • Improved maintenance
  • Better onboarding
  • More inclusive

environment

CC image of a robot with backpack by Morgan: https://flic.kr/p/6UCCUx

slide-30
SLIDE 30

@juliaferraioli

✓ Organize your code logically ✓ Use pronounceable names ✓ Be consistent

Writing accessible Go

slide-31
SLIDE 31

@juliaferraioli

More info

  • Transcript of this talk:

http://bit.ly/accessible-go-transcript

  • Python Code Style for Blind Programmers:

http://bit.ly/2uBWHoY

  • Emacspeak: http://bit.ly/emacspeak
  • Tools of a Blind Programmer:

http://bit.ly/tools-of-a-blind-programmer

  • Curb cuts: http://bit.ly/99-curb-cuts
slide-32
SLIDE 32

julia ferraioli jrf@google.com twitter.com/juliaferraioli

Thank you!

slide-33
SLIDE 33

CC-by-2.0 image of an octopus by Web Betty: https://flic.kr/p/EBcxjV

You’ve gone too far!