Hello internet! My name is Keith Schwarz, and I'm a lecturer in Stanford's CS department. This quarter, I'll be teaching CS106A, Stanford's introductory programming course. I grew up in Sacramento, California, and am currently living in a beautiful apartment in Mountain View, CA.
Ever since I learned how to program computers many years back (2000), I've fallen in love with it. I started off programming in QBASIC, and was fortunate enough to have access to Sacramento State's library, where I found a few good books on the subject. After writing a few simple games, I picked up some books on the C programming language. However, the whole programming thing clicked for me most when I picked up a great book on C++ and a few others on the Windows API and DirectX. It was truly incredible to be able to sit down and design entire games from scratch, which I did several times.
During my first quarter at Stanford I had the great fortune to take CS106X from Julie Zelenski, lecturer extraordinare. I often dropped by after lecture to ask extra questions and quickly realized that as wonderful and incredible as I knew programming to be, I had barely scratched the surface of what could be done with computers. I started taking as many CS courses as I could, some of which were among the greatest classes I have ever taken. I'm now finishing up my bachelor's and master's degrees in computer science eleven years after I first learned how to program.
It was at Stanford that I first discovered my true love of teaching. After taking CS106X, I applied to be a section leader, an undergraduate TA responsible for teaching discussion sections in Stanford's introductory programming courses. This was, quite possibly, the single best decision I have ever made in my entire life. After a fun quarter of section leading, during which I rediscovered four-square and the joy of riding tricycles down parking structures, I approached Julie Zelenski about potentially teaching a weekly, optional section for CS106X that explored more advanced features of C++. Many emails later, I found myself in charge of a new Stanford class, CS106L. After a summer spent devouring Scott Meyers' invaluable Effective C++ series, scouring the internet for any info I could find on C++, and long hours of syllabus design, I returned to Stanford in fall 2007 to teach 19 motivated CS106X students about the power and joy of C++ programming. The course was extremely well-received, and I ended up teaching CS106L six more times over my years as a Stanford student. In the course of doing so, I ended up writing a 500-page introduction to C++ and designing around ten different assignments (one of which, Evil Hangman, I'm expecially proud of). 38 of my former students have since become section leaders, and it looks as though the course will continue to be offered in the years after I graduate. In the course of teaching CS106L I've had the honor and privilege of teaching some fantastically talented students and have made many lasting friendships. Getting involved with the Stanford CS198 program also opened up several other teaching opportunities. I've given five or six guest lectures in CS106B/X, and even had the honor of giving a guest lecture in CS242, an upper-division course in programming languages. This summer, I taught CS143, Stanford's course in compilers. It was great fun and I'm hoping to get the chance to teach it again in the future.
One tradeoff I've had to make in order to fit teaching into my schedule as much as I have is that I haven't had as much time as I did back in high school to program in my spare time. I have held two summer internships (one at the Mozilla Corporation, and another at Palantir Technologies), which definitely gave me an outlet for built- up creative energies, and in my spare time have built a few fun programs, but on the whole I felt like I spent more time doing leisure coding in high school that I did as a Stanford student. As a fun creative coding outlet, I've been working on an open-ended personal project, the Archive of Interesting Code, where I'm aiming to research and code up every interesting algorithm and data structure ever invented. I've spent many fun hours working on this, and have learned a fair number of cool algorithms and data structures along the way. One piece of code I'm particularly proud of is my implementation of the smoothsort algorithm. Coding this one up ended up requiring a lot of research on my part, since all previous explanations of how the algorithm worked were utterly incomprehensible, and culminated in "Smoothsort Demystified", my own explanation and derivation of the algorithm. It's not original research, but I'm still quite proud of it. :-) I also recently wrote an article entitled "Darts, Dice, and Coins: Sampling from a Discrete Distribution" that explored several algorithms for simulating loaded dice. It was a joy to write up, and I'm hoping to continue writing more articles in this vein!
When I'm not coding or teaching, I enjoy listening to a weird combination of jazz fusion and progressive bluegrass. I'm particularly a fan of Pat Metheny (especially We Live Here and Speaking of Now), Béla Fleck, and Steely Dan. I also read a large number of webcomics, with a soft spot for xkcd, Girl Genius, and Questionable Content.
Thanks for reading this far! Welcome to my site, and enjoy your stay!
-Keith