• How does strange code hide errors? TensorFlow.NET Analysis

      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 →
    • No-code: yesterday, today, tomorrow

      No-code movement is a new approach to website and app development. It doesn't require technical knowledge. Does no-code movement have something in common with old image boards, guest books and creation of MySpace or Facebook? Yes, it does. And here is why.

      No-code is a reflection of social tendencies made in technologies. To understand it, we need to discover the history from the beginning of the World Wide Web.
      Read more →
    • WAL in PostgreSQL: 3. Checkpoint

      • Translation
      We already got acquainted with the structure of the buffer cache — one of the main objects of the shared memory — and concluded that to recover after failure when all the RAM contents get lost, the write-ahead log (WAL) must be maintained.

      The problem yet unaddressed, where we left off last time, is that we are unaware of where to start playing back WAL records during the recovery. To begin from the beginning, as the King from Lewis Caroll's Alice advised, is not an option: it is impossible to keep all the WAL records from the server start — this is potentially both a huge memory size and equally huge duration of the recovery. We need such a point that is gradually moving forward and that we can start the recovery at (and safely remove all the previous WAL records, accordingly). And this is the checkpoint, to be discussed below.

      Checkpoint


      What features must the checkpoint have? We must be sure that all the WAL records starting with the checkpoint will be applied to the pages flushed to disk. If it were not the case, during recovery, we could read from disk a version of the page that is too old, apply the WAL record to it and by doing so, irreversibly hurt the data.
      Read more →
    • AdBlock has stolen the banner, but banners are not teeth — they will be back

      More
      Ads
    • Checking the Code of Zephyr Operating System

        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 →
      • This is how you deal with route leaks

          That, we must say, is the unique story so far.

          Here’s the beginning: for approximately an hour, starting at 19:28 UTC on April 1, 2020, the largest Russian ISP — Rostelecom (AS12389) — was announcing prefixes belonging to prominent internet players: Akamai, Cloudflare, Hetzner, Digital Ocean, Amazon AWS, and other famous names.

          Before the issue was resolved, paths between the largest cloud networks were somewhat disrupted — the Internet blinked. The route leak was distributed quite well through Rascom (AS20764), then Cogent (AS174) and in a couple of minutes through Level3 (AS3356) to the world. The issue suddenly became bad enough that it saturated the route decision-making process for a few Tier-1 ISPs.

          It looked like this:

          image

          With that:

          image
          Read more →
        • Everything you always wanted to know about human memory (but were afraid to ask)

            Having a good memory is advantageous, even as people stay home amidst the pandemic. Our memories help us maintain an intellectual connection to the world, and keep us from mentally deteriorating.

            Today, we’re launching a new series of articles on memory enhancement, starting with a short overview of how our memory works and the basic training you can undergo to improve it.


            Read more →
          • COVID-19 and Internet

              СOVID-19 and Internet


              Recent events caused by coronavirus spread have highlighted quite a few problem areas in society, economics, technology… And it’s not only about the panic, which is inevitable and will come back with any following global issue. But it is really about the consequences: crowded hospitals, empty shelves in supermarkets, people having to stay at home and use up the Internet which turns out to not be enough for everyone who’s going through the hard days and nights of #stayathome.

              What already happened

              Read more →
            • Juggling work and study at ITMO University: CS edition

                We talked to the graduates of the Speech Information Systems MA program at ITMO about the ways our university helped jumpstart their careers. [More stories from our startups]:


                Read more →
              • SQL Server & Concurrency Control

                • Tutorial

                What is a Transaction?


                The standard definition of Transaction state that “Every Query batch that runs in a SQL server is a Transaction.”, this means any query you run on a SQL server will be considered as a Transaction it could either be a simple SELECT query or any UPDATE or ALTER query.


                If you run a query without mentioning the BEGIN TRAN keyword then it would be considered as an Implicit transition.


                If you run a query which starts with BEGIN TRAN and ends with COMMIT or ROLLBACK then it would be considered as Explicit Transaction.

                Read more →
              • Lessons learned from working remotely for 3 years or how to save your bacon and sanity


                  You must find out your work-life balance because without that you will burn out. It happens because work is like gas. If you don't control it then work fill all available time little by little. I.e. I used to work 11 hours per day from home. Hopefully, I understood that it had been a bad idea. Let me share some pieces of advice:


                  1. Find out a work-life balance.
                  2. Do exercises.
                  3. Eat healthy food.
                  4. Create a schedule & follow it.
                  5. Improve microclimate at home.
                  Read more →
                • How to develop and publish a smart-contract in the Telegram Open Network (TON)

                    What is this article about?


                    In this article, I will tell about my participation in the first (out of two so far) Telegram blockchain contest. I didn't win any prize. However, decided to combine and share the unique experience from the start to finish line, so my observations could help anyone who is interested.


                    Since I didn't want to write some abstract code, instead make something useful. I created instant lottery smart-contract and website which shows smart-contract data directly from Telegram Open Network (TON) avoiding transitional storage.


                    The article will be particularly useful for those, who want to write their first smart-contract in TON but has difficulties where to start.


                    Using the lottery smart-contract as an example, I will show the path from the environment set up till publication of the smart-contract and its interaction. Moreover, I will create a website that will show smart-contract data. This website can be used to extract and publish data.

                    Read more →
                  • Implementing Fault-Tolerance PostgreSQL Cluster with Patroni

                      I'm a DevOps Teamlead at Miro. Our service is a high-load one: it is used by 4 million users worldwide, daily active users - 168,000. Our servers are hosted by Amazon and located in a single Ireland region. We have more than 200 active servers, with almost 70 of them being database servers.

                      The service's backend is a monolith stateful Java application that maintains a persistent WebSocket connection for each client. When several users collaborate using the same whiteboard, they see changes on the whiteboard in real-time. That's because we write every change to a database, resulting in ~20,000 requests per second to the databases. During peak hours, the data is written to Redis at ~80,000–100,000 RPS.

                      I am going to speak about why it is important to us to maintain PostgreSQL high availability, what methods we've applied to solve the problem, and what results we've achieved so far.

                      image
                      Read more →
                    • WAL in PostgreSQL: 2. Write-Ahead Log

                      • Translation
                      Last time we got acquainted with the structure of an important component of the shared memory — the buffer cache. A risk of losing information from RAM is the main reason why we need techniques to recover data after failure. Now we will discuss these techniques.

                      The log


                      Sadly, there's no such thing as miracles: to survive the loss of information in RAM, everything needed must be duly saved to disk (or other nonvolatile media).

                      Therefore, the following was done. Along with changing data, the log of these changes is maintained. When we change something on a page in the buffer cache, we create a record of this change in the log. The record contains the minimum information sufficient to redo the change if the need arises.

                      For this to work, the log record must obligatory get to disk before the changed page gets there. And this explains the name: write-ahead log (WAL).

                      In case of failure, the data on disk appear to be inconsistent: some pages were written earlier, and others later. But WAL remains, which we can read and redo the operations that were performed before the failure but their result was late to reach the disk.
                      Read more →
                    • OpenToonz: inside and out

                        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 →
                      • Signpost: When Breakpoints are not Enough

                        • Tutorial

                        Instruments for Apple's Xcode is a tool for performance analysis of an iOS application. In 2018 Apple introduced Custom Instruments — an opportunity to expand the standard set of instruments for application profiling. When existing tools are not enough, you can create new ones yourself — it will collect, analyze and display the data the way you need.




                        Read more →