Day 613 of 1000

This is the seventh in a series of posts on how we taught our children to program, what we did wrong and how we think we could have done better.  You can see the introductory post and index to the series by clicking here.

[Previous post]
[Next post]

A Beginner's Guide to RKelly did not start learning to program until she was already in college.  The very first pass at this was when our friend Troy helped her in his work at the Biological and Agricultural Engineering laboratory at North Carolina State University.  We got her a book on R programming.  She spent about three weeks to work her way through four or five chapters of the book before she spent about three weeks in the lab with Troy.  I did not sit with Kelly at all during that process and even though she learned a lot, she felt pretty badly that she contributed so little.  That was my first clue that I had failed terribly by not teaching Kelly to program.

Nevertheless, there was a lot of programming good that came out of Kelly’s six or so weeks in the R Language.  Kelly is a Senior in Statistics at NCSU, so it was a very good thing that R was her first programming language.  Most programmers start with variables that hold a single piece of data and build bigger structures to hold sets of data.  Statistical languages start with whole data sets that allow the programmer to calculate measures of the data set and present the data in user friendly formats.  There is a big difference in paradigms between statistical programming and the more traditional language like C/C++/C#, Java, and Python.

This semester Kelly took her first two programming classes:  SAS (statistical) programming and Java.  The difference between her preparedness for the two classes was stark.  She was way out in front of everyone in her statistical programming class because she had learned to think of programming in terms of how to manipulate entire data sets where looping is often internal.  In Java, not only did she have to learn how to think of data points rather than data sets, she also needed to create loops to work through all the points in the sets.  Her meager six weeks of R experience paid huge dividends in her statistics class and she excelled there.  It was a different story with the Java class.

Kelly struggled and needed to spend many more hours during the first part of semester just to stay even in Java.  By the middle of the semester, she had everything under control, but she did not start “getting” the material until the last few weeks of the semester.  She kept her grade up until that light went on with memorization and hard work.  It was frustrating to her and so unnecessary.  If we would have done the same thing for Java as we had done for R by giving her some training before she got to the class, her experience would have been completely different.  She gets the material now, but there could have been a good deal more joy and a deeper understanding of Java had I given her even a minimal amount of training–six weeks would have done it.