Pull to refresh
100.06

Designing and refactoring *

Reorganizing the code

Show first
Rating limit
Level of difficulty

Spring Data JPA entity enum converter

Reading time 4 min
Views 3K

Faced with situation when had to map STRING VALUE coming from database TO ENUM. The problem happens when value stored in database differs from enum name. And here we need a workaround to make a mapping. I will describe main points on how I was able to realise it.

Entity field converter?
Rating 0
Comments 0

Guide to naming in code

Reading time 15 min
Views 7.9K

We present a guide to name entities in code based on putting naming in perspectives of semantic space, design, and readability. 

The main idea is that naming should not be considered as creation of tags, but as a fundamental part of design process, which implies integral and consistent vocabulary to be used. We discuss naming process and naming formalism from these perspectives and we provide guidelines for practical use.

The work is based on 15 years of experience in engineering work, coding and development management in high-tech industries.

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

A Book on the API Design

Reading time 1 min
Views 1.8K

This year, each of us seeks a special way to pass the time. I am writing a book, for example. A book about one thing I love dearly: the API. (You may read who am I and what expertise got in APIs in my LinkedIn profile.)


I've just finished the first large section dedicated to the API design. You may read it online, or download either pdf or epub version, or take a look at the source code on Github.


The book is distributed for free under a CC-BY-NC license. Enjoy!

Total votes 1: ↑0 and ↓1 -1
Comments 0

Agreements as Code: how to refactor IaC and save your sanity?

Reading time 9 min
Views 1.2K


Before we start, I'd like to get on the same page with you. So, could you please answer? How much time will it take to:


  • Create a new environment for testing?
  • Update java & OS in the docker image?
  • Grant access to servers?

There is the spoiler from the TechLeadConf. Unfortunately, it's in Russian


It will take longer than you expect. I will explain why.

Read more →
Total votes 3: ↑3 and ↓0 +3
Comments 0

The Anatomy of LuaJIT Tables and What’s Special About Them

Reading time 10 min
Views 3K
I don't know about you, but I really like to get inside all sorts of systems. In this article, I’m going to tell you about the internals of Lua tables and special considerations for their use. Lua is my primary professional programming language, and if one wants to write good code, one needs at least to peek behind the curtain. If you are curious, follow me.


Read more →
Total votes 28: ↑28 and ↓0 +28
Comments 0

Let's help QueryProvider deal with interpolated strings

Reading time 5 min
Views 1.6K

Specifics of QueryProvider


QueryProvider can’t deal with this:


var result = _context.Humans
                      .Select(x => $"Name: {x.Name}  Age: {x.Age}")
                      .Where(x => x != "")
                      .ToList();

It can’t deal with any sentence using an interpolated string, but it’ll easily deal with this:


var result = _context.Humans
                      .Select(x => "Name " +  x.Name + " Age " + x.Age)
                      .Where(x => x != "")
                      .ToList();

The most painful thing is to fix bugs after turning on ClientEvaluation (exception for client-side calculation), since all Automapper profiles should be strictly analyzed for interpolation. Let’s find out what’s what and propose our solution to the problem.

Read more →
Total votes 12: ↑11 and ↓1 +10
Comments 0

Authors' contribution