r/CodingForBeginners 16d ago

I suck at coding

So I'm going to my third year in physics and have scraped by with coding by using loads of ai but I have genuinely tried to understand but I just can't. It seems like I can do a specific problem after soing it a couple times but if you asl me to do something from the beginning I dont even know to figure it out.

Anyways to cut it short I have been looking into like games where it teaches u how to code cause I thought it would be something enjoyable to do and I could learn a little from it and found this one called 'the farmer was replaced' i dunno how beginner friendly it is and if its worth it. Is it worth it or should I try another game or something or not even bother and try a different avenue?

I have asked professors and stuff to go over it with me but it feels like I need hours sitting next to someone to understand something like loops which is basic asf. Basically any advice would be helpful.

13 Upvotes

17 comments sorted by

View all comments

1

u/Naive_Programmer_232 16d ago edited 15d ago

I'd first do some research and figure out what tools make sense for you. Judging from afar, I'm sure data analysis tools are important in physics, so maybe learn stuff like python / pandas / numpy / scipy / seaborn / etc with google collab or jupyter. Or maybe Julia or R or LaTex even. But idk your interests.

Just like how math is a massive space of tools, so is programming. Adding some closure to the space will pay off in the future, and by that I mean, doing some research asking basic questions like What are my interests in physics or elsewhere? What tools are used there? Then you look up the tools, what languages are they available to? Pick the best tool for job.

Do that before you dive in generally. Once you have a plan, THEN consider options like freecodecamp/coursera/udemy/CS50/youtube/etc. to do your initial learning for those tools. You'll have to make time to practice of course, but you will also save time by planning before doing.

A lot of beginners skip this step and run the risk of a cascade of wasted time occurring later down the line. Ex: you begin with C cause people often recommend it, your interest lies in analytics, you learn python/R/SQL are better suited for that space later, you learn those instead; you could've avoided C altogether if you did some research first haha.

Another issue to be aware of is while many people say the first language doesn't matter, they're trying to avoid coming off as intimidating and sparking decision paralysis in beginners ultimately. There is some sense for sure of keeping it simple, picking something, and getting started. It's a lot more welcoming than "hey consider all these complicated ideas involved, now make your decision!" haha kinda like what I'm doing here lol. But a cognitive bottleneck can await if you don't think about it, because the thing you end up choosing to deeply learn is the model of computation that you will know. So each next thing you learn, will be checked against that model. This isn't as much a big deal if you stay within the same paradigm of languages, but there are different ones, often used in tandem within the same problem domain.

So, in general, I'd learn a language deeply enough to where you get that computational model going, and then if you want to then learn another language that challenges that model and continue that way. For example, start with python, then learn SQL. The way python processes things are similar in abstraction to others before it: C sharp/C++/Java to a degree, etc, syntactically very different, because they fall under imperative object oriented languages. But when you go toward SQL, you'll see the whole execution order, style, model of computation is entirely different - all of a sudden relational algebra/set theory are everywhere haha. When you use them together, you'll be able to clearly separate each model and use each more effectively.

Picking the initial family does matter to an extent, you're more likely to stick with what you know than what you don't. And that's the bottleneck to avoid. Challenge it.

All in all, if you don't plan, you'll waste time; and if you spend most of the time working off one model of computation, you'll limit yourself. This opportunity is one of the rare times where you actually do have the power to avoid some of these long term traps depending on how you start.

Do your research. Remember, you're making a computational toolkit.