Underrated step for logic building in programming.

Image
Logic building is a crucial and complex skill in programming. In essence, it is ability to come-up with solution of coding problem and write precise instructions ( or code) that a computer can execute autonomously. This skill requires aligning your thought process with computer and its capabilities. And running through code some-what abstractly to know and predict the behavior of code before it is executed. To be able to do this, one essential step that many beginner programmers overlook is performing dry runs. Understanding Dry Runs The concept of a dry run in programming is straightforward: can you mentally execute your code and predict its output without actually running it on a computer? While this seems simple, it is a challenging task. Typically, we are taught to write code, run it, and observe the output. This cycle is essential because code needs to run to be validated. However, if you rely solely on running your code to understand its behavior, you may struggle with building

A better way to learn programming.



In this post, I will be talking about two methods to learn how to program.

The first method (common method) is a step-by-step tutorial approach like following a tutorial. It goes something like this: "Step one, create this component." The tutorial then provides you with detailed instructions on how to create that specific component. "Step two, do this," and you follow the next set of instructions. And when instructions finish you study and repeat the same instruction. This method gives you precise steps to follow. However, the issue here is that the person who created these steps went through a trial-and-error process themselves. They tried something, it didn't work, so they tried something else. They repeated this process until they found a solution that worked. What you're doing by following these steps is simply replicating their final result, which doesn't foster deep learning or problem-solving skills.

Second method:

The better way to learn programming involves a more exploratory approach. Instead of providing exact steps, a good teaching method will explain concepts like, "Here’s how you create a component," and, "Here’s how you do this." After explaining these fundamental concepts, the instructor will give you a project, like, "Now, I want you to build X." You attempt to build X on your own, applying the concepts you've learned. At the end, the instructor will show you how they would build X. This method is beneficial because it allows you to struggle and fail, which is where real learning happens. By encountering and overcoming obstacles on your own, you develop a deeper understanding and become a more proficient programmer.

In my view, this is what learning to program looks like:

You start by learning a little bit (like a new concept) and trying to apply it. You struggle, you fail, and you try again. You research a lot of things, discovering new concepts and techniques along the way. You then try to arrange all of these new ideas around a specific problem you're trying to solve, making sense of them in your own context. Eventually, you find a way to apply the information you’ve learned, and this is how you grow in understanding and skill.

An additional note I'd like to share is this: whenever you learn a new piece of information, always ask yourself, "How does this relate to what I already know?" This approach helps you integrate new knowledge with existing understanding, building expertise and deepening your knowledge over time.

Additionally, I believe the most effective way to learn is not to rely on someone else doing it with you, even though that might seem like a quick way to find the right answer. Instead, it's far more valuable to embrace the process of failing and discovering the context on your own. The essence of learning, especially in programming, lies in grappling with and understanding the complexities of state and state manipulation.

The real challenge in programming isn't typically about writing functions; those are often straightforward. The difficulty arises in comprehending how the state evolves and flows through the system. This understanding requires extensive debugging and hands-on experience. By immersing yourself in the process and tackling these challenges independently, you build a deeper, more nuanced understanding of how everything fits together. This journey, though time-consuming, ultimately fosters a more robust and enduring grasp of programming concepts.

Comments

Post a Comment

Popular posts from this blog

Building JavaScript Array Methods from Scratch in 2024 - Easy tutorial for beginners # 1

Build eisenhower matrix with React, firebase and neumorphism ui . (Part one)

Creating a Dynamic Search Bar in React: A Step-by-Step Tutorial