Pull to refresh
371.84

Open source *

Open source software

Show first
Rating limit
Level of difficulty

How does strange code hide errors? TensorFlow.NET Analysis

Reading time15 min
Views858

PVS-Studio and TensorFlow.NET

Static analysis is an extremely useful tool for any developer, as it helps to find in time not only errors, but also suspicious and strange code fragments that may cause bewilderment of programmers who will have to work with it in the future. This idea will be demonstrated by the analysis of the TensorFlow.NET open C# project, developed for working with the popular TensorFlow machine learning library.
Read more →
Total votes 3: ↑2 and ↓1+1
Comments0

Checking the Code of Zephyr Operating System

Reading time13 min
Views1.9K

PVS-Studio and Zephyr

Some time ago we announced PVS-Studio's new feature that enabled it to integrate into PlatformIO. Naturally, our team kept in touch with the PlatformIO team while working on that feature, and they suggested that we check the real-time operating system Zephyr to see if we could find any interesting bugs in its code. We thought it was a good idea, and so here's this article about the check results.
Read more →
Total votes 4: ↑3 and ↓1+2
Comments0

OpenToonz: inside and out

Reading time10 min
Views643
Picture 1

Almost four years have passed since the PVS-Studio team checked the OpenToonz source code. This project is a very powerful tool for creating two-dimensional animation. Since the last check, with its help, such animated works as Mary and the Witch Flower, Batman-Ninja, Promare and others were created. As large studios continue using Toonz, why not check the quality of the source code again?
Read more →
Total votes 3: ↑3 and ↓0+3
Comments0

buildroot — my own experience with multi-platform distro creation

Reading time5 min
Views5.5K

Introduction


In my previous article (Monitor linux) I wrote, what is this distro and how it works. Now i will write how to do it. It's may be interesting for everyone, who want to study buildroot.


Target goals


The result we get from article is the following:


  • Firmware (non-volatile image with restorable config)
  • Easy management via web-interface
  • Cross-platform (qemu x86_64, arm-based SBC like rasberry 4, beagle bone black and asus tinker board)
  • Support without extra effort
Read more →
Total votes 8: ↑6 and ↓2+4
Comments2

PVS-Studio Is Now in Chocolatey: Checking Chocolatey under Azure DevOps

Reading time9 min
Views586

Рисунок 1

We continue making the use of PVS-Studio more convenient. Our analyzer is now available in Chocolatey, the package manager for Windows. We believe this will make it easier to deploy PVS-Studio, particularly in cloud services. So right off the bat, we also checked the source code of the same Chocolatey. Azure DevOps took on the role of the CI system.
Read more →
Total votes 1: ↑1 and ↓0+1
Comments0

Monitor linux — cross platform firmware with zabbix server

Reading time4 min
Views2.4K

About


This is small cross-platform linux-distro with zabbix server. It's a simple way to deploy powerful monitoring system on ARM platfornms and x86_64.


Worked as firmware (non-changeable systemd image with config files), have web-interface for system management like network settings, password and other.


Who is interested


  • System admins/engineers who need to fast deploy of zabbix server.
  • Everyone, who want to deploy zabbix on ARM.
  • Enthusiasts
Read more →
Total votes 3: ↑3 and ↓0+3
Comments0

A Brief Comparison of the SDS Architectures for Virtualization

Reading time6 min
Views2.6K

The search for a suitable storage platform: GlusterFS vs. Ceph vs. Virtuozzo Storage


This article outlines the key features and differences of such software-defined storage (SDS) solutions as GlusterFS, Ceph, and Virtuozzo Storage. Its goal is to help you find a suitable storage platform.

Gluster



Let’s start with GlusterFS that is often used as storage for virtual environments in open-source-based hyper-converged products with SDS. It is also offered by Red Hat alongside Ceph.
GlusterFS employs a stack of translators, services that handle file distribution and other tasks. It also uses services like Brick that handle disks and Volume that handle pools of bricks. Next, the DHT (distributed hash table) service distributes files into groups based on hashes.
Note: We’ll skip the sharding service due to issues related to it, which are described in linked articles.

image

When a file is written onto GlusterFS storage, it is placed on a brick in one piece and copied to another brick on another server. The next file will be placed on two or more other bricks. This works well if the files are of about the same size and the volume consists of a single group of bricks. Otherwise the following issues may arise:
Read more →
Total votes 2: ↑1 and ↓10
Comments0

