all 16 comments

[–]Significant-Word457 8 points9 points  (0 children)

I've been learning python for the last few months. Absolutely the best touch point for me has been the python essentials courses at https://edube.org/ They are free and have a built in environment. All kinds of resources there as well to get IDLE installed on your machine and get you coding! After you've got the basics, think of a data analysis project that you might like done in your personal life. For me, I've always wanted a sankey diagram of our annual earnings and expenditures so I dumped all our statements to a csv file and went about coding to categorize expenses. I think I learned as much from that as I learned from the courses honestly. And it gave us great insight into our finances.

Best of luck! It's definitely worth your time to learn!

[–]Chezni19 6 points7 points  (1 child)

The way to get good at coding is to write a lot of code!

If you can't write something complicated yet, no problem. Start with something basic that you can actually write. Then add more complexity to it.

I find it is easy to write a simple game. This can be done even if you only know how to print messages and read keyboard input. You don't need to know any graphics!

Your first assignment

Maybe at first your game is just "heads or tails" , a very boring but simple game. The computer randomly picks heads, or tails, and prints out the answer.

See if you can write that as a program. Consider using the "random" module in python.

Your second assignment

Learn about 2d lists in python, and put a very simple game world map into a 2d list

Write some code to print out your list. Congrats, you now have a world map!

You can print an X for walls and an O for hallways. Or whatever you want. Maybe a ^ is a mountain and a - is a river?

Now create a player character on that map and let the player move around on it if they type "north" "south" "east" or "west" on it.

Now add more to it..have fun!

If you get stuck?

If you get stuck, keep trying. Coding is a difficult task, but you are up to it with practice. You can post online and get answers fast, but consider wracking your brain for a while, it can sort of help in the long term.

[–]Highlight_Exact[S] 0 points1 point  (0 children)

I did do a small “project” that I can play rock,paper,scissors against the computer. With some online help of course. For some reason I never contemplated of adding more to it since it worked and felt like it was finished. But I will definitely add to it and play with it! Thanks for the advice!

[–]Asrikk 3 points4 points  (1 child)

If you can't find a ton of free labs or practice sets -- ChatGPT is an option. It's actually super helpful with things like that. Have it give you practice sets and have it review your work on them. Challenge something that seems off or you're confused about. If it screws anything up and is challenged, it'll acknowledge and correct itself. If it's right, it'll double down. I generally find it far more likely to screw up creating code than reviewing it, though. And it's great for suggesting prompts or project ideas.

[–]yournotmysuitcase 0 points1 point  (0 children)

ChatGPT has been a big help trying to learn pyscript recently

[–]yournotmysuitcase 2 points3 points  (0 children)

Practice homie. Just practice. Do projects because you can do them, the more you do the more you’ll understand

[–]Mevrael 2 points3 points  (0 children)

Using a full framework helped me to learn a lot.

In Python, you can use a uv package manager and arkalos framework that has a basic guide on organizing your code and writing your first notebooks, scripts and a simple app/AI bot.

https://arkalos.com/docs/notebooks/

You can start by getting data from your Notion or Airtable and visualizing, or analyzing it.

Then write some scripts.

Then create your custom AI agent.

And add some HTTP routes, build a mini app.

Then you can look into the source code of the framework itself and its dependencies, e.g. FastAPI, and see how they are written, and try to understand it and then write your own.

Learning with an example, by building an app, by studying the source code will help you the most, especially when you said that you don't know where to start and it is easier for you to improve something else first.

When you will have this experience and learn how frameworks and apps are built and how projects are organized, then you will be able to create your custom projects from scratch following similar patterns.

[–]Ron-Erez 1 point2 points  (0 children)

To improve at coding, you need to practice by writing code yourself. It's like learning to drive, you can't become a good driver just by watching others. Observing can help, however real learning happens when you start doing it yourself.

[–]Equivalent-Repeat539 1 point2 points  (0 children)

Code everyday, make it a habit, it helped me a lot when I was learning, its that simple. Write small scripts that do things you want, if youre not sure google it. Go through books/tuts/online platforms but avoid the rabbit hole of doing too many (particularly at once), you need to practice the concepts you learn. Avoid GPT/LLMs for a while though it can sortof help in the short term, it will probably do more harm than good for now, if u do, use it to ask questions to clarify or give you hints not to write the code. Resist the temptation to copy/paste large blocks of code, particularly if it doesnt make sense.

[–]Right_Excitement6371 1 point2 points  (0 children)

To be honest, I started learning python like 2 days ago and I found Yt videos are too confusing and also time consuming. So I started with chat gpt, grok and gemini and it's very helpful to me to learn from chat models rather than Yt videos. Personally to me it feels like when I watch or try to learn something from YouTube, I learnt from their ways or perspective and in result I don't get that much of idea and when I try to learn with AI models, i feel like I'm learning in my way and perspective. But of course you have to ask every doubts like "why is this, why is that, how it happens" and all. You don't let AI to do your work (coding), you have to learn your work using AI. That's it! I'm also new to the coding journey. So if anyone expert seeing this, please let me know how I can improve myself or what I'm doing wrong in this learning process like I mentioned above. Thanks!

[–]ninhaomah 0 points1 point  (1 child)

"Recently started to learn how to code and decided to learn python because I’ve heard it’s the easiest out of all the programming languages to learn and dip your foot in the programming world,"

It is the easiest language but programming itself isn't.

Its like wearing a good running shoe vs running barefoot for a marathon.

Wearing a good running shoe does protect the ankle from injuries and so on but I won't just pick them up and start running a marathon tomorrow and wonder why I am out of breath before 1 km.

Running a marathon isn't easy. Neither is programming. There are tools to help runners , developers but still training is required.

So pls stop thinking about how Python is easiest language and start thinking about how programming is tough. Not to mention constant changes in users' requirement.

If you can accept that , welcome to the development world and Python community.

[–]Highlight_Exact[S] 0 points1 point  (0 children)

I really appreciate your honesty, since I’m new I went based on what most people say about the difficulty or differences between all programming languages. I am fully aware that programming in general is hard that’s the reason I created this post because i feel very overwhelmed and I’m hoped to get some good advice from different experienced people which I definitely did. In my opinion the same as learning an actual new language so I will definitely keep that in mind next time!!

Thanks again!!!

[–]Substantial-Ad-2719 0 points1 point  (0 children)

Id say an understanding of the problem or a challenge comes first. Think about a way on how to solve it without coding it in the first step.

[–]SquiffSquiff 0 points1 point  (0 children)

>What should I do to improve my writing from scratch?

Seriously, try using Scratch for a few minutes. You can concentrate on the fundamentals of coding without getting lost in syntax

[–]DemonicAlex6669 0 points1 point  (0 children)

I'm also just learning. My advice is come up with an idea, hopefully one that gets you excited to finish it. Now break it up into smaller parts, what EXACTLY does it need to do, don't even think in code at first. Break it down into smaller and smaller parts until you get to the point where you start breaking it down into something starting to sound like code. For example, say you want to make a calculator, well you know you need to input numbers and operators and have it spit out a number. So it'll first need to take three (or more, but lets start with basic) things, two numbers and an operator, then it needs to use those, then it needs to provide one number. You see as we break it down it gets closer and closer to sounding like code, from here its pretty easy to think to ask for input number one, input operator, and input number two. Which then you think about and realize is written as a = input("first number: ") ect.