Archive

NMSU CS Archive

A backup of /home/ugrad5/mmichie/class/ from New Mexico State University, mostly 2001–2002. Twenty-five directories spanning a full CS degree; these are the featured files.

The arc runs from printing a name tag in Java to distributing Mandelbrot computation across a cluster with MPI. In between: assembly, red-black trees, a compiler, a Unix shell, and a network protocol.

The full story is in CS Homework from the Turn of the Millennium. It is the sequel to Learning Pascal in the Canal Zone: same person, six years later, different country.

Stats

  • 21 featured files
  • 2001–2002 timeframe
  • bear the hostname

First Steps

Where a CS degree starts: printing your name, then dropping to the metal.

  • Name Tag

    CS 171, the first assignment. Twelve lines including blanks, with the program output pasted into the source as a comment. The hostname was bear.

  • 68HC11 Compare and Swap

    CS 273, embedded systems. Motorola 68HC11 assembly with the C equivalent of every instruction spelled out in the comments: ldaa n1 becomes a = 3.

Data Structures

CS 372. The assignment where a data structure stops being a textbook concept and becomes memory you allocate.

  • QuickSort

    The standard algorithm, implemented by hand for Data Structures and Algorithms.

  • Red-Black Tree

    The extra credit assignment, dated November 15, 2001. Full insert with rebalancing, rotations, and delete with fixup. The sentinel node’s key is 666.

  • Red-Black Tree Header

    Node structure and color enum for the red-black tree.

Building a Compiler

CS 370. Source in, executable out.

  • Tokenizer

    Recognizes words, numbers, periods, comments, strings, and reserved words, with each character classified through a 256-entry lookup table.

  • The Compiler

    Lab 8. Parses function definitions and goal expressions, then emits C: headers, a read_number() function, and a main() that evaluates the goal. A tiny language, but a real compiler.

FireSHell

CS 474, operating systems. A Unix shell built with Eric Zeitler and Daniel Foesch. The README warns: if your system goes down because you used FSH, that’s tough nuggets.

  • README

    The alpha warning, in full. A shell "that bridges the gap between GUI and CLI."

  • Parser

    Tokenizes the command line, handling quoted strings.

  • Interpreter

    The main loop: read a line, parse it, dispatch. Built-ins (cd, pwd, set, unset, exit) are handled internally.

  • Executor

    Fork, exec, wait. Includes the comment "flush std buffers in case the child is dumb."

  • Prompt

    Prompt rendering, a quarter century before plx.

  • Entry Point

    Where FireSHell boots.

  • Makefile

    The build.

  • TODO

    What never shipped: pipes, redirection, aliasing, configurable prompts.

  • CREDITS

    Names Eric’s Q&D Shell (Quick and Dirty) as the foundation.

  • PROJECT

    The project description handed in with the code.

Networking and Parallel Computing

CS 484 and CS 491. Framing, checksums, and state machines, then fractals across a cluster.

  • Framed Packet Server

    Accepts TCP connections, parses framed packets, validates checksums, and answers with ACK or NAK. The groundwork for the class’s Othello game server.

  • Parallel Mandelbrot

    MPI master-worker renderer. The master opens an 800x800 X11 window and feeds row numbers to whichever worker finishes first; workers iterate z = z^2 + c up to 100 times per pixel.

  • Monte Carlo Pi

    Estimates pi by throwing random points at a circle, parallelized with MPI. The formula is in the comments: pi = 4 * amount in circle / amount total.

The Contest Entry

Submitted half-done at midnight with Astral Projection playing in the background.

  • Dots-n-Boxes AI

    The ACM programming contest entry. Looks for three-sided boxes to close (returning 666 when it finds one) and falls back to random moves. The header admits "This program sucks. I ran out of time so I’ll submit what I have."