eBooks

Announcements

Friday, July 17

EXPO! Today!

Take some time this morning to demo the programs, Codecademy lessons, or CodingBat exercises that you plan to show
your parents at EXPO! after lunch today. Lunch begins at 11:00, so you'll need to start lining up at
10:40.

A Look Back

This course is about the things that can be accomplished when there's a good working relationship between the
hardware in front of you and the wetware between your ears.

We used the Pomodoro Technique to allow our minds
to alternate between focused mode and diffuse mode.

We learned to eat our frogs first in order to avoid procrastination.

We learned how sleep and exercise can improve our performance in the classroom.

We learned to appreciate hiker learning as well as race car learning.

We learned how memorization with flashcards and recall with quizzes can help us develop understanding.

We learned about the usefulness of bouncing ideas off of our colleagues.

We also worked with each other. We used pair programming to complete the Text scrolling challenge. We used teams
to build and assemble the components of Pong. People also cooperated on exercises and programs of their own
design.

What's next?

Review Material

We've covered a huge amount of material in a very short period of time. You can revisit tjleone.com any time
to review material. I've also added new videos specifically for people who want to review. They feature a
different presenter so you can get a fresh take on the material.

There might also be some material that you haven't had a chance to look at yet, like the Googleish programs
posted on Wednesday, July 15, or some Codecademy or CodingBat exercises or CodeSkulptor examples.

ebooks

There are links to ebooks in the left margins of each of the tjleone.com course pages. My favorite is Python
the Hard Way.

Python Options After This Course

What if I want to continue to make games with simplegui?

You can continue to use CodeSkulptor for as long as you want. The only caveat is that you have to keep track of
where your programs are in the cloud, the class website will not (once the next class starts).Olivier Pirson has
written a module SimpleGUICS2Pygame which provides simplegui on a normal Python implementation, using PyGame (which
is downloadable) as a basis.

The CodeSkulptor docs also include some pointers to using TKinter and Pygame to convert your code by yourself
(select tabs SimpleGui --> Pygame and SimpleGui --> Tkinter). Click on the Demos button in CodeSkulptor, then
click on the SimpleGUIӐygame for info on Pygame or SimpleGUIӴkinter for info on
Tkinter.

What are Tkinter and Pygame?

Tkinter is the standard Python
interface to the Tk GUI toolkit. If you're running a standard version of Python (like the one you run from IDLE
or the terminal), you don't need to install it. You can just import the module. this Tkinter page for more details.

Pygame is a set of Python modules designed for
writing games that run locally on your computer (in IDLE or in your terminal). It requires download and
installation.

Future courses

I hope everyone in this class will continue to pursue courses in programming and computer science. A good way to
introduce yourself to Java is the Greenfoot class that I teach on Saturdays through CTD. I also teach an online Java
Honors course through CTD's Gifted Learning Links program, and Brian Meyers teaches an awesome Java Honors course
as part of the summer program. If you're particularly interested in math and graphics, I also teach a Gifted
Learning Links course on Math and Computer Graphics that uses Java.

A lot of programming is also done in C# and C++. Both of these languages are covered in the Programming in C++
course that I teach online with Gifted Learning Links.

Thursday, July 16

Preparing for Expo

Today is our last full day to prepare for Expo. If you're not sure what you're going to show tomorrow,
here are some ideas:

Codecademy

CodingBat

Pong

Any project you've worked on alone or with someone else, including CodeSkulptor, IDLE, or Notepad++/Cygwin
or TextWrangler/Terminal projects.

Embrace your Pace

Remember what Barbara Oakley said about hikers and race car drivers. Some of the best learning happens when you
run across something that doesn't make sense. Work through it, and you'll change your brain.

One Last Check-in

I want to hear from everybody one more time about how things are going before parent conferences. Fill out this final
self-evaluation.

Wednesday, July 15

Closing Day Schedule

