I stumbled upon computer science by accident. In a literal quest to 5 as many AP exams as humanely possible, I took AP Computer Science A on Florida Virtual School. Before that class, I had never considered computer science as a major. After that class, I knew it was something I wanted to do.
The absolute upper echelon of students entering university programmed throughout middle and high school. However, there is absolutely no reason why computer science should be a major reserved for these top gunners. My experiences at Penn have shown me that computer science is a field that many people can relate to and succeed in, but a field that most people would not consider studying since they are never exposed to it in high school.
I attended this high school, a school full of bright and creative students bogged down in the procedural world of AP Calculus, AP Physics, and AP Biology. At no point are they ever told about popular and useful majors such as computer science, finance, and statistics. My gut feeling is that most public schools offer this curriculum of traditional APs â€” sure, useful background knowledge to know, but a syllabus truly a mole wide and a molecule deep. Here, students are never informed of collegiate and career opportunities that fall outside the archetypal AP exams.
My question to the reader is â€” how do we attract these intelligent students to the field of computer science?
I personally believe in the power of grassroots activism, which is why I took it upon myself to visit my high school and deliver a guest lecture in my old calculus teacherâ€™s 5th period AP Calculus BC class. This group of bright sophomores, juniors, and seniors is both curious enough to learn for fun and capable enough to learn on the fly.
My guest lecture had three structural components: explain what computer science is, show why it is useful, and field further questions from the students.
What is computer science?
When I asked this question to the class, one girl raised her hand and said, â€œMy mom teaches computer science at a local college, C and C++ I think.â€ I smiled and shook my head. â€œThose are programming languages. Programming is an important application of computer science, but thereâ€™s much more to it than that.â€ And indeed, there is.
Computer science is the art of taking stupidly easy problems and spending a stupid amount of time figuring out how to solve them.
Obviously, this is a massive generalization, and an incorrect one at that. Extremely important computer science work is done every day on challenging, (NP-)hard problems. However, the initial appeal in computer science is that many of the algorithms taught in a traditional undergraduate sequence are solutions to simple problems. One could come up with these just by playing. Thatâ€™s the angle I wanted to take with these students.
â€œFor example, letâ€™s say that I have a list of ten numbers.â€ I wrote down ten arbitrary numbers. â€œI want you guys to put these numbers in increasing order. Surely an easy task you guys do all the time, in one way or another. Have you ever stopped and asked yourselves how exactly you sorted these?â€
A student raised his hand. â€œI took the smallest number and put it first, then the second-smallest number and put it second, and so on and so forth.â€ Ah, selection sort, exactly the answer I was hoping for!
I grinned and said, â€œGreat answer.â€ I proceeded to discuss the number of â€œstepsâ€ weâ€™d have to take to run that algorithm, essentially exploring the intuition behind Big-Oh notation and asymptotic growth.
Why is it useful?
I posed to the class, â€œLetâ€™s say that weâ€™re Facebook, and we need to spit out a list of your friends in alphabetical order. Can we do this any quicker?â€ Of course, I wasnâ€™t expecting anyone to answer with â€œmerge sort,â€ so I led them through how to derive merge sort and how to prove that it is fundamentally quicker than selection sort. For a class that had never heard of an inductive proof before today, I was impressed with how quickly they picked it up. Moreover, they understood the rationale behind quick algorithms â€“ if your website or application takes too long, nobodyâ€™s going to use it.
Any further questions?
I ended up fielding a ton of questions that the students had, from how to count in binary to how Anonymous takes down websites. I explained what hackathons were, what good hacking versus bad hacking was, and what some of the hacks Iâ€™ve done at hackathons were. At the end of the class period, I definitely think I turned some students onto the idea of computer science. They were able to see its relations to math and its interesting applications.
While I donâ€™t subscribe to the belief that everyone should code, I definitely think that a lot of bright kids that go pre-med or major in a pure science or other engineering discipline could really succeed in computer science, had they known more about it. In an attempt to expose more students to this material, I gave a similar lecture last year on the RSA algorithm and how they can use it to send secret messages. This is academic and practical content that most public schools simply will not ever explore with their top students. I think itâ€™s a travesty.
How else can we encourage bright students to explore computer science and programming? Leave a comment with what youâ€™ve done or what you think.