How to Support Java 6, 8, 9 in a Single API

With jOOQ 3.7, we have finally added formal support for Java 8 features. This opened the door to a lot of nice improvements, such as: Creating result streams try (Stream<Record2<String, String>> stream = DSL.using(configuration) .select(FIRST_NAME, LAST_NAME) .from(PERSON) .stream()) { List<String> people = stream.map(p -> p.value1() + " " + p.value2()) .collect(Collectors.toList()); } Calling statements asynchronously (jOOQ 3.8+) CompletionStage<Record> result = ...

Read More »

SWT ScrolledComposite Explained

Like a friend of mine once put it, SWTs ScrolledComposite is a nasty beast. And to some point I do agree. This is likely the reason why there are so many questions asked about how to use this widget. But its not only the authors of the ScrolledComposite to blame. When a piece of software doesn’t work the way you ...

Read More »

Scalable I/O: Events- Vs Multithreading-based

Everything begins with a refresher reading of my fundamental papers – yes, I use a set of papers and books as reference material. This paper is titled: “Why Events Are A Bad Idea (for high-concurrency servers)“, by Rob von Behren at the time of writing a PhD fellow at Berkeley [18]. Von Behren opens with: “Event-based programming has been highly touted ...

Read More »

Simple Event Driven design

Overview Developers often ask about the performance or efficiency of a system or their code. What does this really mean? My code is so efficient, only a coding god could understand how it works. My code is really clever but unmaintainable. The next developer will re-write it anyway. My code is really efficient for the machine, but inefficient for the ...

Read More »

2 Android Studio productivity tips you MUST know

This post will handle frequent tasks one usually do in Android Studio: Modifying layout XML files Observing logcat output If you do that actions, make sure you aware of the below tips. Modifying layout XML files When modifying XML layout files, one has to decide the ultimate decision: Which view to use – Design or Text view? Design view provides you a good visual presentation ...

Read More »

Converting Markdown to PDF or DOCX with Pandoc

Markdown is a popular text formatting syntax among developers these days. Popular Sites like Github or Bitbucket use Markdown for project documentation and various other types of user generated content. These sites automatically convert markdown syntax to HTML, so it can be displayed in a browser. However, maybe you want to use Markdown as document format without using a platform ...

Read More »

Don’t Hate The HATEOAS

java-interview-questions-answers

Or How I Learned to Stop Worrying and Love the HATEOAS REST has become the defacto, or at least vogue, solution to implementing web services. This is understandable because REST offers a level of self-documentation in its utilization of the HTTP specification. It’s durable, scalable, and offers several other desirable characteristics. However many so-called RESTful services don’t implement HATEOAS (Hypermedia ...

Read More »

jcmd: One JDK Command-Line Tool to Rule Them All

I have referenced the handy JDK tool jcmd in several posts in the past, but focus exclusively on its usefulness here like I have previously done for jps. The jcmd tool was introduced with Oracle’s Java 7 and is particularly useful in troubleshooting issues with JVM applications by using it to identify Java processes’ IDs (akin to jps), acquiring heap ...

Read More »

Java Tip of the Week #7 – Maven Slow?

This week Java Tip of the Week is a follow up of last session about Maven. The first video covered aspects related to Maven Dependencies. This video will cover some techniques to speed up your Maven build. Maven Slow? Since Maven 3, you are able to run your builds in parallel. Depending on the build machine and the project structure, ...

Read More »