Pull to refresh

All streams

Show first
Period
Level of difficulty

PVS-Studio for Java hits the road. Next stop is Elasticsearch

Reading time11 min
Views2.1K

Picture 1

The PVS-Studio team has been keeping the blog about the checks of open-source projects by the same-name static code analyzer for many years. To date, more than 300 projects have been checked, the base of errors contains more than 12000 cases. Initially the analyzer was implemented for checking C and C++ code, support of C# was added later. Therefore, from all checked projects the majority (> 80%) accounts for C and C++. Quite recently Java was added to the list of supported languages, which means that there is now a whole new open world for PVS-Studio, so it's time to complement the base with errors from Java projects.

The Java world is vast and varied, so one doesn't even know where to look first when choosing a project to test the new analyzer. Ultimately, the choice fell on the full-text search and analytical engine Elasticsearch. It is quite a successful project, and it's even especially pleasant to find errors in significant projects. So, what defects did PVS-Studio for Java manage to detect? Further talk will be right about the results of the check.
Read more →
Total votes 25: ↑25 and ↓0+25
Comments0

Ways to Get a Free PVS-Studio License

Reading time4 min
Views3.4K

PVS-Studio Free

There are several ways to get a free license of the PVS-Studio static code analyzer, which is meant for searching for errors and potential vulnerabilities. Open source projects, small closed projects, public security specialists and owners of the Microsoft MVP status can use the license for free. The article briefly describes each of these options.

PVS-Studio is a tool designed to detect errors and potential vulnerabilities in the source code of programs, written in C, C++, C# and Java. It works in Windows, Linux and macOS environments.
Read more →
Total votes 25: ↑25 and ↓0+25
Comments0

Making a DIY thermal camera based on a Raspberry Pi

Reading time6 min
Views60K
image

Hi everyone!

Winter has arrived, and so I had to check the thermal insulation of my out of town residence dacha. And it just turned out a famous Chinese marketplace started to sell cheap thermal camera modules. So I decided to DIY it up and build a rather exotic and useful thing — a heat visor for the home. Why not? Especially since I had a Raspberry Pi lying around anyway… The result is down below.
Read more →
Total votes 25: ↑25 and ↓0+25
Comments0

My Pascal compiler and Polish contemporary art

Reading time5 min
Views7K

Origins


Several years ago I wrote a Pascal compiler. The motivation was simple: as a teenager, I had learnt from my first programming textbooks that a compiler is a very sophisticated thing. This claim eventually became a challenge and required to be tested by experience.

image
ha.art.pl

First, a simplistic PL/0 compiler came into being, and later an almost fully-functional Pascal compiler for MS-DOS has grown from it. My source of inspiration was the Compiler Construction book by Niklaus Wirth, the inventor of the Pascal language. I don't care if Wirth's views are now considered obsolete and have no direct connections to the IT mainstream, or if the compiler design fashion has changed. It is enough to know that his techniques are still simple, elegant, and — last but not least — bring much fun, since it is more appealing to parse a program source with a handwritten recursive descent parser and generate the machine code, rather than to call yaccs, bisons and all their descendants.

My compiler's fate was not so trivial. It has lived two lives: the first one in my own hands, and the second in the hands of computer antiquarians from Poland.
Total votes 27: ↑26 and ↓1+25
Comments1

Manifest of Smart Home Developer: 15 principles

Reading time12 min
Views4.1K
Today I’d like to speak about Smart homes and IoT devices. But it is no ordinary article. You won’t find description of hardware, links to manufacturers, batches of code or repositories. Today we’ll discuss something of a higher level — principles that are used to organize “smart” systems.

image



Smart home is a system that can do some everyday routines instead of a person. It leads us to the first and the main principle:
Read more →
Total votes 29: ↑27 and ↓2+25
Comments1

How linear algebra is applied in machine learning

Reading time5 min
Views14K

When you study an abstract subject like linear algebra, you may wonder: why do you need all these vectors and matrices? How are you going to apply all this inversions, transpositions, eigenvector and eigenvalues for practical purposes?


