Posts

What are Unit Tests and Why Should You Write Them?

Image
  Unit tests are simple scripts that check whether a given unit—class, function, module, etc. is working as expected.  They are meant to be simple, to cover the happy path of the code plus a few edge cases. They contribute to the long-term success of a project because of the reasons I discuss below.  As your code grows in size and complexity, tests will force you to break it into manageable pieces. Tests will become an additional resource for the next person working the code to figure out what it’s doing. As a junior programmer, you might be confused by unit tests. To make things worse, tests used as examples often make their purpose more unclear. When you see stuff like you are right to doubt whether there is a solid reason to spend any time writing them. Below, I show my reasons for writing unit tests. # What are unit tests? Unit tests are simple scripts that check whether a given unit—class, function, module, etc.—is working as expected. They are meant to be rather simple, to cover

Modern bots traffic and how to detect them

  Bot detection is the first step in preventing automated attacks on your websites, mobile apps, and APIs. It separates your traffic into requests coming from humans and requests coming from bots. Because at least a third of the world’s total web traffic consists of malicious bot traffic, good bot detection is vital for protecting businesses against online security threats. But detecting bot traffic is harder than it has ever been. Bot developers are constantly finding new ways to get around the standard security solutions that most companies still rely on. This includes the use of captcha farms, artificial intelligence, and instrumentation frameworks such as Puppeteer. Today, efficient bot detection requires truly specialized know-how. This article will cover the following topics: What is bot traffic? Why is bot detection important? Why is bot detection so challenging? How can you identify bot traffic? Common bot traffic detection methods & techniques (& their limitations) Wha