Introduction to Programming

Taking an introductory programming course this semester has been an interesting experience. Since I grasp the course material well, I’ve spent some time helping others with their work. As anyone who has taught math can attest, teaching even basic concepts requires you to understand the material far better than the student must. When it comes to programming, helping people is even more difficult because you can’t just tell them how to do it. You need to let them to figure it out on their own, otherwise they won’t have learned anything.

But leading someone along without explicitly telling them anything is really, REALLY difficult. Our professor is a master at this, and I respect him deeply because of it. A student will ask a question, and the professor will reply with an oblique statement that doesn’t seem to address the student’s question at all. Yet soon enough the student says “Oh! I get it!” and goes on their merry way. I try as hard as possible to emulate this method when I help those who are struggling, but it is nigh impossible to strike the correct balance. Help them too much, and they don’t learn. Help them too little, and they despair or begin to resent programming. And as much as I don’t like seeing it happen, many of the people in the class have come to resent programming.

This is as sad as a student resenting literature because of a bad English class experience, or resenting math because of a bad math teacher. Yet I don’t fully understand how to prevent it. If there was a good, standardized methodology for teaching difficult concepts without causing students to resent the field, I feel a lot of the problems in society today could be solved. Maybe that is just wishful thinking, though.

The second interesting observation from taking this class has come from observing a peer. The first language she learned was Python, and learning C++ this semester has caused some distress. There were many lamentations along the lines of “why is the computer so dumb?!” Of course, I found this hilarious because it mirrors a situation in the novel A Fire Upon the Deep. As the protagonists head towards the bottom of the Beyond, much of their advanced computer technology stops working, and they are forced to adopt more primitive methods. Needless to say, the characters who grew up with the advanced technology are indignant that they are forced to use such primitive technologies as a keyboard. Meanwhile, the character who grew up using primitive technology merely smiles.

In my mind, this helps clear up the argument of whether new students to the art of programming should be started on a high-level language, or a low-level language. Until such time as low-level programming is never needed except in rare circumstances, students should be started at a medium-to-low level. For example, it is easier to step up to Python from Java than it is to step down. I was originally of the mind that new students should start at a high-level as to learn common computing concepts without getting bogged down in obtuse technicalities and syntax, but getting a first-hand view of the results of such an approach has changed my mind.

The Simulation Problem

(No, not this)

I’ve been struggling with this problem for a while now every time I sit down to start playing KSP. As you may know, I am a huge space enthusiast, and a stickler for realism when it comes to portraying space and science topics. Then, of course, I also like playing fun video games. So I’m fundamentally at war with myself when I ask myself: how much realism is enough?

The key here is not striving for realism, but making it feel realistic. This means simulating what I know, and glossing over that which I know nothing about. Yes, this is lame. Additionally, there are some things that take far too much effort to simulate realistically — engine physics, weather patterns, n-body gravitation, physiology.

This problem has been eating away at me enough that I haven’t actually been able to play KSP. I tried a variety of different play styles, but ultimately I got stuck on one problem: I wanted my rockets to be as small as possible, and to take the optimal ascent route.

As I began researching this problem, I realized it was not trivial. In fact, planning an ascent path is quite complex, and the equations have a large number of parameters. Another compounding factor was that there is really no good documentation on the internet about ascent patterns. I’m not sure if this is because that information falls under some sort of ITAR restriction, or just because nobody is interested in it. I wasn’t even sure how to start thinking about it. I knew there was something called a “pitch-over maneuver”, but how does it work? Do they pitch over at a constant rate starting at some altitude, or is a more complex function? Are there multiple pitch-over functions? I could find nothing that answered this.

The second problem was that it is not easy to simulate rocket ascents. You have to account for the curvature of the Earth, so it is not a ballistics problem but a set of differential equations in a polar coordinate system. I tried some basic solution in both Scilab (a free version of Matlab) and in Python, but in both cases the complexity of the problem became so great that I threw up my hands before reaching a satisfactory solution. I mean, it’s hard enough if you consider one stage, but once you consider that a rocket can have any number of stages, the design space spirals out of control.

The design feedback loop

This problem would not stop bothering me. Every time I sat down to play KSP, I realized I was sitting down into a self-imposed math nightmare. Then after that nightmare was solved, I would still be stuck with a inability to truly simulate all the aspects of spaceflight I wanted to simulate, at least not without a lot of work making my own mods.

The moral of the story is: you can’t trust the system. don’t mix realism/math and videogames.

(There is another corollary problem, which is that Reality Is Unrealistic. We have these notions of how phenomenon look drilled into our heads by TV and movies, but the truth is often different and less COOL. Unfortunate that we have been trained to have that heuristic for coolness. TV Tropes says it best. An interesting example is Star Citizen, which shows the ship engines as firing all the time — even when they are off in the physical simulation — because it “looks cool”. Sigh.)

Mobile Computing

Many have predicted the fall of the PC in favor of large-scale mobile computing with smartphones and tablets. Most people don’t need the power of a high-end laptop or desktop computer to check email and play Facebook games. Indeed, most services are now provided over the Internet, with low client computational requirements. However, we may see an abrupt reversal in this trend.

