Lessons Learned:
A Developer's Perspective
on Teaching and Learning


Leah Garrett

My perspective looking for
better ways to code and learn
for myself and others

About Me

  • 20+ years software development
  • Hiring, training and mentoring developers
  • Worked at University as tutor and lecturer
  • Ran a six month coding bootcamp
  • Part of the team that organises the DDD Melbourne conference
  • Co-organiser of the Melbourne Golang Meetup group

Objectives of this talk

  • to share my experiences
  • to pose lots of questions and not answer them all but set directions
  • to evaluate what works and what doesn't
"In the realm of complex systems, definitive answers are often elusive. Wisdom lies in recognizing the 'it depends' and embracing the nuances that shape our understanding."

How to teach the "best" way to do things

  • It Depends
  • You don't know what you don't know
  • Asking good questions
  • Learning to ask for help

Agenda

  • Learning techniques at work
  • Formal education
  • Informal learning outside of work
  • Conclusions

Learning techniques
at work

Brown bag / lunch and learn

  • Informal lunchtime session
  • Can be a presentation, a discussion, a workshop
  • Can be on any topic
  • Can be a one off or a series

What works

Can bring people together across teams

Can introduce a new person or tech

What doesn't work

Takes lunchtime

Not as effective when remote

Pair programming

  • Two developers working together on the same code
  • One developer is the driver, the other is the navigator
  • Can be used for learning, mentoring, problem solving, code reviews
  • Can be done in person or remotely

What works

Can help with on-boarding

Can increase quality

What doesn't work

Can be tiring

Not for everyone

Code reviews

  • Reviewing code before it is merged into the main codebase
  • Can be done in person or remotely
  • Can be done by peers, seniors, juniors
  • Can be done by a team or an individual

What works

Sharing best practices

Can increase quality

Can happen informally

What doesn't work

Not everyone comfortable to comment on a PR

Over policing

Onboarding / interns

  • Formal or informal process of introducing new staff to the company
  • Engage a variety of people across the company in a variety of activities, shadow people for short or extended periods
  • Novice program - onboarding new developers

Formal education

University

  • 3-4 years full time
  • Structured learning over a few hours a week
  • Some practice
  • Lectures with theory and passive listening

What this looked like for me

  • Working full time as a developer
  • Thursday afternoon off to lecture Java
  • Evening classes, labs, tutorials, hands-on
  • Other peoples content

What works

Get to try a variety of subjects

Team projects

What doesn't work

Memorizing to pass an exam

Limited practice

Team projects

Bootcamp

  • 3-6 months full time
  • Semi-structured learning, 9am - 5pm classrom time
  • Students told by staff "think us us as your guides, not your solution book"
  • Students follow along, don't explain everything
  • Show, don't tell

No glossary required

  • No formal introduction of terms or theory
  • Lots of practice

What works

Immersive learning with lots of practice

Team projects

What doesn't work

Can be overwhelming

Team projects

"That's interesting"

"Three weeks to build an app"

Muscle memory

One day Workshop

  • Semi-structured learning
  • Attendees follow along coding straight away, don't explain everything
  • Objective to break the ice on the tech and get people started

Bootcamp style approach

  • No formal introduction of terms or theory
  • Lots of practice

One day Workshop - Considerations

  • No knowledge of audience and who is doing the course and why - try to ask at the start and target examples to audience
  • No constraints to guide content
  • If you are running a workshop internally you can focus on problems to be solved with Go

Consider previous language experience

  • JavaScript - type safety
  • PHP, Ruby - speak to structure and patterns

Content Considerations

  • Trade offs between small examples and large examples that might mean some people behind but engage more interest
  • Assuming people like solving logic puzzles, create ways to ask questions;
    what would be a better way? Could we do this differently? eg: the left strategy, avoid nested `if` statements

Consider making an impression

  • Show off some Go features to capture interest eg: `defer`
  • The extent of features in standard library - students surprised with testing being built in

Consider impact of Generative AI

  • IDE auto complete standard examples
  • ChatGPT to build solutions

Try to break things

Experiment

Learn how to get started

Informal learning
outside of work

Meetups

  • Informal gathering of people with a shared interest
  • Can be a presentation, a discussion, a workshop
  • Can be on any topic
  • Can be a one off or a series

Workshop meetup

  • Short time frame
  • Variety of attendees
  • Scripted to allow for people catching up and racing ahead

Meetup Coding
Challenge idea

  • People enjoyed hearing about an attempt at the One Billion Row Challenge (July Meetup)
  • There was lots of questions and suggestions
  • Wanted to duplicate that energy

Criteria

  • Something that was easy to explain
  • Code needed to fit on one screen for presentation
  • Wanted to target performance

Coding Challenge Objectives

  • Small coding example - easy to see on screen
  • Go deep exploring options
  • Think of many different implementations
  • Code up on github

Started using code from Dave Cheney

  • Word Count implementation
  • Read through every character to find words

Over several meetups

  • address buffer changes recommended by Dave Cheney
  • look at loop performance
  • look at byte shifting

Tooling

Wasted a lot of time running and re-running on branches to compare performance. Introduced Benchmarking in the follow-up session.

Started to look at bit shifting

Does it need to be so complicated?

Performance vs readability

  • Weigh up tradeoffs
  • A safe place to explore and try things

Open ended problem

  • How fast does it need to be?
  • Supporting large files?
  • Lack of constraints expanding the problem arbitarily
  • How much time would you spend?

Best practices discussions

Started as discussion in the coding challenge and ended up as a talk.

  • Don't speculatively optimize code without profiling
  • Don't always need goroutines
  • Don't need to pass by pointer

Knowledge from prior languages

muscle memory working against us

Would I do the
code challenge again?

Yes

What I would change

  • Consider announcing earlier so people could make a PR before session
  • Consider asking people to take turns at keyboard
  • Introduce benchmarking earlier
  • Use tests to confirm validity of word count

Considerations when
running internally

  • Open ended implementation to motivate need for tooling and contraints
  • Highlight the need to ask questions
  • Without restrictions can end up with unexpected learnings

Call to action

  • Try a variety of learning techniques
  • One training or learning technique may not address all your training needs
  • Trying a variety may leads to new and unexpected learning outcomes

References

References


Thank-you


Leah Garrett

linkedin.com/in/leahgarrett/

GopherConAU Mascot by Renee French