Monday, September 24

Lost in Boelter: Computer science demands perseverance more than perfection

(Creative Commons photo by Aaron Jacobs via Flickr)

(Creative Commons photo by Aaron Jacobs via Flickr)

Computer science is not for the faint-hearted. I learned that fact the hard way last week.

I had been working on a major project for my computer science class for the past two weeks. I had completed nearly everything the 56-page project specification required, but a single task managed to lay beyond my reach. After staring at it for 14 hours straight, my laptop was displaying hundreds of lines of code — dysfunctional code. It was code that had forced me to skip four meals over the past two days. And it was code I was ashamed of. Success, once firmly in my grasp, had eluded me.

Sitting on the ground outside Boelter Hall, I submitted my unfinished project, resignation digging hard into my chest. A bitter afterthought persisted: “Aren’t you supposed to be good at computer science? How could you have failed, then?”

But don’t worry, this isn’t a tale about my failure. This is a tale about perseverance.

Terabytes and Tribulations

The difficulty I faced last week is by no means unique to me.

Computer science is wholly occupied with solving problems. This very nature is in itself demanding not necessarily because the problems being solved are complex, but because implementing good solutions is difficult.

This may seem odd, as difficulty in most other fields arises from complex problems, not complex solutions. For example, a pediatrician’s difficulty arises from identifying his or her patient’s condition from the symptoms that are exhibited, not necessarily from the solution itself, which sometimes doesn’t consist of more than prescribing a medication or referring the patient to a specific treatment.

Computer science, on the other hand, operates differently. For example, if a computer scientist is tasked with coming up with a program that can solve mazes, the difficulty isn’t in the complexity of the problem itself — to solve mazes — but in implementing a solution that works not just for one maze, but all mazes. Any syntactical error in the coding language or logical error in the solution’s algorithm renders the solution dysfunctional — in other words, it’s almost always all or nothing.

I speak from experience when I say that computer science can be draconian. It demands exactness in its solutions and accepts nothing short of it. For students studying computer science, mistakes can be disastrous, be that in exams or in course projects, and the devastation – as I experienced that night – they may face in their grades or morales is heartbreaking.

However, despite the great ramifications for making mistakes in computer science, there is an implicit tolerance for them. When faced with a seemingly insurmountable coding problem, what is needed above all else is the perseverance to continue attacking the problem, no matter how many times the attempted solutions fail.

This idea is liberating. Failure to solve problems is not looked down upon, but rather, the failure to persevere and continually come up with possible solutions is.

For example, the fact that I didn’t finish my project does not make me any less of a computer scientist than I was before. It simply means that I couldn’t solve the problem with my current skills and approach. However, if I let such a failure make me any less persistent in solving future problems, then I will truly have failed.

The same holds true even for computer science experts.

Pro Problems

In computer science, the sometimes non-linear relationship between the effort put in and the quality of results is very much apparent. Just because you work harder than someone else in implementing your solution doesn’t necessarily mean you will have the better solution—or a functional solution at all, for that matter. In fact, someone who exerts only a fraction of your effort can very easily garner superior results.

Of course, someone’s skills and coding prowess very much play a factor in the ease with which they solve computer science problems, but even the greatest of programmers, much like students, can fail miserably, though the stakes are higher.

For example, in 2013, when Apple released an update of Safari, its Internet browser, it accidentally disabled an essential web security supported by all other browsers. In short, the updated version deemed all websites, even those that are malicious, as secure. Users could be redirected to malicious sites and input usernames and passwords to bank accounts and emails without Safari warning them if the sites they were visiting were shams of the original sites (e.g., ) — a major security issue. It was as if an airport stopped using a no-fly list and allowed any person, including suspected terrorists, onboard aircrafts.

The “goto failure” bug in question.

Months later, Apple identified the source of the problem: the developer who had written the piece of code that determined whether a website was secure had made a mistake on one line, accidentally copying an extra line that read “goto fail” one too many times — an error infamously named the “goto failure.” The simple error of a single misplaced keystroke had instantly turned a fool-proof system into one that was nothing more than foolishness.

However, as is true for students, what was demanded was not perfection, but the perseverance to continue trying to solve problems.

The Safari update was clearly a security blunder, and Apple faced a great deal of heat for having made such an error. But the very fact that it released a software update that patched the goto failure, business incentives aside, demonstrates how it was able to make amends. And, to date, Apple has continued to release Safari updates, none of which have errors like the “goto failure”.

At the end of the day, failure befalls every computer scientist, regardless of their experience. But what distinguishes the good from the great is the ability to pick oneself up and attack the problem once more.

Share on FacebookTweet about this on TwitterEmail this to someoneShare on Google+Share on Reddit
Opinion editor

Tadimeti is the Daily Bruin's Opinion editor. He was the Opinion editor in the 2017-2018 school year and an assistant Opinion editor in the 2016-2017 school year. He tends to write about issues pertaining to the higher education, state politics and the administration, and blogs occasionally about computer science.

Comments are supposed to create a forum for thoughtful, respectful community discussion. Please be nice. View our full comments policy here.

  • BolarPear

    As a burgeoning CS student in Colorado, I appreciated and was able to relate to the advice here. I’ll have to remember it going forward, great article!