Pull to refresh

All streams

Show first
Rating limit
Level of difficulty

How to quickly check out interesting warnings given by the PVS-Studio analyzer for C and C++ code?

Reading time5 min
Views1K

Once in a while, programmers who start getting acquainted with the PVS-Studio code analyzer ask me: «Is there a list of warnings that accurately indicate errors?» There is no such list because uninteresting (false) warnings in one project are very important and useful in another one. However, one can definitely start digging into the analyzer from the most exciting warnings. Let's take a closer look at this topic.
Read more →

SQL Index Manager – a long story about SQL Server, grave digging and index maintenance

Reading time14 min
Views2.7K
Every now and then we create our own problems with our own hands… with our vision of the world… with our inaction… with our laziness… and with our fears. As a result, it seems to become very convenient to swim in the public flow of sewage patterns… because it is warm and fun, and the rest does not matter – we can smell round. But after a fail comes the realization of the simple truth – instead of generating an endless stream of causes, self-pity and self-justification, it is enough just to do what you consider the most important for yourself. This will be the starting point for your new reality.

For me, the written below is just such a starting point. The way is expected to be lingering…
Let's go?

WSL 2 is now available in Windows Insiders

Reading time3 min
Views4.1K

We’re excited to announce starting today you can try the Windows Subsystem for Linux 2 by installing Windows build 18917 in the Insider Fast ring! In this blog post we’ll cover how to get started, the new wsl.exe commands, and some important tips. Full documentation about WSL 2 is available on our docs page.


Read more →

9 Ways to Fuel Up the Mobile App Developer’s Efficiency

Reading time5 min
Views1.1K
image

In general, the productivity of coding superheroes is measured by the number of lines of code and the quality of the code they write. It means, when the developer churns out the output compared to input, they are declared as productive. Presently, every company wants a productive programmer to accelerate time-to-market and enrich mobile app user’s experience that helps them stand ahead of the competitors.

Alas! All the developers are not productive. Most of them, pull their hairs when the deadline is around the corner, when finding the source of bugs seems a hard nut to crack in, or when the client is complaining about the features not meeting the business needs. The reason behind for not performing to the peak efficiency is they work hard, but not smartly.

The developer’s productivity can be augmented when they work prudently, make the most out of the time, and incorporate the best practices.
Read more →

Security of mobile OAuth 2.0

Reading time12 min
Views15K
image

Popularity of mobile applications continues to grow. So does OAuth 2.0 protocol on mobile apps. It's not enough to implement standard as is to make OAuth 2.0 protocol secure there. One needs to consider the specifics of mobile applications and apply some additional security mechanisms.

In this article, I want to share the concepts of mobile OAuth 2.0 attacks and security mechanisms used to prevent such issues. Described concepts are not new but there is a lack of the structured information on this topic. The main aim of the article is to fill this gap.
Read more →

How Moovit improved its app to help people with disabilities ride transit with confidence

Reading time4 min
Views884

Alexandr Epaneshnikov, a 19-year-old Russian student who is legally blind, recently decided he wanted to be more independent by commuting on his own and relying less on his mom for rides to school. It meant taking a streetcar to a subway to his high school in Moscow, a 30-minute trip that Epaneshnikov assuredly navigates with a cane and Moovit, an urban mobility app optimized for screen readers.


Read more →

Developers are now measured in views and subscribers — and that's wrong

Reading time5 min
Views6.1K


Recently I’ve been getting invited to a lot of interviews, and they all go pretty much the same way: I come on, we chat for a while, and then… they make me a job offer. Like I’ve already passed the technical interview stage and confirmed my skills. The thing is, I don’t even have a mega-popular GitHub page with examples of my code, and my CV is so bland it looked like I was forced to write it. The only outside indication that I’m worth something is my ability to answer technical questions, but I’m not even being asked to do that anymore.

The reason for that is simple: I wrote a couple of Habr articles and they became popular. Looks deserved and normal at first glance: since I shared my experience publicly and people have clearly appreciated it, my skills are considered “community-approved” and there’s no need for a lengthy interview.

But the articles aren’t even about my skills at all — mostly they’re there so I can whine about my depression. I mean, I’m glad I don’t have to prove anything to anyone anymore, but seriously: THAT passes for a quality developer these days? Are you out of your mind? I believe you are, and the symptoms are everywhere.
Read more →

