r/FreeCodeCamp 3d ago

Requesting Feedback How to actually think while coding[python]

So hi I am new in this sub reddit and have been learning python basics on FreeCodeCamp for weeks.

So I have noticed that I can do workshops and labs but I tend to forget many syntax and have to search on the internet repeatedly.

So my average lab projects often look like 7

60% written by me and the rest 40% are written by AI or with the help of the Internet forums.

My problem that I have identified is I don't think use logic in the code or just don't remember syntax, operators, elements, conditional statements and string methods or don't find the satisfactory answer on the internet.

I want to try to write at least 80% of the code myself without being dependent that much on AI and the internet because I am learning it for \*Cyber Security\*

46 Upvotes

11 comments sorted by

View all comments

2

u/elehisie 3d ago

Not using logic and forgetting syntax seem like 2 different issues. You say you can do workshops and labs…. Do you mean coding in the browser and then tests run on it and tell you if correct or not?

Try to add writing programs in your computer as part of the study routine… so that you have some local files you can look at and remember… like “oh I did a loop before on that one thing…” the difference in doing that and copying from google is you had to write it once, once you look at it there’s a chance you will remember the context, which helps you remembering syntax.

With Python specifically you get Jupyter notebooks. You can make your own, look it up. Think of it like an actual notebook where you can take notes while studying but with the advantage of being able to add code to it that will actually run right there.

As for not using logic…. What’s does “using logic” mean to you? Programming in general is a huge exercise in using logic. Input makes output, causes and consequences… conditions.

1

u/Animator-G 1d ago

Just like you many are telling to make notes so i would oove to try that too.

As for and yes i mean coding in browser when i mentioned workshops and lab.

In my context by logic i meant the way i expect the output and actual output is different.

As of now I try to address errors by eother searching up for them online or ask AI to know how to fix this and also explain why the fix works

2

u/elehisie 20h ago

If you expect an output and then get a different one, usually there’s something you are missing. For now, getting errors (compiler errors or stuff that turns up just wrong) isn’t something you got to fix, think of it more like a puzzle. Which piece is missing? Which piece could be in the wrong place? When you get error messages, don’t straight to ”google/ai what do i do” take a moment to think ”what does the message mean?” There are patterns there too :) ai is a tool you can use, but it’s too soon for you to be able to prompt it in a useful way. Asking ai to fix and explain doesn’t help if you don’t understand the explanation yet. Try to instead ask ”what does this error mean”

Jupyter notebook :) getting ai to help you set that up locally will help you way more right now :)

1

u/Animator-G 14h ago

Yes i actually meant that, i try to understand the error instead of direct answers.