This is the schedule for closing day, Friday, July 17.

11am - Lunch.

12 noon - EXPO! will be in this room.

Apogee students can be checked out from the classrooms with the Teaching Assistant and Instructor by any
parent/guardian who attends Expo. Please see the instructor and/or TA for the sign-out sheet and make sure you
have your photo ID with you. Any residential or commuter students whose parents are unable to attend EXPO! will
be escorted back to the residence hall by their class walking RA staff member after the completion of EXPO!.
Residential students can finish packing and then begin the check-out procedure once their parent/guardian arrives
at Willard Hall (1865 Sherman Ave). Commuter students whose families are unable to attend the EXPO! will wait for
a parent/guardian in the conference room inside Willard Hall (where they checked in on Opening Day) until a
parent/guardian arrives to sign them out. Commuter Assistants will be with students while they await pick-up.
Again, please remember to bring a photo ID for check-out.

1 to 4 pm - Apogee Parent/Teacher Conferences & Residence Hall Check Out. Apogee Instructors
will be meeting with parents for their scheduled conferences between 1 and 4 p.m. on Closing Day in their
classrooms. During the conference, instructors, parents/guardians, and students (if they wish to attend) discuss
the student's performance in the program.

Apogee residential students must check out of the residence hall between 1 and 4 p.m. Before leaving campus,
students must complete a room check with a residential staff member, retrieve any medications they turned in on
Opening Day, return their room key to Summer Program Staff and be signed out by a parent or authorized adult
(remember that photo ID!). All students and possessions must be completely out of the residence hall no later
than 4 p.m.

Lists, Dictionaries, and File I/O

Continue to work through the list, dictionary and file I/O material you were working on yesterday.

Working Memory

Today we'll listen to Barbara Oakley's discussion of working memory.

Monday, July 13

Plans for Week 3

For the next couple of days, we'll split our time between completion of Pong and more material from the Google
Python Class. On Wednesday and Thursday, people who have completed all required quizzes will have time to work on
projects of their own design.

Pong

To get our Pong code ready for assembly, I'll meet with each team for one Pomodoro get code into a Ball class,
and Paddle class, and a Scoreboard class. Tomorrow, we'll pull all the classes together into a single game of
Pong!

First up is the motion and bouncing team. This team will assemble the Ball class. We'll start with this template and work for one Pomodoro.

Next is the key control team. When our group meets, you guys will work on the Paddle class.

Finally, the text drawing, buttons and timers team will get together to add the Scoreboard.

Google Class

Here is a priorities list. Go down the list one item at a time. When you find one that you haven't completed,
start working on it. When you finish that one, find the next one you haven't yet completed and work on that one.
The purpose of the list is to make sure you have something to focus on for each Pomodoro. Remember, with the Pomodoro
method, your goal is not to complete the task. Your goal is to do focused work for the length of the focused work
period. Don't just watch the videos. Play along with a trinket console or your own terminal window (Cygwin for
windows or Terminal for macs).

Video walk-through: Word Count. By working through this series of videos, you'll get a sense of how to
build a reasonably sized program by taking it one small step at a time. You'll need to use a terminal window
(Cywin for windows, Terminal for mac) and a text editor (Notepad++ for windows, TextWrangler for mac).

Mimic. This a project that you can download and try on your own.

Confidence

Diffuse mode activity, sleep, and exercise all make us better learners and programmers, even though they don't
directly involve learning or programming. Confidence can also enhance our performance. To learn more about confidence
and body language, we'll watch a video by Amy Cuddy.

Working Memory

We'll also hear more from Barbara Oakley. Today she discusses working memory.

Friday, July 10

Specialty Teams

Work on your assignments for one Pomodoro. After your Pomodoro break, make sure everyone on your team has your
CodeSkulptor code bookmarked and can explain how it works. The purpose of this activity is not to have a complete,
working product, but make sure that everyone understands what you've created so far.