Well, if you study linear algebra with the purpose of doing machine learning, this is the answer for you.


In brief, you can use linear algebra for machine learning on 3 different levels:


  • application of a model to data;
  • training the model;
  • understanding how it works or why it does not work.

drawing
Read more →
Total votes 49: ↑37 and ↓12+25
Comments39

«Чемодан из крокодиловой кожи» или «мешок с аллигатором»: сравнение подключенных к Lokalise онлайн-переводчиков

Reading time9 min
Views3.7K
Пользователи Lokalise могут выбирать, локализовать им свой продукт с привлечением наёмных переводчиков площадки, с собственной командой или исключительно своими силами. Именно для упрощения процедуры локализации тех проектов, где профессиональные переводчики не нужны и достаточно собственных знаний языка, мы и предоставляем нашим пользователям возможность использовать встроенные в Lokalise популярные системы машинного перевода от Google, Yandex, Microsoft и SDL. О том, как переводят эти системы, мы сегодня и поговорим на конкретных примерах.



Google Machine Translate/Google Neural Translate


Около полугода назад компания Google заявила о подключении очередного набора языков к нейронной сети своего сервиса Google Translate, в том числе и русского. Событие это стало знаковым для всего русскоязычного интернет-пространства: ежедневно тысячи человек пользуются встроенным в Chrome переводчиком Google или идут на сайт Google Translate за переводом иностранного текста на родной язык.
Read more →
Total votes 25: ↑25 and ↓0+25
Comments2

Checking the Ark Compiler Recently Made Open-Source by Huawei

Reading time6 min
Views957
Picture 1

During the summer of 2019, Huawei gave a series of presentations announcing the Ark Compiler technology. The company claims that this open-source project will help developers make the Android system and third-party software much more fluent and responsive. By tradition, every new promising open-source project goes through PVS-Studio for us to evaluate the quality of its code.

Introduction


The Ark Compiler was first announced by Huawei at the launch of the new smartphone models P30 and P30 Pro. It is claimed that the Ark Compiler will improve the fluency of the Android system by 24% and response speed by 44%. Third-party Android applications will also gain a 60% speed-up after recompilation with the Ark Compiler. The open-source version of the project is called OpenArkCompiler; its source code is available on Gitee, a Chinese fork of GitHub.
Read more →
Total votes 24: ↑24 and ↓0+24
Comments0

Huawei Cloud: It's Cloudy in PVS-Studio Today

Reading time10 min
Views749

Picture 2

Nowadays everyone knows about cloud services. Many companies have cracked this market segment and created their own cloud services of various purposes. Recently our team has also been interested in these services in terms of integrating the PVS-Studio code analyzer into them. Chances are, our regular readers have already guessed what type of project we will check this time. The choice fell on the code of Huawei cloud services.
Read more →
Total votes 26: ↑25 and ↓1+24
Comments0

Тarantool Cartridge: Sharding Lua Backend in Three Lines

Reading time8 min
Views2.4K

In Mail.ru Group, we have Tarantool, a Lua-based application server and a database united. It's fast and classy, but the resources of a single server are always limited. Vertical scaling is also not the panacea. That is why Tarantool has some tools for horizontal scaling, or the vshard module [1]. It allows you to spread data across multiple servers, but you'll have to tinker with it for a while to configure it and bolt on the business logic.

Good news: we got our share of bumps (for example, [2], [3]) and created another framework, which significantly simplifies the solution to this problem.

Тarantool Cartridge is the new framework for developing complex distributed systems. It allows you to concentrate on writing business logic instead of solving infrastructure problems. Under the cut, I will tell you how this framework works and how it could help in writing distributed services.
Read more →
Total votes 26: ↑25 and ↓1+24
Comments0

PVS-Studio in the Clouds: CircleCI

Reading time11 min
Views702

Picture 2

This is a new piece of our series of articles about using the PVS-Studio static analyzer with cloud CI systems. Today we are going to look at another service, CircleCI. We'll take the Kodi media player application as a test project and see if we can find any interesting bugs in its source code.
Read more →
Total votes 28: ↑26 and ↓2+24
Comments0

