The Future of Coding? Check out Wolfram Language

Earlier this year, I taught a mini-course in computer coding, and it rekindled my interest in that science. I just came across a video where Stephen Wolfram (of Mathematica fame) previews a new language he’s been developing for 30 years. Here’s the official description:

Designed for the new generation of programmers, the Wolfram Language has a vast depth of built-in algorithms and knowledge, all automatically accessible through its elegant unified symbolic language. Scalable for programs from tiny to huge, with immediate deployment locally and in the cloud, the Wolfram Language builds on clear principles—and 25+ years of development—to create what promises to be the world’s most productive programming language.

It looks to be relatively easy to use, while incredibly powerful. In fact, I’ve never seen anything like it. From what I can tell, in many cases the coder can simply type what he or she would like to see, and Wolfram Language converts the text into code:



It links to the cloud, and data from WolframAlpha or any other site can be incorporated into it.

The video is 13 minutes long, but well worth your time if you’re interested at all in the future of coding:

Here is a link to the reference guide to Wolfram Language.


Teaching Coding, Part 7

Yesterday, we wrapped up our study of Python by working through a rather complicated program of Hangman. You can see the source code here. It has several defined functions, lots of else-if statements, for loops, and lists. I think the girls were a little overwhelmed; by the time we got to the end of the program, their eyes were glazed over!

So, for a fun change of pace, we began working with MIT’s AppInventor. This is a website that allows the user to create Android apps. It’s very similar to Scratch, which we worked with in the beginning of this coding minicourse. You can login with a Google account, and it automatically saves your projects as you build them. There are some excellent tutorial screencasts that walk the beginner through the basics. After about 45 minutes, you will have created your own working  smartphone app! The first one we built had a picture of a cat meow when you tap the phone’s screen.

Here’s a screenshot of the designer page, where the components of the app are put together:


The left pane contains the various components and layout options. The middle pane simulates the phone’s screen. The third and fourth panes let you modify each component’s properties.

The Blocks page is where you actually program the components of the app. As you can see below, it works just like Scratch, with drag and drop blocks of code:


Today, we will build a painting app that lets the user take a picture and paint on top of it.

Teaching Coding, Part 6

We spent most of yesterday’s class sharing each others’ games. The girls came up with some very entertaining ones. For example, this one made use of Robert Frost’s famous poem, The Road Not Taken:


In this game, a tardy student has to avoid getting caught by the principal!


Another one reads like an interactive novel, with the user deciding if the protagonist is male or female, if a character has a key to a mysterious trunk, etc. Her code fills eleven pages when it’s pasted into Word!

In the next class, we are going to analyze our final Python program, Hangman. This program introduces ASCII art, lists, for loops, and else-if statements. 


Teaching Coding, Part 4

pythonOn Day 3, I introduced the Python v3.3 programming language, which is very powerful yet easy to understand. It is free, and you can download it here. It installs the interpreter as well as IDLE, which stands for Interactive DeveLopment Environment. IDLE is where the user writes and runs his or her programs.

For our main text, we’re using Al Sweigart’s Invent Your Own Computer Games with Python, 2nd Edition. He has an excellent website, Invent with Python, where you can download a free pdf version of the book. One of the most useful features of the site is the diff tool. After typing in a program from the text, a student can upload her version, and the diff tool compares it to the text’s version. This is very helpful when debugging the programs!

Our first program was the traditional “Hello World!” (with a little extra thrown in) :

#This program says hello and asks for your name
print('Hello World!')
print('What is your name?')
myName = input()
print('It is nice to meet you ' + myName)

This simple little program teaches commenting, calling functions (print and input), string concatenation, and variable assignment.

We then explored some features of IDLE: executing arithmetical expressions, storing values in variables, writing strings, saving and running programs. To wrap up the day’s lesson, we previewed if/then statements.The homework assignment was to write a simple program that asks for user input and responds to it. Here’s what one student came up with:


And here is some typical output:

pasword output

Day 4 continued what we began in Day 3. We typed in a Guess the Number Game, which had the computer generate a random number, and the user tried to guess what it was. The game utilized a “while loop”, so the girls learned about blocks of code, comparison operators, and Boolean values.

After some discussion, we realized that all computer programs contain just four elements:

1. Expressions

2. Assignment statements

3. Flow control statements

4. Input/output functions

Coming up: defining our own functions!