Pull to refresh

All streams

Show first
Period
Level of difficulty

PVS-Studio Graph of Diagnostic Abilities Development

Reading time 2 min
Views 756
Maturation

More than 8 years have passed since the PVS-Studio product was released, and all this time we've been implementing new diagnostic rules in it. Moreover, we are not going to stop. If you care about whether we have lost our vivacity over the years, and whether PVS-Studio stops developing, the graph given in the article will take this issue off the table. The analyzer is actively developing, and the speed of development only increases over the years.
Read more →
Total votes 26: ↑26 and ↓0 +26
Comments 0

Finding Bugs in LLVM 8 with PVS-Studio

Reading time 24 min
Views 2.5K
PVS-Studio and LLVM 8.0.0

It's been two years since we last checked the code of the LLVM project with PVS-Studio, so let's see if PVS-Studio is still the leader among tools for detecting bugs and security weaknesses. We'll do that by scanning the LLVM 8.0.0 release for new bugs.
Read more →
Total votes 26: ↑26 and ↓0 +26
Comments 0

Functional components with React Hooks. Why it's better?

Reading time 5 min
Views 24K

When React.js 16.8 was released we got the opportunity to use React Hooks. Hooks make us able to write fully-functional components using functions. We can use all React.js features and do in in more convenient way.


A lot of people don't agree with Hooks conception. In this article I'd like to tell about some important advantages React Hooks give you and why we need to write with Hooks.


I will not talk about how to use hooks. It is not very important for the examples. If you want to read something on this topic, you can use official documentation. Also, if this topic will be interesting for you, I will write more about Hooks.

Read more →
Total votes 30: ↑28 and ↓2 +26
Comments 1

Vue mixins, the explicit way (by an example of BEM modifiers plugin)

Reading time 3 min
Views 7K


Vue mixins are the recommended way of sharing common functionality between components. They are perfectly fine until you use more than one for them. That's because they are implicit by design and pollute your component's context. Let's try to fix this by giving them as much explicitness as we can.

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

Choosing true wireless earbuds: 6 months later…

Reading time 6 min
Views 5.9K


