Online Learning for Computer Science

I was able to resolve a true head-scratcher of a code bug today. As it turns out, in C++ (1 + 2) / 2.0 = 1.5 while, counterintuitive as it may be, (1 + 2) / 2 = 1. This is just a wonderful quirk of integer arithmetic, but it can have some bizarre and unintended consequences (like making my otherwise functional binary search into an infinite loop this morning.)

Fortunately my undergraduate career prepared me well for bugs like this one. I’ve spent enough time with excellent TAs and professors by my side that I was well-equipped to find what was breaking my loop. But this error led me to think more deeply about computer science as a field: it was not a problem I could have answered easily via Google. (The symptom – an infinite loop – seems far removed from its root cause. And the line at fault was inconspicuous enough that I doubt I’d have had the wherewithal to post it to Stack Overflow.) This leads me to wonder how easy it is to self-teach CS. Granted, many languages do not have the absurd quirks and obscure segmentation faults of C++. That being said, there are some deeper and more universal concepts in CS (like runtimes of various algorithms or the ins and outs of memory allocation) that would be unintuitive to all but the most left-brained of people – they certainly did not come naturally to me!

As classrooms move online and as students start learning new skills on their own, CS knowledge will become pervasive. That is a wonderful thing! That being said, I wonder if this new generation of students will have a harder time without those TAs physically by their side, pointing out potential pitfalls in their code and warning them about the bizzarities of their programming language of choice. I do imagine I would have a much harder time learning in this current academic environment.

Leave a Reply

%d bloggers like this: