Developer's blog

Husky is an excellent way to raise your development process

Husky is an excellent way to raise your development process
2 min read
314

Every developer can’t even imagine life without a version control system. I’m sure that you know a bunch of them, however, at the moment, the monopolist here is git. Git Hooks is one of the grateful things which provide git. As a WordPress developer, you already know that hooks are the greatest bestowed upon us by the supermind. Most importantly, Git Hooks allow the firing of custom scripts when certain…

Advanced usage of Acceptance Tests for WordPress

Advanced usage of Acceptance Tests for WordPress
9 min read
130

The day is here! I’m writing about tests again. Those who missed the first part about acceptance tests feel free to start with it. There was described environment setup and wrote your first acceptance test. The current article is for teams that already tried and wrote a couple of dozen tests and focused on long-term investing in the test base. I’m going to describe the common things that allow you…

Simple start with Acceptance Testing for WordPress

Simple start with Acceptance Testing for WordPress
8 min read
582

Acceptance (UI, E2E, GUI) tests are the highest testing layer and describe a customer’s behavior in browsers. Think of them as good old “user stories”. They are all about what a user can do and see. I’m sure that even one such kind of test can multiply improve your code quality. If you don’t have a strong opinion about test needs, I recommend starting with general testing information that I’ve…

What are Hooks in WordPress? How to use WordPress Hooks?

What are Hooks in WordPress? How to use WordPress Hooks?
9 min read
577

Every WordPress developer knows that hooks the main communication mechanism between the core, plugins, and themes. If not, this is a critically important topic that you should dive into to work with WordPress and its ecosystem. I have participated in a few dozen technical interviews for software engineers with WordPress knowledge and was really amazed that a huge part of them intuitively use hooks but don’t know how it works….

What is Code review? How can you ensure a great Code review?

What is Code review? How can you ensure a great Code review?
5 min read
238

The code review is the act of systematically and consciously convening with teammates to check each other’s code. It helps to detect problems at an early stage. Generally, the code reviews apply for pull requests. Cross-review is one of the best practices. Cross-review is a code review when the PR’s author and reviewer are different people. The reasons why cross-review is really effective are the fresh look and different targets…

Analyze your code with PHP_CodeSniffer

Analyze your code with PHP_CodeSniffer
7 min read
265

You can ask me why we should use coding standards? Shortly, to make more strict rules for your code and control the code quality in your team. A lot of similar things you can do differently, using various syntax. I described the basic knowledge about PHP coding standards, WPCS, with simple examples of my own coding standard earlier. This article will describe how to create coding standards as a separate…

The practice of WordPress unit testing

The practice of WordPress unit testing
7 min read
1137

All developers hear about mystic unit tests that must-have, but no one has. As a developer, who has written unit tests for a few years yet, I can say that it’s impossible to write great code without unit tests. Unit testing is the quality tool that helps developers be sure that new code doesn’t break old business logic. Also, the unit tests are the best documentation for developers, and when…

Why should your objects be immutable?

Why should your objects be immutable?
4 min read
139

Objects are divided into mutable and immutable depending on the possibility to change. Objects that don’t change their internal state after creating are immutable. Otherwise, they are mutable. Why should we think about it? This is an incomplete list of advantages for immutability: easier support in the future immutable objects are simpler to use immutable objects are simpler to test truly immutable objects side-effects free they are much easier to…

Friday’s adventure with Backward Compatibility

Friday’s adventure with Backward Compatibility
2 min read
123

If you work with open source, in the environment world, these are public plugins, and you have a lot of users, but backward compatibility is tedious. But today, there was a hilarious case when it was not an obvious situation. Let’s deep into it. The problem I have a class that I’ve decided to mark as deprecated and write a new code that more readable (I think in such a…

ACID databases as guarantee data safety

ACID databases as guarantee data safety
3 min read
139

ACID (atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps. Wikipedia The transaction is a sequence of database operations such as select, insert, delete, or update as one single work unit. Atomicity Atomicity guarantees that each transaction is treated as a single “unit”, which either succeeds completely or fails completely: if any of the statements constituting…

Take responsibility into your control with GRASP principles

Take responsibility into your control with GRASP principles
5 min read
236

General Responsibility Assignment Software Patterns (or Principles), abbreviated GRASP, consist of guidelines for assigning responsibility to classes and objects in object-oriented design. Wikipedia I want to start with the fact that, strangely, GRASP is in the shadow of SOLID patterns, although it seems to me that it has more specific examples and is easier to understand. The importance of these patterns can’t be overstated in modern development. Generally, nine rules…

SOLID principles in simple words

SOLID principles in simple words
6 min read
1340

SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible, and maintainable. The principles are a subset of many principles promoted by American software engineer and instructor Robert C. Martin. Wikipedia Generally, I don’t want to show a deep analysis of each principle. It’s just a review in simple words which in my opinion must have to know for OOP languages as for example…

Subscribe to news. I promise not to spam :)
Follow me, don't be shy