Once I put on true wireless headphones and all the cables after that (even if it's a flexible headband on a “wireless” headset), became annoying. So I’ve tried a lot of AirPods-like earbuds in order to find the best ones. In 2018 aside from the AirPods themselves I tried: Jabra Elite 65+, Samsung IconX 2018 and Sony WF-1000X. The result was a neat table with all the objective data. Everything else — my personal opinion — let's discuss in the comments.
Total votes 28: ↑27 and ↓1 +26
Comments 6

Implementing UI in iOS: Better, faster, and it scales

Reading time 10 min
Views 4.3K


A few months ago I came across a very interesting documentary series on Netflix called Abstract, they basically explore the output of professional designers from different sectors like architecture, graphic design, fashion, … in their workplaces.

It was easy to spot some similarities in the work of designers from other fields with that of an iOS developer who implements user interfaces. For example, when a designer is creating something that is big enough to be broken down into smaller parts, using a strategy like ‘Divide and Conquer’ is key to being able to focus on smaller parts that will be assembled at later stages in the process.

Breaking down a whole design into smaller subunits allows us to think about each problem in isolation, removing any dependencies between the components. But the full picture also needs to be present throughout the whole process, otherwise there can be problems when the time comes to fit everything back together.

On the other hand, while watching Abstract I noticed that in the design process for objects like a shoes, banners or buildings the final design remains fixed for the lifetime of the product. The design of a Nike shoe isn’t going to change after it is released and there aren’t going to be any updates once it’s on the shelf in the shop. Sometimes a design remains unchanged even 20 years later, and the product is still sound.
Read more →
Total votes 28: ↑27 and ↓1 +26
Comments 1

Generic Methods in Rust: How Exonum Shifted from Iron to Actix-web

Reading time 13 min
Views 5.9K
The Rust ecosystem is still growing. As a result, new libraries with improved functionality are frequently released into the developer community, while older libraries become obsolete. When we initially designed Exonum, we used the Iron web-framework. In this article, we describe how we ported the Exonum framework to actix-web using generic programming.

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

The Fall and Recovery of a Mold

Reading time 4 min
Views 1.5K
Software component developers tend to be far removed from the end users of the products in which their components are employed. Recently, however, we connected directly with a KOMPAS-3D MCAD user to solve an issue involving mold design. It seems that 3D models were being exported incorrectly to data exchange formats like STP, X_T, and SAT. The cause, unhappily for us, turned out to be in our С3D Modeler geometric modeling kernel. Here is how we solved the problem, quickly.

image
Читать дальше →
Total votes 28: ↑27 and ↓1 +26
Comments 1

$10 million in investments and Wozniak's praise — creating an educational computer for children

Reading time 14 min
Views 2K
We interviewed Mark Pavluykovskiy — the creator of the Piper educational computer. We asked him about immigrating from Ukraine to the US, how he almost died in Africa, graduated from Princeton, dropped out of a doctorate in Oxford and created a product that deserved a praise from Satia Nadella and Steve Wozniak.



In mid-October the Sistema_VC venture capital fund hosted a conference called Machine Teaching, where creators of various educational startups assembled to talk about technical advancements.

The special guest was Mark Pavluykosvkiy, the creator of Piper. His company created an educational computer — a children’s toy that, using wires, circuit boards and Minecraft teaches programming and engineering to children. A couple of years ago Mark completed a successful Kickstarter campaign, got a couple of Silicon Valley investors on board and raised around $11 million dollars in investments. Now he’s a member of Forbes’ “30 under 30” list, while his project is used by Satia Nadella and Steve Wozniak, among others.

Mark himself is a former Princeton and Oxford student. He was born in Ukraine, but moved to the US with his mother when he was a child. In various interviews Mark claimed that he doesn’t consider himself a genius, but simply someone who got very lucky. A lot of other people aren’t so lucky, however, and he considers it unfair. Driven by this notion, during his junior year he flew to Africa, where he almost died.
Total votes 28: ↑27 and ↓1 +26
Comments 0

Gotta Go Fast: Building for Speed in iOS. Part 1

Reading time 7 min
Views 2.6K


There are a lot of tips and tricks that allow iOS developers to know how to make performance optimizations to get animations in applications run smoothly. After reading the article you will realize what 16.67 milliseconds for iOS developer means, and which tools are better to use to track down the code.

The article is based on the keynote talk delivered by Luke Parham, currently an iOS engineer at Apple and an author of tutorials for iOS development on RayWenderlich.com, at the International Mobile Developers Conference MBLT DEV 2017.
Total votes 26: ↑26 and ↓0 +26
Comments 1

Building a GPT-like Model from Scratch with Detailed Theory and Code Implementation

Reading time 14 min
Views 33K

Unlock the power of Transformer Neural Networks and learn how to build your own GPT-like model from scratch. In this in-depth guide, we will delve into the theory and provide a step-by-step code implementation to help you create your own miniGPT model. The final code is only 400 lines and works on both CPUs as well as on the GPUs. If you want to jump straight to the implementation here is the GitHub repo.

Transformers are revolutionizing the world of artificial intelligence. This simple, but very powerful neural network architecture, introduced in 2017, has quickly become the go-to choice for natural language processing, generative AI, and more. With the help of transformers, we've seen the creation of cutting-edge AI products like BERT, GPT-x, DALL-E, and AlphaFold, which are changing the way we interact with language and solve complex problems like protein folding. And the exciting possibilities don't stop there - transformers are also making waves in the field of computer vision with the advent of Vision Transformers.

Read more
Total votes 25: ↑25 and ↓0 +25
Comments 1

Tips and tricks from my Telegram-channel @pythonetc, December 2019

Reading time 2 min
Views 1.5K


It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications.


Different asyncio tasks obviously have different stacks. You can view at all of them at any moment using asyncio.all_tasks() to get all currently running tasks and task.get_stack() to get a stack for each task.
Read more →
Total votes 27: ↑26 and ↓1 +25
Comments 0

Tips and tricks from my Telegram-channel @pythonetc, August 2019

Reading time 4 min
Views 1.6K


It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications


If an instance of a class doesn’t have an attribute with the given name, it tries to access the class attribute with the same name.

>>> class A:
...     x = 2
...
>>> A.x
2
>>> A().x
2
Read more →
Total votes 29: ↑27 and ↓2 +25
Comments 1

Using PVS-Studio Static Analyzer in C and C++ Development for Embedded Systems

Reading time 4 min
Views 1.2K

This article will tell you how to launch analysis of an embedded project and how to work with the analyzer's report. The PVS-Studio analyzer supports a number of compilers for embedded systems. The current version allows checking projects built with one of the following compilers under Window, Linux, and macOS:

Read more →
Total votes 29: ↑27 and ↓2 +25
Comments 0

Exceptional situations: part 1 of 4

Reading time 11 min
Views 2.1K


Introduction


It’s time to talk about exceptions or, rather, exceptional situations. Before we start, let’s look at the definition. What is an exceptional situation?


This is a situation that makes the execution of current or subsequent code incorrect. I mean different from how it was designed or intended. Such a situation compromises the integrity of an application or its part, e.g. an object. It brings the application into an extraordinary or exceptional state.


But why do we need to define this terminology? Because it will keep us in some boundaries. If we don’t follow the terminology, we can get too far from a designed concept which may result in many ambiguous situations. Let’s see some practical examples:


 struct Number
 {
     public static Number Parse(string source)
     {
         // ...
         if(!parsed)
         {
             throw new ParsingException();
         }
         // ...
     }

     public static bool TryParse(string source, out Number result)
     {
        // ..
        return parsed;
     }
 }

This example seems a little strange, and it is for a reason. I made this code slightly artificial to show the importance of problems appearing in it. First, let’s look at the Parse method. Why should it throw an exception?

Read more →
Total votes 27: ↑26 and ↓1 +25
Comments 2

In-App Updates Flexible Flow: Speed Up the App Update Process on Android

Reading time 7 min
Views 6.2K


With a variety of new tools and features announced at Android Dev Summit, special attention should be given to the In-App Updates (IAUs) API allowing developers to increase the speed of delivering features, bug-fixes and performance improvements to active users. Since this feature was finally released after Google I/O 2019, in this article I’ll deep dive on IAUs API, describe in details recommended user flows and provide with some code samples. Moreover, I'll share some experience of IAUs integration in the Pandao app, a marketplace platform for Chinese goods.
Read more →
Total votes 25: ↑25 and ↓0 +25
Comments 2

Cataclysm Dark Days Ahead: Static Analysis and Roguelike Games

Reading time 10 min
Views 4.5K
Picture 5

You must have already guessed from the title that today's article will be focusing on bugs in software source code. But not only that. If you are not only interested in C++ and in reading about bugs in other developers' code but also dig unusual video games and wonder what «roguelikes» are and how you play them, then welcome to read on!
Read more →
Total votes 25: ↑25 and ↓0 +25
Comments 0

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

Reading time 11 min
Views 2.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
Comments 0

Ways to Get a Free PVS-Studio License

Reading time 4 min
Views 3.3K

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
Comments 0