hack day. welcome to hack day! meet your mentor and your teammates! share: –what’s your name?...

48
Hack Day

Upload: elizabeth-owens

Post on 31-Dec-2015

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Hack Day

Page 2: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Welcome to Hack Day!

Meet your mentor and your teammates!

Share:–What’s your name?–What school do you go to (or company

do you work for)?–What’s your favorite app?–Why are you excited about the

Technovation Challenge?

Page 3: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Technovation Mission and Vision

Technovation strives to promote women in technology by giving girls the confidence and skills they need to succeed in computer science and entrepreneurship.

Our goal is to empower every girl to see themselves not just as users of technology---but as inventors, designers, builders, and entrepreneurs.

Page 4: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Technovation (video)

Page 5: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Beginner-level app building language • Completely web-based tool, requires

an internet connection to use• Must be signed into your Gmail

account first• Two major parts: Designer and Blocks

Editor

App Inventor

Page 6: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

App Inventor: Designer

Design the user interface of the app!

Page 7: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

App Inventor: Blocks Editor

Program the functionality of the app - how it works!

Page 8: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

App Inventor: Emulator

In case you don’t have a real phone to test with you can use the emulator. It simulates a phone on your computer.

Page 9: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

– Click on Settings App– Select Wireless &

networks– Select Wi-Fi settings– Select Wi-Fi. A green

check will appear by it.– Select Wi-Fi settings.

Choose the network and password (if there is one) written on the board.

Set-up Wireless

Page 10: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

– Click on the Settings App– Select Applications.  This

will open a new page.– Select "Unknown sources".

A green check will appear by it.

– Select Development. This will open a new page.

– Select "USB debugging". A green check will appear.

– Select "Stay awake". A green check will appear.

– Hit back button until back at Settings screen.

Phone Settings for Development

Page 11: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Activity: CrystalBall Hack

In this tutorial, you’ll create an app that works like a crystal ball. Users think of a question such as “Will I win my soccer game?” and then tap the screen to see the crystal ball’s response. We’ll walk through it together.

Page 12: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

CrystalBall: Getting Started

• To begin, go to gmail.com and sign into your email account

• Create a Gmail account if you don’t have one

• Open up a new tab in your browser, go to http://appinventor.mit.edu/ and click “invent”

• Under My Projects, click “New” and name your project CrystalBall

Page 13: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Activity: CrystalBall Hack

In the Designer• Add a label with the text “What do

you want to know?”• Add a label with the text “Shake the

crystal ball and all will be revealed”• Put the 2 labels in a vertical screen

arrangement• Add a button named “FortuneText”

and set the background to be the Crystal Ball Image

• Set the text of the button to be “”.• Add a label under the the button

that says “Tap to Clear..”• Add an accelerometer

sensor

Page 14: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Activity: CrystalBall Hack

In the Blocks Editor• Get the Shaking Event

Handler for the Accelerometer. • Put in a Set Fortune.Text block

in the event handler.• Connect a call pick random

item from the list to the Set Fortune.Text block

• Connect a make a list block to the list value in the pick random item block.

• Add the text “Yes”, “No”, “Maybe”, and “time will tell” to the list as items

Page 15: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Activity: CrystalBall Hack

In the Blocks Editor• Find the

FortuneText clicked event handler.

• Set the FortuneText.Text to a blank text box.

Page 16: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Activity: CrystalBall Hack

On the phone• Package for the

phone• Test it!

Page 17: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Most fun part of app-building!• It’s good to always be

thinking how you can make things better• Customizing your app helps

you learn the tools better and prepare to make an app on your own

Customizing Your App

Page 18: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Activity: CrystalBall Hack

How can we customize this app?• Change the look– Background picture

• Add a sound• Add more answers• Other ideas?

Page 19: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Read the tutorial questions on your worksheet

• Discuss the answers in your group

• Turn in to your teacher• Be prepared to share with the

group

Discussion

Page 20: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• An event is an action that occurs outside the program• Usually from the User!• Examples:–Key presses–Screen Touches

Event-driven Programming

Page 21: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Just like with a computer, program events happen in your life everyday• Examples–Phone rings–Your friend tosses a ball at you

Events in Real Life

Page 22: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• What do you do when an event happens?–Phone rings •Answer the phone!

