It is endless process of work with Typescript…

JavaScript lays in foundation of front-end development, but nowadays Typescript grows up fast and high. It becomes a compiled language, and such tools like SonarQube and Jenkins help us to build project and filter the code smells, bugs, vulnerability and other inconsistencies.

SonarQube rules are very helpful to identify html, css and typescript wrong behavior that can be improved. Often we have 0 uncovered lines and 0 uncovered conditions. But it is not enough to please SonarQube. It want to have many percent of test code coverage, 98% by example.

0. Resolver

Some practical aspects of Redux and Redux-Saga I have worked with.

Since React v16.8.0 a lot of Hooks becomes available. It simplifies life.

Hooks let you use more of React’s features without classes. Hooks provide a more direct API to the React concepts you already know: props, state, context, refs (access to object by id reference), and lifecycle.

I. Practical Task to be implemented: integrate Google map into React Native application. Let’s look on Android part. iOS part missed to make compact article.

Some practical ideas with Angular CLI 11.

Development process cannot be run without front-end side. Here I combine together some Angular recurrent things based on my daily work of front-end development.

I. Lint library

It is very good that Lint’s strict rules help us to avoid null and undefined errors. But Lint could be very annoying and some kind of errors repeats from time to time and stop the compilation process. By example, the most annoying:

a. Consecutive blank lines are forbidden

b. You cannot use double braces. “ should be ‘

c. Missing semicolon

sometimg it is easy to…

Covariance as a contract with strict rules make class type predictable and safe.

Covariance approach let us to narrow the type of certain method, by example: Int type is a part of super type Any.

Kotlin provides ‘In’, ‘out’ reserved keywords — to enhance our tools of using covariance/contravariance.

For ‘in’ generic, we could assign a class of super-type to class of sub-type. But for ‘out’ generic, we could assign a class of sub-type to class of super-type.

If our class used generic type as the output of the function, we use ‘out’ in covariance logic. We pass type as…

Java and SQL samples of hard choice between performance and complexity.

Big O notation looks at the upper bound of the performance of an algorithm to define its worst-case behavior. It looks at algorithms asymptotic behavior and describe the size of the input as represented by n.

I like to work with T-SQL, so I combined together different time complexities.

Certainly, we can use indexes of SQL tables to achieve more speed.

Clustered indexes are physically sorted on the disk, you can have only one per table. …

Every project should contains Tests to check logic and behavior of project.

I’ve always been a fan of mobile apps, during my career I participated in many projects. It is interesting to create interactive applications. But it cost nothing without proper testing.

So, I decided to summarize my previous experience and combine all tests approaches together in one place. It is not a tutorial to observe methods of the frameworks, I just want to show which approaches are available.

Annotations — it is a meta data information regarding the test logic. There are many annotations available in jUnit, Mock or…

jUnit tests or automation tests? That is the question.

Every project developed along with unit tests. Sometimes it based on TDD/BDD approach, when test and method under the test developed in parallel.

Also there are mock tests, integration tests and UI tests. In case of UI Java Android it is a Espresso and UIAutomation standard libraries. Developer can see and work with Java source code: packages, classes and methods.

But also it is a possibility to look at the compiled application from the user side of view and, by example, use Appium framework with usage of Selenium. This approach of…

Functional programming is more interesting approach than imperative programming. Because have a modularity and performance.

Every Kotlin developer knows about 5 useful inline scope functions: apply/with/run/also/let

Use them when you want to hide tree of “if” “else” keywords and make everything in Kotlinize way.
But we can combine them together to make a chain and
1. it is really a lot of fun to use them
2. it is functional programming

Main difference:
apply, also returns object
run, with, let returns result

I like to use these combinations in real work, so here is some samples.

Let + Elvis: the…

Write code in modest manner to make it compact and readable.

The idea is that you can declare new stand-alone variables in a tuple-like manner, where each variable is equal to the class variable at the same position.

First of all, let’s begin from another language. C# has built-in object Tuple.

Tuple<int, string, bool> tuple = new Tuple<int, string, bool>(1, “Book”, true);
Console.WriteLine(tuple.Item3); //true

or lets try to sort the Tuple:

var list = new List<Tuple<int, string>>();
list.Add(new Tuple<int, string>(100, “apple”));
list.Add(new Tuple<int, string>(101, “pineapple”));
list.Sort((a, b) => a.Item2.CompareTo(b.Item2));
foreach (var element in list) Console.WriteLine(element);

My C# code from real…

Kotlin languages likes to work with lazy property initialization.

Methods that will be implemented in proper time.

Usual usage is something like this:

lateinit var loginButton: LoginButton

or like this: Defer the cost of initialization until they’re actually needed.

val tvOutput by lazy { findViewById<TextView>( }

But we can also use a built-in delegate.

Delegate object is a reference type variable that use holds reference to a method.

Delegate Vetoable

Functional interface of lambda passed to the vetoable is called before the assignment of a new value to property. Returning false from the lambda allows you to “veto” the assignment…

Aleksei Jegorov

Java, Kotlin, T-SQL, ASP.NET Core C#, Angular2, ReactJs, Android Java native developer in Estonia, Tallinn.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store