For this part of the activity, we'll break into sub-groups. Each sub-group will work on the same thing.
You'll have a chance later to exchange information and code with other members of your team.

Sleep

Week 2 Survey

Preparation for Pong: Specialty Teams

Today we'll set up specialty teams for different parts of the Pong project. Specialists need a working program
that involves their specialty and they need to be able to explain how it works. Teams are:

Key Control Team

Your assignment is to make sure every member of your team has a CodeSkulptor program that allows the user to use
arrow keys to move a rectangle on a canvas.

Team members: Milan, Emily, Matthew, Ethan, Darion, Rithik

Motion and Bouncing

Your assignment is to make sure every member of your team has a CodeSkulptor program with a ball that moves around
the canvas and bounces off the sides.

Team members: Mark, Jacob H, Aarush, Jacob S, Torin, Riley.

Text drawing, buttons, and timers

Your assignment is to make sure every member of your team has a CodeSkulptor program that displays a counter that
is updated by a timer. You should be able to reset the counter to 0 by pushing a button.

Team members: Elleson, Martius, Tiger, David, Sanjana, Chris

Remaining Error Messages

We'll wrap up our discussions on error messages from the Python errors in English page.

Wednesday, July 8

First things first

We'll see a video on why you should eat a frog first thing every morning. After that, we'll do one
Pomodoro of CodingBat, a video break, and then another Pomodoro preparing for or taking your next quiz.

Pomodoros

One CodingBat Pomodoro. One Pomodoro for catching up on quizzes or preparing for the next quiz. Quiz goal for
today is the Quiz on Buttons and Input Fields and Drawing Quiz on the CodeSkulptor
page. Some review before lunch. Another afternoon Pomodoro on lists or work on the File I/O page. For File I/O,
it's best to set yourself up with a terminal and a text editor.

File I/O Setup for Macs

The Terminal application that comes with your mac is fine. Go to your Applications folder and then your
Utilities folder to find it.

File I/O Setup for PCs

Error Message of the Day

Humans often use statements in mathematics and logic to describe a situation. Python statements tell the
computer what procedures it needs to carry out.

Classes

You should complete the Codecademy material on Classes today. The Jurassic World game inspired by David is an
example of how classes can be used to build games. Check it out!

Tuesday, July 7

Anticipation

Somebody asked me about Expo yesterday and I put him off because I thought it was too early to think about Expo.
This morning I thought that it was a good question even though Expo is a long way off and you don't need to start
work on your Expo project yet. We'll briefly discuss Expo (and the role of anticipation in learning).

Procrastination and the Pomodoro Technique

Programming is a collaboration between two very different kinds of intelligence--human and machine. To understand
how computers learn new tricks, we've been listening to Google talks by Nick Parlante. This morning we'll
continue listening to Barbara Oakley on human learning. One big difference between machine and human learners is that
sometimes humans aren't in the mood to learn. They put things off for another time. In this segment of her Google
talk, Barbara discusses procrastination and what we can do about it.

We'll talk about implementing the Pomodoro technique in this class after we see the video.

CodingBat

We'll practice the Pomodoro method by doing one Pomodoro of CodingBat before we move on to our reward. What
should it be? Five minutes of video, or five minutes of CodeSkulptor games?

Error Message of the Day

Today we'll discuss the TokenError.

CodeSkulptor Quizzes

The CodeSkulptor quizzes are little different from the ones you've had so far. There are a multiple quizzes on
the CodeSkulptor page. You can take one of them each day. You don't have to memorize anything for these quizzes.
I'm more interested in your ability to find the information you need by looking in the CodeSkulptor docs or
experimenting in CodeSkulptor. Start with the Interactive Applications in Python quiz for today. If
you're not happy with your grade you can retake the quiz. If you're happy with your grade and you have time,
you can continue with the material on the CodeSkulptor page and take the Quiz on Buttons and Input
Fields.

