Machine Learning Notes/Pointers

Goodfellow, Bengio and Courville excellent, current book from MIT Press including machine learrning fundamentals. Free to read online.

This site links two libraries for deep learning computations:  Both are Python libraries; both build on numpy.

Common features:

matrix operations are coded with Python operations (+. *, etc) and the result is a thing that the library can be commanded to run.  In TensorFlow, coding the thing is called building a computational graph and commanding it to be run is called running the computational graph.


basic use of Theano

calculations can be run in a GPU

graphical or network display of  a neural network architecture.

deep learning demo codes.

TensorFlow (python library) tutorial on deep convolutional neural networks. Provides a small implementation with a GPU verison.

TensorFlow quick start including a complete gradient descent example.

TensorFlow’s CIFAR10 tutorial( a image classification demo small enough to be easily experimented with)

CIFAR10, Alex Krizhevsky’s page

Krizhevsky’s tech report

on github Actively maintained (March 2017), just released v1.0


NVIDIAs instructions:

Use pip, python installer alternative to easy_install Ubuntu python-pip package brought in:

python-all (2.7.11-1) …
Setting up python-all-dev (2.7.11-1) …
Setting up python-pip-whl (8.1.1-2ubuntu0.4) …
Setting up python-pip (8.1.1-2ubuntu0.4) …
Setting up python-setuptools (20.7.0-1) …
Setting up python-wheel

Theano tutorial page

on github Actively maintained (March 2017)

Machine Learning Frameworks

  1. TensorFlow
  2. Theano
  3. Caffe
  4. Caffe2 Caffe2 link NVIDIA link with online labs
  5. Microsoft CNTK CNTK setup:
  8. NVIDIA says “define by run” rather than “define and run”


  1. NVIDIA’s page of Frameworks supporting cuDNN, see bottom for more links “There are several other deep learning frameworks that leverage the Deep Learning SDK, including BidMach, Brainstorm, Kaldi, MatConvNet, MaxDNN, Deeplearning4j, Keras, Lasagne(Theano), Leaf, and more.” Frameworks supporting cuDNN (NVIDIA link)

Machine Learning toolkit(s) higher level than Theano and TensorFlow

Neural network, API on top of Theano and TensorFlow

Wikipedia article Convolutional Neural Network

Early (2005) paper on benefits of GPUs for machine learning

Wikipedia on ReLU (rectifier linear units), their cousins and motivations. f(x) = max(0,x) is found to be a helpful kind of activation function.  Related to softmax f(x) = ln(1 + e^x) and its derivative the logistic function (1/(1+e^-x)).

Wikipedia on Cross Entropy -\sum (p(x) log q(x) ) minimized by q for fixed p is easily related to Kullback-Leibler divergence

Deep Learning in Neural Networks: An Overview by J ̈ urgen Schmidhuber

Terry Tao on Shannon Entropy and its analogies to set functions

Notes on reading MacKay’s book

Neural network models (neural networks) are inspired by but not faithful models of brains.  The are interesting because  brains are interesting,  neural networks can do learning and pattern recognition,  and neural networks are complex and adaptive.

How biological memories differ from computer memories: the former are associative (content addressable), error-tolerant and robust against local failure, distributed.

Artificial neural networks: “parallel distributed computational systems consisting of many interacting simple elements.”

Terms: Architecture. Weights of connections.  Neurons have activities. Activity rules, usually dependent of weights, affect short-term dynamics. Learning rule is for changing the weights, can depend on activities and /or input of target activity values from a teacher; usually over longer time scale than that for the dynamics for changing the activities. Activity and learning rules may be invented, or derived from objective functions. Supervised vs unsupervised.

Chapter 39 covers in precise terms a range of deterministic and stochastic activation functions for the single neuron classifier, training, back-propagations, gradient-descent, batch vs on-line learning, and regularization..suggest to study this.  Going on: Ch. 40 is on single neuron capacity.  Ch 41 is on learning as inference, which is in terms of the Bayesian view of probability. It may clear up mysteries about the learning of probability distributions and a probability distribution as a classifier or predictor.  It explains why log probability is a good error function to minimize.

