Software Engineering
More than reading popular books on Design Patterns, two things that helped me write and structure a large codebase better were
reading a lot of good open source codebases (with similar stack)coding and collaborating a lot on the same codebase
I understand the importance of reading general-purpose design patterns, but they might not suit your... See more
reading a lot of good open source codebases (with similar stack)coding and collaborating a lot on the same codebase
I understand the importance of reading general-purpose design patterns, but they might not suit your... See more
How to get better at writing and structuring a large codebase?
Some important formatting rules available in this style guide:
But remember: The formatting rules should make the code more readable. Sometimes,... See more
- Use four spaces for code indentation
- Limit all lines to a maximum of 79 characters
- Avoid extraneous whitespace in certain situations (i.e., inside brackets, between trailing comma and close parenthesis, ...)
But remember: The formatting rules should make the code more readable. Sometimes,... See more
How to Write Clean Code in Python
Netflix created a scoring system from 0 to 100 that assigns a priority to a request, with 0 being the highest priority and 100 being the lowest priority.
The score was based on 4 dimensions
Functionality - What functionality gets impacted if this request gets throttled? Is it important to the user experience? For example, if logging-related requests... See more
The score was based on 4 dimensions
Functionality - What functionality gets impacted if this request gets throttled? Is it important to the user experience? For example, if logging-related requests... See more
Shortwave — rajhesh.panchanadhan@gmail.com [Gmail alternative]
But now we are only logging that error message. It would be better to define a custom Exception that we can then handle in our API in order to return a specific error code to the user:
import pandas as pd
import logging
class DataLoadError(Exception):
"""Exception raised when the data cannot be loaded."""
def __init__(self, message="Data could not be... See more
import pandas as pd
import logging
class DataLoadError(Exception):
"""Exception raised when the data cannot be loaded."""
def __init__(self, message="Data could not be... See more
How to Write Clean Code in Python
And then, in the primary function of your API:
try:
df = load_data('path/to/data.csv')
# Further processing and model prediction
except DataLoadError as e:
# Return a response to the user with the error message
# For example: return Response({"error": str(e)}, status=400)We ship often
Shipping early is not enough. We also need to keep shipping tiny iterations daily instead of waiting months to ship something big.
Having a strong sense of urgency , and making hard decisions fast is how we enable that process. Our sprints only last 1 week and are quite short when compared to the rest of the industry - this is by... See more
Shipping early is not enough. We also need to keep shipping tiny iterations daily instead of waiting months to ship something big.
Having a strong sense of urgency , and making hard decisions fast is how we enable that process. Our sprints only last 1 week and are quite short when compared to the rest of the industry - this is by... See more
How we ship new features · Resend
Subscription.status={"active", "canceled"}
Enter fullscreen mode
Exit fullscreen mode
A single field tells us in plain language what the status of the object is by using enums instead of booleans. Another upside is the extensibility and future-proofing that this technique gives us. If we go back to our previous example of adding a “pause” mechanic,... See more
Enter fullscreen mode
Exit fullscreen mode
A single field tells us in plain language what the status of the object is by using enums instead of booleans. Another upside is the extensibility and future-proofing that this technique gives us. If we go back to our previous example of adding a “pause” mechanic,... See more
Common Design Patterns at Stripe
Why is Continuous Delivery for ML/AI hard(er)?
Since the challenge is not new and many valid solutions exist targeting traditional software projects, is there a reason to treat ML/AI systems any differently? Consider these three core challenges that are endemic in ML, AI, and data projects:
Since the challenge is not new and many valid solutions exist targeting traditional software projects, is there a reason to treat ML/AI systems any differently? Consider these three core challenges that are endemic in ML, AI, and data projects:
- Development and debugging cycles are more tedious due to
How To Organize Continuous Delivery of ML/AI Systems: a 10-Stage Maturity Model | Outerbounds
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
What is Hatchet?
Hatchet replaces difficult to manage legacy queues or pub/sub systems so you can design durable workloads that recover from failure and solve for problems like concurrency , fairness , and rate limiting . Instead of managing your own task queue or pub/sub system, you can use Hatchet to distribute your functions between a set of... See more
Hatchet replaces difficult to manage legacy queues or pub/sub systems so you can design durable workloads that recover from failure and solve for problems like concurrency , fairness , and rate limiting . Instead of managing your own task queue or pub/sub system, you can use Hatchet to distribute your functions between a set of... See more