SpecCheck Questions
What do students learn by using SpecCheck? I wish my purpose were so noble. SpecCheck’s raison d’etre is to make grading easier in large lecture classes. By conditioning student code to better conform to the published specification, we graders are more likely to succeed in running functional tests—which only work if the students name things correctly, have […]
SpecCheck talk at ITiCSE 2012
This is the draft of a presentation I’m preparing to give on some of my work. This text is meant to accompany my slides. Premise This work is rooted on a single premise: grading code for two hundred first-year computer science students is painful. It’s painful for two reasons. First, two hundred of anything is […]
Custom Activity in Unity
Goal: I want to trigger Android activity-level code in my Unity 3D application. Here’s a minimal example of doing so: Create a new Android project in Eclipse. We won’t be using many of the ADT plugin features. We mostly leverage the compiler and editor. Override UnityPlayerActivity with a custom activity: Add C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\androidplayer\bin\classes.jar to the […]
Capturing snapshots of a text file in Vim
To make a movie of textual development, I need a way to capture edits to a text file. Capturing needs to be done automatically and transparently; the developer shouldn’t have to trigger them. Otherwise, he’d forget. My initial thoughts were to intercept every keystroke and record the changes elsewhere on disk. I didn’t really like […]
Making a jQuery slider do something
Getting a slider to display was the first step. The end goal is to make the slider scrub through a series of snapshots of a text file. In between, let’s just figure out how to map the tick to a timestep. jQuery sliders are discrete; they can only be scrubbed to integral positions. Since the […]
Loading a remote file in JavaScript
Next up on my list of things I don’t know how to do is load a file in JavaScript. For now, let’s assume the file is hosted on the same server as the script. I understand that reading local files requires HTML5 and reading files from other servers can be troublesome. jQuery has several ways […]
Adding a slider into WordPress
How can I get a slider in HTML? Actually, how can I get a slider in WordPress, which is slightly harder? jQuery UI provides a slider, but the jQuery that ships with WordPress was not appearing for me. I tried using the jQuery provided by Google’s CDN instead: There are probably later versions I could […]
Notes from 5/18/2012
Evaluating field Stripping out complex numbers and NaNs The critical current has some NaNs and complex numbers where we’re finding roots of negative numbers. MATLAB’s visualization functions don’t seem to tolerate these non-real values. I set all non-reals to 0 with: These two lines exploit the fact that find and isnan report the indices of […]
Example case studies
OpenGL Example Installation needs: OpenGL driver GLUT Code: Android example Installation needs: Eclipse Android SDK Eclipse ADT plugin Android virtual device Code:
Plotting samples with GNU Octave
Suppose we have a plain text file of samples named samples.txt, with each intensity on its own line: We can visualize these results in GNU Octave with: If we write this code in a script named plot_samples.m, we can simply run plot_samples at the Octave command-line.