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

      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 →
    • How To Implement JavaScript Utility Functions Using Reduce?

        When it comes to code in JavaScript, developers found reduce function as one of the toughest concepts to crack. According to Wikipedia, Reduce has multiple names viz. Accumulate, Fold, Compress and Aggregate. These names clearly indicate the meaning & working of reduce function. The idea behind this is to break down a structure into a single value. Hence, Reduce can be defined as a function which converts a list into any data type.

        For example, you can reduce an array [5,4,3,2,1] into the value 15 by just adding them.

        Reduce function keeps developers away from using loop in order to fold a list into a single value.

        In this blog, you will learn ways to implement well-known functions using reduce as already done by developers in top software development company.

        I have listed out 10 JavaScript utility functions recreated using reduce function. So, check out below these functions:-

        • Map

        Parameters used

        array (to transform list of items), transform Function (is a function used to run on each element)


        By using the given transformFunction, each element in the given array get transformed and returns new array of items.

        How to implement?

        const map = (transformFunction, array1) =>
          array1.reduce((newArray1, xyz) => 
        	return newArray1;

        Use case:

        const double = (x) => x * 2;
        const reverseString = (string) =>
        map(double, [200, 300, 400]);
        Output: [400, 600, 800]
        map(reverseString, ['Hello Alka', 'I love cooking']);
        // ['alkA olleH', ‘gnikooc evol I']
        Read more →
      • PHP Microservice Framework: Swoft v2.0.7 Release on schedule

          What is Swoft?

          Swoft is a PHP high performance microservice coroutine framework. It has been published for many years and has become the best choice for php. It can be like Go, built-in coroutine web server and common coroutine client and is resident in memory, independent of traditional PHP-FPM. There are similar Go language operations, similar to the Spring Cloud framework flexible annotations.

          Through three years of accumulation and direction exploration, Swoft has made Swoft the Spring Cloud in the PHP world, which is the best choice for PHP's high-performance framework and microservices management.



          Read more →
        • Top 5 Software Development Practices to Follow in 2020

            Though it seems we are just a few months away from reaching 2020, these months are also important in the field of software development. Here in this article, we will see how the coming year 2020 will change the lives of software developers!

            Future Software Development Is Here!

            Traditional software development is about developing software by writing code and following some fixed rules. But the present-day software development witnessed a paradigm shift with advances in Artificial Intelligence, Machine Learning, and Deep Learning. With the integration of these three technologies, developers will be able to build software solutions that learn the instructions and add extra features and patterns in data that are needed for the desired outcome.

            Let’s Try Out With Some Code

            Over time, the neural network software development systems have become more complex in terms of integrations as well as layers of functionality and interfaces. Developers can build a very simple neural network with Python 3.6. Here’s an example of a program that does binary classification with 1 or 0.

            Of course, we can start by creating a neural network class:

            import numpy as np

            Applying the Sigmoid function:

            def sigmoid ():
               return 1/(1 + np.exp(-x))
            def derivatives_sigmoid ():
               return x * (1-x)

            Training the Model With Initial Weights and Biases:
            inputlayer_neurons = X.shape[1]
            hiddenlayer_neurons = 3
            output_neurons = 1

            For beginners, if you need help regarding neural networks, you can get in touch with top software development company.Or, you can hire AI/ML developers to work on your project.
            Read more →
          • Kotlin: How It Is A Great Choice For Android App Development?

              In 2017, Google declared Kotlin as its second official language for Android application development. The language itself proving to be a modern, intuitive and pragmatic programming language. That’s why Kotlin's app development community is growing at a fast pace. For android app developers, using Kotlin with Java can reduce excessive boilerplate code which is a huge win for them.

              In order to heighten productivity, Kotlin language comes with amazing functional features that support Java interoperability. It has effectively improved the coding experience of developers by introducing concise expressions, abstractions, and improved syntax.
              Read more →
            • How did the test task become a production library

              Hello everyone!

              Today I'm going to tell about how is test task to job interview became the library Image Comparison. It's an open-source library, which is hosting on GitHub.


              Before I start, let me introduce myself. My name is Roman. I'm a husband and father. I'm a software engineer in Epam Systems with 4 years of experience in IT.

              The main idea of this topic is to tell, that creating an open-source product it's not wasting time, no! It's an amazing experience, which is going from all the open-source community. It's a time when you're a developer, project manager, product manager in one head.

              While this library is growing I have been working with people from more than 10(!!) countries, such as the USA, Germany, Chine, India, Russia, Ukraine, etc.

              Let's move on from the start of this story…
              Read more →
            • Automate SOAP client auto-generation routines with WSDL import for SBT and Scala

                Working with SOAP often gets tricky, and dealing with WSDL might be a huge contribution to the complexity of this task. Really, it could be the least expected thing to face when you are into a modern & fancy language like for example, Scala, that is well known for its reactiveness and asynchronous way of dealing with requests. In fact, many of the software developers that have made their way into industry quite recently, might not even know about SOAP and WSDL protocols, and get quickly annoyed or even enraged when first trying to connect to such a legacy service. So, should we deprecate this altogether in favour of modern technology stack, or maybe there is a less painful solution?

                Read more →
              • AdBlock has stolen the banner, but banners are not teeth — they will be back

              • Analysis of the Apache Dubbo RPC Framework by the PVS-Studio Static Code Analyzer

                  Picture 2

                  Apache Dubbo is one of the most popular Java projects on GitHub. It's not surprising. It was created 8 years ago and is widely applied as a high-performance RPC environment. Of course, most of the bugs in its code have long been fixed and the quality of the code is maintained at a high level. However, there is no reason to opt out of checking such an interesting project using the PVS-Studio static code analyzer. Let's see how it turned out.
                  Read more →
                • PVS-Studio Visits Apache Hive

                    Рисунок 1

                    For the past ten years, the open-source movement has been one of the key drivers of the IT industry's development, and its crucial component. The role of open-source projects is becoming more and more prominent not only in terms of quantity but also in terms of quality, which changes the very concept of how they are positioned on the IT market in general. Our courageous PVS-Studio team is not sitting idly and is taking an active part in strengthening the presence of open-source software by finding hidden bugs in the enormous depths of codebases and offering free license options to the authors of such projects. This article is just another piece of that activity! Today we are going to talk about Apache Hive. I've got the report — and there are things worth looking at.
                    Read more →
                  • Get to Know the PVS-Studio Static Analyzer for Java

                      Over the years, the PVS-Studio team has been developing the same-name static analyzer. At this point the analyzer represents a complex software solution, which provides the analysis of such programming languages, as C, C++, C# and Java on Windows, Linux and macOS platforms. Just recently the Java language joined the ranks of supported languages. The PVS-Studio analyzer has proved itself as a reliable tool among C++ and C# developers in quite some time, whereas for Java audience PVS-Studio is still a newcomer. Many haven't even heard of the analyzer, and those who had, aren't quite familiar with all its abilities. So in this article, I'd like to introduce PVS-Studio Java to you, talk about the ways to start it and its abilities.

                      Рисунок 3

                      Read more →
                    • EvilParcel vulnerabilities analysis


                        In mid-April, we published news about the Android.InfectionAds.1 trojan, which exploited several critical vulnerabilities in Android. One of them, CVE-2017-13156 (also known as Janus), allows malware to infect APK files without damaging the digital signature. The other one is CVE-2017-13315. It gives the trojan extended privileges, so that it can install and uninstall applications independently from user. A detailed analysis of Android.InfectionAds.1 is available in our virus library; while we’re here we will touch upon the CVE-2017-13315 vulnerability and see what it does.
                        Read more →
                      • How We Find Lambda Expressions in IntelliJ IDEA

                        • Translation

                        Type Hierarchy in IntelliJ IDEACode search and navigation are important features of any IDE. In Java, one of the commonly used search options is searching for all implementations of an interface. This feature is often called Type Hierarchy, and it looks just like the image on the right.

                        It's inefficient to iterate over all project classes when this feature is invoked. One option is to save the complete class hierarchy in the index during compilation since the compiler builds it anyway. We do this when the compilation is run by the IDE and not delegated, for example, to Gradle. But this works only if nothing has been changed in the module after the compilation. In general, the source code is the most up-to-date information provider, and indexes are based on the source code.

                        Finding immediate children is a simple task if we are not dealing with a functional interface. When searching for implementations of the Foo interface, we need to find all the classes that have implements Foo and interfaces that have extends Foo, as well as new Foo(...) {...} anonymous classes. To do this, it is enough to build a syntax tree of each project file in advance, find the corresponding constructs, and add them to an index.

                        Read more →
                      • Analyzing the Code of CUBA Platform with PVS-Studio

                          Java developers have access to a number of useful tools that help to write high-quality code such as the powerful IDE IntelliJ IDEA, free analyzers SpotBugs, PMD, and the like. The developers working on CUBA Platform have already been using all of these, and this review will show how the project can benefit even more from the use of the static code analyzer PVS-Studio.
                          Read more →
                        • Dog Breed Identifier: Full Cycle Development from Keras Program to Android App. on Play Market

                            With the recent progress in Neural Networks in general and image Recognition particularly, it might seem that creating an NN-based application for image recognition is a simple routine operation. Well, to some extent it is true: if you can imagine an application of image recognition, then most likely someone have already did something similar. All you need to do is to Google it up and to repeat.

                            However, there are still countless little details that… they are not insolvable, no. They simply take too much of your time, especially if you are a beginner. What would be of help is a step-by-step project, done right in front of you, start to end. A project that does not contain «this part is obvious so let's skip it» statements. Well, almost :)

                            In this tutorial we are going to walk through a Dog Breed Identifier: we will create and teach a Neural Network, then we will port it to Java for Android and publish on Google Play.

                            For those of you who want to see a end result, here is the link to NeuroDog App on Google Play.

                            Web site with my robotics: robotics.snowcron.com.
                            Web site with: NeuroDog User Guide.

                            Here is a screenshot of the program:


                            Read more →
                            • +11
                            • 12.4k
                            • 6
                          • How to quickly prepare for a job interview with questions on algorithms and technologies

                              Greetings to all readers of Habr! My name is Yuriy, I have been teaching high technologies, Oracle, Microsoft and others for more than 20 years, as well as creating, developing and supporting loaded information systems for various business customers. Today I would like to tell you about the current direction: interviews on data processing technologies. The Russian variant of this post you can find here.

                              It doesn't really make sense for an employer to ask the applicant about traditional programming technologies. That is why I'm going to tell you how to prepare for an interview in only one narrow area related to information processing languages, namely, the processing of long integers(long arithmetic) and the identification of information properties of real world objects, which are described in long integers.
                              Read more →
                            • PVS-Studio for Java hits the road. Next stop is Elasticsearch

                                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 →
                              • What's new in CUBA 7

                                  What's new in CUBA 7

                                  Three years ago we announced the second publicly available major version of the framework. CUBA 6 was the game-changing version — the licensing was turned from proprietary to Apache 2.0. Those days we couldn't even guess where it was going to bring the framework in long term. CUBA community started to grow exponentially, so we have learned a lot of possible (and sometimes impossible) ways of how developers use the framework. Now we are happy to announce CUBA 7, which, we hope, will make development more coherent and joyful for all community members from those just starting their journey in CUBA and Java to skilled enterprise developers and Java experts.


                                  Read more →
                                • Introduce Static Analysis in the Process, Don't Just Search for Bugs with It

                                    This article is an authorized translation of the original post. The translation was made with the kind help of the guys from PVS-Studio. Thank you, guys!

                                    What encouraged me to write this article is considerable quantity of materials on static analysis, which recently has been increasingly coming up. Firstly, this is a blog of PVS-Studio, which actively promotes itself on Habr posting reviews of errors, found by their tool in open source projects. PVS-Studio has recently implemented Java support, and, of course, developers from IntelliJ IDEA, whose built-in analyzer is probably the most advanced for Java today, could not stay away.

                                    When reading these reviews, I get a feeling that we are talking about a magic elixir: click the button, and here it is — the list of defects right in front of your eyes. It seems that as analyzers get more advanced, more and more bugs will be found, and products, scanned by these robots, will become better and better without any effort on our part.

                                    Well, but there are no magic elixirs. I would like to talk about what is usually not spoken in posts like «here are things that our robot can find»: what analyzers are not able to do, what's their real part and place in the process of software delivery, and how to implement the analysis properly.

                                    Ratchet (source: Wikipedia).
                                    Read more →