Bishop’s book Pattern Recognition and Machine Learning begins, after an intro to least square error linear regression, with how it is seen as choosing a normal distribution that maximizes the likelihood that the data given to be interpolated had been drawn from that distribution. This accounts for the minimization of the sum of squares of errors and is further explained in later chapters.

Deep Learning Codes

cuda-convnet2 Alexander Krizhevsky’s git repository

sdc’s fork with updates to build locally

Alex Krizhevsky’s Toronto web site

Deep Learning Links

GPU Enhancement


CUDA: NVIDIAs for their GPUs; C/C++ API

cuDNN: NVIDIA API on top of CUDA for tensor data types and machine learning computations.  NVIDIA’s larger sample code is for the test phase of LeNet-5, the handwritten digit classifier reported in Yann LeCun, et. al. Proc. IEEE Nov. 1998 “Gradient-Based Learning Applied to Document Recognition” The network used was implemented and trained using Caffe.

From sample code: “Training LeNet on MNIST with Caffe” tutorial, located

OpenCL: Open for general GPUs, many platforms of multithreaded CPUs, FPGAs and DSPs

CUDA and OpenCL provide C-like languages for coding kernels (the code that is run in parallel).

Keras is a Python API built on TensorFlow or Theano

TensorFlow is a Python API that can use CUDA.   When it uses CUDA, it does it through NVIDIA’s cuDNN.

Theano is a Python API that can use CUDA (through NVIDIA’s cuDNN like TensorFlow does) and, with “minimal support”, OpenCL


How to read specifications.

How to read the HTML5 and other Specifications…

Early on, Dean Arden declared that one important goal of courses like computer architecture is to enable people to understand specifications.  I’ve tried to weave using specifications, either written by professors like me into assignments, or, more rarely, for required references included in assignments.

The HTML5 spec quote is so cute, I must directly quote it:

1.7.1 How to read this specification

This specification should be read like all other specifications. First, it should be read cover-to-cover, multiple times. Then, it should be read backwards at least once. Then it should be read by picking random sections from the contents list and following all the cross-references.

Brett Victor’s Future of Computer Programming

Brought to our attention from Guzdial’s wonderful Computing Education Blog.  Victor just published informative sources for his talk.

In 1972-1973, I tried to teach myself PL/I, programmed in IBM 1130 and 360 Fortran for money from professors, wrote in IBM 1130 assembly language an IBM 1620 cross-assembler, renovated an IBM 1620 by bypassing broken core memory addressing lines and then removing and faking memory parity checking (having studied its circuit diagrams from the individual transistor level up), took a grad. course in Mathematical Logic taught by Ian Filotti at the Courant Institute while auditing Jack Schwartz’s course on compilers, got lectured on Multics by Bernie Greenberg, graduated with a physics major, entered the maw of MIT, 0-ed the Putnam and aced GRE subject tests, etc.

Free/open source journal

I will try to write about experience with technicalities I encounter in free/open source projects.  This might help academics and other beginners to educate so they can join free or open source communities.

For now, I started working the training materials for Linux on the Beagleboard posted by free-electrons. Read and made notes on the .pdf files with Adobe’s pdf viewer on an Android (Samsung Note 10.1) tablet.  (DISCOVERED LATER: These materials are obsolete.  They predated the Beagleboard xM rev. c1 which I have, and web links in the lab materials are broken.  Free Electrons posted in 2013 that all their Linux-arm training is on the … which is like the Beagleboard.)

The instructions worked ok until the build of the ct-ng toolkit 1.8 failed because of broken links.  I made a note to use current versions, and proceeded with 1.18.

Some step failed because of missing software.  That was easily remedied by installing the (Ubuntu) package.  However, the ct-ng build wasn’t restartable.  Investigation (..fill in ) showed a configuration setting (I knew that systems typically do or should have checkpoint/restart features)

