Pull to refresh
221.73

Java *

General-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible

Show first
Rating limit
Level of difficulty

Introducing One Ring — an open-source pipeline for all your Spark applications

Reading time 23 min
Views 1.4K

If you utilize Apache Spark, you probably have a few applications that consume some data from external sources and produce some intermediate result, that is about to be consumed by some applications further down the processing chain, and so on until you get a final result.


We suspect that because we have a similar pipeline with lots of processes like this one:


A process flowchart with more than 50 applications and about 70 datasets
Click here for a bit larger version


Each rectangle is a Spark application with a set of their own execution parameters, and each arrow is an equally parametrized dataset (externally stored highlighted with a color; note the number of intermediate ones). This example is not the most complex of our processes, it’s fairly a simple one. And we don’t assemble such workflows manually, we generate them from Process Templates (outlined as groups on this flowchart).


So here comes the One Ring, a Spark pipelining framework with very robust configuration abilities, which makes it easier to compose and execute a most complex Process as a single large Spark job.


And we just made it open source. Perhaps, you’re interested in the details.

We got you covered!
Total votes 9: ↑8 and ↓1 +7
Comments 0

Glean Insights About 18 Best Java Frameworks To Use in 2020

Reading time 10 min
Views 4.2K

image


Who doesn’t know about Java today? You can hear its mention in every nook and corner of the world. A significant majority of IT companies provide Java-based applications, while businesses are still driven to secure java applications due to robustness and stringent security facilities. However, Java frameworks are a matter of chaos for a variety of business owners that want their application to be standout.


The fact is that there is no dearth of java frameworks that makes application development simple and efficient. However, a number of people have a query regarding the selection of java framework on the basis of features, ease-of-use, cost, and many more. Businesses hire programmers in India, though they stay confused on which platform they want their app to be created.

Read more →
Total votes 5: ↑3 and ↓2 +1
Comments 0

Introducing Java 13: Let's dive Into JDK's New Features

Reading time 5 min
Views 2.7K


Java has been a programmer’s dream and what’s the better way to quantify Java’s popularity with the new version release Java 13. After the initial Java enhancement proposal, there have been advancements in JDK features that will blow up Java developer’s mind with a new range of features after the official release on September 17, 2019.

But Why do you think Java is so popular?

Java has been a craze among programmers due to its platform independence and the ability to run on different computers. It has been there for so long that it has been adopted by organizations like banks, insurance companies, enterprises, agencies and mostly by software outsourcing companies.

Java has been there in the business to develop android apps, java web applications, software tools, and scientific applications.

Let us delve into the stats and gauge the popularity ratio of Java applications among other competing programming languages.
Read more →
Total votes 3: ↑2 and ↓1 +1
Comments 0

Top programming languages for Android App development in 2020

Reading time 5 min
Views 11K
Do you have any idea how many Android apps are there in the world? As of 2019’s first quarter, there were approximately 2.6 million android apps around the globe. That’s a huge number which leads to stiff competition in the market.

There is no other option other than offering a robust and efficient Android app to survive in this flourishing industry. The selection of the right tech-stack is highly important if you want to get a flawless development of your Android app.
Read more →
Total votes 6: ↑3 and ↓3 0
Comments 0

Testing Water Melon using Neural Networks: Full Dev. Cycle from prototyping to the App. at Google Play

Reading time 7 min
Views 696

The beginning


It all started when I found an app. on Apple market, that supposedly was able to determine the ripeness of a water mellon. A program was… strange. Just think about it: instead of knocking using your knuckles, you were supposed to hit the water mellon with your iPhone! Nevertheless, I have decided to repeate that functionality on an Andtoid platform.
Read more →
Rating 0
Comments 0

Top 10 Bugs Found in Java Projects in 2019

Reading time 8 min
Views 1.3K


2019 is drawing to an end, and the PVS-Studio team is looking back at the accomplishments of this year. In the beginning of 2019, we enhanced our analyzer's diagnostic capabilities by adding Java support, which enabled us to check and review Java projects as well. We have found lots of bugs over this year, and here's our Top 10 bugs found in Java projects.
Read more →
Total votes 2: ↑1 and ↓1 0
Comments 0