There are two factors at play that could radically change the direction of the computing market. First, some experts are now predicting doom and gloom for the “free Internet”. The post-Snowden Internet is very likely going to fragment along national lines, with each country creating its own insulated network over security concerns. Not only does this mean the US will lose its disproportionate share of Internet business (and US tech companies will see significant declines in overseas sales), but it also means the era of cloud services may be coming to a premature close. As users see the extent of NSA data mining, they may become less willing to keep all of their data with a potentially unsecured third-party. If users wish to start doing more computing offline – or at least locally – in the name of security, then desktop computers and high-power tablets may see a boost in sales.

Second, the gulf between “PCs” and “tablets” is rapidly closing; the agony over PC-mobile market shifts will soon be moot. Seeing a dip in traditional PC sales, many manufacturers have branched out, and are now creating a range of hybrid devices. These are often large tabletop-scale tablets to replace desktops, or tablets like the Surface Pro to replace laptops. I suspect the PC market will fragment, with a majority of sales going towards these PC-mobile hybrids, and a smaller percentage going towards specialty desktops for high-power gaming and industry work (think CAD and coding).

I doubt desktop computers will disappear. In 10 years, the average household might have a large tablet set in a holder on a desk and connected to a mouse and keyboard, or laid flat on a coffee table. It would be used for playing intensive computer games, or the entire family could gather round and watch videos. In addition to this big tablet-computer, each person would have one or two “mobile” devices: a smallish smartphone, and a medium tablet with a keyboard attachment that could turn it into laptop-mode. Some people may opt for a large-screen phone and forgo the tablet.

It’s hard to tell whether or not the revelations about national spying will significantly impact the civilian net (the same goes for the fall of net neutrality). On the one hand, people are concerned about the security of their data. However, being able to access data from any device without physically carrying it around has proved to be a massive game-changer for business and society in general. We may be past the point-of-no-return when it comes to adopting a cloud computing framework. On the whole, transitioning from a dichotomy between “mobile devices” and “computers” to a spectrum of portability seems to be a very good thing.

A Forum for Original Thought

Nowadays, people hunger for original analyses and theses. Their pangs are reflected in the popularity of video series like The Idea Channel, Extra Credits, The Big Picture, and TED talks. Essentially, these are just spoken essays and presentations. They don’t really utilize the video medium, other than by coupling speech with a slideshow of images and (occasionally) video clips. Yet more and more these videos are supplementing written forms like blogs and columns. The intersection of unquenchable desire for consumable media (i.e. videos) and a veritable drought of mental stimulation makes spoken essays a desirable form of idea transmission.

Perhaps the number of quick-fact “educational” videos (e.g. Minute Physics, Smarter Every Day, CGPgrey, Vsauce, numberphile) stimulated the Internet’s interest in science. Indeed, there seems to be a vibe coursing through the tubes that “science is cool”, even if the way science is taught in schools isn’t. The realization that the scientific realm, learning, and, more generally, intelligent thought can be interesting has made people desire an influx of original analysis. It stimulates the brain, giving way to more thought in a way that other media has (mostly) failed to do.

In a world with an endless volume of consumable content, our brains may have become starved. Long periods of rumination can be painful and boring, so we flood it with cheap, throwaway media. Yet these times of inward reflection may serve an important purpose. Unfortunately, our over-stimulation by Internet videos, TV, movies, video games, and music has left us unable to focus on content-delivery platforms like text. We thirst for mental stimulation, yet cannot bear to gain it by taking a step backwards. This conundrum gave rise to the popularity of “spoken essays”. They inject creative, original thought quickly and painlessly. As we mull over this gem, we can further explore the subject in the video comments. Such discussion is evidenced by the considerable quality of comments on the aforementioned videos. Trolls, raging arguments over politics and religion, and insults have given way to (somewhat) thoughtful debates about the video’s analysis. Occasionally the next video in the series might make mention of some interesting points or surprising overall consensus concerning the previous video.

But is the classroom going extinct as a forum for intelligent discussion? Does it have a place in the furious online world? Perhaps. Although quick-fact videos give information, they very rarely delve into the depths of the subject and explain it in a way that lets the viewer solve entirely new problems on their own. They give the information top-soil, but hold back any sort of theoretical bedrock. A viewer might come out feeling smarter, but she will not have gained any tools in her arsenal of critical analysis and problem solving. This is partially due to the medium. Spending a longer amount of time to explore the subject drives off the initial appeal of the videos: quick learning.

However, some video series manage to seriously teach a subject while staying interesting. Crash Course has series on biology, literature, ecology, US history, and world history, served up by the eponymous vlogbrothers. They don’t necessarily go into the same depth that a yearlong course would, but that’s not really a problem here (it’s called “Crash Course” for a reason). The fact that dozens of videos are being spent exploring one subject is a start. Another faux-classroom video venue is Udacity. Udacity is a different beast; it is much more of an exploration into online courses than Crash Course. The physical classroom is woefully unfit to teach computer science. Udacity takes a stab at creating a classroom environment that takes advantage of its medium to deliver a more fitting CS education to a much greater volume of people, while still keeping a basic academic form.

Ultimately, I see a rise in the popularity of systems like Udacity, as well as series like Extra Credits and The Idea Channel. If educators want to truly grab the interest of new generations, they need to examine that which is already capturing attention. Rather than lamenting the advent of consumable, throwaway media, embrace it. There is a place for education in online videos and video games.

%d bloggers like this: