image
In this article, I'll talk about some of the ideas on which high-level parts of Android are built, about several of its predecessors and about the basic mechanisms of security.
KlauS 21 october 2017, 10:51

I'm used to looking for problems in code or in the system, using logs or monitoring indicators, which are displayed on pretty control panels with a simple and intuitive interface. However, if for some reason the data does not arrive to the control panel, or the logs of some service are unavailable, debugging becomes more complicated. Now there are few such problems, they are rare, but they do happen. Therefore, in our time is very valuable knowledge of tools that help to understand what is wrong with a certain process on any computer.

image
KlauS 20 october 2017, 15:22

Why the economic feasibility may lead to the collapse Bitcoin

The author of the article is Alexey Malanov, an expert of Kaspersky Lab's anti-virus technology development department

We will discuss what determines the profitability of mining bitkoy, what principles for adapting the speed of mining were laid in it initially, and why these principles can ultimately lead to the collapse of this crypto currency.

image

We assume that the reader has an idea of ​​the basic mechanisms of Bitcoin operation, such as: blocking , mining , mining pools, reward for the block.

Warning. In this article, we explore the theoretical possibility of developing the described scenario, taking into account the algorithms put into Bitkoyn. We did not set ourselves the goal to analyze in detail the cost structure of the miners, electricity prices in various parts of the world, bank rates and the payback period of equipment.
Papay 19 october 2017, 16:01

Recently, the Avito PHP projects have moved to the version of PHP 7.1. On this occasion, we decided to recall how the transition to PHP 7.0 took place for us and our colleagues from OLX. It's a long time ago, but there are beautiful graphics that you want to show the world.
The first part of the story is based on the article PHP's not dead! PHP7 in practice , written by our colleague from OLX Łukasz Szymański (Lukasz Szymanski): the transition of OLX to PHP 7. In the second part - the Avito transition experience in PHP 7.0 and PHP 7.1: the process, the difficulties, the results with the graphs.

image
Tags: Avito, OLX, Php, php7
Papay 18 october 2017, 10:30

image

The speed of the game is the responsibility of all team members, regardless of the position. We, 3D programmers, have ample opportunities to control the performance of the video processor: we can optimize the shaders, sacrifice picture quality for speed, use more cunning rendering techniques ... However, there is an aspect that we can not fully control, and this is the graphics resources of the game.

We hope that artists will create resources that not only look good, but also will be effective in rendering. If the artists learn a little more about what is happening inside the video processor, this can have a big impact on the frame rate of the game. If you are an artist and want to understand why aspects such as draw calls, LODs and MIP textures are important for performance, then read this article. To take into account the impact that your graphics resources have on game performance, you need to know how the polygon meshes get from the 3D editor to the game screen. This means that you need to understand the operation of the video processor, the chip that controls the graphics card and is responsible for the 3D real-time rendering. Armed with this knowledge, we will look at the most frequent performance problems, understand why they are a problem, and explain how to deal with them.
Papay 17 october 2017, 15:34

image
Many people represent functional programming as something very complex and "science-intensive", and representatives of the OP-community - aesthetic philosophers living in an ivory tower.

Until recently, such a view of things really was not far from the truth: we say FP, we mean Haskel and the theory of categories. Recently, the situation has changed and the functional paradigm is gaining momentum in web development, not without the help of F #, Scala and React. Let's take a look at the "patterns" of functional programming that are useful for solving everyday problems from the point of view of the OOP paradigm.

OOP is widely spread in the development of applied software for more than a decade. We are all familiar with SOLID and GOF. What will be their functional equivalent? .. Functions! Functional programming is simply "different" and offers other solutions.

image
Papay 17 october 2017, 14:37

image
In this article, I'll talk about the components that make up applications for Android, and about the ideas behind this architecture.
Articles series:

How Android works, part 1
How Android works, Part 3
...

Papay 16 october 2017, 10:49

