0% found this document useful (0 votes)
4 views13 pages

Python Module Presentation Module F

The document discusses the importance of version control and collaboration using Git and GitHub in engineering projects, highlighting common issues such as lost work and version confusion. It explains Git as a version control system and GitHub as a cloud-based platform for collaboration and project management. Additionally, it provides hands-on steps for creating a repository, programming best practices, and resources for further learning in Python and chemical engineering applications.

Uploaded by

Priscilla Wangu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

Python Module Presentation Module F

The document discusses the importance of version control and collaboration using Git and GitHub in engineering projects, highlighting common issues such as lost work and version confusion. It explains Git as a version control system and GitHub as a cloud-based platform for collaboration and project management. Additionally, it provides hands-on steps for creating a repository, programming best practices, and resources for further learning in Python and chemical engineering applications.

Uploaded by

Priscilla Wangu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Python Module (f)

Version Control & Collaboration Using Git/Github

By Mark Kinyingi
Overview 6
01 The Problem We Face

02 The Solution: Version Control

03 What is Git & Github

03 Hands-on
The problem we face
• Lost work: "I accidentally deleted my heat exchanger calculations...“
• Version confusion: "Which reactor model was the final one?“
• Collaboration chaos: "Did you use the old or new Antoine constants?“
• No backup: "My laptop crashed and I lost 3 months of process simulations“
• Knowledge silos: "Only Sarah knows how the distillation model works"
The solution – Version Control
• Track every change to your code and documents
• Never lose work - complete history of all modifications
• Collaborate safely - multiple people can work on the same project
• Professional standards - industry-standard tool used by top engineering companies
• Documentation - README files, comments, and project wikis
What is Git & GitHub?
Git (The Engine)
• Version control system that tracks changes in files
• Local tool - works on your computer
• Creates snapshots of your project at different points in time
• Branching - work on different features simultaneously
What is Git & GitHub?
GitHub (The Platform)
• Cloud-based hosting for Git repositories
• Collaboration features - share code with team members
• Backup & sync - your code is safe in the cloud
• Project management - issues, discussions, documentation
• Free for public and private repositories
Chemical Engineering Analogy
Think of Git like a process control system:
• Commits = Taking readings at regular intervals
• Branches = Running parallel experiments
• Merging = Combining results from different test runs
• Repository = Your lab notebook with complete experimental history
Hands-on
Creating your first repository
Steps
• Sign up in Github through the link:
• https://github.com/

• Follow the following video on how to create your first repository:


• https://www.youtube.com/watch?v=-RZ03WHqkaY
Using AI as a Tutor
• Choose an AI and create a new chat/thread
• Write the following prompt:
I am a complete beginner in python programming. I want you to act as a professional
programmer in python with over 20 years of writing professional code. I want you to be my
tutor where you test my python proficiency in a chemical engineering perspective. You will
give me questions to code, then I will give my answers, to which you will rank them 0 to
100% based on professional standards. After the ranking, you can give me various pointers
to improve my code.
• Try out the question that given
• Paste the solution to the thread
• Learn from the suggestions for improvement

Disclaimer: AI is still in development, be sure to confirm with


textbook material whatever output AI has. Any problems
caused I will not be liable.
Programming Best Practises
1. Function Design 2. Code Organization
Use descriptive names Use consistent indentation
Keep functions focused on one task Add comments for complex logic
Include docstrings Group related code together
Use default parameters wisely Use meaningful variable names
Return meaningful values

3. Error Handling
Validate input parameters
Handle edge cases
Use try/except blocks (we'll cover this in the future)
Provide helpful error messages
Further Resources
Book
Python for Everybody (previously sent to the club
whatsapp group

Online Course
Coursera: "Python for Everybody"
FreeCodeCamp: Python
w3schools for practise
Codedex for game-like practise

Chemical Engineering Python Libraries


SciPy: scientific computations
CoolProp: thermodynamic properties
CANTERA: chemical kinetics
PyChemEng: chemical engineering toolkit
Streamlit: view relations using a simple web app
ChemE Skills Lab

Thank You
[email protected]

You might also like