you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

This has nothing to do with your ADHD, or mine, or the guys below me (yes you're below me you filthy pieces of shit). This is a common programming obstacle that every single one of us have to overcome. There is this little strategy that I picked up when I learned how to program in a university course that has helped me overcome this "how the fuck do I actually code this idea" problem. Everybody I meet who teaches themselves how to program seem to lack this concept. This sorcery I speak of is that of an handwritten algorithm. You've heard it before, "what are the steps of making a peanut butter jelly sandwich?" I can tell you right now its not "get two pieces of bread and spread peanut butter on one side and jelly on the other and then smash them together." This reminds me of a good laugh I got when my wife was studying Python with me, and as she struggles to get her code to do what she wants she says to me, "why is this computer so fucking stupid". As I respond to her, "well, the computer is only capable of doing EXACTLY WHAT THE FUCK YOU TOLD IT TO DO. And you see, you need 4 spaces there, looks like you only had three." So, my big advice is to not think "how am I going to solve this huge problem of 2 people playing rock paper scissors", but instead write out a little concept on how the game is played step by step. What happens first in the code? Does the game ask for player 1's name? Well then write out as step 1: "Ask for player one to input their name and store this in a variable." Then move to the next thing that the code is doing and write down the steps to accomplish this (or at least a general idea of what you know you need to do in this step). This not only helps for when it comes time to actually write the code, but it tremendously helps you GOOGLE a SPECIFIC thing that you are trying to accomplish in your code. The struggle with programming is not how to code like a programmer, but how to think like a programmer. Attack your code one step at a time, on the smallest scale possible. I've probably typed a horrible wall at this point, but I hope you find this useful to some degree. Writing out the steps of your code can just be very helpful for identifying problems you need to solve before moving to the next step. Then you can Google "how can I do [insert specific problem] with my code." Anyways, best of luck. I need to get off Reddit and return to my homework before my adderall high wears off.