Navigating around the tools built from ct-ng

Installed under x-tools.  Observed one dir. for the built tools  arm-unknown-linux-uclibcgnueabi written about in lab instructions.  Observed a subdirectory arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi having entries: bin  debug-root  include  lib  lib32  lib64  sysroot

CURVE:  hello C program built with tool built from ct-ng failed on Beagleboard’s out-of-the box system.

-sh: ./hello not found

Knew this is likely a missing shared library (from past experience, seeing this non-informative error message) (The lab book contents in a later chapter from testing your cross toolkit discusses the shared library issue, and quotes the “not found” message.)

Tried ldd hello: Failed since the out-of-the-box system didn’t have ldd. (past experience: ldd, stands for list dynamic dependencies. Linux dynamic link libraries have names like lib*.so and many are installed under /usr/lib)

Looked for ldd in x-tools built by ct-ng:  Found it!  Tried arm-linux-ldd ./hello and it failed with a message suggesting the –root option.  Used –help option and read about –root option.  Knew (from this project’s reading) about sysroot.  Observed sysroot has lib subdirectory containing familiar lib*.so and lib*.a files.  So I tried arm-linux-ldd –root that sysroot dir hello and found 2 dependencies:  I then looked for them on the Beagleboard system.  Saw but NO and ld-??? !

With tools, compiled hello.c with –static (past experience, training content about dynamic libraries).  Built.  SUCCESS running the static version on the Beagleboard!

C compiler command line arguments: –static  -o used to name the result hello.static (good idea to use multiple names)

What should I do next?

A root file system (observed out-of-the-box system did not use initramfs or initrd) has a kernel, so to build a root file system, I need a kernel.  So we should work on building a kernel first.


Training explains using an nfs root file system.  The PC requires shorter (don’t know what to call that size) cards, which I didn’t see in the depts. old card box.  Emailed for sysadm for spare nic.

Try instructions from Embedded Linux Primer for kgdb:

How can I get new kernel parameters (kernel command line) in the out-of-the-box Beagleboard?

Ran u-boot (booted Beagle and pressed a key).  Explored environment with commands, beginning with printenv (had read about uboot before).

Printing: Copy from terminal screen, paste into screen running lpr .  (Had to configure our network printer into the PC, basic Ubuntu adm.)

Finding the .config file for a working kernel

Past observations/readings: it’s installed in the /boot subdirectory alongside the kernels and initrds.  NOT found under /boot in the Beagleboard out-of-the-box system!

Noticed config.gz in the /proc directory of the Beagleboard.  (Unix cp command; ok to copy /proc files; know /proc files won’t exist on the disk image!)  cp to my user home dir, so I can get the copy outside the Beagleboard.

Kernel building subproject

I’m familiar with Linux kernel configuration.  Recent reading reminded me that one can start with a given configuration, copy it to .config and then run make oldconfig.

Note kernel version on the out-of-the-box system:  Use uname -a (previous experience)  Also, noted in notebook from boot messages TI DM3730 (model of OMAP–had read about lots of new OMAPs from TI’s recent OMAP tech reference manual; I read the initialization chapter after reading web pages about xloader uboot OMAP booting)

BeagleStudy/kernels must download 2.6.32 kernel src.  Hey, let’s use GIT!

wget -nd

Went to  Saw was a “long term” so I decided on that. Saw URL when hovering.  Decided to use wget.  (Learned of wget long ago. Remembered -nd option.)

tar xzf linux- (long ago; basic kernel building instructions appearing many places.)  FAILED:  Encountered .xz yesterday!!  Did google xz and man -k xz to find out about .xz compression and tool xzcat.

