I recently wanted to examine a multi-threaded Python program, which took a long time to complete, appeared to be stuck, and even crashed occasionally.
Having a previous background in java, I was hoping to get the stack trace with some utility like jstack. To my surprise, Python doesn’t have such a utility, but it’s easy to make one ourselves!
It’s pretty obvious — go over the running threads, format the stack trace and append it, then return it.
It uses pure Python libraries, no addons are required.
A sample output might look like this (focus mainly on the bottom…
A friend of mine asked me to share my writing tips and thoughts.
What better way to do it than to write about it?
Understand if and Why Do You Want to Write
Writing Is an Art
Around a year ago, I read one of the more influential articles about Python I’ve ever read: Hypermodern Python.
That article introduced many new tools to me and changed some of my thinking about programming in Python.
A year later, after experiencing many of the tools listed in the article, I feel comfortable sharing my impressions.
You don’t have to read the original article to follow this short blog post, but I strongly recommend it:
During the last year, the pip team has been putting in a great effort to improve those two fronts. This effort is very impressive, however, it exposes some problems and breaks down existing software.
Here is one example of such a breakdown, how it was fixed, and some thoughts about the future of pip usage.
One day, out of the blue, our CI pipeline broke down: pip could not get the dependencies specified in our
requirements.txt. This file did not change for a few weeks prior to that incident.
Turns out that our pip was upgraded to a newer version…
As developers, we use the term “mocks” and “mocking” when referring to several different testing practices. In this post, I will standardize the terminology of Mocks, Stubs and Fakes: their capabilities, the differences between them, and when to use each one.
Knowing about different Mocking alternatives can help you write more robust and maintainable code, enjoy faster execution time, and raise the overall code quality.
Let’s begin with the definitions:
A mock replaces the original “mocked” object. The basic mock has no implementation of its own. Mocks record all calls made to them, so they can be verified later.
This article assumes you already know your way around Python mocks and pytest. If you need a short recap, I find the following article extremely useful: What the mock? — A cheatsheet for mocking in Python.
Almost every experienced software developer knows that unit tests are important to ensure that the code performs the way it should, in addition it’s a way keep the code safe from regressions when new code is introduced.
Good unit tests are limited to testing a specific function, class or module. …
Intuit is a well-established company that keeps reinventing itself to thrive in the ever-changing modern economy. Micro services hold the key for the company’s vision.
I have covered the inevitable process of converting our monolith code into services. Now we are getting to the fun part: the actual benefits Intuit gains from having the new services.
In the end, it all boils down to Integrations: our acquired startup (and monolith) was good at doing some specific work, but buying the startup wasn’t about keeping the existing business model and letting it run under a new management, it was about leveraging the core functionalities and building new and exciting capabilities.
Click here for the full story.
I work for Intuit, a well-established company that keeps reinventing itself to thrive in the ever-changing modern economy. Micro services hold the key for the company’s vision.
I have covered the inevitable process of converting our monolith code into services in a previous post. Now we are getting to the fun part: the actual benefits Intuit gains from having the new services.
In the end, it all boils down to Integrations: our acquired startup (and monolith) was good at doing some specific work, but buying the startup wasn’t about keeping the existing business model and letting it run under a…
This is a story of Check, an Israeli startup that was sold to Intuit, a mature company with the heart of a startup. Intuit is committed to micro services to increase agility and improve customer experiences. At the heart of Intuit’s product and tech strategy is to systematically evaluate and invest in monolithic decomposition.
A key insight I’ve understood during this process is that code base and architecture changes are just one part of the story. They are an important piece, but to truly understand the journey, one has to understand the mentality and mind change.
This is my story…