黑料传送门

Skip to content Skip to Chat

One of the skill areas that presents difficulty for many students is programming.聽 For those without programming experience, getting started can be overwhelming.聽 But it鈥檚 more than that.聽 Even after getting started, it takes time to adjust mentally to the practice of programming.聽 In some sense, programming is like anything else we learn 鈥 it takes time and practice to get better at it.聽 In another way, however, programming is unlike any other skill we learn.聽 That鈥檚 because the process of programming is not one-and-done. Instead, it鈥檚 iterative and full of code that doesn鈥檛 run when we think it should.聽 As , 鈥渨riting code is not actually coding.聽 Debugging is coding.鈥

My path to learning math was unlike most students, because my father would make me sheets of math problems to work through after I finished my normal school homework.聽 Cruel, you say?聽 Perhaps 鈥 but it had a point.聽 The point was that the more different types of problems I saw, the more I could recognize patterns when I saw them.聽 Working through many examples of different problems at similar levels of difficulty is what allowed me to catch errors I was making consistently, but also to recognize paths to solving certain classes of problems.

Coding Challenges

Debugging is both an art and a science, the skill of which distinguishes between experienced and beginner programmers.聽 Experienced programmers have seen many examples of different ways to solve problems, so they can pick and choose the ones they want to try from a 鈥渢oolbox鈥 of algorithms.聽 Experienced programmers have also seen many errors they made in previous attempts, so they can recognize a likely cause when they see one again.聽 Seeing this returned from a Python interpreter can be daunting:

However, once you realize this is likely caused by a missing index on a data frame, you can easily look for that and correct it in your code.

Programming Challenges

So, part of why programming is hard is that it takes time to practice lots of different examples.聽 There is no rushing this 鈥 you must write code to solve for different problems and to see the errors you will make. Only then will you learn what caused the errors and correct them.聽聽

The second way that programming is hard relates to the first: it鈥檚 frustrating!聽 Many people enter programming with the expectation that once they learn the syntax and how to code, they will be able to write code efficiently.聽 My experience after years of programming in multiple different languages, including JavaScript, PHP, Python, and R is that it rarely gets easier. We all make silly typos, and the types of problems we solve get harder as we gain experience. Even so, have resilience and be patient: The code only runs correctly once, and that is the last time you need to try it.聽 Every time before then, an error is returned.

The mental fortitude to accept multiple rounds of errors and debugging requires an adjustment in our thinking.聽 We cannot tie our self-worth to the number and types of errors returned.聽 We can鈥檛 allow ourselves to think that we are somehow 鈥渓ess than鈥 if we are struggling to solve a problem.聽 We must realize that all programmers experience debugging as the most normal part of their working lives.聽 This is different from other types of work we do, in which experience leads to fewer errors and faster completion of work.聽 For simple programs or scripts, additional experience may make us able to complete these tasks quickly.聽 But we will tackle harder and harder problems, so the total number of errors we will see will not decrease, and they will take longer to understand and resolve.聽聽

How do we make this mental transition?聽 I cannot speak generally, but I can offer some advice from my experience.聽 Instead of being frustrated by errors and bugs, I now realize that my skills are being built through the process of resolving them.聽 I am now happy when I am resolving bugs and errors, one function at a time, one step toward my final goal.聽聽

Programming Skills

I see programming as similar to running, which I do in my free time.聽 For both, there is certainly struggle along the way, and the same mental and emotional tools can help.聽 For example, visualizing the program finally running correctly 鈥搃s the same as visualizing crossing the marathon finish line with a smile on my face. I also use the Internet to find community with other programmers who can help me solve errors and provide needed comic relief. There is no shortage of hilarious memes about the programming process to help deescalate how frustrated I feel. Finally, how we think about our programming identity is important.聽 Some people think that if we aren鈥檛 employed with the job title of 鈥渟oftware engineer,鈥 we aren鈥檛 programmers. Instead, I think about it this way:聽 I am a runner when I am running.聽 Likewise, when I am programming, I AM a programmer.聽 Own your process and this will help you get to where you want to be.聽

Programming is a skill that is essential to a wide variety of careers in IT and beyond, so it is well worth the effort.聽 I hope these tips are useful to you as you begin and continue your programming career. Remember that it鈥檚 not the destination that is most important, but the journey.

Recommended Articles

Take a look at other articles from 黑料传送门. Our articles feature information on a wide variety of subjects, written with the help of subject matter experts and researchers who are well-versed in their industries. This allows us to provide articles with interesting, relevant, and accurate information.聽