Autogenerate PHP Tests with TestGen AI

I like to write a quality software, but I do not like to write tests. This work is boring and repetitive.

What is tests in general - this is a check of instructions that we have in code.

Would it be nice to have a tool that will generate test instruction for us? Welcome, TestGen AI! This tool write tests for us.

TestGen AI Logo
TestGen AI Logo

Indexes for boolean fields. When to create/skip an index?

When it comes to database optimization, creating indexes is often seen as a panacea that can magically speed up queries. However, the truth is that not all fields require an index, and in some cases, creating an index can actually harm performance. This is particularly true for boolean fields, which have only two possible values (true or false). In this article, we will explore the scenarios where creating an index for a boolean field in MySQL is necessary and when it is not.

Library. Indexes in real life
Library. Indexes in real life

The Magic of Bloom Filters

We’re always trying to improve application performance. Caching is a cool thing, but it can use a lot of memory.

What is the minimum measurement of memory? Correct - BIT. In this article, I’ll explain how to use bits (actually use less memory) and skip old fashion caching approach.

Bloom filers bits sequence
Bloom filers bits sequence

Database: Index scan vs Sequential scan

In databases, two common methods of accessing data are index scans and sequential scans. To optimize the performance of your database, it’s crucial to comprehend the distinctions between these methods.

Main factor for choosing a programming language

Developers often have debates. No, not just debates but real holly wars: what language is the best. When we need to start the project, we often think about performance, scalability, readability, and other features with “ility” endings. But this is just an engineering point of view. Nowadays, these features are less important than community. Let’s take a real-world example.

PhpClean - small steps to the perfect code

Yeah. Some of you can blame php. Especially folks that are using scala/kotlin/haskel and even typescript. You cannot achieve full strict types and write lovely code. But Php is the huge elephant, that holds our web. It has its pros and cons. Today we will learn how to write the accurate php code with the help of the small plugin PhpClean.

Php elephant
Php elephant

Refactorable - the best quality of great code

Clean, best, friendly, excellent code - we are all trying to find the right words for the good code. And I found that we never use the term - refactorable code. I will describe why this is a primary quality feature that we should achieve.

Core layers of oop

OOP is very hard. If you think that this is simple - then you are writing not too much code ;) Naming and organizing code is a complicated thing, but the main cause of that is the absence of strategy. When you will find your oop wave, you will surf like a pro. Classes will be created in seconds without any dump questions: where should I put my class and how to name it?

Google PageSpeed. Score 100. Lazy loading

Google tries to make the web faster|safer|better?! Ine of the best tools that are widely used is Google PageSpeed. It can provide us some reasonable issues related to site performance and usability. You definitely should check it. I have tested it and here is my short story about getting amazing results.

Mobility - is your new friend

2020 is a strange year. On one side it is scary. You do not know who will die and when. We are all working from home and don’t know when we can open the door and run around the lake. But every time people are in trouble - they evaluate and adjust for the new environment. Mobility is the key feature that people (or at least IT professionals) should acquire to be more productive and survive in the future.

Decorators — why and how?

One of my favorite patterns is a decorator. I love it because we store implementation in different classes and then combine them according to business specification. Our classes become small, testable and easy to understand. Moreover, we group our logic in one layer. I think ‘decorator’ is truly one pattern that can achieve SRP Let’s get down to the practice. Now I`m trying kotlin and all code will be written in this awesome language ;)