Bluetooth stack modifications to improve audio quality on headphones without AAC, aptX, or LDAC codecs

Reading time7 min
Views71K
Before reading this article, it is recommended to read the previous one: Audio over Bluetooth: most detailed information about profiles, codecs, and devices / по-русски

Some wireless headphone users note low sound quality and lack of high frequencies when using the standard Bluetooth SBC codec, which is supported by all headphones and other Bluetooth audio devices. A common recommendation to get better sound quality is to buy devices and headphones with aptX or LDAC codecs support. These codecs require licensing fees, that's why devices with them are more expensive.

It turns out that the low quality of SBC is caused by artificial limitations of all current Bluetooth stacks and headphones' configuration, and this limitation can be circumvented on any existing device with software modification only.
Read more →

Audio over Bluetooth: most detailed information about profiles, codecs, and devices

Reading time24 min
Views318K
XKCD comic. How standards proliferate. SITUATION: there are 14 competing standards. Geek: 14?! Ridiculous! We need to develop one universal standard that covery everyone's use cases. Geek's girlfriend: yeah! SOON: Situation: there are 15 competing standards.

This article is also available in Russian / Эта статья также доступна на русском языке

The mass market of smartphones without the 3.5 mm audio jack changed headphones industry, wireless Bluetooth headphones have become the main way to listen to music and communicate in headset mode for many users.
Bluetooth device manufacturers rarely disclose detailed product specifications, and Bluetooth audio articles on the Internet are contradictory and sometimes incorrect. They do not tell about all the features, and often publish the same false information.
Let's try to understand the protocol, the capabilities of Bluetooth stacks, headphones and speakers, Bluetooth codecs for music and speech, find out what affects the quality of the transmitted audio and the delay, learn how to capture and decode information about supported codecs and other device features.

TL;DR:

  • SBC codec is OK
  • Headphones have their own per-codec equalizer and post processing configuration
  • aptX is not as good as the advertisements say
  • LDAC is a marketing fluff
  • Voice audio quality is still low
  • Browsers are able to execute audio encoders compiled to WebAssembly from C using emscripten, and they won't even lag.

PVS-Studio Graph of Diagnostic Abilities Development

Reading time2 min
Views812
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 →

Protocol for communication between iframe and the main window

Reading time4 min
Views5.2K

From time to time, developers need to establish communication between several browser tabs to be able to send messages from one tab to another and receive responses. We have also faced this need at some point.


Some solutions already exist (like, for instance, BroadcastChannel API). However, its browser support leaves a lot to be desired, so we decided to use our own library. When the library was ready, that functionality was no longer required. Nevertheless, another task emerged: communication between an iframe and the main window.


On closer examination, it turned out that two-thirds of the library would not have to be changed — only some code refactoring was necessary. The library is a communication PROTOCOL that can work with text data. It can be applied in all cases in which text is transferred, such as iframes, window.open, worker, browser tabs or WebSocket.


How it works


Currently, the protocol has two functions: sending messages and subscription to events. Any message in the protocol is a data object. For us, the main field in that object is type, which tells us what kind of message it is. The type field is an enum with the following values:

Read more →

Top 5 mobile app development companies in the UK

Reading time3 min
Views2.3K
image

According to Evans Data Corporation, there are 12 million developers in the world. About 350,000 of these software and mobile developers work and live in the UK including freelancers and IT employees.

How do you choose the best one among all this variety? The obvious answer — get going with a professional IT company. This will increase your chances to work with true professionals.

I’ve made my own research based on a variety of reliable resources like Google SERPs and user’s reviews, different independent media, including medium.com and aggregators, like businessofapps.com, Clutch, etc. and other independent sites. Based on the collected data, I’ve aggregated the total score for each of the 25 leaders, and here I represent a list of the winners: the top 5 software developers in the UK.
Read more →

The one who resurrected Duke Nukem: interview with Randy Pitchford, magician from Gearbox

Reading time38 min
Views4K
RUVDS and Habr continue the series of interviews with interesting people in IT field. Last time we talked to Richard «Levelord» Gray, level designer of popular games Duke Nukem, American McGee’s Alice, Heavy Metal F.A.K.K.2, SiN, Serious Sam, author of well-known «You’re not supposed to be here» phrase.

