Pull to refresh
823.79

Programming *

The art of creating computer programs

Show first
Rating limit
Level of difficulty

How to be an effective engineer?

Reading time6 min
Views2.9K

This question comes up for a lot of us as we trying to advance our career and reach new heights. At the moment when I was challenged by it, I came across a wonderful book by Edmond Lau "Effective Engineer".

As always going through the book, I write new thoughts down. And today I want to share the compilation of things that I have found useful from the book. This is by no means an ad for the book, but I think it has some really interesting approaches for us to explore together.

Read more
Total votes 3: ↑3 and ↓0+3
Comments3

PHDays 11: bootkit infection, sanitizers for the Linux kernel, the new face of OSINT, and phishing on official websites

Reading time3 min
Views1.5K

Positive Hack Days 11 will begin in a matter of weeks. This international forum on practical security will be held on May 18–19 in Moscow.

As per tradition, PHDays will have three big tracks dedicated to countering attacks (defensive), protection through attack (offensive), and the impact of cybersecurity on business. It is our pleasure to present the first talks.

Read more
Total votes 1: ↑0 and ↓1-1
Comments0

Audio API Quick Start Guide: Playing and Recording Sound on Linux, Windows, FreeBSD and macOS

Reading time35 min
Views16K

Hearing is one of the few basic senses that we humans have along with the other our abilities to see, smell, taste and touch. If we couldn't hear, the world as we know it would be less interesting and colorful to us. It would be a total silence - a scary thing, even to imagine. And speaking makes our life so much fun, because what else can be better than talking to our friends and family? Also, we're able to listen to our favorite music wherever we are, thanks to computers and headphones. With the help of tiny microphones integrated into our phones and laptops we are now able to talk to the people around the world from any place with an Internet connection. But computer hardware alone isn't enough - it is computer software that really defines the way how and when the hardware should operate. Operating Systems provide the means for that to the apps that want to use computer's audio capabilities. In real use-cases audio data usually goes the long way from one end to another, being transformed and (un)compressed on-the-fly, attenuated, filtered, and so on. But in the end it all comes down to just 2 basic processes: playing the sound or recording it.

Today we're going to discuss how to make use of the API that popular OS provide: this is an essential knowledge if you want to create an app yourself which works with audio I/O. But there's just one problem standing on our way: there is no single API that all OS support. In fact, there are completely different API, different approaches, slightly different logic. We could just use some library which solves all those problems for us, but in that case we won't understand what's really going on under the hood - what's the point? But humans are built the way that we sometimes want to dig a little bit deeper, to learn a little bit more than what just lies on the surface. That's why we're going to learn the API that OS provide by default: ALSA (Linux), PulseAudio (Linux), WASAPI (Windows), OSS (FreeBSD), CoreAudio (macOS).

Read more
Rating0
Comments0

Riddles of the fast Fourier transform

Reading time10 min
Views1.5K

• The method of phase-magnitude interpolation (PMI)

• Accurate measure of frequency, magnitude and phase of signal harmonics

• Detection of resonances

The Fast Fourier Transform (FFT) algorithm is an important tool for analyzing and processing signals of various nature.

It allows to reconstruct magnitude and phase spectrum of a signal into the frequency domain by magnitude sample into the time domain, while the method is computationally optimized with modest memory consumption.

Although there is not losing of any information about the signal during the conversion process (calculations are reversible up to rounding), the algorithm has some peculiarities, which hinder high-precision analysis and fine processing of results further.

The article presents an effective way to overcome such "inconvenient" features of the algorithm.

Read in Russian

Read in English
Rating0
Comments0

Why does my app send network requests when I open an SVG file?

Reading time8 min
Views2.1K

0923_SVG_XXE_ru/image1.png


You decided to make an app that works with SVG. Encouraged by the enthusiasm, you collected libraries and successfully made the application. But suddenly you find that the app is sending strange network requests. And data is leaking from the host-machine. How so?

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

Introduction to Engineering

Reading time16 min
Views1.9K

This is a set of chapters for young engineers. We give practical advice and discuss goals, challenges and approaches used in modern software engineering.

Along with classical foundations this article contains original ideas of conceptualizing engineer's work with emphasis on bringing order to the situation and finding an insight. Engineering is approached as work in uncertainty with other people which requires special skills. Non-obvious complications regarding modern production in big companies are discussed.

This article is based on 15 years of experience in engineering and management in high-tech industries.

Read more
Rating0
Comments3

