r/learnpython • u/winkapp • Feb 01 '23
Thank you guys.
Six months ago, I started a post here asking why I didn't seem to understand Python.
At that point, I had "known" Python for three to four years and yet didn't understand any of it. I could scrape passes, but that's about it.
I didn't understand any workflow, I barely knew how to start Jupyter properly.
I didn't understand it, I didn't enjoy it, and I found it hard to understand why so many other people were succeeding at it while I was failing spectacularly.
After explaining the problem, which was that I couldn't "see" the results of individual steps, many of you suggested notebooks and the like.
I eventually settled on Visual Studio Code.
After a few weeks on W3schools exercises to relearn the basics, I dived into writing my own code.
With the aids of VS Code, whether it be the autocorrect, the colour coding of existing variables, or the helpful "did you mean X?" when I made small mistakes like typing x instead, mistakes that would usually take me fifteen minutes and endless frustration to find, I began being able to focus on the bigger issues.
I began understanding the issues and slowly analysing them, and finally was able to troubleshoot my own code. I was beginning to gain interest.
This week at work, I managed to troubleshoot someone else's Python code not just on one PC, but on two.
I kept going when even the person who wrote the code had given up.
Then I fixed the second issue that popped up on both.
After that, the code ran perfectly. My colleagues were incredibly grateful because it meant that they could spend less time manually comparing thousands of entries against one another.
I felt like it had gone full circle. From being that person who was struggling with cryptic error codes to now becoming that person who could fix it.
I still have a long way to go, but I've made way more progress in a few months than I thought I ever would.
So thank you, for showing me that coding is truly enjoyable.
21
u/CommondeNominator Feb 01 '23
Properly using breakpoints and IDE variable explorers was a huge breakthrough for my debugging skills.
For OP or anyone else browsing, in VS Code all your variables show up in the debug sidebar when your program is paused at a breakpoint. F9 sets/unsets breakpoints and F5 cycles to the next.
Kinda similar to how notebooks work, but in more of a traditional programming style.
2
u/winkapp Feb 04 '23
This is new to me, thanks for the tip!
1
u/CommondeNominator Feb 04 '23
Ima be honest I still use print(x) quite a bit, but at least not solely.
6
u/shady_downforce Feb 01 '23
Congrats op. I feel like I'm you, but a few years ago.
Would you mind sharing your list of the best VScode extensions that you would recommend to beginners?
Thanks in advance!
1
u/winkapp Feb 04 '23
I think it's just the regular VSCode, it has some preinstalled stuff that suggests corrections to your code like you'd have in Word. That in itself is already way better than most IDEs.
I haven't dabbled with other extensions yet.
5
u/CommondeNominator Feb 01 '23
Not OP but I learned using IDLE for several months before discovering the benefits of rich IDE’s.
I might be in the minority on this, but as few extensions as possible is my preference. It’s easy to get lost in the comforts only to realize they were crutches the moment you don’t have them.
For python-only, the basic Python extension is probably sufficient. If you’re working with flask/Django/etc those code snippet extensions are all but necessary as well as HTML/CSS/js snippets.
There’s a “popular python extensions” package that installs like 6 or 8 of the most popular extensions, but it added a lot of things I don’t much care for (like doc-string auto-templates, off the top of my head).
Also, the more extensions you install the longer VS Code takes fully initialize. What took 3-5 seconds on my old 4th gen PC now takes 15+ before all the type hints and stuff gets loaded, and that’s on a new 12th gen i7.
1
u/shady_downforce Feb 01 '23
Thanks for the reply! I'll check the package out
2
u/CommondeNominator Feb 01 '23
FYI if you or anyone else is doing anything with custom classes/OOP and not using type hints, go read up on PEP 484 and start using them. Doing so is like installing an extension, as there’s loads of functionality built into python that doesn’t trigger if the pre-compiler isn’t informed of your design choices.
1
u/notislant Feb 02 '23
I usually use pycharm for python but have been learning js and using vscode for it. Theres extensions like prettier (which can also format code on save). You can specify one or two indents.
Theres an extension called 'explaindev' iirc. You select code and it explains what it does. It seems to work very well in the few cases ive used it.
I think techwithtim mentioned some free ml tool in one of his vids actually. Might have been blue something, it seemed useful for learning programming but I forget what it was called.
I believe my other extension is 'live server' hit a button and each time you save lets say a web app, it reloads the page.
38
u/4569 Feb 01 '23
Thanks for posting this, I am having some of the same issues and will give this method a try.
9
6
u/CreativeNameIKnow Feb 01 '23
This is such a nice post. I personally have never helped you, but thank you too! Posts like these go to show just how great this community is :)
1
u/winkapp Feb 04 '23
Appreciate the support guys! Hope this helps in some way!
So I basically started with w3schools exercises and lessons to build a base before jumping into actual coding questions from Pynative.
With a good base and the corrections from VSCode, you'll be able to write simple code surprisingly quickly!
Once you've got the simple questions down, you'll build confidence and be able to take on the harder ones without being overwhelmed.
Take things step by step, and always take a break when you get overwhelmed. When you come back later, it often makes sense very quickly rather than trying to push through it.
1
u/Attitude_Medium Feb 02 '23
I'm at the same point on the struggle bus. I'm taking online classes through the local community college after leaving my job. I spend a lot of my time searching for the answers in order to get the work done. I just don't understand the basic language. I spend a lot of my time crying over my life choices and just want to quit. I keep on thinking that one day ill just "get it."
1
u/winkapp Feb 04 '23
You should start with the w3schools online questions to build a base first. They're free and best of all, the tutorials match the questions closely.
It's not like other sites where the question is at level 100 and the tutorial is at level 1.
3
u/Lhotse7 Feb 01 '23
Congratulations, staying consistent, humble and being a good listener pays good in long term.
2
u/surfnwest Feb 01 '23
This is inspiring to read! Way to not give up and also use your skills to helps others. Can’t wait to be there, but I’m just starting! Lol
2
u/Kynaeus Feb 02 '23
Congratulations!! This internet stranger is very proud of you and your progress!
1
u/madhousechild Feb 01 '23
Yay for you! Remember this whenever you start something new and feel like you'll never catch on.
1
u/Crypt0Nihilist Feb 02 '23
That kind of achievement makes the struggle worth it. Well done for persevering.
1
u/Outside_Self9437 Feb 08 '23
Python should be the opposite from your experience. It is easy to see intermediate results. First using the f-string in print(); next use a debugger of any form. I often just use the built-in 'pdb'. Naturally the debugger in Visual Studio and VSCode is much much better.
Using pretty printer also can help.
21
u/[deleted] Feb 01 '23
What were you using before VSCode?
I subjectively agree VSCode is pretty much the best generic solution to the internal emacs/vim vs visual studio/pycharm/etc IDE debate that plagues every newish dev.