Lists

Today, tomorrow, and Thursday, we'll do an afternoon Pomodoro on Lists. If you haven't the three quizzes
on the Lists page, you can work on those. Otherwise, you can work on List-1 or List-2 in CodingBat. If you've
finished those as well, let me know. There's more Google material on lists that you can work on.

Text scrolling challenge

This is our first pair programming activity

The video below will explain what pair programming is and why we use it. We'll watch the video together as a
group.

On line 11, create a variable named position and intialize it to [50, 112]

In the draw() event handler, replace [50, 112] with the variable position

Test to make sure that the program still works.

In the draw handler, add the line

position[0] += 1

Test the program again. What happens? Why?

Starting at line 10, add these lines:

WIDTH = 300

HEIGHT = 200

FONT_SIZE = 48

Add this line to your draw handler after position[0] += 1:

if position[0] >= WIDTH:
position[0] = 0

Test the program. What happens? Why?

We can make scrolling a little smoother if we start the text farther to the left. frame.get_canvas_textwidth(message, FONT_SIZE) will give us the length of the message string for the
given FONT_SIZE. Try changing the if statement in your draw function to this:

if position[0] >= WIDTH:

position[0] = -frame.get_canvas_textwidth(message, FONT_SIZE)

Test out your change. What happens? Why?

It would be nice if clicking the button could toggle the text back and forth between "Welcome!" and
"Good job!"

Decoding

After all the coding you've done so far, you might be in the mood for some decoding. Can you read the Japanese
on today's Google page? If you don't already know enough Japanese to read the characters, here' a katakana chart to get you started. Hint: In Japanese, katakana is used for foreign (non-Japanese) words. When you're finished decoding, you
might want to check out the activity on the page in honor of Eiji Tsubarya's 114th birthday

Monday, July 6

This week

We'll be getting into CodeSkulptor and event-driven programming this week. You should make sure that you know
how to save your CodeSkulptor work as explained on the CodeSkulptor page.

You'll also make use of the IDLE development environment that comes with Python 2.7.10. If you haven't had
a chance to install Python 2.7.10 from python.org,
you should do that first thing.

At some point during the week, you'll want to be sure you can run a terminal (Cygwin for Windows, Terminal app
for Mac) and run some kind of text editor (I recommend Notepad++ for windows, TextWrangler for Mac).

Keeping last week in mind

We learned tons of stuff last week. Make sure you've completed the following:

At least half of the CodingBat String-1 exercises and at least half of the Logic-1 exercises.

As we move ahead, I've added some short videos for review purposes. You should take fifteen to thirty minutes
each day to review these so you don't forget what you've learned as we move ahead. Today, we'll look at
the video on variables together.

Good Questions

I've noticed two kinds of questions from you guys that I find particularly interesting:

What will happen? type questions. Examples (Riley, inclusive/exclusive). Anticipating what will happen when we
press Enter.

Sometimes you'll have a big question that can't be asked or implemented before this course is over. But
you should also pay attention to the small questions. These questions can help move you forward. Take your small
questions seriously. Experiment, look things up, ask a friend, or ask Jimmy or me.

CodeSkulptor

Once you're sure you've completed all your quizzes and you've done some review, you're ready to
dive into interactive programming with CodeSkulptor and the simplegui module!

CodeSkulptor quizzes won't require memorization since they deal with a special purpose module (simplegui) that
only exists in CodeSkulptor. So I won't post any CodeSkulptor Quizlets. The Quizlets will start up again when we
revisit lists and dictionaries.

Error Message of the Day

Today we'll look at the AttributeError. We'll see how it can arise with string objects, the Car example
from Codecademy, a similar example in CodeSkulptor, and a simplegui example.

Two modes of thinking

