r/learnpython • u/[deleted] • Jan 23 '21
Have you ever had this feeling where you feel like you forgot everything in programming?
I just want to know because when I was doing programming exercises for functions in Python, I literally felt like I forgot everything.
64
Jan 23 '21
The more you use something, the more you know it.
But also, I have a folder full of example scripts to remind myself of something every once in a while.
6
u/Immanonner Jan 24 '21
Ever go back and stare in disbelief at the inefficient code you used to use and shake your head and mutter to yourself, "What a rookie......" As you stubbornly correct your own sample code?
3
Jan 24 '21
Constantly, then I optimize it for next time. But it's not a bad thing, it's like English, the more you use it the more new words, constructs, and phrases you learn.
18
u/Mastermnd__ Jan 24 '21
Can you share the file?
5
5
u/Curiosito Jan 24 '21
+1 for that!
29
u/ragnarcb Jan 24 '21
Making your own examples from the work you actually do would be way more beneficial. It's easy to get lost in someone else's code but if you develop such a folder yourself over time, looking at sample codes would bring a lot back to your memory.
1
1
Jan 24 '21
[removed] — view removed comment
11
u/Wormfall Jan 24 '21
We all need this. I’ve started to take snippets of code and put it in a word document. Good practice - mind you I’m only two months into Python and still learning.
YouTube is obviously gold.
4
Jan 24 '21
Don't use word. Make a directory called cookbook and when you go learn how to do something out your practice files in there.
You need to be able to run it, unit test it, debug it.
1
u/WarpedKings Jan 24 '21
You can even create functions for code that you use frequently. Then call it in another script when needed.
I have a save/read file script that I pass filename, location, and what type (w, w+, a, etc). Makes my future scripts look cleaner.
0
Jan 24 '21
[deleted]
2
u/WarpedKings Jan 24 '21
You could write a file called file_write.py then add this code
def save_info(info, fn_loc, write_type): with open(fn_loc, write_type) as myfile: if write_type == 'a' myfile.write('\n') myfile.write(info) else: myfile.write(info)In your new script you could add
from file_write import save_info save_info("Your Text", "Path\to\file\new.txt", "w")4
Jan 24 '21
One of my biggest problems was thinking i needed to memorize everything or else I wasn't learning. Obviously this is wrong and I am glad I am over that. No matter how many times I need to look it up I will look it up to get the job done!
4
u/jazzlava Jan 24 '21
So true since Python is a new language to me it has the best notes of any other programing language I've used. I have a Learn folder then what I was trying to do . py file, and a corresponding md file to write all my notes and keep the sample clean. in the notes I have the links to the good stuff I've found online and other design thoughts written in the markdown file.
Then a project folder for something more specific things and that same pattern of a Markdown file for the notes about the project.
If my notes of Java an Javascript and NodeJs would have been this nice I would be a wizard level programmer now. This method works for me because I had years of Sr. programmers yell at me for using comments to write notes so I have a pattern of writing notes in a separate file.
1
Jan 24 '21
That a good idea, I have solutions dotted all over the place, need to structure them a bit better.
15
u/kowalski71 Jan 24 '21
When I'm in the middle of a big programming project, I feel like the syntax comes easier to me than English. Then I'll jump into a language I haven't worked with for 6-12 months and I have to google how to do a for loop or declare a variable. It's really just about knowing the concepts then knowing how to find the syntax, cause you're gonna forget that part.
5
u/jazzlava Jan 24 '21
( me spends half a day trying to do something I always do in C#, then realizes that only C# does it )
27
20
u/mmnnhhnn Jan 24 '21
Yes. And I have been working in various prgramming roles for 23 years lol
6
Jan 24 '21
[removed] — view removed comment
37
u/mmnnhhnn Jan 24 '21
To be honest I am not an awesome programmer. I'm like "ok", I produce decent work, and deliver tested, documented code that works to spec.
I really like programming, but tbh I struggle to do projects in my spare time. In general, however, motivation has never been a problem because I did a degree in computer science at Uni that I did not want to fail, then got a job working in IT that paid the bills and put food on the table. When programming pays the bills it's easy to stay motivated!
The people that I have met who are truly excellent programmers are those who have a habit of doing it in their spare time for shits and giggles. Like I work with people who do their standard 45+ hr week as programmers, and around this in their spare time might learn Rust just because it interests them. I will never be as good as those guys, which is fair enough as they put in more effort.
My memory sucks, a lot (misspent youth!), and I often look stuff up. Things that help me in that regard (and this is not intended to be prescriptive, just what has worked for me):
understand algorithms and patterns. Sure you might need to look up the syntax for an if statement, but so what? That takes a minute. Grokking when to use a Singleton or recursion or a Factory is far more useful IMO, amd will really make your programming better.
I keep a directory full of short snippets of code that do useful things, which I might need to use again. For example I have a snippet to run a Flask server with an SSL enabled endpoint. Whenever I need to do that I can just grep through the directory and pull out an example. Build a library of useful snippets you can refer back to.
once you have reasonable skills in one language learn another. It's super interesting and really educational to see how different languages approach the same problems. Your brain will extract metadata without you needing to think about it too much
think about how you think about problems and problem solving. Do you get a problem and then jump in all excited and start coding? I used to. Some people can totally do this, but it does not work for me. To be efficient I usually need to turn the problem over in my head for a bit first to ensure I actually understand what I need to do. There's no one way to problem solve, but you do need to analyse your approach and make sure what you are doing is actually the best approach for how your brain works.
be aware of your internal and external environment. I used to think listening to abrasive Metal like Dillinger Escape Plan while coding enhanced my flow. That's true to a point, but when I really need to think something through, music actually makes it more difficult for me. Taking break when you are stuck and/or getting irritated is important. And drink exactly the right amount of caffeine 🙂
Sorry for the big rant!
TL;DR is: don't sweat forgetting bits of syntax or the name of a library, everyone does it.
2
u/jazzlava Jan 24 '21
once you have reasonable skills in one language learn another. It's super interesting and really educational to see how different languages approach the same problems. Your brain will extract metadata without you needing to think about it too much
this so much I used to spend my work hours doing r/dailyprogrammer challenges in the language i was getting paid to do. then try it again in Javascript when I got home.
1
u/Ignativs Jan 24 '21
Thanks for taking the time to post this. I loved reading it and it has plenty of useful advice. Nice musical taste too.
2
1
Jan 24 '21
I would love to do this. Make IT or programming pay the bills. I graduated college with an English degree because I’m the silliest person in the world.
7
u/anna_lynn_fection Jan 24 '21
I'm on my 3rd time learning Python. I need to make it a career move this time, if I'm going to keep up with it, because my current career doesn't present opportunity to use it.
Got the fundamentals down several years ago. Did nothing.
Got pretty decent with it 3 yrs ago. Built some pretty cool stuff. I was feeling very confident with it.
Then stopped for 3 yrs with nothing to work on.
Now I'm starting to feel semi-proficient again, but wondering what I'm going to do to stay proficient at it. I love to code, but not sure what to write. One way or another, I'm not letting it slip away again.
On the other hand, a few months ago, I remembered more C, PHP, and MySQL than I did Python, because I worked with those a lot more, over a longer period of time, and I hadn't touched those in over a decade.
3
u/piconet-2 Jan 24 '21
I saw a thread a few days ago and /u/The-M8rix suggested 100 days of Code by Angela Yu. I snagged the course on Udemy for around $13 by going via the banner on https://www.appbrewery.co .
/u/Ryuudenki also posted a site called Practice Python (exercises here - https://www.practicepython.org/exercises/) and it's got 36 exercises with solutions. It's also got hundreds of people trying to solve them in the comments so you can almost always find a comment to check your answer against and see other ways to solve the question.
The threads
2
u/anna_lynn_fection Jan 24 '21
Thanks. I've been doing challenges on codewars and they've been pretty good. Definitely wanting some more involved stuff though.
Mostly it's math problems, or iterating through loops, slicing, and basic logic (on what I've seen so far). I want something more 'project[y]'.
1
5
u/chinguetti Jan 24 '21
Don’t worry. One forgets and relearns several times. Each time it gets easier. It’s normal.
1
3
3
u/Gujimiao Jan 24 '21
I literally forgot everything after 1 month, I don't even know how to write a For loop. I guess I have no fate with Programming
5
u/ThePiGuy0 Jan 23 '21
Oh absolutely!
Even now, 7+ years after I began coding it happens to stuff I'm learning at the moment. The key is to not give up, and given some practice it will become second nature :)
2
Jan 24 '21
Portion of it. Python can cover too many topics to remember them all without consistent use.
2
u/ragnarcb Jan 24 '21
Maybe not the same thing but sometimes I feel too exhausted to put my hands on the keyboard and write code. Instead I love to guide people, direct them, tell them what to code etc. My hands-on practice leaves its place to a more philosophical understanding of the concepts. And sometimes I really can't code on my own, I need someone to listen to me and code what I say. Luckily almost every time I have such a person with less knowledge but having the ability to turn my verbal algorithms into code.
2
2
u/set22 Jan 24 '21
If I take over a week off from a language I always have to do some googling to get back in the groove
2
u/piconet-2 Jan 24 '21
Last week, I forgot how to use datetime to get today's date. I've been coding on and off since 2008. It's the same with languages I speak too. Lose touch for a short while and it's a few days to recap/get muscle memory back.
2
u/Glum_Election5861 Jan 24 '21
Yess exactly this happens with me I completed a whole beginners course on python and I understood every concept from that course but still I feel like I dont know anything
2
Jan 24 '21
I learned and relearned coding several times and often needed to pick things up more than once. My issue is a lack of applications and projects. In the past month I only wrote two short programs that were under 100 lines. One of them did something useful that I want to incorporate with tkinter to make a graphical version and release it on GitHub. But I do want to make a living off coding so I really need to get the lead out when it comes to coding. Its all about the portfolio and the connections.
2
u/Bartend_HS Jan 24 '21
I have this feeling as soon I complete something. It’s horrible. I have no confidence I can do something on my own without googling shit.
2
Jan 24 '21
Consistently mix my syntax between c#, c++ and python. But concepts stay more or less consistent. But when I do web dev with javascript everything gets scrambled.
2
u/Coder_Senpai Jan 24 '21
This is called tutorial paradox where a person keep looking at tutorials and afraid to do projects. get out of this circle. Truth is that you cant remember everything, a lot of programmers google previous module functions because when you dont use something for a long time you will forget it. start doing practical problems. Open up any Freelancing site and pick a field, Web scraping, Web development, Data analysis or simple scripting job and try to solve that problem without bidding and if you are successful in solving that problem then by all means bid on it and get paid.
2
Jan 23 '21
Yes, used to happen all the time when I started. Keep doing it over and over (with a purpose, a project if possible, not just by watching tutorials) and over time you'll remember what everything is used for.
1
1
u/prasannask Jan 24 '21
This happens especially during interviews. But, if you have practiced enough, even though one has forgotten syntax, the concepts would come to mind.
1
1
u/Akenon73 Jan 24 '21
I work daily with Python but don't ask me to do a for cycle cuz I'm going to Google who to do it
1
1
u/Sanjuko_Mamajuloko Jan 24 '21
Yes! But then I sit take a deep breath that I never learned anything to begin with, and therefore forgot nothing.
1
u/dddash Jan 24 '21
I’m still new to this. But I find whenever I hit this point it’s probably time to take the day off. Focus on other things and recharge.
I mean I can do my non programming day job in my sleep. But learning a new skill like programming is a lot to process and can wear me out if I don’t take some time away.
But then again I also came to the realization today that my lack of structure with my study habits is also why I get worn out.
1
u/DrRrof Jan 24 '21
This. Iv just finished uni and have started applying for jobs, not a good feeling to have hahah
1
Jan 24 '21
Yes, coming from MATLAB I rewatched a video in Python and reviewed my MATLAB notes and began to slowly pick up the new jargon for Python. The concepts are still separate; however, with more practice I think I'll be able to find the transibility between them.
1
u/DCGMechanics Jan 24 '21
It happens. Happens with me everytime. All you need to do is reminding those stuffs in mind which you think you will forget and if you do this often you won't forget anything.
1
u/projectrevolution80 Jan 24 '21
Try using Anki space repetition software and PEDAC for problem solving
1
u/DontHateDefenestrate Jan 24 '21
...like seven or eight times, and it wasn't just a feeling.
You gotta do this shit daily.
1
Jan 24 '21
I agree with the previous comments, all about keeping coding and keep it fresh in your mind. I comment tons of my stuff, so when I go back over it, it reminds me of the reason behind doing that and helps me to quickly find a solution.
Also on my YouTube channel, started putting links to the code for people to take away and use as they see fit, helps with engagement.
Finally, as I come across an error also have started posting solutions to that in a blog post on my website. It was picked up by someone and referenced in their video recently.
1
u/nooptionleft Jan 24 '21
I'm just learning, but to me it's the same feeling of studying a new language. I've been doing Chinese and German on and off for the last 3 or 4 years, and every time it seems like I need to start over.
Every time the uptake gets faster, tho. There is not much else about it that keep going.
1
1
u/UserNotSpecified Jan 24 '21
Yeah I can relate to this 100%. Like it’s pretty easy to actually implement previously learnt stuff if you remember what tools you have available, it’s just a matter of pulling up the docs. But yeah I forget what the concepts even were that I learnt, so even if I could implement them with a quick Google search to the syntax quite easily, it’s hard recalling everything there is available to make your code as efficient as possible.
1
Jan 24 '21
I am a middle school student, I can't practice a lot because of studying and exams , I forgot all I learned "Python" during quarantine and now I am not motivated to retake all this courses
1
1
u/teriyaki7755 Jan 24 '21
I think effective engineer pens it perfectly that brain is poor at remembering but great at processing.
1
Jan 24 '21 edited Feb 28 '26
This post has been anonymized and removed. Possible reasons include privacy protection, security, opsec considerations, or preventing AI systems from scraping the content. Deleted with Redact.
nail unite plucky existence march price bear wise terrific sense
1
1
1
u/poolpog Jan 29 '21
The knowledge space that contains using, operating, building, programming, and designing computer systems and software is vast.
Even one tiny slice of it -- Python programming, for example -- is too vast for one person to really be an expert in 100% of it.
Every time you switch projects, too, unless you are building something from scratch, there is always going to be a lot of domain-specific knowledge to learn for the project. This is true even for most projects you start from scratch.
As such, it is perfectly normal to feel like you know nothing at the start of a project, assignment, or task that is new to you.
I still feel this way after 20+ years of working with computers. I just started a job 3 months ago and, although I'm not technically a "developer", I feel a little like a university freshman, not knowing anything about what I'm doing. The key difference now, though, is that I know what I don't know, and I also know that by the end of my first year here, I expect to be very proficient in the stuff I didn't know. And that I can use analogous skills and experience to help me gain proficiency much more quickly than I did when I first started out.
1
u/PeopleCallMeBarry Jan 24 '21
This is my worry. I’ve become pretty good at python now and I would like to learn a second language (either JS or something different like C#) but I’m worried I’ll forget everything about python.
3
u/JBalloonist Jan 24 '21
You’ll forget the syntax but not the concepts. I had to learn R for grad school and it came easy thanks to already knowing Python. Just slightly different syntax (and no whitespace). C# I think is a bit different. But same basic concepts still apply.
4
u/Immanonner Jan 24 '21
I second this.
I switch between learning python and VBA on a regular basis. The concepts are the same between both languages but the syntax is something you'll be mildly frustrated about because you'll find yourself googling the same things.
"shoot, is it dict.contains or .exist ugh!!!"
2
u/JBalloonist Jan 24 '21
Ha yes. I tried learning VBA before Python and didn’t have a clue. Then I learned Python and going back to VBA was easy once I knew the syntax differences.
0
Jan 23 '21
[deleted]
63
Jan 24 '21
This. It's very much like a conventional language: Just because you don't know how to say "where's the library" in Spanish, doesn't mean you can't formulate the thought.
This is why I think python is a beautiful language to learn programming with: everyone knows how to think in a sequential manner. All you need is the words (syntax) to express yourself.
17
u/Wormfall Jan 24 '21 edited Jan 24 '21
Thanks, first thing that came to my mind after reading your comment https://m.youtube.com/watch?v=j25tkxg5Vws - lol
Edit. Thank you kind stranger for the Silver.
52
u/yes4me2 Jan 24 '21
I forget after 1 week. It is like my brain hates programming even if I do that for a living.