You are hereFeed aggregator / Sources / Dzone

Dzone


Syndicate content
Recent posts on DZone.com
Updated: 1 hour 3 min ago

Using Google's Protocol Buffers With Java

Wed, 01/17/2018 - 1:01am

Effective Java, Third Edition was recently released, and I have been interested in identifying the updates to this classic Java development book, whose last edition only covered through Java 6. There are obviously completely new items in this edition that are closely related to Java 7, Java 8, and Java 9 such as Items 42 through 48 in Chapter 7 ("Lambdas and Streams"), Item 9 ("Prefer try-with-resources to try-finally"), and Item 55 ("Return optionals judiciously"). I was (very slightly) surprised to realize that the third edition of Effective Java had a new item not specifically driven by the new versions of Java, but that was instead was driven by developments in the software development world independent of the versions of Java. That item, Item 85 ("Prefer alternatives to Java Serialization") is what motivated me to write this introductory post on using Google's Protocol Buffers with Java.

In Item 85 of Effective Java, Third Edition, Josh Bloch emphasizes in bold text the following two assertions related to Java serialization:

Categories: Technical

Oracle January 2018 Critical Patch Update (CPU) Preview

Tue, 01/16/2018 - 6:11pm

Overall Trends Point to Increased Risks from Vulnerable Code

After two weeks of focusing on Bond-esque vulnerabilities found in microprocessors, it's time to turn attention to the bellwether of software flaws - the quarterly Oracle Critical Patch Update (CPU). In a pre-release statement, Oracle indicates the first CPU of 2018 will likely be the smallest patch update since April 2016.

Don't celebrate just yet. The overall number of flaws patched may be lower, but it's also likely the number of Java SE vulnerabilities will be flat to the October 2017 CPU and represent a year-over-year increase compared to January 2017. New security fixes for the widely used Oracle Database Server are also expected to involve the Java Virtual Machine.

Categories: Technical

I am Guilty of Agile Training

Tue, 01/16/2018 - 5:01pm

Over Christmas I was thinking, reflecting, drinking…

Once upon a time I was asked by a manager to teach his team Agile so the team could become Agile. It went downhill from there.

Categories: Technical

Rust for Java Devs: Creating Variables

Tue, 01/16/2018 - 5:01pm

I’m going to do something different today and write about Rust instead of Java. This is something that I want to give a try, and if it all goes well, I will continue writing some posts about Rust in the future.

I will be writing about learning Rust from the perspective of a Java developer by making comparisons where appropriate to help you (and me) understand what is going on. These will most likely be shorter posts and, honestly, might not even contain that much information — but hopefully, someone finds these sort of posts helpful and makes it all worth it.

Categories: Technical

Browser Rendering Optimization

Tue, 01/16/2018 - 5:01pm

In one of our recent projects, we had to develop a few games using web technologies, but we were limited by the computation power of the client machines (the games would have been used in a chromium-based browser).

To get a better idea about this, the final setup was pretty much similar to what a 90s' game console would look like.

Categories: Technical

Using AI to Build Smarter Traffic Models

Tue, 01/16/2018 - 3:02pm

City planners already receive significant amounts of data about traffic flows, but congestion is still a problem that blights many cities today. A team from the Texas Advanced Computing Center (TACC), the University of Texas Center for Transportation Research, and the City of Austin believes that AI can help to optimize traffic flow.

Their work is developing searchable traffic analyses using deep learning and data mining. The tool uses the raw data generated from traffic cameras, with their algorithm capable of recognizing the various objects in the footage and then characterizing how those objects move and interact. This information can then be queried by traffic planners to better understand the transport network.

Categories: Technical

Top 5 Hidden jOOQ Features

Tue, 01/16/2018 - 3:01pm

jOOQ's main value proposition is obvious: type-safe embedded SQL in Java.

People who actively look for such a SQL builder will inevitably stumble upon jOOQ and love it, of course. But a lot of people don't really need a SQL builder — yet, jOOQ can still be immensely helpful in other situations through its lesser-known features.

Categories: Technical