Apache Hadoop Code Quality: Production VS Test

Reading time 11 min
Views 646

Рисунок 1

In order to get high quality production code, it's not enough just to ensure maximum coverage with tests. No doubts, great results require the main project code and tests to work efficiently together. Therefore, tests have to be paid as much attention as the main code. A decent test is a key success factor, as it will catch regression in production. Let's take a look at PVS-Studio static analyzer warnings to see the importance of the fact that errors in tests are no worse than the ones in production. Today's focus: Apache Hadoop.
Read more →
Total votes 4: ↑4 and ↓0 +4
Comments 0

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

Reading time 9 min
Views 2K
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
Comments 0

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

Reading time 10 min
Views 746

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
Comments 0

How To Implement JavaScript Utility Functions Using Reduce?

Reading time 5 min
Views 2.8K


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)

Working


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) => 
{
	newArray1.push(transformFunction(xyz));

	return newArray1;
  }, 
[]
);

Use case:


const double = (x) => x * 2;
const reverseString = (string) =>
  string
	.split('')
	.reverse()
	.join('');

map(double, [200, 300, 400]);

Output: [400, 600, 800]

map(reverseString, ['Hello Alka', 'I love cooking']);
// ['alkA olleH', ‘gnikooc evol I']
Read more →
Total votes 8: ↑7 and ↓1 +6
Comments 1

PHP Microservice Framework: Swoft v2.0.7 Release on schedule

Reading time 4 min
Views 976


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.


Github


https://github.com/swoft-cloud/swoft

Read more →
Total votes 4: ↑2 and ↓2 0
Comments 0

Top 5 Software Development Practices to Follow in 2020

Reading time 6 min
Views 9.7K


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.

Also read: How Blockchain is helping the healthcare sector?

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
X=np.array([[0,1,1,0],[0,1,1,1],[1,0,0,1]])
y=np.array([[0],[1],[1]])


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:
epoch=10000
lr=0.1
inputlayer_neurons = X.shape[1]
hiddenlayer_neurons = 3
output_neurons = 1

wh=np.random.uniform(size=(inputlayer_neurons,hiddenlayer_neurons))
bh=np.random.uniform(size=(1,hiddenlayer_neurons))
wout=np.random.uniform(size=(hiddenlayer_neurons,output_neurons))
bout=np.random.uniform(size=(1,output_neurons))


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 →
Total votes 8: ↑7 and ↓1 +6
Comments 0

Kotlin: How It Is A Great Choice For Android App Development?

Reading time 4 min
Views 2.1K


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 →
Total votes 4: ↑2 and ↓2 0
Comments 0

How did the test task become a production library

Reading time 5 min
Views 2K
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.

logo

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 →
Total votes 5: ↑5 and ↓0 +5
Comments 0

Automate SOAP client auto-generation routines with WSDL import for SBT and Scala

Reading time 5 min
Views 3.6K

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 →
Total votes 3: ↑2 and ↓1 +1
Comments 0

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

Reading time 9 min
Views 1.5K

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 →
Total votes 25: ↑24 and ↓1 +23
Comments 0

PVS-Studio Visits Apache Hive

Reading time 12 min
Views 1.2K
Рисунок 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 →
Total votes 23: ↑20 and ↓3 +17
Comments 0

Get to Know the PVS-Studio Static Analyzer for Java

Reading time 4 min
Views 1.2K
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 →
Total votes 28: ↑27 and ↓1 +26
Comments 0

EvilParcel vulnerabilities analysis

Reading time 8 min
Views 6.3K

Introduction


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 →
Total votes 3: ↑3 and ↓0 +3
Comments 0

How We Find Lambda Expressions in IntelliJ IDEA

Reading time 10 min
Views 7.1K

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 →
Total votes 11: ↑11 and ↓0 +11
Comments 0

Authors' contribution