xzcat lin… | tar xvf –  (long ago–l like seeing it happen so I use v flag.  x is extract, f is file, – use stdin (piped from xzcat command)  ls to confirm I have a linux- dir.

cd linux-, git (have to find out again how to init a git repo!) (git not installed!, sudo apt-get install git) (Wow, for Linux kernel)

git init; git add .; (took a long time); git commit -m “pristine…” (knew message was required)

Used USB micro/etc flash card interface to cp config.gz (above)

Know: Automounter make flash cards available under /media  Tab completion to remind names under which partitions are mounted..  is Narcissus… (observed before).. know users are under /home, so use /home/seth

gunzip config.gz ; ls to confirm config.gz replaced by config; rename mv config BeagleOutOfBoxConfig; cp Beag.. .config

Tried git add Beagle-Out-Of-Box-Config .config;   add .config refused because of .gitignore (So stuff built won’t be saved by git…  Decided not to use -f to really want to add them!)

Look at 2009 cross compile material in free-electrons lab.  (BEFORE dispatching make oldconfig)

Forgot install uboot-mkimage!  Try that.  Installed uboot-tools package too. (Free Electrons lab explains getting and using Ubuntu, installing linux packages, and use of apt-get install on Ubuntu Linux. )

lab says: TI OMAP Beagleboard (reminded it’s OMAP based and from TI)

lab says: put bin dir of our xtools in front of PATH (know about unix PATH, etc)

Observed: x-tools/arm-unknown-linux-uclibcgnueabi/bin has arm-linux named tools, but

x-tools/arm-unknown-linux-uclibcgnueabi/arm-unknown-linux-uclibcgnueabi/bin has the tools without the arm–… qualified names.  Did ls -l to see they are not symbolic links.  Are the binaries equal?? YES, at least the gcc one! I’ll follow the lab’s instrs.

I wrote question in lab: Makefile setup Modify the top level makefile… REALLY??? Lets look in the top level makefile.  Also do a make help (know about that).

Reading the makefile and google search found   Have to set ARCH set to an arch in the arch subdir.  CROSS_COMPILE is the prefix appended to commands like gcc for finding them under a search using PATH.  gentoo also explains an INSTALL_MOD_PATH Apparently gentoo explains a way to get the kernel build tree in the embedded system.  gentoo explains two ways of setting environment (What’s that?) for kernel building: Put them in the make command within a shell script, or modify Makefile.

I see Makefile uses uname to set SUBARCH and uses that as default for ARCH.  This is how it knows the arch for a native build.

I think I’ll use a script setting the env.  What’s “$@” after the make for?  command line args..  follow gentoo: make it executable.  Named it mymake (I like my).  Checked: PATH does not contain .; so I’ll do that in the shell.  Checked: mymake help printed help!

Maybe … I’ll make a sysroot dir alongside the linux tree!!

Look for INSTALL_MOD_PATH in Makefile.

# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
# relocations required by build roots.  This is not defined in the
# makefile but the argument can be passed to make if needed.

SCROLLING:  Ctrl-midde and Ctrl-right in xterm give option setting window.  Handy to turn on scrollbars.


did mymake oldconfig.  Noticed an extra new line was entered each time I pressed enter!!

So, I viewed xterm’s settings with Ctrl-right and turned OFF auto linefeed. (Probably set it accidentally)

Forgot to write a custom subversion in the makefile. Do that now… (edit the makefile!! .61-sdc1)


mymake oldconfig… something wrong.. looks like it thinks I’m doing an x86, not ARM!! Instead of putting the enviroment settings on the make command line, I put them on separate lines in the script!!!  So they were not exported.  Will fix it:  use shell command export on each one..

…. built 2 kernels and got uBoot to load them; got uncompress messages and starting kernel messges.. then nothing!!

The next day.

Viewed some Google search results.  Worked from Looked at the referenced git repository via the web interface: found a commit to support Beagleboard xM rev. C.  Compared file to file in my last kernel version build…new one has much more.

Tried to use the published command (suspicious of the ;):

git clone git://;branch=linux-3.2.y;protocol=git

It looks like the author took the entry from a bitbake recipe and reprinted it in a git command!  But I tried it anyway.  As I expected, it got the whole linux-stable repository.  A git checkout linux-3.2.y worked of course.  I listed all branches for fun git branch -a.

I see the author says to checkout a particular commit (identified by hash)  must try that…

FAILS!  Check out the version given by above recipe (SRCREV). E.g. git checkout 58cf2f1425abfd3a449f9fe985e48be2d2555022 failed with fatal: reference is not a tree: 58cf2f1425abfd3a449f9fe985e48be2d2555022 Also git show on this reports bad object


Networking with u-Boot.

The current FE lab instr. didn’t work.

Google search: David Neiss’ Blog (Jan 9,2012) said his “stock 05.02 precompiled u-boot image didn’t seem to support tftp.” He got a source tree from u-boot.not.mainline, built it and reported success.  His steps:

  1. setenv serverip  (sdc’s IP here)
  2. setenv ipaddr (sdc’s Beagleboards IP here)
  3. usb start
  4. see output
  5. try ping reports he’s an active TI arm hacker; but no u-boot.not-mainline branch.  I found a 2yr old u-boot repository commit that edited doc/README.usb adding information about usb networking.  Quote of current version of Networking section:

USB Host Networking
If you have a supported USB Ethernet adapter you can use it in U-Boot
to obtain an IP address and load a kernel from a network server.
Note: USB Host Networking is not the same as making your board act as a USB
client. In that case your board is pretending to be an Ethernet adapter
and will appear as a network interface to an attached computer. In that
case the connection is via a USB cable with the computer acting as the host.
With USB Host Networking, your board is the USB host. It controls the
Ethernet adapter to which it is directly connected and the connection to
the outside world is your adapter’s Ethernet cable. Your board becomes an
independent network device, able to connect and perform network operations
independently of your computer.
Device support
Currently supported devices are listed in the drivers according to
their vendor and product IDs. You can check your device by connecting it
to a Linux machine and typing ‘lsusb’. The drivers are in
For example this lsusb output line shows a device with Vendor ID 0x0x95
and product ID 0x7720:
Bus 002 Device 010: ID 0b95:7720 ASIX Electronics Corp. AX88772
If you look at drivers/usb/eth/asix.c you will see this line within the
supported device list, so we know this adapter is supported.
        { 0x0b95, 0x7720 }, /* Trendnet TU2-ET100 V3.0R */
If your adapter is not listed there is a still a chance that it will
work. Try looking up the manufacturer of the chip inside your adapter.
or take the adapter apart and look for chip markings. Then add a line
for your vendor/product ID into the table of the appropriate driver,
build U-Boot and see if it works. If not then there might be differences
between the chip in your adapter and the driver. You could try to get a
datasheet for your device and add support for it to U-Boot. This is not
particularly difficult – you only need to provide support for four basic
functions: init, halt, send and recv.
Enabling USB Host Networking
The normal U-Boot commands are used with USB networking, but you must
start USB first. For example:
usb start
setenv bootfile /tftpboot/uImage
To enable USB Host Ethernet in U-Boot, your platform must of course
support USB with CONFIG_CMD_USB enabled and working. You will need to
add some config settings to your board header file:
#define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters */
#define CONFIG_USB_ETHER_ASIX /* Asix, or whatever driver(s) you want */
As with built-in networking, you will also want to enable some network
commands, for example:
and some bootp options, which tell your board to obtain its subnet,
gateway IP, host name and boot path from the bootp/dhcp server. These
settings should start you off:
You can also set the default IP address of your board and the server
as well as the default file to load when a ‘bootp’ command is issued.
All of these can be obtained from the bootp server if not set.
#define CONFIG_IPADDR (replace with your value)
#define CONFIG_SERVERIP (replace with your value)
#define CONFIG_BOOTFILE uImage
The ‘usb start’ command should identify the adapter something like this:
CrOS> usb start
(Re)start USB…
scanning bus for devices… 3 USB Device(s) found
       scanning bus for storage devices… 0 Storage Device(s) found
       scanning bus for ethernet devices… 1 Ethernet Device(s) found
CrOS> print ethact
You can see that it found an ethernet device and we can print out the
device name (asx0 in this case).
Then ‘bootp’ or ‘dhcp’ should use it to obtain an IP address from DHCP,
perhaps something like this:
CrOS> bootp
Waiting for Ethernet connection… done.
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address
Using asx0 device
TFTP from server; our IP address is
Filename ‘/tftpboot/uImage-sjg-seaboard-261347’.
Load address: 0x40c000
Loading: #################################################################
Bytes transferred = 3557464 (364858 hex)
Another way of doing this is to issue a tftp command, which will cause the
bootp to happen automatically.
MAC Addresses
Most Ethernet dongles have a built-in MAC address which is unique in the
world. This is important so that devices on the network can be
distinguised from each other. MAC address conflicts are evil and
generally result in strange and eratic behaviour.
Some boards have USB Ethernet chips on-board, and these sometimes do not
have an assigned MAC address. In this case it is up to you to assign
one which is unique. You should obtain a valid MAC address from a range
assigned to you before you ship the product.
Built-in Ethernet adapters support setting the MAC address by means of
an ethaddr environment variable for each interface (ethaddr, eth1addr,
eth2addr). There is similar support on the USB network side, using the
names usbethaddr, usbeth1addr, etc. They are kept separate since we
don’t want a USB device taking the MAC address of a built-in device or
vice versa.
So if your USB Ethernet chip doesn’t have a MAC address available then
you must set usbethaddr to a suitable MAC address. At the time of
writing this functionality is only supported by the SMSC driver.
I compared the include/configs/omap3_beagle.h with the config.h file in my u-boot build tree [How did I know to look there? I had read u-boot documentation about how to configure and build it.]  I observed that usb networking seemed to be configured fine.  I checked include/config_cmd_all.h [How did I know? omap3_beagle.h has an include targeting default commands, so I looked where that would be and noticed other *cmd*.h files in the include directory].  There was no CONFIG_CMD for the tftp command!  But in the latest config_cmd_all.h I saw:
#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#define CONFIG_CMD_NFS /* NFS support */
#define CONFIG_CMD_PING /* ping support */

That means the NET option implies all 3 commands, including tftp (which is a prefix of tftboot)  The FE lab indicates that tftpboot merely transfers a file, whilst (other sources say) bootp does everything, including getting the board’s IP addr from a bootp server.


Here is the sequence that worked (the first time)

# usb start
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… Warning: failed to set MAC address
1 Ethernet Device(s) found

# print ethact

# setenv usbethaddr 00:11:22:33:44:55
OMAP3 # usb stop
stopping USB..
OMAP3 # usb start
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 1 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… 0 Ethernet Device(s) found
OMAP3 # ping
ERROR: Need valid ‘usbnet_devaddr’ to be set
at ether.c:2369/usb_eth_init()
ping failed; host is not alive
OMAP3 # usb tree
USB device tree:
1  Hub (480 Mb/s, 0mA)
u-boot EHCI Host Controller
  [LOOKS LIKE ethernet device is off now!]

OMAP3 # usb reset
(Re)start USB…
USB0:   USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
scanning usb for ethernet devices… 1 Ethernet Device(s) found
OMAP3 # usb info
1: Hub,  USB Revision 2.0

2: Hub,  USB Revision 2.0
3: Vendor specific,  USB Revision 2.0
– Class: Vendor specific [THAT’S MY ethernet device!]
– PacketSize: 64  Configurations: 1
– Vendor: 0x0424  Product 0xec00 Version 1.0
Configuration: 1
– Interfaces: 1 Self Powered Remote Wakeup 2mA
Interface: 0
– Alternate Setting 0, Endpoints: 3
– Class Vendor specific
– Endpoint 1 In Bulk MaxPacket 512
– Endpoint 2 Out Bulk MaxPacket 512
– Endpoint 3 In Interrupt MaxPacket 16 Interval 4ms

OMAP3 # ping
ERROR: Need valid ‘usbnet_devaddr’ to be set
at ether.c:2369/usb_eth_init()
Waiting for Ethernet connection… done.
*** ERROR: `ipaddr’ not set
ping failed; host is not alive

[Noticed: 2 Error messages! Note usbnet_devaddr is spelled differently from usbethaddr which is cited README.usb]

OMAP3 # printenv usbethaddr [I knew this from the README.usb and Neiss’ blog]
OMAP3 # setenv ipaddr
OMAP3 # ping

Waiting for Ethernet connection… done.
Using sms0 device
host is alive
OMAP3 # ping
Waiting for Ethernet connection… done.
Using sms0 device
host is alive


Also observed: I had the server ping repeatedly: Network not reachable messages.  Then, when I commanded u-boot to ping, then 3 (and then 2) ping responses appeared and the not reachable messages ceased.  Account for this: u-boot did not run an arp service until the ping command was given.  After the first ping, the server knew the mac addr.  I verified it (00:11:22:33:44:55) was in the server’s arp table with the arp command.



Here I’ll draft a collection of instructions or guidelines for CS TAs, useful for profs too.

  1. Provide enough information for students to account for every point of credit lost on assignments that did not receive 100% credit.
  2. Never dictate or tell students specific code for which the intention of the assignment is for the student to figure out that code him or herself.
  3. place holder…


  1. Set up and enforce a policy so that after a student gets help the student must code or continue coding his/her own solution without looking at certain material such as code or design sketches (in more advanced) that a helper showed to explain how to solve the problem.

Challenge aspects:  When a solution is worked out by a group, especially when it is based on or refactors code that is printed in the textbook, seems unreasonable to the student to refrain from electronically copying a solution file after it is finished by someone else.

Research paper on laptops in class and the authors’ FAQ

Laptops hinder classroom learning for both users and nearby peers

Faria Sana, Tina Weston, and Melody Wiseheart*


Full paper

General Abstract: Laptops are commonly found in university classrooms. Thus, students will inevitably use laptop applications, such as games and social networking, during class time. To investigate whether multitasking on a laptop impedes in-class learning, we conducted two experiments in a simulated university lecture setting. We found that students who multitasked on a laptop during a lecture scored lower on a test compared to students who did not multitask, and students who were in direct view of a multitasking peer scored lower on a test compared to students who were not in view of a multitasking peer. The results suggest that multitasking on a laptop is a distraction to both users and fellow students and can be detrimental to learning of classroom materials.
*formerly Nicholas J Cepeda


Writing and asking the purpose of program code.

Example from a lab early in a Data Structures course:

//Lab Followup: Write a comment after EVERY LINE YOU WRITE OR CHANGE
//that demonstrates that you understand the purpose of that line
//in terms of the problem goal.  
//Bad example:  i = i + 1;  //Add 1 to i or Increment i
//Good: The count of dog bites is updated when we are bitten by a dog.


Here I’ll draft a collection of instructions or guidelines for CS TAs, useful for profs too.

  1. Provide enough information for students to account for every point of credit lost on assignments that did not receive 100% credit.
  2. Never dictate or tell students specific code for which the intention of the assignment is for the student to figure out that code him or herself.
  3. Set specific deadlines for when grading of an assignment must be completed.


  1. Set up and enforce a policy so that after a student gets help the student must code or continue coding his/her own solution without looking at certain material such as code or design sketches (in more advanced) that a helper showed to explain how to solve the problem.
    • Challenge aspects:  When a solution is worked out by a group, especially when it is based on or refactors code that is printed in the textbook, seems unreasonable to the student to refrain from electronically copying a solution file after it is finished by someone else.
  2. place holder…

Lightweight Java Visualizer Tool

Lightweight Java Visualizer Tool

Cool tool for teaching data structures…


“Don’t try to understand ’em
Just rope, throw, and brand ’em
Soon we’ll be living high and wide.”