Pull to refresh
838.25

Programming *

The art of creating computer programs

Show first
Rating limit
Level of difficulty

MobX or Redux: Which is Better For React State Management?

Reading time5 min
Views19K


In JavaScript, state management is a hot of discussion these days. When it comes to implementing state management, developers often find it challenging dealing with boilerplate code in Redux. Hence, MobX has proved to be a good alternative to Redux which gives the same functionality with less code to write. However, both state management tools work well with React.

Let's first have a look at the common things between the two:

1) Both support time-travel debugging
2) Both contain open-source libraries
3) Both provide a client-side state management
4) Both provide huge support for React native frameworks

In this blog, we have listed all the pros and cons of both state management solutions. It will help web developers to choose the best one for their next project. Before discussing this, we have compared both Redux and Mobx based on some parameters as given below:
Read more →
Total votes 1: ↑1 and ↓0+1
Comments0

Where Do Mojibakes Come From? Essentials of Encodings

Reading time9 min
Views686


This article explores the basic concepts behind character encoding and then takes a dive deeper into the technical details of encoding systems.


If you have just a basic knowledge of character encoding and want to better understand the essentials, the differences between encoding systems, why we sometimes end up with nonsense text, and the principles behind different encoding system architecture, then read on.


Getting to understand character encoding in detail requires some extensive reading and a good chunk of time. I’ve tried to save you some of that effort by bringing it all together in one place while providing what I believe to be a pretty thorough background of the topic.


I’m going to go over how single-byte encodings (ASCII, Windows-1251 etc.) work, the history of how Unicode came to be, the Unicode-based encodings UTF-8, UTF-16 and how they differ, the specific features, compatibility, and lack thereof among various encodings, character encoding principles, and a practical guide to how characters are encoded and decoded.

Read more →
Rating0
Comments0

Habr — best articles, authors and statistics 2019

Reading time6 min
Views2.8K
2019 is coming to an end, and it's Christmas soon. It is also the time to grab all data and collect statistics and a rating of the most interesting Habr's articles for this period.



In this post the best articles and best Habr authors 2019 will be presented, I also will show some statistical graphs that I find interesting or unusual.

Let's get started.
Read more →
Total votes 23: ↑22 and ↓1+21
Comments11

Open Source Java library with stacktrace filtering, Silent String parsing and Version comparison

Reading time9 min
Views2K
Over some time in different jobs, I came across a need for several utilities that I couldn't find available at the time. And I saw that I needed them several times over and over again. So I wrote my own small library that I found very useful. So I just published it as an open-source java library.

Here is the Github link

Javadoc online is available here

