Pull to refresh
126.5

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

Distributed File Systems

Reading time 9 min
Views 8.5K

The Big Data Tools plugin seamlessly integrates HDFS into your IDE and provides access to different cloud storage systems (AWS S3, Minio, Linode, Digital Open Space, GS, Azure). But is this the end? Have we implemented everything and now progress has stopped? Of course not.


In this short digest, we'll take a look at 15 popular distributed file systems available on the market and try to get a sense of their individual advantages.


Almost all of these systems are free or open-source, and you can find the sources on GitHub. The sites of these projects, their documentation, and online reviews provide most of the information we’ll consider here. Other than HDFS, none of these technologies have been implemented yet in Big Data Tools. But who knows? Perhaps someday we'll see them in our plugin.


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

Big Data Tools Update 11 Is Out

Reading time 3 min
Views 1.6K

EAP 11 of the Big Data Tools plugin for IntelliJ IDEA Ultimate, PyCharm, and DataGrip is available starting today. You can install it from the JetBrains Plugin Repository or inside your IDE.


Big Data Tools is a new JetBrains plugin that allows you to connect to Hadoop and Spark clusters and monitor nodes, applications, and jobs. It also brings support for editing and running Zeppelin notebooks inside IntelliJ IDEA and DataGrip, so you can create, edit, and run Zeppelin notebooks without ever having to leave your favorite IDE. The plugin offers smart navigation, code completion, inspections, quick-fixes, and refactoring inside notebooks.


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

ZTools for Apache Zeppelin

Reading time 8 min
Views 1.3K



Zeppelin is a web-based notebook for data engineers that enables data-driven, interactive data analytics with Spark, Scala, and more.


The project recently reached version 0.9.0-preview2 and is being actively developed, but there are still many things to be implemented.


One such thing is an API for getting comprehensive information about what's going on inside the notebook. There is already an API that completely solves the problems of high-level notebook management, but it doesn’t help if you want to do anything more complex.

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

Checking WildFly, a JavaEE Application Server

Reading time 9 min
Views 627
image1.png

WildFly (formerly known as JBoss Application Server) is an open-source JavaEE application server developed and first released by JBoss in February, 2008. The primary goal of the project is to provide a set of tools usually required for enterprise Java applications. And since the server is used for developing enterprise applications, it is especially important to minimize the number of bugs and potential vulnerabilities in its code. Today, WildFly is being developed by the large company Red Hat, and they keep the code quality at a pretty high level. That said, our analyzer was still able to find a number of programming mistakes in the project.
Read more →
Total votes 4: ↑3 and ↓1 +2
Comments 1

JavaCC 21 Parser Generator

Reading time 4 min
Views 2.3K

JavaCC 21 is a continuation of work on the venerable JavaCC parser generator, originally developed at Sun Microsystems in the 1990’s and released under a liberal open source license in 2003. It is currently the most advanced version of JavaCC. It has many feature enhancements (with more to come soon) and also generates much more modern, readable Java code. Also, certain key bugs have finally been fixed. (N.B. The “21” in JavaCC 21 is not a version number. It is simply part of the project name and means that this is a JavaCC for the 21st century!)

Read more →
Total votes 8: ↑8 and ↓0 +8
Comments 0

How to write Palindrome Polyglot Quines

Reading time 10 min
Views 2.5K
PalidromePolyglotQuine

I offer a solution to one beautiful task — writing code that outputs its text is valid for interpreters and compilers of different languages and is correctly executed when reversing its sources.


Not so long ago I learned about code that can be both interpreted in PHP and compiled to Java: PhpJava.java. As it turned out, this idea is not new: code which is valid for several compilers or interpreters is called a polyglot. It is possible to write such code because of the peculiarities of processing strings and comments in different interpreters or compilers.

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

Checking the Code of XMage, and Why You Won't Be Able to Get the Special Rare Cards of the Dragon's Maze Collection

Reading time 13 min
Views 578
image1.png

XMage is a client-server application for playing Magic: The Gathering (MTG). XMage's development was started in early 2010. Since then, it has seen 182 releases, attracted an army of contributors, and it's still being actively developed even now. All that makes it a good reason for us to contribute to its development too! So, today the PVS-Studio unicorn is going to check the code base of XMage and maybe even get into a fight with some entities.
Read more →
Rating 0
Comments 0

Delayed queue in Java and Redis

Reading time 6 min
Views 7.9K

