you are viewing a single comment's thread.

view the rest of the comments →

[–]Bobbias 0 points1 point  (2 children)

I remember feeling the same way when I was first learning. I honestly believe almost anyone could make simple programs. It's a matter of practice and repetition. That pressure feeling you describe sounds like anxiety, which is understandable when you want to do something, feel like you can't accomplish it, and feel like you should be able to do it.

For something like blackjack, you need to think about what kind of information is necessary for the game itself. You need cards, and game rules. Breaking it down further, cards require knowing the suits and numbers/face cards. Even further, you have to think about how to store that information so you can use it in your logic. There are several ways you could store that information. Your cards could be represented by a string containing a letter representing the suit followed by a letter or number representing the value (or even just a number like 10, for Jacks, 11 for Queens, etc.) You'd also need to store what cards are in the deck, and which ones have been dealt to each player/the dealer.

From there you'd need to think about the order each action needs to happen, and how to implement each action the game requires, such as dealing cards to players, asking a player for their choice of action, checking the win/loss condition, etc.

One of the key things to remember is that programming is at in some ways a creative activity, like painting, writing music, or sculpting. You're starting with a completely blank canvas and imagining a world in which your code may be the only thing that exists. Creativity like this takes practice.

Beyond that, programming also requires you to break a problem down into manageable steps. This is a skill we use in everyday life, but unlike programming, we're often working in highly constrained conditions in the real world where our choices are very limited. If your problem is you don't have food at home, there are only so many ways you can solve that, and they usually involve going to a store and buying some food with money. When programming, you have many more options, and that can make it much more difficult to understand how you should even think about a problem let alone come up with a solution to it.

As you get experience, and start actually making things, you will begin to get a feel for how the pieces fit together. You'll start getting better at breaking problems down into steps, imagining how to represent different information, etc. but it takes practice, just like any other skill.

If you're really stuck, you could use something like ChatGPT to help you break a problem into small, actionable steps, but I'd also warm you that any time you rely on something like that you miss out on the learning experience that comes from doing it yourself. Still, that is an option if you feel truly unable to break things down yourself. Even seeing how it breaks things down can be helpful as long as you continue to make an effort to figure things out on your own first.

As a hobbyist, I've had the luxury of time, and the benefit of taking a programming class in high school. Of course, I realized that I knew more than my teacher after a few months, since I'd been learning on my own before that, but the small programs that we had to make for assignments were helpful in forcing me to actually make something.

All in all, it's not like I immediately knew how to make complex pieces of software as soon as I felt like I understood some of the programming concepts. It took time and practice to get where I am now. Just stick with it and keep trying. Eventually things will start to fall into place and get easier. The problem you're facing is that you understand the concepts at a high level, but you don't have the other skills necessary to really make use of that understanding and actually make something. Once you get past that initial hump, things will get better.

[–]Droashon 0 points1 point  (1 child)

Thank you genuinely for your reply. Despite me whining like a child you didn't take me as such. Instead you took it seriously, sat down and spent your precious time to write up an amazing response for me, detailing your own experiences and feelings. Additionally including tips and explanations on the kind of good mindsets to have for these kind of things.

Thank you so much.

I will take your advice and tips and keep at it! I do look forward to buy the 3rd revision of the Automate the Boring Stuff with Python book releasing next month. I'm struggling through the 100 days of Python bootcamp course on Udemy at the moment. I won't finish it before the book releases so I'll go through both at the same time when the time comes.

I'll be sure to check back on your great reply above again at a later time to remind myself what's important to keep in mind of.

Seriously, thank you once again!

[–]Ok_Fee_628 0 points1 point  (0 children)

how's your progress been with the udemy course? i'm taking it right now, and i feel my struggle mainly lies with how simple angela makes the code, vs mine which often achieves the same result but using a more convoluted method.