How to Survive Phase III of Flatiron School
Tags: pyth, flatironschool, coding, sql
Published: 2023-05-19 18:33:42

Another month, another phase of Flatiron! This time around, we studied Python. This took the place of the Ruby phase in Flatiron. In a way, we learned along with the professors. It was a lot of trial and error, but I think we adapted, overcame, improvised. It was definitely helpful that I had a knack for Python from the bat, where I greatly struggled with JavaScript and React before. Python came a lot more naturally. Maybe it is my data background, or perhaps I remembered more from my 1 semester in grad school using Python than I realized. Either way, I'm not questioning it, I just took the W and ran.

I passed the coding challenge on my first attempt, more on that later. The project has also been going well. I find that with the Flatiron projects, it is paramount to start with a project outline before even setting up an environment. But that's just good project planning. I recommend to anyone going into coding to also study best practices in project management. Even if you do not want to be a project manager in the traditional or formal sense, it's invaluable skills that will make your life as a student and professional immensely easier. Use the table I have provided below to plan your projects. Also, see the list of phases in the project life cycle. You may think project planning is intuitive, but I think most people will find there are skills and steps they would not have thought of prior to researching it.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2iwf9dozan3omql9ax5.png)

**Initiation:**
In this phase, the project is conceptualized and defined. The project's purpose, objectives, feasibility, and potential risks are assessed.
The project sponsor or stakeholders provide the initial authorization and resources to proceed.
The project team is identified, and a project manager may be appointed.

**Planning:**
This phase involves creating a detailed plan outlining project objectives, deliverables, timelines, resources, and budget.
The project scope is defined, requirements are gathered, and a work breakdown structure (WBS) is developed.
Risk assessment and management strategies are established.
The project plan is documented and shared with the stakeholders for approval.

**Execution:**
The execution phase is where the actual project work takes place.
Resources are allocated, tasks are assigned, and the project team begins executing the project plan.
Regular communication and collaboration among team members and stakeholders are crucial during this phase.
Progress is monitored, and adjustments are made as necessary to keep the project on track.

**Monitoring and Control:**
This phase involves tracking and monitoring project progress, performance, and quality against the planned objectives.
Key performance indicators (KPIs) are measured, and project data is collected and analyzed.
Changes and deviations from the project plan are identified, and corrective actions are taken to address issues and risks.
Regular project status updates and reporting are provided to stakeholders.

**Closure:**
The closure phase signifies the completion of the project.
Final deliverables are reviewed and verified against the project's requirements and objectives.
Project documentation, lessons learned, and best practices are documented and archived for future reference.
Formal project closure reports are prepared, and project stakeholders are notified.
Resources are released, contracts are closed, and the project team is disbanded.

Once these steps are taken, you are ready to start your Python project! Funny enough, I think the most difficult part of this project was the set up of the environment. My group ran into a lot of issues with it. We asked the professor for more help in the initial setup than we did for actual coding issues. To help you avoid that headache, I have provided the steps that I follow to setup Python environments in VSCode here. These are the steps I'm taking for all Python projects going forward:

**Step 1: Install Python**
First, ensure that Python is installed on your computer. You can download the latest version of Python from the official Python website (https://www.python.org/downloads/) and follow the installation instructions for your operating system.

**Step 2: Choose an Integrated Development Environment (IDE)**
An IDE provides a comprehensive environment for coding, debugging, and managing projects. There are several popular options available, including:
PyCharm (https://www.jetbrains.com/pycharm/)
Visual Studio Code (https://code.visualstudio.com/)
Atom (https://atom.io/)
Sublime Text (https://www.sublimetext.com/)
Choose an IDE that suits your preferences and install it on your computer.

**Step 3: Create a Project Directory**
Decide on a location on your computer where you want to create your project. This will serve as the root directory for your project.
Create a new folder/directory in the chosen location. Give it a meaningful name that represents your project.

**Step 4: Set Up a Virtual Environment (optional but recommended)**
A virtual environment provides an isolated space to work on your project, separating its dependencies from the system Python installation and other projects.
Open a command prompt/terminal and navigate to your project's directory.
Run the following command to create a virtual environment:
`python -m venv myenv`
Replace myenv with a name of your choice.

Activate the virtual environment:
_For Windows:_
`myenv\Scripts\activate`

_For macOS/Linux:_
`source myenv/bin/activate`

**Step 5: Install Packages and Dependencies**
Depending on your project's requirements, you may need to install additional packages or dependencies. You can use the package manager pip to install packages.
With your virtual environment activated, run the following command to install a package:
`pip install package_name`

Replace package_name with the name of the package you want to install. Repeat this step for each package you need.

**Step 6: Start Coding**
Open your chosen IDE and create a new file within your project directory.
Write your Python code in the file and save it with a .py extension.
You can now start coding, building your project, and running your Python scripts.

**Step 7: Managing Project Structure**
As your project grows, you may want to organize your code into multiple files or directories.
Create additional directories and files within your project directory to structure your code in a logical manner.
For example, you can create a directory for modules, a directory for tests, and so on.

Once you have this, you are off to the races! Combine your knowledge from your learning with this tutorial to create the best Python project you can. Happy coding!