The Nature of Code

Over the Christmas Break, I came across a fabulous textbook called “The Nature of Code.” The author (Daniel Shiffman) provides an online copy of the text, with source code and interactive examples free of charge. Check out the text here.

You can get a paper copy of the text for around $30 or a full PDF copy of the text (with source code for all examples) for a recommended donation of $10 (although he lets you set your own price).

Anyway, this book is one of the best (if not the best) textbooks for teaching computer programming I’ve ever come across. The focus throughout is on simulating natural processes. Check out these topics:

  • Random Processes & Noise
  • Using Vectors for Modeling Physics
  • Physics Forces as Vectors
  • Simulating Oscillating Systems
  • Particle Systems
  • Physics Libraries
  • Autonomous Agents (modeling forces within)
  • Cellular Automata
  • Fractals
  • Genetic/Evolutionary Programming
  • Neural Networks

We are now in week 4 using this book and it seems that my feelings are vindicated. My students are loving the book and creating some wonderful simulations… which they are sharing on their blogs.

I am working through the class along with my students. Below is a link to what I’ve done so far. I call it “Dr. Brown’s Funky Forest.”

Dr. Brown's Funky Forest

Our class programs are written in Processing, which is actually Java, but with a cool class called PApplet that allows you to deliver “Processing” programs (called “Sketches”) in the same manner as applets. In addition, there is a JavaScript implementation of Processing called processing.js that makes it easy to embed Processing programs.

This is what I did for my “Funky Forest.” It is supposed to illustrate the use of Perlin noise to model natural looking randomness (in the insects movements), physics modeling of movement and acceleration, and it has two classes of insects that are attracted to different things. The smaller insects are interested in the flame. The larger insect is interested in the smaller ones.

The Sketch doesn’t look exactly like it does running it on my home computer. The flame is flickering above and beside the torch to which it belongs and my easter egg doesn’t work (clicking the torch flame should show movement trails of the insects).

Processing allows you to export your program to run on Android devices and this sketch looks great running on my Galaxy Tab 2 running 4.1.1 Jelly Bean.

Anyway, I’m pretty impressed with Processing and with Daniel Shiffman’s book “The Nature of Code.” Again, check out the work my class is doing throughout this semester. They are impressing me every week!

Filed in EduPunk,Software Development,Student Work Comments Off

Spring 2013 CSIT1520 Student Blogs

Here are links to my Spring 2013 CSI1520 “Intermediate Java Programming” student blogs:

Filed in EduPunk,Student Work Comments Off

Spring 2013 CSIT1510 Student Blogs

Here are links to my Spring 2013 CSI1510 “Introduction to Programming using Java” student blogs:

Filed in EduPunk,Student Work Comments Off

Spring 2013 CSIT1110 Student Blogs

Here are links to my Spring 2013 CSIT1110 “Introduction to Information Technology” student blogs:

Filed in EduPunk,Intro to Computer Science,Student Work Comments Off

Fall 2012 – CSIT1110 Student Scratch Projects

Here are links to my Fall 2012 CSIT1110 “Introduction to Information Technology” Scratch projects:

Filed in EduPunk,Student Work Comments Off

Fall 2012 – CSIT1510 Student Blogs

Here are links to my Fall 2012 CSI1510 “Introduction to Programming using Java” student blogs:

Filed in Student Work Comments Off

Fall 2012 – CSIT2230 Student Blogs

Here are links to my Fall 2012 CSIT2230 “Introduction to Internet Software Development” student blogs:

Filed in Student Work Comments Off

« Previous PageNext Page »