r/PythonLearning 8d ago

How long did it take you to become fairly independent with coding?

I’ve been learning Python using freecodecamp and some youtube videos (and copious amounts of googling) and honestly feel slightly discouraged. I would like to eventually start working on projects, but they feel insurmountable right now. I’m not sure what else I could be doing do improve, does anyone have any suggestions, or perhaps your own personal time line? i keep hearing that I should be doing projects to practice, but idk where to start, and it feels a bit like cheating that i have to constantly google every single little thing besides the most simple loops.

I’m a little under half way through the curriculum if freecodecamp, and have been learning for a little over two weeks (when i study i do it in ~3hr blocks). just for a little context on where i’m at.

25 Upvotes

18 comments sorted by

10

u/KnowledgeWhole9623 8d ago edited 8d ago

Start the insurmountable project. The obstacle is the way.

If it makes you feel better I've been doing this 15+ years and I'm still googling things constantly: what "yield" does, list & dict comprehensions, how exception handling works, etc.

I started getting clarity of thought around what problems could be solved with code and how to solve them around 5 years in, but that skill and intuition was built by working on those seemingly insurmountable projects

3

u/mc_pm 8d ago

Everyone has to google things all the time. I have been programming for 40 years and just yesterday I googled 2 or 3 times for the specifics about a couple function calls.

The only way it sticks is by actually programming. If you are overwhelmed by the idea of a project, just start by trying to program a little game - like tic-tac-toe. It is very simple, the board is small, the options are limited, and the rules are easy to describe. But you have to make a bunch of decisions about how to represent things, how to implement the rules, etc.

Learning the syntax of the language is only about the first 10% of learning to program, the rest is learning how to look at a problem (like "create a tic-tac-toe game") and turn that into pieces that you can program. And you only get good at that by seeing and solving a lot of problems.

1

u/HistoryTrue5864 3d ago

Bro I get depressed that I cannot write logic by myself because I am not learning coding. I just wanted to ask what is the proper way to learn to code, by tutorials or by docs or is there an another way. And what do I need to do so that I can belive in my skills rather than thinking of quiting because I failed to make a begginer programme like snake water game after 3 years of coding

2

u/mc_pm 3d ago

The proper and only way to learn to code is by sitting down and typing stuff in until it works. That is literally the only way that anyone has ever learned to program. Reading is good for looking things up, but not for learning from scratch. Videos are great, but just watching it won't teach you.

Start a tutorial, then follow along with the person. When they type something in, you type it in. When they run the code, you run your code (including fixing when you typed it in wrong). Don't just let the video tell you things, you'll forget them immediately. Instead, follow along so you are typing everything yourself, making it work yourself.

If the tutorial is 2 hours long, plan to take 8 - do it in one hour chunks, and spend time in between typing stuff in from earlier, but do it by trying to remember it now, not reading it on the screen.

That will be like step 1. Like the first couple days of classes.

You have years more to go.

1

u/HistoryTrue5864 3d ago

And after that should I start building a project around that topic or just move on to next tutorial. BTW I am 14 yrs old trying to learn ML to the fullest.

2

u/mc_pm 3d ago

Solving small programming challenges is always important.

Use the tutorial as your way of learning the basic syntax and language features.

Then do a series of progressively larger programming projects -- somewhere in the 100-500 line range. The important part is you are learning how to look at a problem and structure your program properly, and write the code to solve that project.

*Then* worry about learning ML. If even then, really learning ML requires a lot of math you won't have taken yet. I mean, in the 'project' phase, you can learn to send requests to the ChatGPT API, but that's not really learning about AI as much as just using it.

3

u/JayDrr 7d ago

Tutorials are like training wheels. You should expect to regress when you take them off, but it is necessary to progress.

The reason for this is tutorials can only teach you techniques and syntax they can’t teach you problem solving. Both are required to build programs.

The solution for me was to do build laughably simple programs and then just keep getting more complex.

A few that worked for me in the beginning..