API Consumer-Contract Tests and Test Doubles With Karate

Tue, 01/16/2018 - 3:01pm

Karate recently crossed 500 stars on GitHub and has been very well-received, even starting to feature in job postings as a desired skill. Not bad, given this project is just ten months old!

Test Doubles

One of the features in the works (and close to being released) is the ability to spin-up test-doubles to “mock” a web-service API dependency that may still be in development — or for which a test-environment may be unavailable or unstable. This is a significant pain-point for many teams — and “flaky integration tests” are legendary sources of pain for many a platform team dealing with micro-services.

Categories: Technical

Spring Boot and Apache Camel

Tue, 01/16/2018 - 2:02pm

As the world of software moves on, more complex systems are being developed, which have to integrate with each other. It started with SOA and it continues with microservices.

Camel is the number one integration tool that comes to my mind, since, nowadays, Spring Boot with Camel is a very strong combination.

Categories: Technical

Angular 2 Architecture

Tue, 01/16/2018 - 2:02pm

In this article, we shall see the building blocks in an Angular Application.

Module

Angular applications are modular in nature. Therefore, an Application is just a collection of individual modules.

Categories: Technical

Second-Order Remote File Inclusion (RFI) Vulnerability Introduction

Tue, 01/16/2018 - 2:02pm

The main difference between a Remote File Inclusion (RFI) vulnerability and a second-order one is that in a second-order RFI, attackers do not receive an instant response from the web server, so it is more difficult to detect. This is because the payload that the attacker uses to exploit the vulnerability is stored and executed at a later stage.

Exploiting a Second-Order Remote File Inclusion Vulnerability

Imagine a website that allows users to submit links through a web form. These submissions are later reviewed by a moderator, on a control panel that directly adds the remote content into the page. If an attacker manages to use the form to submit a remote website containing a dangerous payload, this payload will be executed once the moderator opens the page.

Categories: Technical

Effective Java 3rd Edition: A Must-Read for Every Developer

Tue, 01/16/2018 - 1:01pm

Joshua Bloch finally updated his popular book Effective Java for Java 7, 8, and 9. The previous edition was one of the most popular books among professional Java developers, and I couldn’t wait to finally read the updated 3rd edition.

I got this book two weeks ago, and it more than fulfilled my expectations. It is packed with best practices and detailed descriptions of the finer details of the Java language. Every developer should at least read the chapters about generics and lambdas.

Categories: Technical

Test Automation: The Need to Get More Focused in 2018

Tue, 01/16/2018 - 1:01pm

New and emerging technologies are changing the dynamics of software development and testing. New tools and fresh approaches are needed to make the software much more robust and market-ready. It impacts the way in which software products are developed and tested on the QA front. Software testing is no more an isolated function, as it needs to effectively collaborate with development teams to build high quality and error-free software.

Test automation has been a great enabler in the software development process, especially to build sound software at super speed. Speed with the right blend of quality has been one of the greatest strengths of test automation. We have been witness to the fantastic performance of licensed as well as open source test automation suites/frameworks. The best part is, these tools and automation platforms have evolved and progressed with the kind of requirements and challenges the industry has posed.

Categories: Technical

An Introduction to OKR: Objectives and Key Results

Tue, 01/16/2018 - 1:01pm

Objectives and Key Results (OKR) is a popular leadership process for setting, communicating, and monitoring goals and results in organizations on a regular schedule, usually quarterly. The intent of OKRs is to link organization, team, and personal objectives in a hierarchical way to measurable results or outcomes, focusing all efforts to make measurable contributions.

Why OKRs Are Important

In a Harvard Business Review survey, only 55% of middle managers can name one of their company’s top five priorities. When the leaders charged with explaining strategy to their people are given five chances to list their company’s strategic objectives, nearly half fail to get one right. This isn’t anything new. Andrew Grove first wrote about Objectives and Key Results (OKR) in his book High Output Management (1983) stating “A successful MBO system needs only to answer two questions: Where do I want to go? How will I pace myself to see if I’m getting there?”

Categories: Technical