Dark theme of Thunderbird as a reason to run a code analyzer

Reading time12 min
Views2K
Picture 3
The adventures with the Mozilla Thunderbird mail client began with automatic update to version 68.0. More text in pop-up notifications and default dark theme are the notable features of this version. Occasionally I found an error that I immediately craved to detect with static analysis. This became the reason to go for another check of the project source code using PVS-Studio. It so happened that by the time of the analysis, the bug had already been fixed. However, since we've paid some attention to the project, there's no reason not to write about other found defects.

Introduction


The dark theme of the new Thunderbird version looks pretty. I like dark themes. I've already switched to them in messengers, Windows, macOS. Soon iPhone will be updated to iOS 13 with a dark theme. For this reason I even had to change my iPhone 5S for a newer model. In practice, it turned out that a dark theme requires more effort for developers to pick up the colors of the interface. Not everyone can handle it the first time.
Read more →
Total votes 28: ↑26 and ↓2+24
Comments0

Make it easier to get finished: Interview with John Romero, developer of Doom

Reading time12 min
Views5.8K
At the last Tech Train IT festival, we met the legendary John Romero, who designed and developed the iconic Wolfenstein 3D, Doom, and Quake. We talked about whether game developers need soft skills, which working tools to pay attention to, and which co-founder of Id Software's favorite toys are. Questions were asked by Nikita Tsaplin, the founder of RUVDS.


→ Text and video in Russian
Total votes 26: ↑25 and ↓1+24
Comments0

WinForms: Errors, Holmes

Reading time17 min
Views1K

Picture 5

We like to search for errors in Microsoft projects. Why? It's simple: their projects are usually easy to check (you can work in Visual Studio environment for which PVS-Studio has a convenient plugin) and they contain few errors. That's why the usual work algorithm is as follows: find and download an open source project from MS; check it; choose interesting errors; make sure there are few of them; write an article without forgetting to praise the developers. Great! Win-win-win: it took a little time, the bosses are glad to see new materials in the blog, and karma is fine. But this time «something went wrong». Let's see what we have found in the source code of Windows Forms and whether we should speak highly of Microsoft this time.
Read more →
Total votes 28: ↑26 and ↓2+24
Comments0

Citymobil — a manual for improving availability amid business growth for startups. Part 5

Reading time8 min
Views1K


This is the final part of the series describing how we’re increasing our service availability in Citymobil (you can read the previous part here). Now I’m going to talk about one more type of outages and the conclusions we made about them, how we modified the development process, what automation we introduced.
Read more →
Total votes 24: ↑24 and ↓0+24
Comments0

Citymobil — a manual for improving availability amid business growth for startups. Part 1

Reading time4 min
Views1.3K


In this first part of an article series «Citymobil — a manual for improving availability amid business growth for startups» I’m going to break down the way we managed to dramatically scale up the availability of Citymobil services. The article opens with the story about our business, our task, the reason for this task to increase the availability emerged and limitations. Citymobil is a rapid-growing taxi aggregator. In 2018, it increased by more than 15 times in terms of number of successfully completed trips. Some months showed 50% increase compared with the previous month.

The business grew like a weed in every direction (it still does): there was an increase in server load, team size and number of deployments. At the same time the new threats to service availability emerged. The company faced a task of the most importance — how to increase availability without compromising company growth. In this article, I’ll talk about the way we managed to solve this task in a relatively short time.
Read more →
Total votes 24: ↑24 and ↓0+24
Comments0

BGP perforating wound

Reading time2 min
Views2.3K
It was an ordinary Thursday on 4.04.2019. Except that at some point of the midday timeline an AS60280 belonging to Belarus’ NTEC leaked 18600 prefixes originating from approximately 1400 ASes.

Those routes were taken from the transit provider RETN (AS9002) and further announced to NTEC’s provider — RU-telecom’s AS205540, which, in its turn, accepted all of them, spreading the leak.

image
Read more →
Total votes 28: ↑26 and ↓2+24
Comments0