CoderDojoTo 6 – HTML5 & CSS3 animation

By | classes, tutorial
Masterclass in HTML5 and CSS3For each mini-topic, I’ll show how to do some sort of basic graphics primitive like draw a line or move an image across the screen. Then the kids will have some time to use that primitive to make their own pictures and stuff.
Mentors don’t have to know the material to help out. There are many basic things that kids will need help with like:
a) Many of the kids will make mistakes just typing things in, and they’ll need help fixing their typos (you’ll have to be patient. Some of the younger kids are very slow at typing. Try to resist the temptation of doing all the typing for them).
b) Other kids won’t have any ideas for pictures they want to draw on the computer, so you’ll need to inspire them.
c) And others will try to draw things that are too ambitious for the graphics primitives that they know
d) Some might have difficulty just with the idea of x and y coordinates
Here is a link to the hand-out, put together by Ming-Lee Iu: http://www.programmingbasics.org/en/downloads/html5canvas/htmlcanvashandout.pdf

 

Simulating the Spread of Diseases in Scratch

By | classes, tutorial

This walkthrough requires you have a free account with Scratch. Get it here. 

http://scratch.mit.edu/
http://scratch.mit.edu/projects/19361239/

1. New project and sprite

  • Create a new project with the ‘Create’ button

  • Give your project a name (you can change this later)

  • The cat is fun, but there are lots of other sprites. Right click on the cat to delete it.

  • Download a sprite from: http://www.clipartlord.com/
    What do you want your colony to be? A dinosaur, monkey, a golden armadillo?

  • Below the animation panel is an arrow with a folder => click on that to Choose new sprite from file.

2. Make a healthy and a sick look for your sprite by making two “costumes”

  • Click on Costumes at the top of the middle panel and you’ll see your sprite.

  • Right click and duplicate your costume to make another costume just like it.

  • Give it a new costume name – ‘sick’

  • Then click Edit beside the new copy and use the painting tool to make it look sick. Be sure to give the sick costume a different color so it stands out.

3. Make the Sprite move by writing a script for it to follow

  • Click on Scripts at the top of the middle panel to get ready to write your script.

  • At the top of the left panel, click on Events. Drag the when flag clicked block to your script panel in the middle.

  • Now click on Motion at the top of the left panel. Drag move 10 steps to your script and attach it to the other block.

  • Try running your program by clicking the flag. Cool!

  • Make your sprite turn by attaching another block from the Motion options.

4. Keep your sprite moving!

  • Click on Control to go back to the orange control blocks.

  • Make your sprite follow the move and turn actions ten times by dragging a repeat 10 block over to the script. Attach it below the when flag clicked and around the move and turn blocks. Try it!

  • Change the number of repeats from 10 to 100 and try it again. Your program runs for a longer time, but still eventually stops.

  • Disconnect the blocks and throw away the repeat block by dragging it to the left panel. Instead, insert a forever block. Try it! Now you need to click the red stop sign to stop.

5. Slow down your sprite

  • That sprite is too fast! Put a wait 1 secs block inside your forever loop.

  • Okay, now it’s too slow. Change to .1 sec.

6. Make your sprite a little less predictable

  • Instead of always moving the same number of steps, you can make your sprite move a random amount. Replace the 10 in your move block with a green pick random 1 to 10 block from the Operators menu.

  • Use the same idea to make the amount your sprite turns be random.

  • Play with the range of your random numbers until you like how your sprite moves.

7. Make a new sprite who is always sick

  • Go to the bottom right panel and right click on your sprite to duplicate it. Now you have a new sprite with the same costumes and script as your first sprite. Give this sprite a name like “sick sprite” by double clicking on the name in the top of the middle panel.

  • Click on Scripts. Now you’re going to change your sick sprite’s costume so that it looks sick.

  • Go to the Looks menu and drag a purple switch to costume block into your script right before the forever loop. Set the block so that it chooses your costume for sick sprites.

8. Make your original sprite healthy

  • Just like you did for your sick sprite, set your original sprite’s costume, but make this sprite look buy cipro antibiotic healthy.

  • Run your program. Your two sprites run around, but they have no effect on each other.