Multi-Tenant Cloud vs. Single-Tenant Cloud: An Important Choice

Tue, 01/16/2018 - 1:01pm

Whenever we discuss cloud adoption with enterprise companies curious about making the move, one of the first questions is, which is better: public cloud or private cloud? Cloud adopters want to know which approach is most likely to give them better performance, greater flexibility, stronger security, and lowest cost to operate.

While these are important requirements, they miss a critical issue: So you want to share your cloud with others? If you’re working towards an effective cloud adoption strategy, you’d be wise to consider whether you want a multi-tenant or single-tenant cloud offering.

Categories: Technical

Quick Guide to Database Technologies

Tue, 01/16/2018 - 11:02am

Database technology has seen rapid developments in the past two decades. Online analytical processing (OLAP), which gained prominence in the 1990s, gradually lost altitude in favor of in-memory databases at the start of the 21st century.

However, the requirements of modern business intelligence have set a challenge that in-memory databases will have a very difficult time responding to. This, in turn, has brought on the next generation of databases and querying: in-chip analytics. This newly developed technology makes use of the CPU, RAM, and disk storage in innovative ways in order to tackle the complexity and size of datasets that current BI software is forced to handle in order to provide effective insights to end users at a reasonable timeframe.

Categories: Technical

Introduction to Azure Data Lake

Tue, 01/16/2018 - 11:02am

This article is related to the general architecture of Azure Data Lake. I hope it will be a good foundation to start with Azure Data Lake. The article is a representation of my understanding of Azure Data Lake. In the coming days, we are going to be posting more advanced articles on this.

Before jump into Azure Data Lake, we have to understand the concept behind a data lake.

Categories: Technical

Access All Contacts Using the Content Provider Concept in Android App Development

Tue, 01/16/2018 - 11:02am

In the Android system, applications are not allowed to directly access other applications' internal data. The Android framework enforces a robust data sharing model: Content Provider. Also, a helper class is needed for this purpose: this is Content Resolver. The Android.Content package contains these classes for accessing and publishing data. A content supplier is a holder of special content, it gives well-defined APIs to read, insert, update, and delete that data. The content provider can internally use any place to store its data, like a local file, local database, or some remote service. The Content Resolver is responsible for finding the correct content provider. The Content Resolver decides which provider to use based on the URI. The Content Resolver and Content Provider classes work together to ensure secure access to other applications’ data. In this blog, we will learn how to access all contacts from our phone with the help of the Content Provider and display a phone number with a name in a text view.

Purpose

Access all contacts from the Contacts app of the Android system and show it to a text view label.

Categories: Technical

Dynamic Rule-Based Decision Trees in Neo4j

Tue, 01/16/2018 - 11:02am

A few posts ago, I showed you how to build a boolean logic rules engine in Neo4j. What I like about it is that we’ve pre-calculated all our potential paths, so it’s just a matter of matching up our facts to the paths to get to the rule and we’re done. But today, I am going to show you a different approach where we are going to have to calculate what is true as we go along a decision tree to see which answer we get to.

Yes, it will be a bit slower than the first approach, but we avoid pre-calculation. It also makes things a bit more dynamic, as we can change the decision tree variables on the fly. The idea is to merge code and data into one, to gain the benefit of agility.

Categories: Technical

Spring Boot: Integrating With Bootstrap and jQuery Using Web Jars

Tue, 01/16/2018 - 11:02am

This guide will help you create a simple web application with Spring Boot. We will add the dependencies for Bootstrap and jQuery web jars. We will create a simple JSP view using jQuery and Bootstrap.

You Will Learn
  • How to bootstrap a simple project with Spring Initializr.
  • How to initialize a basic web application for Spring Boot.
  • How to add a JSP to a web application.
  • How to add web jars to jQuery and Bootstrap.
  • How to create a simple view using jQuery and Bootstrap.
Tools You Will Need
  • Maven 3.0+ is your build tool.
  • Your favorite IDE. We use Eclipse.
  • JDK 1.8+
Overview of the Web application

We will build a static todo page (un-formatted) rendered using a JSP.

Categories: Technical