Sharing Programming

I’m going to be volunteer teaching AP computer science this fall at a NYC high school! Aside from actually prepping them for the AP exam, I’ve been thinking about how to share the programming culture I love with the students. Off the top of my head, I’d like to tell them about:

Stuff you can do to program for fun:

  • Hackathons
  • Game jams
  • Project Euler

Where programmers hang out:

  • Github
  • StackOverflow
  • HackerNews
  • IRC

Programming culture and history:

  • Basic security: anyone can come up with a scheme that even they, themselves cannot break.
  • How the internet/websites work.
  • Notables in the field: stories about Stallman, Knuth, Linus.
  • Cartoons: XKCD… there must be others.
  • Obfuscated C (and other languages) contests.
  • Read Joel Spolsky’s blog.

I’m sure there’s loads of stuff I’m missing. Any other ideas?

12 thoughts on “Sharing Programming

  1. Not a culture thing, but something I’ll push anyway 🙂 My favourite “I’m looking to get into computer science/software” book is http://www.amazon.com/The-New-Turing-Omnibus-Excursions/dp/0805071660 – it offers 66 short (~5 page) introductions into areas of Computer Science. It’s incredibly approachable and clearly written, and full of references (and a few exercises) at the end of each chapter in case something interested you.

    Like

  2. Three things I see with the interns we hire.

    They believe (and are trained) that being a programmer is only about writing code. They have no skills in reading code, especially code they didn’t write. Consequently they also miss writing/structuring code in such a way that reading by themselves or others, in the future is a good thing. Being able to navigate a code base, including whatever parts of the platform have source code is a very important skill. Also they should be able to intelligently talk about the quote “Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious.”

    Optimisation is taught but is used prematurely. I’ve heard all sorts of nonsense about cache hierarchies and string concatenation that while true, are completely irrelevant to the code just being written. What they aren’t taught is to “optimise” for human eyes (previous paragraph), and then tools (documentation generation, static analysis), and then testing. Finally once the system is determined “slow”, optimising the areas that actually matter as proved by profiling.

    The last one is breadth. We had one person who had learned PHP only, and then proceeded to write Python code as though it was PHP (eg only using data structures that PHP also has, opening files the PHP way, optimising based on PHP performance intuition). Even though they claimed to have done the Python tutorial multiple times (I kept insisting) what they were really doing is mapping it back to their PHP knowledge. Breadth means making yourself learn several different programming languages, frameworks, data structures, testing, doc etc and using them in their idiomatic ways.

    Like

    1. I definitely want to teach them to read code, I’ve noticed the same thing with interns and fresh-out-of-college hires. Given my druthers, I think I’d be teaching them _programming_, not computer science (I think most of your suggestions fall onto the programming side). I was actually debating with Andrew last week about whether using the debugger and writing tests were necessary for a computer science class. I came down firmly on the test & debuggers side, but I can see the argument that it’s not “pure” computer science.

      I am teaching AP CS, so theoretically it’s important that they do well on the test (which would argue for more CS, less programming). However, I think it’s more important that I get them interested in programming itself, who cares how they do on a stupid test?

      Like

      1. The interns we get are CS students which is why these programming/philosophy issues arise. Tests/debugging/reading code/learning languages/optimisation etc are all solutions to the bigger picture problem of what the context for the code is. That never got covered when I was doing my CS degree. For example the context for judging code is *relevant* amounts of correctness, performance, maintainability, scale, collaboration, simplicity, predictability (eg how long it will take to develop or run), future functionality, the goals of whoever instigated it etc. Usually these are not clearly spelled out (or at all).

        I like trying to solve the same problem multiple ways where you connect CS theory with practical experience. For example a Sudoku solver can be implemented using brute force, random (monte carlo style), and using various algorithms. The code can be functional style (especially immutable data) or traditional mutable data structures. It can be single threaded, multi-threaded and multi-process. CS can give you nice big O numbers, but actual time to develop and performance aren’t that predictable.

        Tying back to CS philosophy, I find MongoDB’s approach to index selection interesting. Traditional databases have lots of clever code to pick the best, while Mongo just tried them all and picked what looked best for a while.

        Like

  3. For where programmers hang out: meetups for every imaginable topic, some are even instructional, once you learn to navigate the spam. And then there are the inexpensive non-O’Reilly conferences like PyCon and such. Some have student pricing.

    Like

    1. Good idea, I’ll tell them about NYC meetups & events, like the speakers the NYU CS program hosts. They are high schoolers, so I doubt they’d be able to afford travel to any non-local conferences.

      Like

  4. Woo hoo, a New Yorker is on the web!? How could that be 🙂 – it always amazes me to find a ‘local’ via google… (I found you via MongoDB read ahead.)
    A terrific resource for teaching is NYC Hacker Hours meetup. They have a wonderful page of resources for teaching coding , http://hackerhours.org/resources.html . They are great people too… Lately I’ve been having some success getting security guards and events coordinators interested in Python, and I want to put together an email of my own short tips.

    Like

Leave a comment