–Your friend tosses a ball at you •Catch the ball!

• These are called Event Handlers–Notice they can be different for each

event

Events in Real Life

Page 23: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• In CrystalBall, what was our event?–Phone was shaken

•What did our event handler do?–Displayed an answer from the list!

Event-driven Programming

Page 24: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• A named container that holds a value• The value can change• Your wallet – Sometimes might have $5– Other times it might have $20

• Hair Color– Sally’s is Brown–Michael’s is …

Variables

Page 25: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

In this tutorial, you create an app that allows the user to draw lines and dots of various colors on the screen.

PaintPotHack

Page 26: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Driver – hands on keyboard & mouse• Navigator – reads instructions and

tells driver what to do• Switch every 5-10 minutes• Two brains are better than one

Pair Programming

Page 27: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Pair Programming in Practice

Page 28: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

If you have problems• Watch the YouTube videos (Part 1 & 2)

• Post questions to the P2PU forum

Resources

Page 29: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

How can we customize the app?– Add more color

buttons– Have a random

color button– Use camera to add

background image– Others?

PaintPotHack

Page 31: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Read the tutorial questions on your worksheet

• Discuss the answers in your group

• Turn in worksheet to your teacher

• Be prepared to share your answers with the group

Discussion

Page 32: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

In this app you will create a game that has a mole that jumps randomly around the screen every half second. If the user successfully touches the mole, then the score increases by one point.

MoleMash Hack

Page 33: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Resources

If you have problems• Watch the YouTube videos (Part 1, 2 & 3)

• Post question P2PU forum

Page 34: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• A named sequence of steps•Why is it useful to make procedures?–Code Reuse, less coding–Only need to change code in one place if there are bugs or updates

Procedure

Page 35: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• What do you do when brushing your teeth?–Put toothpaste on brush, add

water, brush, spit, rinse your brush

• It’s actually several steps represented by “brushing your teeth”

• But your mom only needs to say “brush your teeth” and you know what she means

Procedures in Real Life

Page 36: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

What procedures did we use in MoleMash? What did they do?–MoveMole•Update the position of the mole

–UpdateScore•Print the new score

Procedures in MoleMash

Page 37: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

What are some ways you have found that work well to find errors in your app?

– Proper Naming– Test frequently– Reread your code– Add Comments– Deactivate code that’s not

in use– Use the Watch feature to

see variables– Do It allows you to test procedures

Debugging

Page 38: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

How can we customize it?– Add a second mole– Speed up the mole– Change the look• Change the mole• Change the background

– Add a sound– Others?

MoleMash Hack

Page 39: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Read the tutorial questions on your worksheet

• Discuss the answers in your group

• Turn in to your teacher• Be prepared to share

Discussion

Page 40: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Work alone or in pairs to design and develop your own application

• Try to use the tools you’ve learned– Events– Variables– Lists– Procedures– Camera– Buttons

Activity: Create Your Own App

– Labels– Accelerometer– ImageSprites– Timer– Sound

Page 41: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Have another pair/person test your app– Do they like it?– Is it easy to use?– Do they have suggestions for improvement?

• Describe your app to your group• Continue to work on your app at home • Show your friends & family!

Activity: Create Your Own App

Page 42: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Read the tutorial questions on your worksheet

• Discuss the answers in your group

• Turn in to your teacher• Be prepared to share your

answers with the group

Discussion

Page 43: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

In this tutorial, you’ll create an app that autoresponds to text messages while the user is driving. The user also has the option to have the app speak the message that was received.

Activity: No Text While Driving Hack

Page 45: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

How can we customize this app?– Custom responses for

different phone numbers

– Others?

Activity: No Text While Driving Hack

Page 46: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Read the tutorial questions on your worksheet

• Discuss the answers in your group

• Turn in to your teacher• Be prepared to share your

answers with the group

Discussion

Page 47: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

• Think-Pair-Share–Share 2 things you learned with a partner–Be prepared to share with the group

• Get the contact info for your team and set up your first meeting for January!

Wrap Up

Page 48: Hack Day. Welcome to Hack Day! Meet your mentor and your teammates! Share: –What’s your name? –What school do you go to (or company do you work for)?

Before you go!

Tweet us: @_technovation_#technovation

Join our Facebook community: Technovation Challenge