extracurricular swift

33
EXTRACURRICULAR SWIFT SALLY SHEPARD // @MOSTGOOD

Upload: sally-shepard

Post on 07-Aug-2015

108 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Extracurricular Swift

E X T R A C U R R I C U L A R S W I F T

S A L LY S H E PA R D / / @ M O S T G O O D

Page 2: Extracurricular Swift

T H E O P P O R T U N I T Y

Lot’s of people will talk to you about Swift.They’ll talk to you about type safety, relying on the compiler and optionals.They’ll talk to you about functional patterns.They’ll talk to you about functions as first-class objects.I want to talk about the potential of Swift in learning.About using it’s clear, concise syntax to teach the concepts and practices of programming.

Page 3: Extracurricular Swift

T H E N E E D

But why? Why teach kids to code?Learning to code does not mean funnelling every child into a job as a programmer. By the time they are adults the landscape will have changed probably beyond our imagination. The real benefit of teaching kids to code is to pass on skills that are useful in many other paths through life. Ordered thinking, problem solving, abstraction and attention to detail are general skills that benefit any occupation.

Page 4: Extracurricular Swift

B R I D G I N G T H E G A P

Resources in schools are often limited, and it's difficult for teachers to not only maintain knowledge of technology but to also learning new technologies.Because of this, it’s essential to have ways of complimenting the current curriculum.When I heard about this after school club for teaching children to code, I really wanted to get involved.So a few months ago I went to a code club induction session, super-excited about the possibility of teaching kids to code.

Page 5: Extracurricular Swift

W H AT I S C O D E C L U B ?W W W. C O D E C L U B . O R G

What is code club?-For children aged 9-11-Volunteer-led after-school coding club.-For one hour a week, kids get to learn to program starting with Scratch and working their way up through HTML and CSS up to Python.

Page 6: Extracurricular Swift

E X T R A C U R R I C U L A R

After-school clubs are often the only place where children can discover what is going on behind the games they play. It's great for them because they are not forced to be there, they want to be there, it creates a different relationship for them.We are a huge, untapped, reservoir of knowledge and enthusiasm that can make a real difference.I love that we are a passionate, excited and friendly community and I think it would be amazing to leverage that excitement and pass it on to a new generation of programmers.

Page 7: Extracurricular Swift

C O D E C L U B C U R R I C U L U M

I wanted to spend some time working on helping kids learn to code, but I couldn’t commit to running a club.I’ve been looking at the Code Club tools and examining them as a framework for how Swift could be an amazing tool for learning.Before I get into what I’ve been working on, I want to give you a brief overview of what gets covered in code club.

Page 8: Extracurricular Swift

H T T P : / / S C R A T C H . M I T. E D U

S C R AT C H

The first two terms involves using Scratch to build programmatic structures like loops and conditions with coloured blocks and immediately see the results on the screen.It’s all drag and drop, so it really focuses on learning logic without having to also learn a language.It’s mostly targeted at simple game mechanics as a way to get children interested.

Page 9: Extracurricular Swift

H T M L & C S S

After completing Scratch, the students can move onto a term of HTML and CSS.They get to build some simple websites and learn how to style them.

Page 10: Extracurricular Swift

P Y T H O NFinally, they get to learn Python.It builds well off of everything they’ve learned so far, but focuses on learning more about programming languages.The lessons for the first term of Python include:Printing text, catching errors, variables, data types, conditionals, loops, using libraries, collections.It provides a decently comprehensive introduction to structures and data types.I’d like to take a moment to look at the Python language and tools and why they make a good choice for learning.

Page 11: Extracurricular Swift

W H Y P Y T H O N ?So why choose Python for learning?Simple, clear syntax: -there’s no division between primitives and objects.-no complications around pointer notation and memory management.Focuses on what-to-do not how-to-do-it.Widely available:-free to obtain and ships with most OS.Wide selection for functions like math, drawing etc..And it has a choice of interaction methods.There’s Python IDLE. This is the method of choice for Code Club.And There are also Web-based tools.So now we understand the basis for using Python, let’s take a look at Swift in comparison.

Page 12: Extracurricular Swift

S W I F T A S A N A LT E R N AT I V E

Swift embraces most of the points that made Python a good choice: Simple syntax, focus on what over how, great library support from Foundation and UIKit, and some choices as to how to interact with it.In less than a year, Swift has become hugely popular, just imagine where it will be in 5-10 years.

Page 13: Extracurricular Swift

A C C E S S I N G S W I F T

There are three main ways to access Swift-Xcode-REPL-Web-based tools

Page 14: Extracurricular Swift

X C O D E

Xcode gives you access to full projects and playgrounds.Playgrounds allow you to use a huge spread of libraries and features to ‘live code’ anything from ‘Hello, world’ up to Scene Kit 3D game views.

Page 15: Extracurricular Swift

R E P LThe closest match for the Python IDLE is the Swift REPL. This can be access by typing ‘swift’ on the command line and requires at least that the Xcode Command Line tools package be installed. The REPL allows commands to be typed and executed immediately, referencing previously typed declarations and commands. Alternatively you can pass in a Swift file at the command prompt and have it executed automatically. You can also specify command line arguments, which can be accessed via Process.arguments

Page 16: Extracurricular Swift

W E B - B A S E D T O O L S

