Jeff Bergier: Teaching Swift to Non-Developers

1fa9cb8c7997c8c4d3d251fb5e41f749?s=47 Realm
March 22, 2016

Jeff Bergier: Teaching Swift to Non-Developers

1fa9cb8c7997c8c4d3d251fb5e41f749?s=128

Realm

March 22, 2016
Tweet

Transcript

  1. 2.

    Jeffrey Bergier UX Designer @ Riverbed TA @ General Assembly

    Teacher @ MobileBridge Addicted iOS Dev @ Home @jeffburg jeffburg.com
  2. 4.
  3. 6.

    Standard Format • All Day Workshop on Saturday 9:30 to

    5 • “Installfest” on day before workshop to get Xcode installed • Build a functioning app • Retrospective after workshop • Post workshop drinks with Students and Teachers
  4. 7.
  5. 8.
  6. 9.
  7. 10.

    Plug (only one) • Volunteer Teachers • Volunteer TA’s •

    Volunteer Curriculum Developers • Office Space for Events • Food for Events • Volunteer Organizers
  8. 13.
  9. 14.
  10. 19.

    Possible Questions • Do you know what a variable is?

    • Have you heard of “Object Oriented Programming” • Have you ever done web or flash programming?
  11. 21.

    This the Mobile Age • Filesystems are hard • Windows

    are hard • Full screen windows are a nightmare
  12. 23.
  13. 25.
  14. 26.
  15. 27.
  16. 28.
  17. 30.
  18. 35.

    Swift is a means to an end • We like

    Swift for many many reasons. • Unless you’re students are already developers, they likely won’t understand those reasons. • Focus on getting things on the screen. • Don’t teach Swift features or syntax beyond what is needed for the project at hand.
  19. 37.

    Questions for yourself • How long is the teaching session?

    • Is this the only session or is this daily / weekly? • Is this one-on-one or is it a group? • What am I teaching today? • Have I built this app on my own recently? • Getting lost in your own content is extremely disruptive.
  20. 39.

    Get Something on the Screen • Run often • Spend

    the time to get the app running on their device (remember, its free now) • When you hook up an IBAction, use print() to show it works • When you hook up an IBOutlet, change the text to show it works. • Coding for more than 10 minutes straight is a complete SLOG. Try to keep it to no more than 5 minute stretches of code.
  21. 42.

    Common Crashes • Rename IBOutlet (Key Value Coding compliant) •

    Rename IBAction (Does not response to selector) • Unknown Cell Identifier • Found nil while unwrapping • Array out of bounds
  22. 44.

    Ask Questions • “What do you think will happen when

    we build and run?” • “Why do you think that happened?” • “Ok, now that that works, what do you think is next?” • Classes can sometimes be really quiet. Try to be humorous about it. “Bueller?”
  23. 46.

    Storyboards are Amazing! • Even though you may not like

    them, they’re amazing. • No platform has anything as powerful • Its even great for designers, you can make such great workflows with ZERO code • (I know android has the equivalent of NIB’s, but they don’t have storyboards)
  24. 48.
  25. 49.
  26. 51.

    Be unsafe, but tell them • !!!!!! • valueForKeyPath as!

    String • NSData(contentsOfURL: “sure is easier than NSURLSession”) • If you have time at the end, go back and make the coder safer.
  27. 54.

    Starter Project • Does the project rely on a CocoaPod?

    • A lot of custom UIViewController and UITableViewCell subclasses? • A lot of boilerplate code? NSURLSession code? • Does any API used by the project use completion handlers? • Is there an API key for the service you’re using? • Does ATS f*ck up network access?
  28. 56.

    AutoLayout • Very tedious • Lots of fiddly buttons in

    Xcode • Try UIStackView if you dare • Ask the students what iPhone models match these screen sizes.
  29. 58.

    The App Works • Customize background colors in the Storyboard

    • Customize fonts in the storyboard • Show how to have even/odd cell layouts • Show how to add an about screen • This sounds small. But this is HUGE. The satisfaction level of students that experience this step is ginormous compared to the students who didn’t.
  30. 59.

    Don’t assume beginners know how to use desktop computers Do

    know your student(s) existing skill level. Do show common iOS design patterns. Do be prepared. Do Build and Run often. Do crash often (on purpose). Do err on the side of Storyboards, rather than code. Don’t lecture Don’t be a soup code Nazi Provide starter project (If needed). Don’t teach AutoLayout Do save time for customization at the end. Don’t fight the framework. Don’t teach (the intricacies of) Swift Do a fully functional app. Do believe in your students ability to learn this stuff
  31. 60.

    Thank You Now get out there and teach the next

    generation of great creators ☑
  32. 61.

    Q&A