Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Sunday, August 18, 2013

Help Getting Started with Scratch


   I will be teaching a mathematics class this Fall for middle and high school math teachers. The course requires that students do a bit of programming in the Scratch environment. To smooth their entry into Scratch,  I have written three Getting Started with Scratch  documents.
   The first document guides the reader through the steps of building a script that draws a square with a side length of 100 steps. This introduces the blocks menu and the mechanics of connecting blocks together to build a script.
   The second document describes how to create variables, sliders, and how to set the minimum and maximum values in a slider. The size of the square is now under variable control.
   The third document helps the reader build a script that will draw any regular polygon. In a regular polygon the side lengths are equal. A slider controls the number of sides and again, the side length is controlled by a slider. 
   The relationship between the number of sides and the turn angle for a regular polygon of n sides requires a bit of mathematical analysis.

   You may request any or all of these documents—in PDF format— by sending an email to: grandadscience@gmail.com.           
            Getting Started with Scratch - Part 1
            Getting Started with Scratch - Part 2
            Getting Started with Scratch - Part 3

Sunday, December 16, 2012

Algorithmic Thinking


   
   I have just finished teaching a two-unit college course in programming for middle school and secondary math teachers. Over the years I have used BASIC, Logo, Pascal, and the version of BASIC Texas Instruments uses in their programmable calculators. The last two times I have taught the course I have used Scratch. No matter what the programming language, I have found that many math teachers have a difficult time learning to program. I have pondered this phenomenon for years because in my mind, programming should be easy for math teachers.
   Over the last few years I have created a structure that I use in the course for every programming project. I insist on participants following the seven steps of algorithmic thinking. Doing this has helped participants in my course understand that programming is not a single skill, it's a set of skills.
The Stages of Algorithmic Thinking

                       Purpose: to create machine* understandable algorithms that solve a specific problem
                                               
            First, Do the Math with Paper & Pencil Part
                                    Analyze the problem

            Next, Do the Algebraic Thinking Part
                                    Identify the Variables
                                    Determine the relationships between the variables

            And Finally, Do the Algorithmic Thinking Part
                                    Create a Logic Flow diagram
                                    Translate the relationships (math syntax) à (computer syntax)
                                    [the syntax of every computer language is fixed and can not be violated)
                                    Combine the pieces of code (into the algorithm that solves the problem)
                                    Test the algorithm (debug)

*machine = any device controlled by digital logic [computer, smart phone, etc.]

Algorithmic Thinking Takes Place within a Problem-solving Environment


   If you teach programming for nonprofessionals, what structure do you use?