Developing a symbolic-expression library with C#. Differentiation, simplification, equation solving and many more

Reading time15 min
Views7.6K
Hello!

[UPD from 12.06.2021: if you're looking for a symbolic algebra library, AngouriMath is actively developed. It's on Github and has a website. Discord for questions]

Why does programming a calculator seem to be a task, which every beginner undertakes? History might have the answer — computers were created for this exact purpose. Unlike the beginners, we will develop a smart calculator, which, although won't reach the complexity of SymPy, will be able to perform such algebraic operations as differentiation, simplification, and equations solving, will have built-in latex support, and have implemented features such as compilation to speed up the computations.

What are the articles about?
It will superficially tell about assembling an expression, parsing from a string, variable substitution, analytic derivative, equation numerical solving, and definite integration, rendering to LaTeX format, complex numbers, compiling functions, simplifying, expanding brackets, and blah blah blah.
For those who urgently need to clone something, repository link.

Let's do it!
Read more →
Total votes 6: ↑5 and ↓1+4
Comments0

Introducing One Ring — an open-source pipeline for all your Spark applications

Reading time23 min
Views1.5K

If you utilize Apache Spark, you probably have a few applications that consume some data from external sources and produce some intermediate result, that is about to be consumed by some applications further down the processing chain, and so on until you get a final result.


We suspect that because we have a similar pipeline with lots of processes like this one:


A process flowchart with more than 50 applications and about 70 datasets
Click here for a bit larger version


Each rectangle is a Spark application with a set of their own execution parameters, and each arrow is an equally parametrized dataset (externally stored highlighted with a color; note the number of intermediate ones). This example is not the most complex of our processes, it’s fairly a simple one. And we don’t assemble such workflows manually, we generate them from Process Templates (outlined as groups on this flowchart).


So here comes the One Ring, a Spark pipelining framework with very robust configuration abilities, which makes it easier to compose and execute a most complex Process as a single large Spark job.


And we just made it open source. Perhaps, you’re interested in the details.

We got you covered!
Total votes 9: ↑8 and ↓1+7
Comments0

Five Methods For Database Obfuscation

Reading time20 min
Views7.2K
ClickHouse users already know that its biggest advantage is its high-speed processing of analytical queries. But claims like this need to be confirmed with reliable performance testing. That's what we want to talk about today.



We started running tests in 2013, long before the product was available as open source. Back then, just like now, our main concern was data processing speed in Yandex.Metrica. We had been storing that data in ClickHouse since January of 2009. Part of the data had been written to a database starting in 2012, and part was converted from OLAPServer and Metrage (data structures previously used by Yandex.Metrica). For testing, we took the first subset at random from data for 1 billion pageviews. Yandex.Metrica didn't have any queries at that point, so we came up with queries that interested us, using all the possible ways to filter, aggregate, and sort the data.

ClickHouse performance was compared with similar systems like Vertica and MonetDB. To avoid bias, testing was performed by an employee who hadn't participated in ClickHouse development, and special cases in the code were not optimized until all the results were obtained. We used the same approach to get a data set for functional testing.

After ClickHouse was released as open source in 2016, people began questioning these tests.

Read more →
Total votes 11: ↑9 and ↓2+7
Comments4

Our Small Contribution to Avalonia UI's Fight for Fewer Platforms

Reading time11 min
Views930

Рисунок 2

This article is a review of the bugs found in the Avalonia UI project with the static analyzer PVS-Studio. Avalonia UI is an open-source cross-platform XAML-based UI framework. This is one of the most technologically significant projects in the history of .NET as it enables developers to create cross-platform interfaces based on the WPF system. We hope the project's authors will find this article helpful in fixing some of the bugs, and convincing enough to make static analysis part of their development process.
Read more →
Total votes 7: ↑7 and ↓0+7
Comments0

Apache Hadoop Code Quality: Production VS Test

Reading time11 min
Views648

Рисунок 1

In order to get high quality production code, it's not enough just to ensure maximum coverage with tests. No doubts, great results require the main project code and tests to work efficiently together. Therefore, tests have to be paid as much attention as the main code. A decent test is a key success factor, as it will catch regression in production. Let's take a look at PVS-Studio static analyzer warnings to see the importance of the fact that errors in tests are no worse than the ones in production. Today's focus: Apache Hadoop.
Read more →
Total votes 4: ↑4 and ↓0+4
Comments0

Faster ENUM

