Getting Started with Python
Posted on Tue 03 October 2023 in Student Resources
Welcome to the world of programming with Python!
Working with a new language can be a real challenge; it requires patience and determination. But, it can also allow you a great deal of flexibility in terms of creating resources with real utility. At FUSION, that is what we do. We aim to create a suite of tools that provide a means of assessing environmental impacts and routes to sustainability.
In this guide, we'll direct you to resources and courses that will help you get started with python and computer science concepts.
Table of Contents
- Installing Python
- Introductory courses
- Books & other resources
- AI as a learning tool
1. Installing Python
Before you begin, you need to have Python installed on your computer. You can download Python directly, or the simplest way is often to use Anaconda. The choice is yours, whatever works best for you.
After this, you will need an Integrated Development Environment (IDE). There are many to choose from, and the choice is subjective. My preference is VSCode.
2. Python courses
With Python installed, you can get started writing some code. Some practical courses can be a great way to quickly advance.
Two great resources for free courses are EdX and Coursera.
Some courses that I have found useful here were:
The CS50x and CS50p courses can be taken through EdX. They are challenging, but they are very practical and relatively well supported.
There are also several courses available via GitHub repositories. An example is the Python Mastery course.
3. Books & other resources
Advice that I have received in the past, which has served me well, is that "reading is better than googling". Read relevant books when you can. But try to put what you are reading into immediate practice. This could be a practice toy, project, or integration into existing work. You will always be "refactoring" code as you go along. Essentially, this means that anything you use, you will update and maintain. You should endeavor to update and improve code so that it is easier to maintain and work with in the future. The idea is that you are building tools that you can use again and again.
The philosophy here is to (1) get it working, (2) make it right, (3) make it fast. The last part is an iterative process. Books from professional developers will give you insight into how to write and document code in a way that lets you work with others. This is essential moving forward, and it will be essential in your studies.
Recommended books:
- Practices of the Python Pro
- Python 3 Object-Oriented Programming
- Automate the Boring Stuff with Python
- Python for Data Analysis
- Python Packages
The best book I have read is "Practices of the Python Pro" by Dane Hillard. When you have moved beyond getting to know Python as a language and have moved to structuring your code, testing properly, integrating, documenting, and adding an extra degree of professionalism, this book will help you a lot. This book will mark your progression from learning how to use Python to learning how to be a developer.
Another honorable mention here, it is not a book, but a fantastic online resource. Real Python offers courses, tutorials, podcasts, and much more.
4. AI as a learning tool
ChatGPT and AI can be excellent learning tools for Python due to their ability to provide instruction, generate new ideas, and assist with code refactoring. However, it's important to note that they should not be used to automatically write your code for you. Here's a summarized breakdown of why AI is valuable for learning Python:
Advantages:
-
Instruction and Learning: ChatGPT can explain complex Python concepts, syntax, and best practices in a user-friendly manner. It can serve as a virtual tutor, helping learners understand programming concepts step by step.
-
Generating Ideas: AI can help brainstorm ideas for your Python projects, offering suggestions for algorithms, data structures, or approaches that you might not have considered.
-
Code Refactoring: When faced with code that needs improvement, AI can provide suggestions for optimizing code, enhancing readability, and following coding standards.
-
Debugging Assistance: AI can help identify common programming errors and guide you in troubleshooting issues within your code.
-
Quick Answers: AI can provide rapid answers to specific programming questions, saving time and effort in searching for information.
Limitations:
-
No Substitution for Learning: Relying solely on AI-generated solutions hampers your learning process. Understanding the "why" behind code is crucial for becoming a proficient programmer.
-
Contextual Understanding: AI might not always fully understand the specific context of your project, leading to inappropriate or ineffective suggestions.
-
Incomplete Information: If you don't provide comprehensive details, AI might give incomplete or inaccurate guidance.
-
Lack of Creativity: AI generates solutions based on patterns in the training data, so it may lack creative problem-solving abilities that human programmers possess.
-
Code Quality: AI-generated code might lack elegance, efficiency, or adherence to best practices. It's essential to review and validate any generated code. DO NOT COPY AND PASTE
Proper Use and Validation:
-
Learning Tool: Use AI as a supplementary resource to enhance your learning, not as a primary means of coding.
-
Guidance and Inspiration: Seek guidance from AI when you're stuck, looking for new ideas, or needing help with code improvement.
-
Active Participation: Engage with the AI-generated suggestions, understand the rationale behind them, and implement them manually to reinforce your learning.
-
Review and Refinement: Always validate the code generated by AI, ensure its correctness, efficiency, and adherence to coding standards. Do not just copy code into your