In a 2022 survey of 1,000 United States students conducted by KX, 58% consider coding vital to future success. The desire to learn coding has exploded in popularity over the years, but learning a new programming language can feel daunting. You could be a student applying to the IAA, nervous if your skills are up to the task. Or you may be an IAA student already, worried about upcoming classes. Programming isn’t scary; it just takes a different approach than usual.
Learning a Programming Language Isn’t Like a Spoken Language
My first programming class as an undergraduate had written tests. I would sit down in the lecture hall, hope my pen had enough ink, and write several lines of code to answer whatever question my instructor deemed necessary. This method of instruction made sense for teaching a student how to ask where the bathroom is in Spanish, but not for programming.
Not how the world works, although it’d be REALLY funny.
The difference is the need for memorization and instant recall. If you forget the word for “bathroom” in Spanish, you can be left floundering in an informal conversation. If you forget how to ask R for the dimensions of your dataframe, then you can look that up without cutting into your time too much. This is not to say that memorization should be forgone entirely. Interviewers may still ask you specific questions, and committing syntax to memory will save you time in the long run. In general, however, the pressure to memorize can quickly scare off those aspiring to learn. Learning will come easier through the process of coding than through flashcards and written notes.
Application Takes Priority
“Practice makes perfect” is just as true with coding as it is with any other craft. Practicing your programming is the best sort of teacher, especially when starting a new language. Continuous, relevant practice is what will help concepts and functions stick.
Continuous practice refers to learning a concept and then immediately applying it. Each step of the learning process should be supplemented by examples and practice instead of waiting for the very end of a large cumulative project. This process, while time-consuming, is what builds that recall and familiarity. It also helps identify gaps in knowledge faster. Many online coding classes divide themselves into sections; use those gaps to test what you have learned before trying to accumulate more information.
“Relevant” practice has two interpretations. The first is relevant to what was just learned, which is self-explanatory. The practice you do should test and re-affirm what you looked at. The second interpretation is that it should be relevant to the real world.
When I first learned about memory pointers in coding, the resources I used never explained their relevant applications or usage. I understood the syntax and theory, but the lack of real-world tie-ins led to the question that can undermine all learning: “Why should I care?” You can still learn with this nagging question, but your “pull” to learn more knowledge gets weakened.
How the IAA handles this issue is superb. A real-world dataset, such as the Ames Housing dataset, supplements all lessons on the subject. Questions you can expect in the workplace are posed and then answered using taught material. The “why” is consistently being answered throughout the process. That said, you should not neglect theory entirely. For example, understanding how a data structure works will help with debugging. Conceptual understanding also helps when adopting other programming languages. As with most things in life, there is a balance to be struck.
Trust the Process
It’s easy to give umbrella advice like “You should practice!” or “Don’t be afraid to look things up!” without giving more concrete advice. Here are three well-defined things you can do that might help.
#1 Keep code somewhere easily searchable
Classes will usually have functional snippets used as examples or demonstrations. I collect these snippets in OneNote so I can store coding examples in the same document as my notes.
Example from my SQL notes
Keeping the code and concept close together has two benefits. The first is reinforcing the “why” of what you are doing. If you forget the purpose of some code, you have a clear explanation in your own words directly above. The second reason is much more practical: searching. If you are looking up how to do lists in Python, looking up “python list” is much easier than looking up every instance of brackets in your OneNote.
Use comments (unironically)
Many programming classes will exalt the importance of comments, but convincing beginners is not easy. “It’s my code, I’ll remember how it works” was something I frequently said. For smaller programs, that may be a reasonable response. However, it will not hold up once you start including functions, lists within lists, custom objects, etc. This retort will also crumble once you start coding in groups, which is how most programming assignments work in general.
Use AI sparingly
Generative AI is an incredibly powerful tool for programming. The utility of converting ideas into implementable code solutions is an undeniable feat of technology. As with anything, it’s a matter of moderation.
The first major issue is, as with any code you get online, it could be wrong. The syntax may be wrong, and Python will proceed to scream at you. In other cases, the chatbot will misinterpret your request or make a logical error. The AI solution will run without issues, but the output will be completely wrong. Identifying why these errors occur while learning a new concept can be more hassle than it is worth.
The second issue is that you are removing “practice” from “continuous, relevant practice.” You can use an online chatbot to solve relevant questions, but how much are you truly learning? The emotional experience of attempting an issue, debugging your solution, and succeeding helps you remember.
As critical as I am, AI has a clear benefit for coding. AI can give some quick and functional solutions, assuming you already know what you are doing. I have also heard stories of people using chatbots to explain confusing programming concepts to varying degrees of success. These applications are undeniably beneficial, but overreliance will cause more problems than it is worth.
Coding is a skill that can be learned by just about anyone. My advice is not prescriptive. Instead, I shared ideas to try as you approach learning. Be willing to experiment; you’ll be a fully-fledged coder before you know it.
Columnist: Daniel Jaramillo