Lambda Lessons

Katie Miller (@codemiller)

Background: Who Am I?

Motivation: Why Teach FP?

  • FP is awesome
  • It may not look that way to outsiders
  • Sharing the awesomeness is to the community's benefit

FP Is Awesome

"[W]e're going to be living in a multicore, distributed, concurrent – all the buzz words – world. The conventional models we've been doing, the OO stuff...is not going to survive in that kind of environment. We're already seeing it beginning to fall apart."
Pragmatic Programmer Dave Thomas

There Are FP Learning Barriers

Sharing FP Has Benefits

  • More programmers writing more functional code: software, libraries, languages
  • Larger community helping FP to become more mainstream, leading to more FP jobs
  • More diversity of ideas, driving innovation

Areas to Consider

Curricula and Pedagogy

  • Set clear learning goals
  • Choose primary emphasis: problem solving, language learning, project
  • Consider target audience; build on what they already know
  • Plan a series of small, achievable tasks leading to the end goals
  • Use a variety of teaching mediums, including visual stimuli

Language Choice

Teaching Tools

  • Professional tools aren't designed for beginners; keep it simple, and explain it
  • Obscure error messages are frustrating; choose tools that help students recognise/overcome them
  • Environment set-up can be a major pain point; consider using the cloud

Experience Report 1: NICTA Lambda Ladies Workshop

Overview

  • Free, three-day event at Red Hat Brisbane in March
  • Content based on the NICTA Haskell course
  • First NICTA event to include the Lambda Ladies branding and explicitly invite women
  • Instructors: Tony Morris, Mark Hibberd, and myself, with help from Dave Laing
  • Women given preference, but men also able to apply/attend; 16 women and 11 men accepted

What Went Well

  • On day one, 12 women out of 23 students (52%); over the next two days, numbers dropped but the percentage still 53-55% women
  • Good ratio of instructors to students
  • Content paradigm-focused, consisting of a series of short exercises
  • Expectation set it was OK not to follow every detail
  • Feedback indicated material kick-started further learning

Issues Encountered

  • Value/goals of course not clearly defined
  • Levels of expertise and pace varied greatly
  • Some felt there was too much content
  • Some had difficulty with general tools and GHCI
  • Several students had issues with whitespace in Haskell

Lessons Learnt

  • If you want women to come to your workshop, invite them. Make it clear if workshop will be mixed gender; some prefer woman-only learning environments
  • Make early mention of Haskell/GHCI quirks
  • Include visual representations of key concepts
  • Offer official slides/handouts/answers so no need to copy from projector/whiteboard
  • Have all instructors/helpers deliver content; different perspectives are valuable

Experience Report 2: Haskell in the Cloud Workshop

Overview

  • Four-hour workshop at Codemania Auckland conference in April
  • Taught by myself and Tony Morris
  • 17 registered participants (all men)
  • Brand new course content, focused on Haskell basics and creating a Scotty web app in the cloud with the OpenShift PaaS

Demo

What Went Well

  • Leveraged students' knowledge of web app development
  • Clear goals; expectation set we would omit details
  • Most got Haskell app running locally and in the cloud
  • High level of engagement, during and afterwards

Issues Encountered

  • Lack of time; a lot of FP concept/syntax explanation required before web app work possible
  • Some network issues
  • Some students had issues setting up tools locally, so could only run app in the cloud

Lessons Learnt

  • Cloud can be helpful, but a plan B in case of network issues is a must
  • The context of building something familiar can be a useful way to introduce FP concepts
  • A workshop focused on several things sacrifices depth for breadth, but sharing the big picture of 'the FP way' can be a win

Teaching Opportunities

  • Lunchtime talks at your workplace
  • Presenting at local Meetup groups (FP-focused, and otherwise)
  • Conference presentations
  • Running or helping to coach at workshops
  • Special events (eg: Clojure Bridge)
  • Everyday workplace discussions

Conclusion

References and Credits

References

Image Credits

Lambda Lessons

lessons.codemiller.com

Katie Miller (@codemiller)