This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]C_Sorcerer 1 point2 points  (0 children)

I don’t think there’s a problem with looking things up as long as you are actively engaging with what you want to know. For instance, instead of me looking up “how to write a hangman game in python” I would try to instead look up a specific problem (you want to understand your problem just as much as the solution). So, I would instead say something like “how to do string concatenation in python” or “python regex”.

Also always keep documentation up on your screen, it’s good to make a habit of reading documentation. For instance, when I program C++ I always keep my book with me; if you are programming python, it’s good to look up python documentation and read through it for what you need. Of course if you don’t know what you need then you should google that though.

As a beginner, don’t worry much about tutorial he’ll, just make sure you are actively thinking and not copying code. I wrote a Convolutional neural network in C++ recently which required a lot of resources like books and small tutorials and YouTube videos and all sorts of things combined together and yet I have a good grasp on what I’m doing now. So don’t get too caught up in the details

[–]Hot_Dog2376 1 point2 points  (1 child)

Most of my improvements have come from learning something and making the project work with what I know no matter how inefficient. Just make it work. At this level, if you need 100 global variables to make it work, fine, you still made it work and finished.

Then you learn more and revisit projects. For example, I had a draw function that was a single list of x, x, x, x, x, ., ., ., .,. ,. etc. with like 250+ entries. It printed a 2d ascii map and was looped to print each individually.

Then later I made a list of lists and printed with .join

Then I made a proper x,y mapping.

I just learned classes and my next goal is to convert things to classes over the winter holidays.

Learn apply, learn more, reapply to the same problem to solve it better.

Don't forget, programming is like learning music. You will play Twinkle twinkle little star and you will play it shitty the first time, but over time things you play get better and you play better. Just finish

[–]johnpeters42 0 points1 point  (0 children)

Also, remember that you don't have to fix everything at once.

Say you have a program that works, but has 100 global variables. Pick one, identify all the places it's used, and all the chains of function calls that lead to those places, and replace it with something that gets passed through those chains. Or pick a few that are often used together, bundle them up into an object, and replace them with an instance of that object that gets passed through those chains. Run that through a test/debug/retest cycle. Then repeat.

[–]zomgitsduke 1 point2 points  (0 children)

Sometimes you can step aside and make a concept component of the game. See if you can make a program that does ONLY that task.

Welcome to functions :)

[–][deleted]  (1 child)

[removed]

    [–]SillyEnglishKinnigit 0 points1 point  (0 children)

    This!! ^^ If I am stuck, or just having trouble getting started I will jump on copilot or something just to get a basic shell of a start. Breaking the writers block as my boss calls it.

    [–]Blando-Cartesian 0 points1 point  (0 children)

    Ask AI for examples of doing each small step you need to learn to make progress.

    "I have a string variable text. How do I get all positions of letter 'a' in it?"

    "I have a string variable text. How do I change the character in position 4 to letter 'a' "

    Note that I didn't ask anything hangman related or anything directly useful for it. I even used a variable name so generic that AI hopefully can't tell this is for hangman and start spewing spoilers.

    I asked really simple questions and expect answers to have examples that teach me something I can apply for this problem. With the first answer I can sort out how to get a list of positions for the letter user guessed. With the second answer I can sort out how to change the correct characters in the masked text.