Phase 2: Programming
Author: GPS
How does this phase apply to Cloud?
Programming is a fundamental skill for cloud engineering, enabling you to create, manage, and optimize cloud resources efficiently.
You don't need to know how to build UIs but you need to know how to work with APIs and other cloud services like storage, databases, etc. Knowing how to program will make you more competitive in the hiring market. Additionally, understanding prompt engineering with tools like GitHub Copilot can enhance your coding productivity and capabilities.
In the previous step you were introduced to programming basics and wrote your first Bash script. You can now leverage this knowledge and apply it to your choice of programming language.
How to break down this phase
There are several programming languages that are popular with Cloud: Python, Go, Rust, .NET, JavaScript. If you know any of these, you can continue using them, if not, I would go with Python. It's a very popular language and there are many quality free resources out there to learn it.
Continue adding your projects to your GitHub profile that you created in the past phase.
I would suggest spending time on these two topics and this timeline:
Order | Topic |
---|---|
1 | Learn to Code |
2 | Learn Prompt Engineering |
Resources
Order | Title | Notes |
---|---|---|
1 | Python Crash Course | A great Python book, also there is an Appendix in there on Git which is great! |
1 | Python for Beginners | A 44 part video series introducing you to Python |
1 | 7 Days of Python | A 7 day guide to Python |
2 | A Beginner's Guide to Prompt Engineering with GitHub Copilot | An article by Rizèl Scarlett on how to get the most out of GitHub Copilot. |
Capstone Project: Serverless Movies API.
Create an API with serverless functions that display movie information. Don't forget to create a GitHub repo and document in your README.md
Capstone Steps
Create Your Cloud Infrastructure:
- Use an SDK to set up your cloud infrastructure.
- You will need a NoSQL database, cloud storage, and serverless functions.
- Depending on the cloud provider (AWS, Azure, Google Cloud), additional setup steps may be required.
Prepare Your Data:
- Find movie data or create it and store it in your cloud NoSQL db.
- Store movie cover images of each movie in cloud storage.
Create Serverless Functions:
- GetMovies: Returns a JSON list of all movies in your database. Ensure the response includes a URL for the movie cover.
- GetMoviesByYear: Returns a list of movies released in a specified year. The year is provided by the client.
- EXTRA CREDIT - GetMovieSummary: Returns a summary generated by AI for a specified movie.
Example Data Model
Your movie data model could look like:
{
"title":"title of the movie",
"releaseYear":"when the movie was released",
"genre":"genre of the movie",
"coverUrl":"url-to-image-in-cloud-storage"
}
Example API Endpoints
- GetMovies
yourapi.com/getmovies
[
{
"title": "Inception",
"releaseYear": "2010",
"genre": "Science Fiction, Action",
"coverUrl": "https://example.com/inception.jpg"
},
{
"title": "The Shawshank Redemption",
"releaseYear": "1994",
"genre": "Drama, Crime",
"coverUrl": "https://example.com/shawshank-redemption.jpg"
},
{
"title": "The Dark Knight",
"releaseYear": "2008",
"genre": "Action, Crime, Drama",
"coverUrl": "https://example.com/dark-knight.jpg"
}
]
- GetMoviesByYear
yourapi.com/getmoviesbyyear/2010
[
{
"title": "Inception",
"releaseYear": "2010",
"genre": "Science Fiction, Action",
"coverUrl": "https://example.com/inception.jpg"
}
]
- GetMovieSummary
yourapi.com/getmoviesummary/inception
{
"title": "Inception",
"releaseYear": "2010",
"genre": "Science Fiction, Action",
"coverUrl": "https://example.com/inception.jpg",
"generatedSummary": "A mind-bending sci-fi thriller about dream theft and manipulation."
}
Things you should be familiar with at the end of this phase
Programming
- Variables: Understand how to declare and use variables.
- Data Types: Familiarize yourself with different data types (e.g., strings, integers, lists, dictionaries).
- Comments: Learn to write comments to document your code.
- Functions: Learn to define and call functions.
- Object-Oriented Programming (OOP): Understand the basics of OOP (classes, objects, inheritance).
- Lists: Learn how to create and manipulate lists.
- Modules: Understand how to use and import modules.
- Dictionaries: Learn to use dictionaries for key-value data storage.
- Loops: Master loops (for, while) to iterate over data.
- Control Statements: Understand conditional statements (if, else, elif).
- Exceptions: Learn to handle exceptions and errors in your code.
Git
- Create a Git Repo Locally: Initialize a repository and add files.
- Create a GitHub Repo and Clone It Locally: Understand the process of creating a remote repository and cloning it.
- Create a Git Branch: Learn to work with branches.
- Add Changes to a Git Branch: Stage and commit changes.
- Merge Git Changes: Merge changes from different branches.
- Document Code with a README: Write clear and informative README files.