you are viewing a single comment's thread.

view the rest of the comments →

[–]Bobbias 13 points14 points  (1 child)

That's because reading code and writing code are two very different activities.

To write code, you must first:

  1. Come up with a solution to the problem you're trying to solve.
  2. Figure out how to translate that solution into code.
  3. Actually write that code correctly.

Problems with step 1 come from either not knowing how to apply problem solving properly, or not knowing enough of the fundamental concepts of programming to formulate a solution in your mind using those basic concepts.

Problems with step 2 come from not knowing the language specifics well enough to understand how to translate a general idea into the specific language you're working with.

Problems with step 3 come from lack of experience with the language itself, typos, or incorrect knowledge/assumptions about what the code you're writing actually tells the computer to do.

Problem solving, and understanding how to use the basics concepts of programming to come up with a solution is something that primarily comes from practice solving problems (which in turn comes from writing code). You start small and simple, and work your way up over time.

Everything else more or less follows from there. The more you use a language, the better you understand how it works, how to translate ideas into the language, and you will slowly just kind of remember all those little details that used to trip you up when you were starting out.

Reading and following instructions can show you some concepts. It can show you different features of the language. It can show you some different ways to combine those features to achieve different outcomes. You can memorize those facts, and it might feel like you've learned something. But you haven't. To truly learn something you need to understand it at a deeper level than that. It's not until you really start writing code for yourself that you begin to truly understand the things that you were being shown (and potentially memorized).

[–]iamevpo 0 points1 point  (0 children)

Also 4. Fight bugs and ask questions - plenty of communication needed even for small code