Also, this library is available on Maven Central. Here are the Maven artifacts (the version 1.5.1.2 is the latest at the time of writing of this article but might change in the future. To check for the latest version search for artifact «MgntUtils» at http://search.maven.org/):

<dependency>
     <groupId>com.github.michaelgantman</groupId>
     <artifactId>MgntUtils</artifactId>
     <version>1.5.1.2</version>
</dependency>

 <dependency>
     <groupId>com.github.michaelgantman</groupId>
     <artifactId>MgntUtils</artifactId>
     <version>1.5.1.2</version>
     <classifier>javadoc</classifier>
</dependency>

<dependency>
     <groupId>com.github.michaelgantman</groupId>
     <artifactId>MgntUtils</artifactId>
     <version>1.5.1.2</version>
     <classifier>sources</classifier>
</dependency>

Below is just a short explanation of what is there. The library comes with a nicely written (I hope) JavaDoc with a detailed description. So here is the list of features:
Read more →
Total votes 6: ↑6 and ↓0+6
Comments0

Channel quality indicator for server WebRTC over TCP

Reading time5 min
Views2.5K


Publish and Play


There exist two main functions of WebRTC operation on the server side in the field of streaming video: publishing and playing. In the case of publishing, the video stream is captured from the web camera and moves from the browser to the server. In the case of playing, the stream moves in the opposite direction, from the server to the browser, is decoded and played in the browser’s HTML5 <video> element on the device’s screen.

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

React benefits: A blessing for Businesses?

Reading time3 min
Views3.7K
Launched in 2013, React has been successfully used to develop 1,004,124 websites in the past 6 years. The Javascript library React JS is known for giving simple programming experience and improved performance.

It was released by Facebook to resolve the issues of coding and maintenance with their ads. It was developed with an intention to increase and manage Facebook ads traffic. React has successfully delivered the expected outcomes throughout its journey.
Read more →
Total votes 8: ↑7 and ↓1+6
Comments0

Announcing .NET Core 3.1

Reading time6 min
Views3.4K
We’re excited to announce the release of .NET Core 3.1. It’s really just a small set of fixes and refinements over .NET Core 3.0, which we released just over two months ago. The most important feature is that .NET Core 3.1 is an long-term supported (LTS) release and will be supported for three years. As we’ve done in the past, we wanted to take our time before releasing the next LTS release. The extra two months (after .NET Core 3.0) allowed us to select and implement the right set of improvements over what was already a very stable base. .NET Core 3.1 is now ready to be used wherever your imagination or business need takes it.

You can download .NET Core 3.1, for Windows, macOS, and Linux:


ASP.NET Core and EF Core are also being released today.

Visual Studio 2019 16.4 was also released today and includes .NET Core 3.1. It is a required update to use .NET Core 3.1 with Visual Studio. For Visual Studio 2019 users, we recommend simply updating Visual Studio to 16.4 and instead of separately downloading .NET Core 3.1.

Visual Studio for Mac also supports and includes .NET Core 3.1, in the Visual Studio for Mac 8.4 Preview channel. You will need to opt into the Preview channel to use .NET Core 3.1.

Release notes:



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

SARIF SDK and Its Errors

Reading time7 min
Views576

Picture 2

Today we have another high-quality Microsoft project to be checked, which we'll heroically delve into trying to find errors with PVS-Studio. SARIF, an acronym for Static Analysis Interchange Format, which is a standard (file format), designed to interact and share the results of static analyzers with other tools: IDEs, complex code verification and analysis tools (e.g. SonarQube), continuous integration systems, etc. SARIF SDK, respectively, contains .NET developer tools to support SARIF as well as additional files.
Read more →
Total votes 6: ↑6 and ↓0+6
Comments0

How to cook RTSP on your website in 2020, or why the boars will not have a chance to run away

Reading time8 min
Views45K


RTSP is a simple signaling protocol which they cannot replace with anything for many years already, and it has to be admitted that they don't try really hard.


For example, we have an IP camera that supports RTSP. Anyone who has ever tested the traffic with a Sharkwire cable will tell you that first there comes DESCRIBE, then PLAY, and then the traffic begins to pour directly via RTP or wrapped in the TCP channel for instance.

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

Quick reference of C++ value categories: Part 2

Reading time41 min
Views2.5K



Go to Part 1


Passing parameters to a function


When passing parameter to a function, category of a passed expression is implicitly converted to the category of function parameter: void f(TO_TYPE p); FROM_TYPE x; f(x); This implicit conversion takes place the same way as during an assignment (see "Assignment" section above) except that function definition cannot contain "auto" types.


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

Quick reference of C++ value categories: Part 1

Reading time13 min
Views6.7K

image

The goal of this quick reference is to collect in one place and organize information about value categories in C++, assignment, parameter passing and returning from functions. I tried to make this quick reference convenient to quickly compare and select one of solutions possible, this is why I made several tables here.


For introduction to the topic, please use the following links:


C++ rvalue references and move semantics for beginners
Rvalues redefined
C++ moves for people who don’t know or care what rvalues are
Scott Meyers. Effective Modern C++. 2015
Understanding Move Semantics and Perfect Forwarding: Part 1
Understanding Move Semantics and Perfect Forwarding: Part 2
Understanding Move Semantics and Perfect Forwarding: Part 3
Do we need move and copy assignment

Read more →
Total votes 14: ↑12 and ↓2+10
Comments0

Android, Google and free content licenses. Who is to blame and what can be done?

Reading time23 min
Views742

The story of another ban.


Have you heard about bans on apps and developers in Google Play? This is just such a story. It’s also an attempt to collect similar cases into one place and offer some kind of plan of action to prevent Google’s unpredictable actions. It isn’t fair to be banned for the legal use of free material. Personally, I like the idea of content licenses such as CC BY-SA, which permits any use, including commercial. Thanks to such licenses, we developers have websites like StackOverflow, where I’ve been elected to be the moderator. Unfortunately, companies like Google don’t respect the ideas behind these licenses. Here's my story.

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

Dynamic CDN for Low Latency WebRTC Streaming with Stream Access Control

Reading time4 min
Views1.3K


In the first part, we have deployed a simple dynamic CDN for broadcasting WebRTC streams to two continents and have proved on the example of a countdown timer that the latency in this type of CDN is actually low.


In the second part, we have incorporated dedicated servers into the CDN for performing the task of transcoding in order to provide good broadcast quality to our viewers based on the devices they use and the channel quality. In this manner, all published streams in our CDN are available to all the viewers.


Now, assume that a company is starting to introduce its monetization strategy where a number of streams should be available for free and the rest on a subscription basis. Or, for example, webinars for in-house staff training are broadcasted simultaneously, but each subsidiary has a separate stream, and disclosing the sales techniques used in Southeast Asia to the managers from CIS countries is undesirable.

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

AI-assisted IntelliSense for your team’s codebase

Reading time3 min
Views1.7K
Visual Studio IntelliCode uses machine learning to offer useful, contextually-rich code completion suggestions as you type, allowing you to learn APIs more quickly and code faster. Although IntelliCode’s base model was trained on over 3000 top open source C# GitHub repositories, it does not include all the custom types in your code base. To produce useful, high-fidelity, contextually-rich suggestions, the model needs to be tailored to unique types or domain-specific APIs that aren’t used in open source code. To make IntelliSense recommendations based on the wisdom of your team’s codebase, the model needs to train with your team’s code.

Earlier this year, we extended our ML model training capabilities beyond our initial Github trained base model to enable you to personalize your IntelliCode completion suggestions by creating team models trained on your own code.

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

Dynamic CDN for Low Latency WebRTC Streaming with Transcoding

Reading time5 min
Views1.6K


In the first part we have deployed a simple dynamic CDN for broadcasting WebRTC streams to two continents and have proved on the example of a countdown timer that the latency in this kind of CDN is actually low.


However, besides low latency, it is important to provide good broadcast quality to users. After all, this is what they are paying for. In real life the channels between Edge servers and users can differ in bandwidth capacity and quality. For example, we are publishing a 720p stream at 2 Mbps, the user is playing it on an Android phone using 3G connection in an unstable signal reception area and the 360p maximum resolution that provides smooth picture at 400 Mbps is 360p.

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

Angular: The Best Building Companion for Interactive apps

Reading time5 min
Views4.1K
Do you know there were 5 million apps in 2019? Out of these millions of apps, only a few are able to perform. There are many reasons for this but a major factor is the interactivity of an app.

No matter which product you are trying to sell, customers choose the one which allows them to get involved. Interactive apps are in demand for a long time. Are you wondering how can you make an interactive app?

The first thing which comes to our mind when we talk about interactive apps is the concept of single page application. This is because SPAs are known for their capacity to interact with the user by reloading some page elements dynamically depending upon the interaction by the user.
Read more →
Total votes 3: ↑3 and ↓0+3
Comments2

Cracking Reduce Concept In Just 10 Minutes

Reading time3 min
Views1.4K


Being a developer, I love to code especially in JavaScript. As per my experience, using reduce function is one of the toughest tasks in JS. Let me first elaborate on the Reduce concept!

In Wikipedia, it has many names viz.

Reduce
Fold
Accumulate
Aggregate
Compress

It is a function that folds a list into any data type. It's all about breaking a structure down into a single value. It's like folding a box! With reduce, you can turn an array [1,2,3,4,5] into the number 15 by adding them all up.
Read more →
Total votes 6: ↑5 and ↓1+4
Comments0

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

Reading time10 min
Views748

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

Dynamic CDN for Low Latency WebRTC Streaming

Reading time5 min
Views2.2K


Having analyzed earlier the capacity of standard server configurations in Digital Ocean in terms of WebRTC streaming, we have noticed that one server can cover up to 2000 viewers. In real life, cases when one server is insufficient are not uncommon.


Assume gambling amateurs in Germany are watching real-time horse races in Australia. Given that horse races are not only a sports game but also imply big gains on condition that field bets are made at the right time, the video has to be delivered with lowest possible latency.


Another example: A global corporation, one of FCMG market leaders with subsidiaries in Europe, Russia and Southeast Asia, is organizing sales manager training webinars with live streaming from the headquarters in the Mediterranean. The viewers must be able to see and hear the presenter in real time.

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

Cloud-based WebRTC streaming on DigitalOcean

Reading time5 min
Views4.4K


Popular cloud hosting DigitalOcean has recently launched its new marketplace selling preconfigured images that can help to quickly deploy an application server. It’s much like AWS, but DO is for those already using this provider’s services. Let’s see how to deploy a simple server for WebRTC streaming with a DO account for a $10/month fee based on Flashphoner WebCallServer and how such a server can be of use.

Read more →
Total votes 6: ↑5 and ↓1+4
Comments0

Authors' contribution