Use a Pencil: How a Java Developer Gets Stuff Done
Blog: Oracle BPM
When Java Champion Mani Sarkar talks about technology, you think, “I’ll have what he’s having.” The prolific writer, speaker, and Java and JVM-based developer is a vibrant member of the London Java Community (LJC) as well as a passionate backer of open source projects such as Adopt OpenJDK. Although his day job focuses on strengthening teams, his interests include improving code quality and performance, implementing DevOps and machine learning, and more.
Talking to Sarkar about productivity means tapping into the mother lode. Here is just a sampling of the many ways he suggests improving your Java code and learning new technology more effectively.
Deep Work
“These days I take a lot of inspiration from the book Deep Work by Cal Newport,” says Sarkar. “Getting into the flow of working or coding isn’t hard at all. The idea is to shut yourself off from the outside world and distractions, timebox your tasks, take breaks, and be disciplined about not breaking this discipline. Cal Newport has a lot to say about how to do this. He calls it deep work, as opposed to the shallow work we all are used to doing. Developers must aim for and do deep work as much as possible.”
As any good programmer knows, you also improve productivity—and prevent ergonomic strain—when you memorize keyboard shortcuts instead of clutching at the mouse or clawing the trackpad. Sarkar recommends using an IntelliJ plugin called Key Promoter (see Figure 1) to keep track of how often you reach for menu options instead of typing equivalent keyboard shortcuts. “You can configure the plugin to keep track of how often you use the mouse to select the menu option, and if you cross that limit, it will nag you each time,” he says. “It also helps you create a shortcut for menu options if there isn’t one already.”
Sarkar has several favorite productivity-enhancing tools:
- Tab Shifter is for splitting the IntelliJ screen into vertical or horizontal tabs and switching between them.
- Spacemacs combines the best of the Vim and Emacs editors.
- Censum is for finding JVM-based program memory leaks.
- Snyk is for vulnerability testing of public GitHub repositories or websites.
- Sarkar offers his own curated resources for polyglot Java running on the GraalVM virtual machine.
- Java Flight Recorder and Java Mission Control are for understanding how your app and the JVM are behaving. Both are included in the JDK, so no additional download is necessary.
Learning Java
Sarkar is passionate about the future of cloud native Java and is currently exploring serverless computing and systems for containerized deployment, including Docker, Apache Mesos, CoreOS rkt, and SmartOS containers. “The JVM language Clojure is a great example of simplicity and compactness,” he says. “In fact, functional programming language concepts tout simplicity all the time.”
But what if you’re still learning Java or learning to be a better Java developer? Sarkar recommends attempting to solve katas, a concept that developers have enthusiastically borrowed from the Japanese martial arts world. The Gilded Rose refactoring kata, for example, has become an extremely popular exercise that hones the skill of writing more-elegant problem-solving code.
The most contagious aspect of Sarkar’s approach is how, in a fashion befitting a programmer, Sarkar has taken a step back from the problem of learning Java to contemplate what learning means. “Your brain indexes knowledge when you are resting,” he says, “so sleep and rest let the brain index away. Don’t overload. Instead, interleave: Fill the gaps, and learn incrementally and iteratively.”
- Follow the Oracle Developers blog
- Learn about Java Champions
Leave a Comment
You must be logged in to post a comment.