On this Wednesday, August 30, at the office of Oracle, meeting JUG with Oleg Shelaev, Developer Advocate in the company ZeroTurnaround, which makes JRebel and XRebel. The topic of the meeting is the tools for creating multi-threaded Java programs (from designing bikes and starting threads to handles, to ForkJoinPools, green threads and transactional memory).
Of course, we asked which Java 9 chips are considered the most useful in ZeroTurnaround. As a result, they got hold of the article that you are reading right now. The original article Oleg published in the blog RebelLabs , there are many more interesting.
Papay 14 october 2017, 11:49

C++ language is constantly evolving, and for us, as for developers of a static analyzer, it is important to track all its changes, in order to support all new features of the language. In this review article, I would like to share with the reader the most interesting innovations introduced in C++17, and demonstrate them with examples.

image

Now, developers of compilers are actively adding support for the new standard.

Fold expressions

I would like to start with a few words about what a fold is (also known as reduce or accumulate).
Fold is a function that applies the assigned combining function to sequential pairs of elements in a list, and returns a result. The simplest example is the summing up of elements in the list using a fold:

Example from C++:


std::vector<int> lst = { 1, 3, 5, 7 };
int res = std::accumulate(lst.begin(), lst.end(), 0,
[](int a, int b) { return a + b; });
std::cout << res << '\n'; // 16

If the combining function is applied to the first item in a list and to the result of the recursive processing of the tail of a list, then the fold is called 'right'. In our example, we will get:

1 + (3 + (5 + (7 + 0)))
If the combining function is applied to the result of the recursive processing at the top of the list (the entire list without the last element) and to the last element, then a folding is called 'left'. In our example, we will get:

(((0 + 1) + 3) + 5) + 7
Thus, the fold type determines the order of evaluation.

In C++17 there is also folding support for a template parameters list. It has the following syntax:
(pack op ...) A unary right associative fold
(... op pack) A unary left associative fold
(pack op ... op init) A binary right associative fold
(init op ... op pack) A binary left associative fold

op is one of the following binary operators:


+ - * / % ^ & | ~ = < > << >> += -= *= /= %=
^= &= |= <<= >>= == != <= >= && || , .* ->*

pack is an expression containing an undisclosed parameter pack

init - initial value

For example, here's a template function that takes a variable number of parameters and
calculates their sum:


// C++17
#include <iostream>

template<typename... Args>
auto Sum(Args... args)
{
return (args + ...);
}

int main()
{
std::cout << Sum(1, 2, 3, 4, 5) << '\n'; // 15
return 0;
}

Note: In this example, the Sum function could be also declared as constexpr.
If we want to specify an initial value, we can use binary fold:


// C++17
#include <iostream>

template<typename... Args>
auto Func(Args... args)
{
return (args + ... + 100);
}

int main()
{
std::cout << Func(1, 2, 3, 4, 5) << '\n'; //115
return 0;
}

Before C++17, to implement a similar function, you would have to explicitly specify the rules for recursion:


// C++14
#include <iostream>

auto Sum()
{
return 0;
}

template<typename Arg, typename... Args>
auto Sum(Arg first, Args... rest)
{
return first + Sum(rest...);
}

int main()
{
std::cout << Sum(1, 2, 3, 4); // 10
return 0;
}

It is worth highlighting the operator ',' (comma), which will expand the pack into a sequence of actions separated by commas. Example:


// C++17
#include <iostream>

template<typename T, typename... Args>
void PushToVector(std::vector<T>& v, Args&&... args)
{
(v.push_back(std::forward<Args>(args)), ...);

//This code is expanded into a sequence of expressions
//separated by commas as follows:
//v.push_back(std::forward<Args_1>(arg1)),
//v.push_back(std::forward<Args_2>(arg2)),
//....
}

int main()
{
std::vector<int> vct;
PushToVector(vct, 1, 4, 5, 8);
return 0;
}

Thus, folding greatly simplifies work with variadic templates.
Kate Milovidova 13 october 2017, 14:23

image

Performing daily tasks of the system administrator is considered safe when working through the SSH session. This article will discuss modern tools for conducting MITM attacks on the SSH protocol and how to protect against them.
Papay 13 october 2017, 12:18
1 2 3 4 5 6 7 ...