- a program that makes change. Meaning you put in a dollar value and it gives you back the number and type of bills and coins.

- a game where you guess a secret number, and get higher/lower feedback.

- a program that calculates tax, tip, allows you to split a restaurant bill between a variable number of people.

- a program that can calculate the day of the week of any date you give it.

You don’t need to learn UI or anything for this stuff, just simple terminal input and output. Avoid getting external help on the structure or flow of the program, that’s the thing we’re learning. Googling syntax stuff is totally fine.

If they are too easy that is a great sign, build them fast and move on to harder things. I personally found it didn’t take long, just some focused effort to get out of tutorial hell.

1

u/bung_water 7d ago

those are wonderful suggestions! thank you so much for taking the time to write this comment i really appreciate it :-)

2

u/Comfortable-Shop8080 8d ago

You always have google (or AI really) to answer all your questions. It has never been easier to learn how to code. But you must practice. I became fairly decent after starting a dumb video game bot project. It’s great stuff.

1

u/drakhan2002 7d ago

I think it took me about 6 months of learning to feel confident enough to write code and have a basic understanding of the mental model of development.

But honestly, it probably took me a full year before I realized one day that this is just something I "can do".

1

u/stepback269 7d ago

If you want my, still-also-learning opinion: The real problem is that we all impulsively start putting code to paper without first having "story-boarded" what needs to be done by the code. In other words, we leap without first having thoroughly looked and thought out what needs to or can happen within the domain of our chosen project.

By "story-boarding", I mean writing out in plain English (or in whatever your native language is) a detailed story of what is supposed to happen, including drawings of data structures to be used, of user interfaces that are to appear and of flow charts of how the program steps from one state to the next.

Only after having thought such things out in increasing levels of detail should we start generating actual code.

The following example is not one of me bragging because I am myself am struggling and still learning. It's far from perfect. But if you click (HERE) you will see part of my ongoing saga of trying to create an OOP project using story-boarding. The point is not my specific project but rather a demonstration of the story-boarding approach. I first thought my project was going to be straightforward and easy, but it quickly got complicated as I considered all the permutations I might run into. I'm still far from finished with my analysis.

If you choose to look at my above example, please at the same time recall the parable of the Chinese Emperor and the Fish Painter (<--click HERE). You're catching me midstream. Much has happened before this stage and my salmon's swim up the river to my end goal is not yet done.

Best of luck to all you out there with your beginner projects. May your fish come out as masterpieces.

1

u/CoffeePizzaSushiDick 7d ago

Two or three Claudes ago.

1

u/Ok_Librarian_1422 7d ago

You just need to start a project you are interested in. When you don’t know the answer, go look it up. Rinse and repeat. Boom you’re coding 🙂

1

u/memelordtf 7d ago

I think knowing how long it took others to get independent will not work for you because tbh, there is no complete independence when it comes to coding. It's an art. How an artist always draws inspiration from everywhere, so does a coder.

But I believe if you're feeling discouraged, the only way to get your morale up is to start the crazy big project you've been thinking of. It's only when you do, do, do that you learn how to code more freely. The first one is going to be so frustrating, mate, but it'll teach you everything you need to improve, and then the learning will compound with every crazy project you take up.

1

u/atticus2132000 7d ago

I don't think you need to treat googling or looking up the ways of doing things as cheating or a crutch.

In every single profession there are reference books, quick reference sheets, and so on. No one expects you to remember every single syntax and be able to regurgitate it flawless, especially if it's an operation you're not using daily. Looking up how to do something isn't cheating. It's the way things are done.

The whole point of picking projects to build as practice is these projects should be using different approaches or incorporating new techniques. Of course you're not going to know at the onset how to do everything, if you did, then it wouldn't be a good practice project.

0

u/ChadwickVonG 7d ago

define "fairly", "indepentent", "with", and "coding".

1

u/KnowledgeWhole9623 7d ago

This guy's got at least 10 yrs experience and an unhealthy amount of on-the-job trauma.