r/PythonLearning • u/intellectsup02 • 7h ago
Help Request hello!
I am a mechanical engineering student who doesnot even know how to write a line of code in any languages. I tried watching some videos on youtube but all that felt way boring. I need to learn coding in python nonetheless for a project. Could you suggest ways to ignite interest in the subject and make its study intuitive and enjoyable , maybe some book or other resources . Thanks
2
u/Sea-Ad7805 7h ago
Was it also boring when you were learning to read? and how could they have made it more intuitive and enjoyable for you?
1
u/TheDeviate 6h ago
Honestly, I enjoyed boot.dev. I liked gamifying the process, but it’s not for everyone; plus if you actually want to use the online editor and get feedback, it’s got a monthly subscription. Technically, I guess, you can use all of the content for free if you were following along in your own environment.
2
u/sububi71 6h ago
Harvard's CS50P is free, and one of the very best resources I've seen. The best free one, actually!
1
u/FreeLogicGate 5h ago
Lots of people have used books to learn Python.
These tend to be recommended a lot:
- Python Crash Course
- Automate the Boring stuff
- Think Python
- Fluent Python
I learned Python from the Python crash course book, but I already knew a slew of other programming languages.
I'm not sure what can be done regarding your boredom issue -- that's a you problem. But one thing that might ignite your interest is to take what you are learning and attempt to create some Python utilities you can use to do calculations and/or simulations relevant to your ME studies.
This will do a few things for you, including:
- help you tie what you are learning to practical applications
- accelerate your understanding of what you don't know how to do elegantly
- create an appreciation of refactoring, and valuable methodology concerns like version control (git)
In other words, as you learn more, the sophistication of your code should improve dramatically. You will naturally start to look for ways python can be applied to things you're interested in, rather than being focused on courseware that tends to abstract examples for simplicity.
With that said, the important things to focus on in Python for you are going to be the core "collection" datatypes (lists and dictionaries in particular) and functions. With lists you naturally will need to loop.
Beware of courses that are entirely taught/built around Jupyter. Jupyter is great for what it is, and you might find it to be a great tool for you, once you fully understand how it fits into the solving of certain types of problems, but you want to be able to write stand alone Python applications, including creating and using your own modules (with reusable functions). This will inevitably involve the use of an editor or IDE (I'd suggest Pycharm community edition). If you can power through the basics of a course in the next 4-5 weeks, it will set you up for a course in the fall (assuming you're returning to college in that time frame).
1
1
u/stepback269 3h ago
I'm not sure which way to guide you based on your question.
It could be that find some of the videos "boring" because your brain has been re-wired to demand constant excitement via YouTube shorts or other click bait mechanisms, If that's the case, you need a dopamine detox.
What you may need to do first is "Learn how to Learn"
Go to YouTube and in the search bar, type, "learning coaches"
Pick the ones who rely on modern neuroscience.
Godspeed and may the productivity-motivating dopamine hits be with you. :-)
3
u/ALonelyKobold 7h ago
Tutorials are not the best way to learn this subject, as they don't help you go from a blank page to having code, which is something MANY people struggle with (search this sub for "tutorial hell"). I recommend the free online textbook "a byte of python".
For something to get excited about, if you have calculations for say, a calculus class, try programming little command line tools to solve the problems for you. Not only will it do your homework for you, you'll also learn both programming and the calculus content at the same time. I started this way in high school doing my algebra homework via writing C++ code.
Recognize that python (and similar but domain specific languages) is often embedded into CAD tools, so you will build a highly relevant industry skill via learning Python; not everyone knows how to script their cad tool of choice, but for some operations it's necessary to complete them in a reasonable amount of time. Example usecase, if you want to add a texture to something in Onshape, there's not a built in function to do so, but the built in script engine is capable of handling it.