Java

Showing 19-27 of 70 results
EngineeringIcon ChevronTechnology

Genetic Algorithms: Search and Optimization by Natural Selection

By Eugene Ossipov

Many problems have optimal algorithms developed for them, while many others require us to randomly guess until we get a good answer. Even an optimal solution becomes slow and complex at a certain scale, at which point we can turn to natural processes to see how they reach acceptable results. In this article, Toptal Freelance Software Engineer Eugene Ossipov walks us through the basics of creating a Genetic Algorithm and gives us the knowledge to delve deeper into solving any problems using this approach.

9 minute readContinue Reading
EngineeringIcon ChevronBack-end

Write Fat-free Java Code with Project Lombok

By Miguel García López

Java has some idiosyncrasies of its own and design choices that can make it rather verbose. While Java is a mature and performant programming language, developers frequently need to write boilerplate code that bring little or no real value other than complying with some set of constraints and conventions. In this article, Toptal Freelance Software Engineer Miguel García López shows how Project Lombok can help dramatically reduce the amount of boilerplate code that needs to be written in a Java application.

13 minute readContinue Reading
EngineeringIcon ChevronMobile

Android Threading: All You Need to Know

By Eliran Goshen

Android provides many ways of creating and managing threads, and third-party libraries exist to make that even easier. However, with so many options, choosing the right approach can be quite confusing. In this article, Toptal Freelance Software Engineer Eliran Goshen discusses some common scenarios in Android development that involve threading and how each of the scenarios can be dealt with.

15 minute readContinue Reading
EngineeringIcon ChevronBack-end

A Unit Testing Practitioner’s Guide to Everyday Mockito

By Ivan Pavlov

Using Mockito is not just a matter of adding another dependency. It requires changing how you think about your unit tests while removing a lot of boilerplate. In this article, we cover multiple mock interfaces, listening invocations, matchers, and argument captors, and see firsthand how Mockito makes your tests cleaner and easier to understand.

22 minute readContinue Reading
EngineeringIcon ChevronBack-end

A Guide to Robust Unit and Integration Tests with JUnit

By Joshua Hayden

Automated software tests are critically important to the long-term quality, maintainability, and extensibility of software projects, and for Java, JUnit is the path to automation. While most of this article will focus on writing robust unit tests and utilizing stubbing, mocking, and dependency injection, Toptal Software Engineer Josh Hayden will also discuss JUnit and integration tests.

19 minute readContinue Reading
EngineeringIcon ChevronBack-end

How Hibernate Almost Ruined My Career

By Grzegorz Gajos

Are you building the next big thing? Planning to become the next Facebook or Google? Are you at the point of making fundamental decisions that will stay with you for the entire project? There is a good chance that you will pick a robust language like Java. If so, you want to pick the best object-oriented abstraction of your flexible data model because you don’t want to deal with plain SQL. You want to support all kinds of data and ideally, support all kind of databases. If so, there's only one right choice for you: Hibernate. Freelance Software Engineer Grzegorz Gajos explores some possible scenarios where things can go wrong using Hibernate.

10 minute readContinue Reading
EngineeringIcon ChevronMobile

Meet RxJava: The Missing Reactive Programming Library for Android

By Christopher Arriola

Implementing applications that deal with complex concurrent behavior has always been a challenging aspect of programming. Various paradigms exist that promise a solution to this problem in different ways. RxJava is a Java library that enables Functional Reactive Programming in Android development. It raises the level of abstraction around threading in order to simplify the implementation of complex concurrent behavior. In this article, Toptal Freelance Software Engineer Christopher Arriola gives us a detailed walkthrough of RxJava and how it fits into the realm of Android development.

12 minute readContinue Reading
EngineeringIcon ChevronBack-end

10 Kotlin Features to Boost Android Development

By Ivan Kušt

Kotlin is a new, expressive, general-purpose programming language powered by the same virtual machine technology that powers Java. Since Kotlin compiles to the JVM bytecode, it can be used side by side with Java, and it does not come with a performance overhead. In this article, Toptal Freelance Software Engineer Ivan Kušt gives us a walkthrough of 10 major features of Kotlin that help avoid boilerplate code and, more importantly, save time.

16 minute readContinue Reading
EngineeringIcon ChevronBack-end

Java in the Cloud: Continuous Integration Setup Tutorial

By Matko Šuflaj

More than two decades ago, Java shook the world with its "Write once, run anywhere“ slogan. Today, Java developers have at their disposal a whole set of tools, such as Spring Boot, Docker, Cloud, Amazon Web Services, and Continuous Delivery, to take development and delivery to a whole new universe. In this article, Toptal Freelance Software Engineer Matko Šuflaj presents all these technologies and guides us through a step-by-step tutorial on how to build a small microservice and prepare it for continuous integration in the cloud.

18 minute readContinue Reading

Join the Toptal® community.