This is a repository of code samples. Feel free to reuse however you like.
I code mostly in Java, so the Java examples are the most extensive. When I first learned to program, Perl was my language, so the Perl examples are clever but also relatively naive.
I have lots more Java and JavaScript code from work that I can't post.
Check out the Java Play! framework web app I built for a museum exhibit at MoMA! The source code is here: https://github.com/MultiAgencyCollective/exchange-net
And the site is here: www.theexchangearchive.com
Or check out an independent study I did in computational finance with my statistics professor, on option pricing models (such as Black-Scholes) and volatility models (such as GARCH). I implemented data collection and import routines, as well as the models themselves, in Python and Java. The source code is here: https://github.com/masonwright14/options
Summary of Contents:
C:
threading exercises from Silberschatz
Java:
Project Euler solutions for the first 25 problems
a Mancala engine that uses alpha-beta pruning minimax
a model of a deterministic finite automaton the user can configure
a Java quine, based on Sipser's Computation Theory book
a demonstration of period doubling in the logistic graph
JavaScript:
a port of the original Pong game to HTML5
LaTeX:
a sample homework assignment from Linear Algebra in Tex
NetLogo:
an implementation of Conway's Game of Life
a wolf-sheep predation model with custom made Poincare plot and recurrence plot
Perl:
a tower of Hanoi implementation as an alarm clock
a jotto engine
a jumble solver
a bf interpreter
a nim engine
an n-queens solver
Scheme:
solutions to all of part 1 of Structure and Interpretation of Computer Programs
bash shell:
a script from work for performing periodic screen captures during a software user study
a script to select a random emoticon as the prompt
SPIM:
assembly language exercises from Patterson and Hennessy (print factorials and primes, etc.)
SQL:
sample queries from work projects
XSS demo:
a class project demonstrating cross-site scripting and defenses against it. project includes
CGI scripts in Ruby, as well as JavaScript and HTML for the target sites