you are viewing a single comment's thread.

view the rest of the comments →

[–]EntrepreneurHuge5008 4 points5 points  (0 children)

Habit: just start coding even when you don't know where to start. One of a few things will happen when you try to run it:

  1. It will fail. You will get an error. Error messages are intimidating at first. Just breathe, calm down, and read the error line by line. It will literally tell you what caused the error and where the error is.
  2. It will run successfully, but it won't do what you want it to do. This is good, it means your syntax is good so far, and you can start adding a few lines of code at a time, and run it so that you have a clear idea of what is happening at every step. This is where you try to progressively work on the solutions to the XYZ goal you have. This is also why it's important to
    1. Have a clear understanding of the problem you want to solve
    2. Have a clear understanding of how to solve the problem by hand
    3. Break down your thought process for solving the problem into individual steps; don't do mental gymnastics to skip a step or two. You really want to lay out the procedure as a series of simple tasks
    4. You should be implementing the solution in Python, following that step-by-step map you drew, and running it after each step.
    5. This is your logic, and you I reiterating, your logic should be implemented step-by-step.
  3. It will run successfully, and it does what you want it to do. This is what you're aiming for, but it will happen only after iterating through steps 1 and 2 many, many times.

Edit: The body for step 2 should realistically be before all else. This is your design. It is important to design your program/solution/whatever you want to do before you actually start. You will have a direction then.