W W W. R U N S W I F T L A N G . C O MThere are also some great web-based resources for running Swift, like runswiftlang.com. They are restricted to using Foundation only and so you do not have access to UIKit.The big advantage of this is you can run it on any computer that has access to the internet and you don’t need to install any software or tools.

Page 17: Extracurricular Swift

T H E C H A L L E N G E S

There are some challenges to overcome before Swift can be embraced as a learning tool.

Page 18: Extracurricular Swift

E N V I R O N M E N T A N D FA C I L I T I E S

The biggest problem is schools don’t usually have Macs, schools are most likely to have PC hardware running Windows. There are usually safeguards in place to limit accessing content outside of the school network and restrictions on installing additional software on any of these machines. At the end of the day, there is a potential roadblock around either needing Mac hardware to fully engage with Swift or using Web-based tools and accepting the limitations they have.Outside of having direct access to macs or using web-based tools, there are some other options I’ve looked into.

Page 19: Extracurricular Swift

S S H I N T O A S I N G L E M A C T O R U N R E P L

You can SSH into a mac to run the REPL.Here you’d use a single Mac with Xcode Command Line Tools installed, either added to the local network or remotely located and accessible through the firewall as a server and open up SSH sessions in a command line on any platform to access the REPL.The difficulties with this are you’d still need a Mac somewhere and you wouldn’t have access to Playgrounds.

Page 20: Extracurricular Swift

A C C E S S I N G A M A C V I A V N C

You could also give visual access to a Mac to use Playgrounds across VNC or other Screen Sharing technology.Again, with this option you’d still need a Mac somewhere and there could be performance issues, but you would have access to Xcode, Playgrounds and REPL.

Page 21: Extracurricular Swift

R U N O S X I N A V I R T U A L M A C H I N ERun OS X in a virtual machine. This would enable both Xcode and REPL access.But, this would require the school to keep Xcode up to date, and for their IT team to know how to use Macs. This could also have performance issues since most computers in schools are not designed to run Xcode.

Page 22: Extracurricular Swift

C O R P O R AT E S P O N S O R S H I P

Get some corporate sponsorship to finance a small mobile mac lab.It means you don’t have to interfere with the schools hardware or network.You would still have to deal with individual schools requirements over what software is installed on the machines, how it’s monitored and who is in charge of upkeep.

Page 23: Extracurricular Swift

L I M I TAT I O N S O N I N P U TThe REPL and Playgrounds are missing one significant feature that Python possess.And that’s an way to easily capture input from devices, commonly standard input from the keyboard. This input allows interaction with running code, and that immediate feedback is a great way of providing a reward for work when children might have a small attention span.Although REPL has access to command line arguments, this is still limited and not in real time during execution.

Page 24: Extracurricular Swift

W H AT A B O U T W I N D O W S ?

Use your skills and imagination to build tools to make using Swift easier in other environments. Could you make playgrounds that work on Windows?Or a more full-featured web-based tool?

Page 25: Extracurricular Swift

G O G E T I N V O LV E D

Kids need the opportunity to learn from coding, not just for the next generation of programmers but also as general life skills.Swift is an amazingly suitable language to use to help kids understand the concepts and practices of programming.The tools are still maturing and need our input and innovation to reach the ubiquity of other languages.Our community is so ideally placed to make a difference to the education and abilities of children, we owe it to them to make the effort.

Page 26: Extracurricular Swift

H O W T O G E T I N V O LV E D

There are a number of organisations for supporting this, but these are the two I’m most familiar with:Code Club and Stemnet.

Page 27: Extracurricular Swift

R U N A C O D E C L U B

You can run a club: you don’t have to do this on your own, in fact it’s better to get a few volunteers to run a club.There will also be a teacher with you at all times.Try to get your employer to agree to send a few people from your team, alternate between weeks if that’s easier.

Page 28: Extracurricular Swift

H O S T A C L U B

You can also host a club.Code clubs don’t have to be in schools,they also take part in libraries and community centres.If you know a place that would work - talk to them.

Page 29: Extracurricular Swift

V O L U N T E E R T O T E A C H T E A C H E R S

You can volunteer to teach teachers so they can better support students.Many teachers don’t have training to properly teach the new computing curriculum,help them get where they need to go.(Find out more: http://www.codeclubpro.org/become-a-trainer)

Page 30: Extracurricular Swift

W R I T E /I M P R O V E M AT E R I A L S

If you’re worried about commitment, or maybe terrified of children, you can contribute by making some cool new projects.

Page 31: Extracurricular Swift

There are almost 3000 code clubs worldwide.Since it’s so global, there’s a massive need for the materials to be translated into other spoken languages,so if you speak other languages, then help them out.

Page 32: Extracurricular Swift

S T E M N E T A M B A S S A D O R

W W W. S T E M N E T. O R G . U KThere’s also STEMNet where you can go and volunteer on a more ad-hoc basis: they do lots of career fairs and classroom talks. They also have active forums where you can help teachers and other volunteers out.They also handle getting the necessary background checks you need, and Code Club recommend going through STEMNet to get this sorted.As developers, we make magical, wonderful things, if you’ve lost that feeling - of making something magical then spend some time teaching kids, and you’ll get it back.

Page 33: Extracurricular Swift

T H A N K S !S A L LY S H E PA R D / / @ M O S T G O O D