We’ve gathered some practical and simply cool Java repositories on GitHub
There are a lot of repositories on GitHub. Some you’ll want to fork, some might help you with your own code and some were made to help you learn a little more about programming. Either way, there’s a lot to see and not enough time to use it all.
In the following post we’ve collected some of the most interesting and useful Java repositories that caught our attention in the past couple of months. May the fork be with you.
— Takipi (@takipid) June 30, 2016
Finding a Needle in a Repo
GitHub, the git repository hosting service, serves 15 million developers from around the world, collaborating across 38 million repositories. 330,550 repositories are Java. To put it in simple terms, GitHub has heaps of information from legions of developers.
These can include code that’s relevant to your current project, or a simple game made to help you with other programming languages. It doesn’t matter what you’re looking for, you’ll probably find hundreds of it, and that’s the real problem.
That’s why we decided to lend you a hand on your quest for finding repositories, so you’ll at least know where to start.
1. Minimal Java Simplicity
Bootique is a minimally opinionated technology for building container-less runnable Java applications. This project allows you to create REST services, web apps, jobs, DB migration tasks and more, built on modules. That way, you’ll be able to run them like simple commands.
The goal behind this project is to liberate apps from Java container, and let developers reclaim their main() method. There’s a bonus – there are a few built-in commands, so if you don’t have that much code, or if you don’t import any modules to your app, you can still use Bootique to execute them.
2. Elegant Problem Solving
The name says it all: 99-problems. As you can guess, it’s a collection of problems, made to help you practice your skills in logic programming. You can choose to solve the problems using Java 8, Scala or Haskell, and your final goal is to find the most elegant solution possible.
If you’re a puzzle master – don’t worry. There are different levels of difficulty, each with a time frame that range from 15 minutes to a few hours. No one will check how long it actually took you to solve each problem, but it gives you a basic idea how long you should spend on it.
If you’ve managed to solve these 99 problems, you might be up for another challenge. You should check out our puzzle minigame for developers: Java Deathmatch. In case that you’re stuck, the solutions are right here, but hey! No peeking.
3. String Manipulation
Strman-java repository is a Java 8 library, made for working with String. As you can understand, it’s pretty straight forward. Since it’s available on Maven, all you have to do is add a dependency to your build tool of choice.
If you’ve used Kik (the extension for Node.js) and heard about the leftPad crisis when it was taken down, you’d love Strman’s option to return a new string of a given length such that the beginning of the string is padded.
Other than that, you’ll find a list of functions that includes appending strings to values, get the character at a certain index and return an array with strings between start to end, and many more.
4. Data Explorer
If you want a cool way to interact with your data, you should check out Dex. With it you can extract, transform and visualize your data, while also get predictive capabilities. You can publish your visualizations in 3D or any other HTML variable you’d like.
Dex lets you generate over 50 different visualization patterns that include world maps, engagement timeline, network usage and more. You can integrate it with a running instance of R, and tap into complex statistical analysis and predictive analytics.
5. Small Big Data
Tablesaw is an in-memory data table, that include data tools and a column-oriented storage format. It’s designed around the idea that no one needs distributed analytics for smaller tasks, and you can work interactively with a 2B row table on a single server.
You can use Tablesaw to apply rules in order to determine display presentation layout, data priority, or adds a range of extensions to give users control over data display and interaction. With it you can import data from RDBMS and CSV files, add and remove columns, perform map and reduce operations or store tables in a compressed columnar storage format.
6. Key Value Store
Chronicle Map is an in-memory key-value store. It’s designed for low-latency and/or multi-process applications, such as trading and financial market applications. This repository targets median latency of read and write queries, and lets you write queries that scale well up to the number of hardware execution threads in the server.
The primary use cases here are for replacing slower key-value stores when used within a single server (like Redis), or replacing similar JVM-centric solutions to speed them up. You can also move parts of your application state out of the Java heap and reduce heap size and GC pressure.
7. Load Investigator
Gumshoe lets you monitor your application performance statistics. With it you can pinpoint lines of code, and get statistics which are associated with a call stack and individual stack frames. This means that you’ll be able to analyze your resources usage (TCP, UDP, filesystem or processor utilization).
This repository allows capturing, filtering and visualizing statistics as they are generated, and gives you intuitive views of flame and root graphs. If you’re looking for something a little more specific in your application, you can also filter stack frames at capture and/or during visualization, and change them while they’re running.
8. Java Music
SoundSea lets you search and download songs, with their metadata and album art built in. When you search for a certain song, SoundSea looks for the relevant metadata and album art on iTunes, and presents it to you. If there’s more than one song available, you can search for the right one.
The song itself is downloaded from Pleer.com, and you can filter through high, low, or VBR bit-rates. If you’re feeling lucky, you can even configure it to instantly download the first search result. It’s also a mini-player, so you can simply listen to the song without overloading your music library.
9. Detect Your Leaks
LeakCanary is an open source library, made to help you stop your memory leaks. You can use it to detect memory leaks in Java (and Android) in your debug builds. As written on their GitHub page, “A small leak will sink a great ship.” (-Benjamin Franklin).
After you’ve set LeakCanary up, you can configure it to automatically show a notification when an active memory leak is detected. Another possible use is setting up smart pins in order to detect if certain collectibles have been garbage collected or not.
10. Multi Dimensional Arrays
ND4J is an open sourced library, that brings intuitive scientific computing tools from the Python community into JVMs. It’s made for production environments, so it runs fast but with the minimal RAM requirements. With it, engineers get an easy way to port algorithms and interfaces into other Java and Scala libraries.
The main features this library offers are versatile n-dimensional array object, multiplatform functionality including GPUs and linear algebra and signal processing functions. It integrates with Hadoop and Spark and its API mimics the semantics of Numpy, the popular Python math library.
11. Monitor Java
It doesn’t matter which monitoring tool you’re using, Automon combines the power of it along with AOP (AspectJ) to declaratively monitor your Java code, the JDK, and dependent libraries. It works with known monitoring tools such as JAMon, JavaSimon, Yammer Metrics, StatsD along with logging libraries, that include perf4j, log4j, sl4j and others.
Automon is typically used to track method invocation time and exception counts, storing and displaying the data inside your tool of choice. You should be aware that it’s not doing any monitoring on its own, but serves as a middleman between the “what should I monitor” and the “how am I monitoring it”, but it could still be of great use to you.
Another cool tool you can try for production monitoring is OverOps. With it you’ll be able to know when and why your code breaks, see all of your exceptions and get the full stack, source and state for them.
12. Take Care of Your Java
Jvm-tools, or SJK, is a set of tools for JVM troubleshooting, monitoring and profiling. It’s a command line tool, that exploits standard diagnostic interfaces of JVM (such as JMX, JVM attach and perf counters), while adding some more logic on top in order to be useful for common troubleshooting cases.
This library allows pooling thread CPU usage of target JVM and periodically report to console, report information about GC in real time and get basic sample profiler capabilities. In it you’ll also find tools to do basic operations with MBean from command line, and dump all MBeans of target java process to JSON.
13. Best Java EVER
Meet awesome-java. It’s a curated list of awesome Java frameworks, libraries and software. If you’re not sure what to choose, this is the list you should check out. It’s even filtered into different categories, so you’ll know what to focus on.
You can find ancient tools that are still in use, frameworks that ease bean mapping, tools which handle the build cycle and dependencies of an application and libraries to manipulate bytecode programmatically.
This is just the tip of the GitHub iceberg, and we’re sure there are plenty more projects that can help pass the time or pump up your code. If there’s something we’ve missed and you feel it has to be on the list, drop us a line below.
Main image credit: Inspectocat by Jason Costello, GitHub