Last week, we saw a few minutes of a Google talk given by Barbara Oakley. Some people seemed to be wondering why I
was sharing a talk about someone who had trouble with math when she was your age. Most people at Google were pretty
good at math when they were children, too. Why do you think so many of them showed up for Barbara Oakley's talk?
Why would they seek her out in order to become better learners? Today we'll hear what Barbara Oakley has to say
about focused mode and diffuse mode.

Friday, July 3

Social Media

CTD instructors and staff are asked not to friend students or share social media info with them. This is a general
policy for the safety of all students.

Two kinds operators

This morning we'll consider the similarities and differences of arithmetic and comparison operators.

Barbara Oakley at Google

This morning we will start looking a short outtakes from an important Google talk.

Finishing up the basics of procedural programming

We're almost done learning the basics of procedural programming. This will prepare us for next week, when we
take on the programming we'll use to build games--event driven programming and (later) object-oriented
programming.

Here's what remains to finish up the basics:

Finish up any quizzes you haven't completed, including the Strings quiz and the Basic Operators quiz.

Go over the material on the Returning Results page and the Truth Tables page.

Take the Boolean Operations quiz.

Work on the Logic-1 section in CodingBat.

Error message of the day

Today we'll look at the IndexError.

Kinds of programming

Procedural programming consists of breaking down a program into simple, reusable chunks. In Python, we do
this whenever we def a function. You may have noticed that in CodingBat we don't use print
statements, and I've encouraged people to experiment with print in a console window and then replace the print
with a return statement with a return statement. The CodingBat functions are similar to math functions, because all
we care about is what goes in and what comes out. There are no side effects, like the output we get from a print
function. This kind of programming is called functional programming. When you write functions in Codecademy,
you may be asked to write print statements inside a function definition. This kind of programming is procedural, but it's not functional, because of the side-effect of the print statement.

Next week, we'll use event-driven programming to create some basic visual effects, and combine that
with object-oriented programming to create games.

Quiz of the day and trinket exercises

Today I'd like everybody to get through the quiz on strings. After you're done, check out Nick
Parlante's video on slices and do the exercises at the bottom of the Strings page.

If you've already taken the Strings quiz and completed the exercises on the Strings page, try out some of the
String-1 exercises in CodingBat.com. Sign in with your email address and the password I'll give you in class. If
you need help signing in, watch the video on the course CodingBat page.

Discrepancies

One important skill in problem-solving is recognizing that there's a problem to solve. Here are two examples I
saw yesterday of people recognizing problems:

When we were looking at SyntaxError messages yesterday, Rishi noticed a comment that didn't seem to match
the code. On a second reading, the meaning was clearer, but we couldn't have clarified it if Rishi hadn't
read it in the first place and brought up the apparent discrepancy.