Several years ago we had to solve how to enqueue events with an arbitrary delay, e.g. check a status of a payment 3 hours later, or send notification to a client in 45 minutes. At that point of time, we didn't find suitable libraries to accomplish this task, which didn't require us to spend time on configuration and maintenance. After analysing possible solutions we ended up building our own small library delayed queue in Java language on top of Redis storage engine. In this article I'll explain capabilities of this library, alternatives and problems we solved during creation process.

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

7 Ultimate Programming languages For Mobile App Development

Reading time 5 min
Views 4.3K
"image"

Do you know that 21% of people open an app 50+ times per day? Yes, you heard that right. With the rapid development of technology, the mobile app now made many things possible, which was previously unthinkable.

And that's why there is an incredible increase in the number of mobile users. According to a recent mobile app development stat, the number of mobile users worldwide is projected to increase to 6.95 billion by the end of 2020.

In the last couple of years, the mobile app development industry has grown manifold, changing how businesses function around the world. If you are planning to jump into mobile app development, then choosing the right programming language will be the most significant challenge.

There are more than 600 programming languages, and each one has its own perks and popularity. Are you pondering which language would be best for developing a stunning app?

Several factors come to mind when making this choice, but the most important one is the language's demand. Here in this blog, I have listed the best programming language for mobile apps in terms of popularity and demand. Let's start!
Read more →
Rating 0
Comments 0

Under the Hood of PVS-Studio for Java: How We Develop Diagnostics

Reading time 8 min
Views 427

To keep it interesting, this time I'd like to tell about our approach to developing and polishing diagnostic rules for PVS-Studio Java. You will learn how we keep existing warnings consistent across releases and why the new ones aren't too weird. I'll also share a bit of inside information on what plans we, the Java team, have for the future, and show you a few interesting (and a few plain) bugs we found using the diagnostics from the upcoming release.
Read more →
Total votes 3: ↑2 and ↓1 +1
Comments 0

Spring transaction management. Isolation and propagation

Reading time 3 min
Views 25K

Introduction


In my opinion transaction management is a really important topic for each backend developer. In general, people don’t pay attention to it while using Spring framework.


But I think, it is important to know how to use transactions properly. Because sometimes can happen that there was an exception thrown inside your method, but transaction was not rolled back and it is not clear why? Or some other “strange” cases.

Read more →
Total votes 6: ↑6 and ↓0 +6
Comments 0

The Testcontainers’ MongoDB Module and Spring Data MongoDB Reactive in Action

Reading time 19 min
Views 5.1K

1. Introduction


How can I easily test my MongoDB multi-document transaction code without setting up MongoDB on my device? One might argue that they have to set it up first because in order to carry out such a transaction it needs a session which requires a replica set. Thankfully, there is no need to create a 3-node replica set and we can run these transactions only against a single database instance.

Read more →
Rating 0
Comments 0

IntelliJ IDEA: Structural Search and Replace

Reading time 11 min
Views 7.1K

Modern IDEs are very powerful tools that can help developers in all kinds of situations. Unfortunately, much of this power is often lost because many functions remain unknown to developers, hiding in the shadows.


Simple example of the one of the such functions

Did you know that when you press F2 in IntelliJ IDEA, the cursor will jump to the nearest error in the file? And in the absence of an error – to the nearest warning? It seems that this is a secret only a few people know about.


Structural search and replace is one such pair of features. They can be extremely useful in situations where a whole variety of other functions can’t quite get the job done.


In this post, I will present some of these situations and go beyond artificial cases by demonstrating examples of real code from two projects:


  1. 3D-engine for game development, jMonkeyEngine, which is an example of a big, interesting project.
  2. My own pet project, plantuml-native-image, where I experiment with compiling PlantUML into native executable code using GraalVM Native Image.

In fact, it is this second project that encouraged me to write this post but I’m getting ahead of myself. First things first...

Read more →
Total votes 14: ↑14 and ↓0 +14
Comments 0

Small things that pollute your code

Reading time 4 min
Views 2.3K
I'm not going to discuss global things like design patterns and so on, as there's enough literature on that topic. Instead, I'd like to attract your attention to some small things that still affect lucidity and maintainability of a code.

Polluting code with 'test-only' methods or access modifiers


First of all, if you give access to something that shouldn't be used in production code, it gets used sooner or later. Just because it exist. The argument that it's an internal stuff doesn't work as it absolutely shouldn't be matter, writing you a library or isolated project! Treat people who will add anything to your internal codebase the same way as if they use your existing code as a different library.