9. Make your original sprite “get sick” with it touches a sick sprite

  • First, your sprite must notice if it touches a sick sprite. From the Control menu, drag an if block into the bottom your loop.

  • The if block is going to check if something is true. You get to tell it what to check, by filling in the hole in the block. Go to the Sensing menu and drag in a touching color block.

  • Set it to the color of the sick sprite by clicking on the color square, taking the little eye dropper (it will pop up over) to your sick sprite and clicking on its background color.

  • Now fill in what should happen if your sprite is touching a sick sprite: change to the sick costume.

  • Run your program and watch your sprite get sick! Run it again and confirm that your sprite starts out healthy at the beginning. If not, adjust the order of the blocks in its script to make that happen.

10. Add more sprites – don’t do this step until you have finished steps 1-9

  • In the bottom right panel, right-click on your original sprite to make some duplicates. They will inherit the same costumes and script. Be sure to keep that other sprite who is always sick.

  • Now run your program and watch the disease spread through all the sprites. If the sprites start out too close together they’ll get sick immediately, which isn’t much fun to watch.

  • You can drag them apart to better starting positions.

11. More ideas: Experiment with more realistic diseases

  • Keep track of the sickness level of each sprite. Go to the Data menu and click on Make a variable. Name it “sickness” (and make it a variable For this sprite only). Your sprite now has a variable called “sickness” that can be 0 if it has no sickness and higher numbers if it is sick. Add a block at the beginning of your sick sprite’s script that will set its sickness to 50. Make your other sprites start out with a sickness level of 0.

  • Make your sprites get well again after they have been sick for a while. (Hint: reduce their sickness level every time through the loop and check for when that sickness hits 0.) But be sure to keep that one sprite who is always sick so the disease has somewhere to start.

  • Experiment! Make the disease more or lass catchy, try different amounts of time needed to get well

  • Change your script so that a sprite isn’t guaranteed to get sick when they touch a sick sprite. Try using a 30% chance of getting sick.

12. More ideas: Make it look cool

  • Make your sprites “say” something when it gets sick. (Hint: Find a block for this in the Looks menu.)

  • Make an interesting “stage” that will be the background for your sprites: Click on the stage icon in the lower-right panel, and then the Backgrounds tab in the top of the middle panel. You can paint your own background, or import one from a file.

  • Improve how your sprites move.

  • Keep track of the total number of sprites who are sick.

Using Scratch at home: http://scratch.mit.edu
Adapted from: Gr8 Designs for Gr8 Girls

CoderDojoTo 5 – Learning through Games

By | blog, classes

Next Session: March 23th, 10AM

[ujicountdown id=”Next Event” expire=”2014/03/23 10:00″ hide = “true”]

Bitmaker Labs
220 King Street West
Toronto, ON M5V 2C3
Canada

CoderDojoTo has free classes for young people to learn computer & code skills. By following our lead instructor’s visual presentation, students and mentors work together to learn coding concepts and build something totally unique in an open education lab. This session will be based on learning programming logic through game play. Pizza party after class. TTC tokens provided. Coffee for the early morning. It’s totally free! This event is hosted by our venue sponsor Bitmaker Labs*.

*Bitmaker Labs is located on the 2nd floor. Wheelchair access is unfortunately not available at this time. Visit coderdojoto.com to download supplimentary resources for use at home. Contact info@coderdojoto.com with any questions about accessibility or if you have any questions about our session resources.

Get tickets here: http://coderdojoto5.eventbrite.com

HOW TO BUILD A WEBSITE (HTML/CSS) – Website 101 walkthrough

By | blog, tips & tricks, tutorial
LEARN TO CODE, FOR FREE!
Sunday, February 23rd 2014 from 10AM-1PM
Bitmaker Labs – 20 Duncan Street, Toronto, ON – Unit 201

Toronto, ON – CoderDojoTo has free classes for young people to learn computer & code skills. By following our lead instructor’s visual presentation, students and mentors work together to create a unique web page.

You will need:

A text editor – The software we need to edit our code.
Text Wrangler for Mac (free) – http://bit.ly/1aakfTP
Notepad++ for Windows (free) – http://bit.ly/1g76DLF
Sublime Text for Windows (free trial)- http://bit.ly/KaHm4P
Sublime Text for Mac (free trial) – http://bit.ly/1jbo6D6
A web browser – To view our code (hint: you’re using one to see this code too!)
The slides: 
View externally: http://bit.ly/1os8agM

