I’ve searched for this several times over the last year or two, and each time it takes me a while to find the solution. If you’re looking for the last queries that were executed against your MongoDB instance, these are the steps you need to perform: Enable The Profiler First, enable the profiler by executing the following command: Keep in mind that this has an impact on performance. Best not to do this on the production database. If you want

I have a customer that sells a multi-tenant SaaS platform. I often have to run the thing locally, but there is some interaction with other websites that then redirect to the customer’s system. And these website won’t redirect to localhost of course. What’s more, the application running on my localhost is running on port 3000, instead of 443 (the default HTTPS port). Let’s see how we can fix this. The hosts File First, we need to tell our system that

This post was written for the LinearB blog. You can read the original h e re. There are countless resources on software quality. If you’re reading this, you probably have an idea of what high- or low-quality software is. But defining it seems a lot harder. And if you identify low-quality software but others disagree, how can you avoid endless discussions? Let’s look at how we should understand software quality and how to measure it more objectively. Different Kinds of Software Quality The

This post was written for the Plutora blog. You can read the original here. Are you eager to deploy the next version of your software? Or are you afraid of the possible downtime during deployment? Or worse, that issues will arise and you’ll have to do a painful and complicated rollback? Then I recommend you look at blue-green deployments. Let’s look at how software is traditionally deployed, what blue-green deployments are, and how you can use them. Traditional Situation In a more “traditional”

This post was written for the Testim blog. You can read the original here. Cucumber.js and BDD aren’t new kids on the block. But they’re still fairly unfamiliar for many developers. That’s unfortunate, because the two can be very powerful tools for both the business people and developers. Let’s have a short look at what BDD is, and then see how Cucumber.js can be used to your advantage. What Is BDD? If you’re unfamiliar with BDD, don’t worry. It’s not a difficult topic.

This post was written for the Plutora blog. You can read the original here. In 2001, the Agile Manifesto surfaced. It wanted to change the software development process. The manifesto has four central themes, but not many people know that there are also 12 Agile Principles. These offer more concrete examples of how agile software development should take place. Many years later, almost every organization will say they “do agile” but many only provide lip service to the values and principles of the

This post was written for the Testim blog. You can read the original here. Looking to test your JavaScript and/or TypeScript code? Then you could do worse than go for testing with Mocha and Chai. These two libraries are among the most popular tools that developers use to write tests for JavaScript or TypeScript code. But if you’re not familiar with them yet, let me show you how easy it is to get started. Introducing Mocha Mocha is a unit testing library that

This post was written for the Testim blog. You can read the original here. There are many libraries available to write unit tests for your JavaScript code. One popular option is QUnit. Let’s look at how you can get started with QUnit. But let’s not stop there. Measuring code coverage of your tests is a useful metric to gain insights and improve your test suite. We’ll open the tutorial with a brief overview of QUnit itself, so we’re on the

Every now and then, I encounter some complex legacy code that has been moved around and changed so much, git blame doesn’t help in finding the original commit. Git bisect is the solution here. Why the Original Commit Can Help Sometimes, I read code and (after a while) it becomes clear what it does. But I’m often left wondering why the code is there, what the context was. It allows me to read the commit message and maybe several commits

While working on a legacy application for a client, I wanted to get some code coverage for my tests. In Python, this usually means running Coverage.py and pointing it to your unit tests. This being a legacy application, there were no unit tests. There were Postman tests however. This is a simple technique that is useful when working with legacy applications. The idea is simple: we run our application using Coverage.py. The application is a Django application and so it