Darion (and somebody else, I can't remember who) wrote an if-statement that looked something like
this:

if a > 7 not b == 4:

This code presents an important discrepancy between not and the other two boolean operators and and or. Finding problems like this helps to clarify distinctions. What's going on
here?

Python Errors in English and Codecademy

How can you use the Python Errors in English page to help you debug code in Codecademy?

NameError

Send me a trinket

The video shows you how to share the work you do in a trinket. Send me a trinket that you've completed from
the Strings page or one of the later pages.

Tuesday, June 30

Getting Everybody Set Up

We have three people who haven't gotten into Codecademy yet. We have video and Chromebooks on the way to hold
them over.

Temperature

It gets hot in here. Let's make a plan to do something about that.

Python Syntax Quiz Due Today

If you haven't taken the Python Syntax quiz yet, today's the day. You should plan to take it right after
lunch at the latest. You can retake it as many times as you like.

Understanding Python Error Messages

Python error messages can be helpful if you learn how to read them. I've added a resource that explains some
common errors. We'll take a look at a few of them together and see how they can help us debug our programs.

Getting Help

There are lots of students and only one instructor and one TA for this course. One thing that programmers need to
learn is how to manage scarce resources. Before you ask Jimmy or me a question, you should:

Try Google. If you type in the word "Python" followed by your question, you'll often get just the
answer you need.

Try experimenting. Sometimes you just need to try out different things in a Python console or script.

Ask a classmate. Someone else in class might have already come across the same problem and found a
solution.

If you've exhausted these possibilities, follow these steps to make the most efficient use of your instructor
or TA's time:

Be ready to demonstrate the problem. Make sure the problem is still happening and you know how to make it
happen. We can't help you fix a problem if you can't show it to us.

Be ready to explain what you've already done to try to solve the problem. That way, your instructor or TA
can eliminate possibilities that need to be explored.

Monday, June 29

Welcome to Python Programming: From Games to Google!

We will spend the morning getting acquainted with each other and start exploring Python.

Logistics

Bathroom. Students need to be accompanied by an adult to the bathroom. Jimmy and I would like
to be available as much as possible for Python questions, so we'll schedule whole class bathroom breaks. One of
us will accompany anyone any time they need to go, but try to go during scheduled breaks.

Morning break. Our morning break will coincide with our scheduled bathroom break. During that
time, you will take your break with Jimmy. You will either go to the bathroom or hang out in the area designated by
your TA. You must be in sight of your TA at all times. What's a good time? You arrive in the classroom at
8:30am and leave for lunch at 11:10am.

Afternoon break. You will also have a short bathroom break in the afternoon with me. We need
to pick a time between 12:10 and 2:45

Food and Drink. Students can bring food and drink for break time. You can drink water in the
classroom if it is in a water bottle.

Lunch. Students will leave for lunch with Jimmy at 11:10am and return to the classroom at
12:10. This will give you time to walk to the cafeteria, eat, and then have some time to hang out or play
outside.

Laptops cannot be left unattended. If your instructor and TA are both leaving the room the
same time as you, you'll have to take your laptop with you.

Noise Level. There are Northwestern students and faculty at work in this building. Noise level
should be adjusted appropriately, especially in hallways.

Homework. CTD requires one hour of homework per day. We'll go over details this afternoon, when it will
make more sense.

Headphones. If you have your own ear buds or headphones, you are welcome to bring them. Otherwise, headphones
will be provided to you.

Take a break.Sometimes students need some time away from a situation to clear their heads.

Any other ideas?

What should be the consequences for following the rules? We'll discuss this more in days to come.

Getting Started

You don't need to install Python to start programming in Python. Just go to the first page of lessons, Explore Python.

Developing Talent

Since we're part of the Center for Talent Development, we need to discuss how to make this classroom a good
place for developing talent. This is another topic we'll come back to throughout the course.

Everyone in this room has demonstrated the potential to develop cool software. Your job over the next three
weeks is to develop that talent.

Each of you are already at different points in developing that potential. It will take more or less effort for
you to develop your talent in different parts of the course. The thing to focus on is maintaining the effort to
improve.

In order to create an atmosphere that supports continual development, part of your job is to encourage
others.

Where Did Python Get Its Name?

Python was not named for the snake. It's inventor, Guido van Rossum, had a different Python in mind.

Python Setup

You can do most of the Python exercises through your browser, but at some point in the course, you'll probably
want to run Python locally. Check out this
web page to see if you already have Python installed and make sure you have the right version. If you need help
with installation, Jimmy and I will be available, and there will probably be other students who can help you as
well.

A local version of Python won't be necessary until some of the later activities. As long you have a working
browser, you'll be able to complete all the activities for at least the first week.

Homework

Your homework each evening is to spend one hour on any material from the class web pages or CodeCombat. If you choose to work on CodeCombat, you are expected to create an
account to keep track of your progress.

About the Center for Talent Development

Center for Talent Development (CTD), housed at Northwestern University's School of Education and Social
Policy, is an accredited learning center and research facility that identifies, educates and supports gifted students
and their families and serves as a leader in gifted education. Learn more
about the Center for Talent Development.