Thus, if for some reason in test, you need to call something that should not be called on prod — use reflection or whatever else but do not expose it in production code! And there's no reason to afraid of reflection for test proposes, at the end, you using Mockito, shouldn't it be bad in that case as well?
Read more →
Total votes 4: ↑3 and ↓1 +2
Comments 1

The PVS-Studio analyzer: detecting potential compatibility issues with Java SE API

Reading time 9 min
Views 652

Рисунок 9

2019 was a very busy year in terms of conferences. Our team could leave for whole weeks on business trips. As you know, the conference is perfect time to share knowledge. In addition to giving talks and telling many interesting things at our booth, we also learned a lot from communicating with conference participants and speakers. So at the Joker 2019 conference in fall, a talk from Dalia Abo Sheasha «Migrating beyond Java 8» inspired us to implement a new diagnostic rule that allows us to detect incompatibilities in the Java SE API between different versions of Java. This is what we will talk about.
Read more →
Total votes 4: ↑4 and ↓0 +4
Comments 0

Java vs .Net: Who will Reign in the Future?

Reading time 6 min
Views 50K
As the time is changing, technologies are expanding and with that, the priority and the importance of the technical languages are also changing. So, usually, it becomes difficult to pick when we have to choose between two languages.

 

 

java vs .net


 

Here we will see the battle between Java and Microsoft .Net in order to make this clear which language is better to choose. For that, you may also have a quick look at this short video:
Read more →
Total votes 13: ↑8 and ↓5 +3
Comments 3

NSA, Ghidra, and Unicorns

Reading time 12 min
Views 892

NSA, Ghidra, and Unicorns

This time, the PVS-Studio team's attention was attracted by Ghidra, a big bad reverse-engineering framework allowing developers to analyze binary files and do horrible things to them. The most remarkable fact about it is not even that it's free and easily extensible with plugins but that it was developed and uploaded to GitHub for public access by NSA. On the one hand, you bet NSA has enough resources for keeping their code base clean. On the other hand, new contributors, who are not well familiar with it, may have accidentally introduced bugs that could stay unnoticed. So, we decided to feed the project to our static analyzer and see if it has any code issues.
Read more →
Rating 0
Comments 0

Traps and pitfalls in modernization of enterprise application using «supersonic subatomic java»

Reading time 8 min
Views 1.2K

This is a post about first steps and first pitfalls in modernization of old enterprise application using "supersonic subatomic java" quarkus as it is positioned by RedHat.


Initial setup


In the end of 2019 I was invited to work in a project in our company, where an old monolithic application should be split into micro-services. Basic reasoning behind this decision was, that framework which is used in application is near to it's end-of-life. The application should be rewritten in any case. If it should be rewritten in any case, why not to split it into micro-services?


Since last 10 years, I was working mostly with java and we had in the project specialists with java knowledge, we have decided to give java-based frameworks a try for back-end functionality.
OK, let's use spring-cloud for that purpose, was our first thought. But then, we have had a look onto quarkus, which has been released in the end of 2019. We have decided to give it a try, keeping in mind building of native applications using GraalVM.


Native applications from our perspective could give us following benefits:


  • shorten start time of container
  • reduce resource consumption of container and application

We were aware about possible drawbacks of this solution:


  • no experience in our team with quarkus framework
  • significantly less amount of available feedback from community, since this is very young framework
Read more →
Total votes 3: ↑3 and ↓0 +3
Comments 0

Discover Unmatched Potential of Java for Your Next App

Reading time 3 min
Views 703


One of the most popular programming languages for a decade, Java has been the top choice and preference of most software application development companies. More and more businesses are looking forward to leveraging the potential of the Java language. How can they not? The websites, web apps, mobile apps all could be developed easily using the language. From small, easy to complex apps, Java is the best-suited as it is robust, reliable, and user-friendly programming language.
Read more →
Rating 0
Comments 0

Zero, one, two, Freddy's coming for you

Reading time 23 min
Views 1.4K

Рисунок 1

This post continues the series of articles, which can well be called «horrors for developers». This time it will also touch upon a typical pattern of typos related to the usage of numbers 0, 1, 2. The language you're writing in doesn't really matter: it can be C, C++, C#, or Java. If you're using constants 0, 1, 2 or variables' names contain these numbers, most likely, Freddie will come to visit you at night. Go on, read and don't say we didn't warn you.
Read more →
Total votes 2: ↑2 and ↓0 +2
Comments 0

Authors' contribution