Reading time9 min
Views2.3K

tl;dr


github.com/QratorLabs/fastenum
pip install fast-enum

What are enums


(If you think you know that — scroll down to the “Enums in Standard Library” section).

Imagine that you need to describe a set of all possible states for the entities in your database model. You'll probably use a bunch of constants defined as module-level attributes:
# /path/to/package/static.py:
INITIAL = 0
PROCESSING = 1
PROCESSED = 2
DECLINED = 3
RETURNED = 4
...

...or as class-level attributes defined in their own class:
class MyModelStates:
  INITIAL = 0
  PROCESSING = 1
  PROCESSED = 2
  DECLINED = 3
  RETURNED = 4

That helps you refer to those states by their mnemonic names, while they persist in your storage as simple integers. By this, you get rid of magic numbers scattered through your code and make it more readable and self-descriptive.

But, both the module-level constant and the class with the static attributes suffer from the inherent nature of python objects: they are all mutable. You may accidentally assign a value to your constant at runtime, and that is a mess to debug and rollback your broken entities. So, you might want to make your set of constants immutable, which means both the number of constants declared and the values they are mapped to must not be modified at runtime.
Read more →
Total votes 28: ↑28 and ↓0+28
Comments0

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

How did the test task become a production library

Reading time5 min
Views2K
Hello everyone!

Today I'm going to tell about how is test task to job interview became the library Image Comparison. It's an open-source library, which is hosting on GitHub.

logo

Before I start, let me introduce myself. My name is Roman. I'm a husband and father. I'm a software engineer in Epam Systems with 4 years of experience in IT.

The main idea of this topic is to tell, that creating an open-source product it's not wasting time, no! It's an amazing experience, which is going from all the open-source community. It's a time when you're a developer, project manager, product manager in one head.

While this library is growing I have been working with people from more than 10(!!) countries, such as the USA, Germany, Chine, India, Russia, Ukraine, etc.

Let's move on from the start of this story…
Read more →
Total votes 5: ↑5 and ↓0+5
Comments0

Enthralling Open Source Platforms for Developing Mobile Applications

Reading time4 min
Views847
image

Codes are the blocks of instructions that convey your intention to the computer. It is coding that helps you get the best out of the machines. Thus every, program or software is a creation of codes and the way they are structured and written defines the specialty of that software.
Read More
Total votes 2: ↑2 and ↓0+2
Comments0

On request of Embedded Developers: Detecting Errors in Amazon FreeRTOS

Reading time15 min
Views1.3K
Anyone who programs microcontrollers probably knows about FreeRTOS, or at least heard of this operating system. Amazon developers decided to enhance the abilities of this operating system to work with AWS Internet of Things services. This is how Amazon FreeRTOS appeared. We, developers of the PVS-Studio static code analyzer, were asked by mail and in comments to check these projects. Well, now get what you asked for. Keep reading to find out what came out of it.


Read more →
Total votes 27: ↑27 and ↓0+27
Comments0

Now is the time to make a fresh new Windows Terminal profiles.json

Reading time3 min
Views7.6K
I've been talking about it for months, but in case you haven't heard, there's a new Windows Terminal in town. You can download it and start using it now from the Windows Store. It's free and open source.

At the time of this writing, Windows Terminal is around version 0.5. It's not officially released as a 1.0 so things are changing all the time.

Here's your todo - Have you installed the Windows Terminal before? Have you customize your profile.json file? If so, I want you to DELETE your profiles.json!

Read more →
Total votes 4: ↑4 and ↓0+4
Comments0

Analyzing the Code of ROOT, Scientific Data Analysis Framework

Reading time14 min
Views2.4K
Picture 3
While Stockholm was holding the 118th Nobel Week, I was sitting in our office, where we develop the PVS-Studio static analyzer, working on an analysis review of the ROOT project, a big-data processing framework used in scientific research. This code wouldn't win a prize, of course, but the authors can definitely count on a detailed review of the most interesting defects plus a free license to thoroughly check the project on their own.

Introduction


Picture 1

ROOT is a modular scientific software toolkit. It provides all the functionalities needed to deal with big data processing, statistical analysis, visualisation and storage. It is mainly written in C++. ROOT was born at CERN, at the heart of the research on high-energy physics. Every day, thousands of physicists use ROOT applications to analyze their data or to perform simulations.
Read more →
Total votes 22: ↑22 and ↓0+22
Comments4

Authors' contribution