Skip to main content
4 answers
4
Asked 713 views

Whats the best way to use python or any programming language ?

This is for my computer class and even though this is for my class I want this question to be answered

+25 Karma if successful
From: You
To: Friend
Subject: Career question for you

4

4 answers


1
Updated
Share a link to this answer
Share a link to this answer

Thomas’s Answer

The best way to use any programming language, in my opinion (and in my experience) is to first build something practical for yourself and then look for ways to expand it to (1) your own desires or (2) by incorporating a new piece of code you just learned. For example, I put this into practice by first writing myself a simple piece of code that reminded me to take breaks. So every 2 hours, my code would launch a video of the song "Africa" by Toto and this would remind me to take a break. That was the starting point. Well quickly I thought it would be best to launch a yoga video that would not only remind me to take a break, but it would also remind me to stretch. That was a preference change. Then I learned a new piece of code and changed mine so that it randomized yoga videos to give me some variety and didn't do the same stretches all the time. That was a skill change. Then I learned another skill and changed my code to give me a congratulations message every time i passed through 5 yoga sessions, etc, etc...

This is a very simple example, but hopefully it shows how to best use code and maybe inspires you to make a simple piece of code, and then work to continually improve/adapt it along the way based on not only your preferences, but also by using new skills you learn.
Thank you comment icon I'm excited to put your great advice to good use! Henry
1
0
Updated
Share a link to this answer
Share a link to this answer

Jimil’s Answer

There are many ways to use a programming language like Python, but some general best practices include:

Understand the problem: Before you begin coding, make sure you understand the problem you're trying to solve and the requirements for the solution.

Plan your solution: Once you understand the problem, plan out your solution in pseudocode or with flowcharts. This will help you understand the overall structure of your code and identify any potential issues.

Write readable, well-organized code: Use meaningful variable names, comments, and proper indentation to make your code easy to read and understand. This will not only make it easier for you to maintain your code in the future, but also for other people who may need to read or work with it.

Test and debug your code: Test your code on different inputs and debug any issues you encounter. Make sure to thoroughly test your code to ensure it works as expected and doesn't contain any bugs.

Continuously improve your skills: As you gain experience and become more familiar with the language and its libraries, you will be better equipped to tackle more complex problems. Stay informed of the latest trends and advancements in the field, and be open to learning new technologies and frameworks.

The main idea is to be thorough, organized, readable and keep yourself updated. This will help in the long run.
0
0
Updated
Share a link to this answer
Share a link to this answer

Eleanor Maria (Ria)’s Answer

Consider finding an open source project in your language of choice (pypi for Python) and see if there are any issues listed for it. This can be a good way to get a concrete issue that needs help and all the source code you need to start tackling it!

Eleanor Maria (Ria) recommends the following next steps:

Visit https://pypi.org/.
0
0
Updated
Share a link to this answer
Share a link to this answer

Laura’s Answer

Hi Henry,

great question :)
I totally agree with Thomas: you have to get your hands dirty. However, you also have to find the right way between trying out and learning with the necessary basics. This you can learn through different methods: books, online courses, university courses, YouTube etc. I could recommend to start with native python, then work towards numpy and pandas. You can then look into visualisation with matplotlib and seaborn. If you understand the differences between these libraries and how they work, you can dive into more specific use cases, e.g. machine learning. There is this MOOC I can recommend: https://www.fun-mooc.fr/en/courses/machine-learning-python-scikit-learn/.

Hope it helps and happy learning :)

Laura recommends the following next steps:

basics about python, numpy and pandas
basics about matplotlib and seaborn
field specific deep dives, e.g. into machine learning with scikit-learn (https://www.fun-mooc.fr/en/courses/machine-learning-python-scikit-learn/)
0