Software Engineering
- Solution : Apply the Single Responsibility Principle - each microservice should focus on one single capability that it masters.
- Benefits : This specialization makes microservices easier to comprehend, test, scale, and upgrade. It's like having a coordinated team where each member excels at their role.
- Pitfalls : Violating this principle leads to
Muaath Bin Ali • Microservices Design Principles
Before you start working, figure out:
After you’ve finished your work, check:
4. Did I miss anything?
- What does the business want?
- Which criteria should I fulfill to call my work “good”?
- What do I need to do to complete this particular task?
After you’ve finished your work, check:
4. Did I miss anything?
It’s time to upgrade from “hard-working” to “highly efficient”
- Requirements (or constraints) : What does success look like? What can we not do?
- Methodology : How will we use data and code to achieve success?
- Implementation : What infrastructure is needed in production?
Real-time Machine Learning For Recommendations
- Tornado is a Python web framework and asynchronous networking library designed for handling long-lived network connections. It is built to be non-blocking and uses an event loop to manage all operations. While Tornado itself does not rely on a thread pool for its core operations, it provides interfaces for integrating with thread pools (e.g.,
Saverio Mazza • FastAPI: Thread Pool and Event Loop
Pyinstrument is a Python profiler. A profiler is a tool to help you optimize your code - make it faster. To get the biggest speed increase you should focus on the slowest part of your program. Pyinstrument helps you find it!
Installation
pip install pyinstrument
Pyinstrument... See more
☕️ Not sure where to start? Check out this video tutorial from calmcode.io!
Installation
pip install pyinstrument
Pyinstrument... See more
joerick • GitHub - joerick/pyinstrument: 🚴Call stack profiler for Python. Shows you why your code is slow!
Comments are helpful sometimes. But sometimes, they are just an indication of bad code.The proper use of comments is to compensate for our failure to express ourself in code [1].Whenever you have to add a comment in your code, ask yourself if it is really required or if you could instead put that into a new function and name the function so that it... See more
How to Write Clean Code in Python
The book Clean Code introduces three laws of TDD [1]:
So, the tests are written before the production code. This leads to the developer... See more
- Write a failing unit test first before you start writing production code.
- Write not more of a unit test than is sufficient to fail.
- Write not more production code than is sufficient to pass the currently failing test.
So, the tests are written before the production code. This leads to the developer... See more
How to Write Clean Code in Python
Hopefully, at this point, you see where I’m going with this. What I’ve concluded, based on experience, is that positioning your project as an alternative implementation of something is a losing proposition. It doesn’t matter how smart you are. It doesn’t matter how hard you work. The problem is, when you build an alternative implementation, you’ve... See more
The Alternative Implementation Problem
Shipping to production
Before shipping to production, we think about all the different artifacts that might be affected by a new feature.
Here's a non-exhaustive list of things we ask ourselves:
Before shipping to production, we think about all the different artifacts that might be affected by a new feature.
Here's a non-exhaustive list of things we ask ourselves:
- Does the API need to be updated?
- Is the OpenAPI spec up to date now?
- Have we released all the official SDKs?
- Do we need to write a Changelog post to announce