Teaching Coding, Part 3

Our second day of class was a lot of fun; the students shared the games that they coded. You can click on each screenshot to go to the actual game. Some of them are quite challenging!

Emily’s Game

Emily's Game

Lucy’s Game:

Lucy's Game

Caroline’s Game:

Caroline's Game

Allison’s game:

Allison's Game

Delaney’s game:

Delaney's Game

The day’s new material involved using the pen feature in Scratch to draw figures. We coded a program that drew a triangle everywhere you clicked your mouse. We wrote a function, Draw a Triangle, that the program called up whenever the user clicked the mouse. We also learned how to create new variables. Click the screenshot below to go to the program. You can click the “See Inside” button to look at the code.

Triangle

Advertisement

Teaching Coding, Part 1

Scratch

My school has a three-week period between semesters called Winterim, where we offer an alternative curriculum. This year, I am taking the plunge and teaching an intro to computer coding. One of the biggest challenges of teaching at an all-girls school is sparking interest in computer science among my students. Hopefully, this minicourse will get a few girls inspired to pursue the subject further, and we can build on that. So, I’ll be writing a series of posts in the next couple of weeks to share with you what works and what doesn’t.

The basic course outline is this:

  1. Intro to coding through Scratch. (The screenshot above is from the Scratch programming environment.)
  2. Intro to Python by designing some simple games. For this part, I’m using Al Sweigart’s Invent Your Own Computer Games with Python. It’s available for free online here.
  3. Design your own Android apps. I’m using MIT’s App Inventor website in conjunction with the book App Inventor to do this. You need a Google account to log into the website.
  4. Time permitting, we’ll learn the basics of TinkerCAD, and print out some 3D projects.

I’ve spent the past couple of days exploring Scratch, and that will be the subject of my next post.

Entering The World of Coding

Women are underrepresented in computer science, so I have agreed to offer a three-week minicourse on coding at Harpeth Hall during Winterim, a between-semesters period for alternative curricula. My only previous experience with computer programming is from more than 30 years ago, when I had to take a course in FORTRAN for my engineering degree. I do not have happy memories of that experience.

Fortunately, there are many more coding languages to choose from these days, and there are some very entertaining and enjoyable ways to learn them. I’m learning Python, and I’m using two resources. The first one is the book Hello World! by Warren and Carter Sande. Hello World

It’s written at a level schoolkids can understand, but adults will also find it very helpful. It’s filled with useful illustrations, and best of all, it has a link to a downloadable file that installs a Python IDLE (a graphical user interface that allows you to write and run Python programs on your computer), so you can work through all the examples as you read. There is a brand new edition coming out in two weeks, and the link above will take you to the Amazon page for that edition.

Here’s a screenshot of one of the first exercises. It’s a program that converts any Fahrenheit temperature to Celsius:

Program2

The second resource I’m using is Codecademy, which hosts all kinds of online courses for people who want to learn coding. Here’s a screenshot of a typical lesson:

codecademy

The lessons are easy, entertaining, and you can learn at your own pace. Codecademy offers courses in jQuery, JavaScript, PHP, Python, and Ruby. And guess what? It’s free!

I’ll be posting later in the year on how the course goes, and what my students think about the subject. Meanwhile, here is a nice introduction to what is involved in programming.