SRE This Week — 13 Nov 2022
I compile the best of the best things that I come across and share them in my LinkedIn posts.
This week we covered:
- Robust Object Oriented Programming in Python
- Github actions plugin for vscode
- Strace Zine
I write about the tools and tips related to Software Development and SRE regularly on my Linkedin profile. You can check out my profile here: https://www.linkedin.com/in/vikasyadav94/
Robust Object Oriented Programming in Python
Want to do some robust object-oriented programming in python which your teammates would love you for?
Try Pydantic. It provides you
👉 Data validation and settings management using python type annotations.
👉 Enforces type hints at runtime, and provides user-friendly errors when data is invalid.
👉 Neat intelli-sense integration with your IDE.
Why should you use pydantic?
👉 No new schema or language to learn — if you know to use python then you already know how to use pydantic.
👉 You can use pydantic to validate input via web api requests or via instantiating objects in normal code.
👉 Neat integration with FastAPI, Flask, and other web frameworks in python.
👉 It’s battle-tested. #Microsoft uses it. So does #AWS, #Uber and #TheNSA.
I can’t convince you enough to use it — so go ahead and give it a try on your own. If you’re already using it, let me know about your experience with it in the comments section!
Github Actions Plugin for Vscode
How to quickly write github-action workflows like a pro?
Did you know there was an extension to help you write the workflows? Also — It offers a bunch of features:
-> Auto-complete and documentation
-> Monitor workflow runs from vscode — Check the execution status and logs without leaving vscode.
Checkout this vscode plugin: https://lnkd.in/e5ZRntAG
This plugin will drastically reduce the amount of time you spend on writing workflows. Share it with your network if you like it.
Strace Zine
Want to learn strace? It lets you #spy on what a program is doing without a debugger or any source code
You can either browse through tons of documents for hours or just spend 30 mins on this one.
Strace is a great utility to understand how things are happening under the hood. It comes in very handy while reverse engineering unknown binaries as well as deep diving into a program that you have no idea about.
I have been through a lot of resources to get good with strace — but hands down — there’s nothing better than this.
All credit to the author Julia Evans (https://jvns.ca/). She’s doing a brilliant job of oversimplifying complex things.