The Hitchhiker's Guide to GitHub: 13 Java Projects You Should Try
A wonderful collection of projects to check out for code samples and seeing the power of Java in action.
Join the DZone community and get the full member experience.Join For Free
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
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.
democratic or republican? display relationships with a chord diagram
5. small big data
tablesaw is an in-memory data table, that includes 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 2m 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.
search and download
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 takipi . 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
Published at DZone with permission of Henn Idan, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.