Today we welcome Randall Steward «Randy» Pitchford II, president, CEO and co-founder of Gearbox Software video game development company.

Randy started in 3D Realms where contributed to Duke Nukem 3D Atomic Edition and Shadow Warrior. Then he founded Gearbox Software and made Half-Life: Opposing Force, which won D.I.C.E in 2000. Other Gearbox titles include Half-Life: Blue Shift, Half-Life: Decay, Counter-Strike: Condition Zero, James Bond 007: Nightfire, Tony Hawk's Pro Skater 3, Halo: Combat Evolved and of course Borderlands.

The interview team also includes editor of Habr Nikolay Zemlyanskiy, Richard «Levelord» Gray, Randy’s wife Kristy Pitchford and Randy’s son Randy Jr.


Indexes in PostgreSQL — 10 (Bloom)

Reading time11 min
Views7.6K
In the previous articles we discussed PostgreSQL indexing engine and the interface of access methods, as well as hash indexes, B-trees, GiST, SP-GiST, GIN, RUM, and BRIN. But we still need to look at Bloom indexes.

Bloom


General concept


A classical Bloom filter is a data structure that enables us to quickly check membership of an element in a set. The filter is highly compact, but allows false positives: it can mistakenly consider an element to be a member of a set (false positive), but it is not permitted to consider an element of a set not to be a member (false negative).

The filter is an array of $m$ bits (also called a signature) that is initially filled with zeros. $k$ different hash functions are chosen that map any element of the set to $k$ bits of the signature. To add an element to the set, we need to set each of these bits in the signature to one. Consequently, if all the bits corresponding to an element are set to one, the element can be a member of the set, but if at least one bit equals zero, the element is not in the set for sure.

In the case of a DBMS, we actually have $N$ separate filters built for each index row. As a rule, several fields are included in the index, and it's values of these fields that compose the set of elements for each row.

By choosing the length of the signature $m$, we can find a trade-off between the index size and the probability of false positives. The application area for Bloom index is large, considerably «wide» tables to be queried using filters on each of the fields. This access method, like BRIN, can be regarded as an accelerator of sequential scan: all the matches found by the index must be rechecked with the table, but there is a chance to avoid considering most of the rows at all.
Read more →

Nullable Reference types in C# 8.0 and static analysis

Reading time12 min
Views3.7K

Picture 9


It's not a secret that Microsoft has been working on the 8-th version of C# language for quite a while. The new language version (C# 8.0) is already available in the recent release of Visual Studio 2019, but it's still in beta. This new version is going to have a few features implemented in a somewhat non-obvious, or rather unexpected, way. Nullable Reference types are one of them. This feature is announced as a means to fight Null Reference Exceptions (NRE).
Read more →

Improve your mobile application using machine learning technology

Reading time4 min
Views1.1K
Today, even mobile application developing company has begun to consolidate ML related to other cutting edge technologies, for example, AI and predictive analysis. This is on the grounds that ML empowers mobile applications to learn, adjust, and improve after some time.

It’s an incredible accomplishment when you consider the way that changes requested an express order from designers for gadgets to execute a particular activity. At the point when this was the standard, software engineers needed to estimate and record for each conceivable situation (and this was a fantastic test).

Be that as it may, with ML in portable applications, we have removed the speculating game from the condition. It can likewise upgrade User Experience (UX) by understanding client conduct. So you can wager that ML in versatile won’t be restricted to voice associates and chatbots.
Read more →

Let's help QueryProvider deal with interpolated strings

Reading time5 min
Views1.7K

Specifics of QueryProvider


QueryProvider can’t deal with this:


var result = _context.Humans
                      .Select(x => $"Name: {x.Name}  Age: {x.Age}")
                      .Where(x => x != "")
                      .ToList();

It can’t deal with any sentence using an interpolated string, but it’ll easily deal with this:


var result = _context.Humans
                      .Select(x => "Name " +  x.Name + " Age " + x.Age)
                      .Where(x => x != "")
                      .ToList();

The most painful thing is to fix bugs after turning on ClientEvaluation (exception for client-side calculation), since all Automapper profiles should be strictly analyzed for interpolation. Let’s find out what’s what and propose our solution to the problem.

Read more →