Virtual function calls in constructors and destructors (C++)

Reading time6 min
Views4.7K

Virtual function calls in constructors (C++)
In different programming languages, the behavior of virtual functions differs when it comes to constructors and destructors. Incorrect use of virtual functions is a classic mistake. Developers often use virtual functions incorrectly. In this article, we discuss this classic mistake.

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

Structured Logging and Interpolated Strings in C# 10

Level of difficultyMedium
Reading time10 min
Views40K

Structured logging is gaining more and more popularity in the developers' community. In this article I'd like to demonstrate how we can use structured logging with the Microsoft.Extensions.Logging package and show the idea how we can extend it using the new features of C# 10.

Read more
Total votes 6: ↑6 and ↓0+6
Comments0

How to create bilingual books. Part 2. Lingtrain Alignment Studio

Reading time6 min
Views2.6K

title


How to make a parallel book for language learning. Part 1. Python and Colab version


This is a second article on making parallel books. Today we will use the more advanced tool which will bring rich UI functionality. Lingtrain Alignment Studio is a web application written on Vue and Python. The main purpose of it is to extract the parallel corpora from two raw texts and make a bilingual (or even multilingual) parallel book. This is an open-source project and I will be glad to hear all of your bright ideas. Links to the sources and our community contacts can be found below. Los geht's!


Setup


The app is packed into the docker container. It's a simple technology to deploy your stuff anywhere from the server to your local machine. It's available across all the operating systems. So at first, you need a docker installed locally. Then you need to run two simple commands. The first will download the container:


docker pull lingtrain/aligner:v4

And the second one will run the application:


docker run -v C:\app\data:/app/data -v C:\app\img:/app/static/img -p 80:80 lingtrain/aligner:v4

C:\app\data and C:\app\img — your local folders.


The app will be available on the 80th port. Let's open the localhost page in your favorite browser.


Lingtrain app 1


We will make three simple steps: Load, Align, Create

Continue reading
Total votes 8: ↑8 and ↓0+8
Comments0

How the Carla car simulator helped us level up the static analysis of Unreal Engine 4 projects

Reading time17 min
Views1.4K

One of the mechanisms of static analysis is method annotations of popular libraries. Annotations provide more information about functions during errors detecting. CARLA is an impressive open-source project in C++ that helped us implement this mechanism to our analyzer. Subsequently, the simulator became a test-target for the improved PVS-Studio static analyzer.


0888_Carla/image2.png

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

How to detect a cyberattack and prevent money theft

Reading time13 min
Views1.9K

Money theft is one of the most important risks for any organization, regardless of its scope of activity. According to our data, 42% of cyberattacks on companies are committed to obtain direct financial benefits.  You can detect an attack at various stages—from network penetration to the moment when attackers start withdrawing money.  In this article, we will show how to detect an attack at each of its stages and minimize the risk, as well as analyze two common scenarios of such attacks: money theft manually using remote control programs and using special malware—a banking trojan.

Read more
Rating0
Comments0

Lingtrain Aligner. How to make parallel books for language learning. Part 1. Python and Colab version

Reading time8 min
Views3.1K

title


If you're interested in learning new languages or teaching them, then you probably know such a way as parallel reading. It helps to immerse yourself in the context, increases the vocabulary, and allows you to enjoy the learning process. When it comes to reading, you most likely want to choose your favorite author, theme, or something familiar and this is often impossible if no one has published such a variant of a parallel book. It's becoming even worse when you're learning some cool language like Hungarian or Japanese.


Today we are taking a big step forward toward breaking this situation.


We will use the lingtrain_aligner tool. It's an open-source project on Python which aims to help all the people eager to learn foreign languages. It's a part of the Lingtrain project, you can follow us on Telegram, Facebook and Instagram. Let's start!


Find the texts


At first, we should find two texts we want to align. Let's take two editions of "To Kill a Mockingbird" by Harper Lee, in Russian and the original one.

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

How we sympathize with a question on StackOverflow but keep silent

Reading time3 min
Views668

How we sympathize with a question on StackOverflow but keep silent
On the stackoverflow.com website, we frequently see questions about how to look for bugs of a certain type. We know that PVS-Studio can solve the problem. Unfortunately, we have to keep silent. Otherwise, StackOverflow moderators may consider it as an obvious attempt to promote our product. This article describes a particular case of such a situation that makes us suffer deeply.

Read more →
Total votes 2: ↑1 and ↓10
Comments0
Change theme settings

Authors' contribution