For Immediate Release: CoderDojoTo teams up with Bitmaker Labs and Financeit

By | blog

CoderDojoTo has teamed up with Bitmaker Labs to help youth ages 10-17 learn how to code. As a title venue sponsor, Bitmaker Labs will be providing meeting space for CoderDojoTo events.

Computer programs and computers have become intertwined with our daily lives, both at home and at work, assisting us and sometimes even making decisions for us altogether. CoderDojoTo and Bitmaker Labs both strongly support and promote computer literacy, which makes the partnership an ideal fit.

Financeit has also joined CoderDojoTO and Bitmaker Labs as the title sponsor, providing resources to students and covering costs to operate the volunteer-run program. All CoderDojoTo events will now be held at Bitmaker Labs. The next CoderDojoTo session (HTML/CSS: Website 101) will be taking place at 10:00AM on Sunday, February 23rd, at 20 Duncan Street on the 2nd floor. Bitmaker Labs will be moving to 220 King Street West in March, so the CoderDojoTo event in March will be held at the new headquarters.

The CoderDojo program is free to participate in. High school students who want to find out more about learning to write code are strongly encouraged to apply.

To get free tickets for the CoderDojoTo HTML/CSS: Website 101 session, register at: http://coderdojotofeb23.eventbrite.ca.

Become a CoderDojoTo student, sponsor or volunteer using the information below:

CoderDojoTo
Twitter: @CoderDojoTo
Web: http://coderdojoto.com
Contact: Meaghan Bent, PR Coordinator – hi@coderdojoto.com

About CoderDojoTo:
CoderDojo is a global movement about providing free and open learning to youth, with an emphasis on computer programming. The Toronto chapter was founded to bring this movement to the GTA, inspire other chapters, and partner with other organizations to better introduce kids to coding.

Bitmaker Labs
Twitter: @BitmakerLabs
Web: http://bitmakerlabs.com
Contact: Lidia Sienkowska, Director of Community & Student Experience – lidia@bitmakerlabs.com

Financeit
Twitter: @Financeit
Web: http://financeit.ca
Contact: Casper Wong, COO – press@financeit.ca

CoderDojoTo 4 – HTML/CSS (Intro to Websites)

By | classes

coverCDTO4

Next Session: February 23th, 10AM

[ujicountdown id=”Next Event” expire=”2014/02/23 10:00″ hide = “true”]

Bitmaker Labs
20 Duncan St
Toronto, ON M5V 2C3
Canada

This session is about HTML and CSS, the core languages of web site development. Our lead instructor Syed Hussaini will show you how to build a pages, give them custom styles, and link between them to make a web site. Follow us on Twitter, or like us on Facebook for more information as we get closer to #CoderDojoTo 4! This event is hosted by our venue sponsor Bitmaker Labs.

Get tickets here: http://coderdojotofeb23.eventbrite.com

CoderDojoTo 3 – HTML/CSS (Intro to Websites)

By | classes

CoderDojoTo 3 - HTML/CSS session cover image

Next Session: January 26th, 10AM

[ujicountdown id=”Next Event” expire=”2014/01/26 10:00″ hide = “true”]

Bitmaker Labs
20 Duncan St
Toronto, ON M5V 2C3
Canada

This session is about HTML and CSS, the core languages of web site development. Our lead instructor Syed Hussaini will show you how to build a pages, give them custom styles, and link between them to make a web site. Follow us on Twitter, or like us on Facebook for more information as we get closer to #CoderDojoTo 3! This event is hosted by our venue sponsor Bitmaker Labs.

Get tickets here: http://coderdojotojan26.eventbrite.com

CoderDojoTo 2 – Photo Gallery

By | blog | No Comments

CoderDojoTo2 – Games Workshop

By | classes

coderdojo2

Our premiere event was a completely exciting success! And the 2nd session is only looking up! This time, we’re going to tackle the basics of how to make your own game. Follow us on Twitter or like us on Facebook for more information as we get closer to #CoderDojoTo2! CoderDojoTo is open to all students between 7-17.

October 20th, 2013

Bahen Centre for Information Technology (Room BA 2270)
40 Saint George Street
Toronto, ON M5S 2E4
Canada

Register, for free:

https://coderdojotoronto2.eventbrite.com/

Read More