12 September 2019

Difference among JVM JRE JDK

JVM = responsible for executing the java program line by line hence it is also known as an interpreter.

JRE = JVM + Lib classes

JDK = JRE + Dev Tool


10 September 2019

Visitor Pattern

Two simple examples are taken from github repo about Visitor pattern:


The Visitor drops by:

  • The Visitor must visit each element of the Composite; that functionality is in a Traverser object.
  • The Visitor is guided by the Traverser to gather state from all of the objects in the Composite.
  • Once the state has been gathered, the Client can have the Visitor perform various operations on the state.
  • When new functionality is required, only the Visitor must be enhanced.

From: Head First Design Patterns.

1. https://github.com/devwebcl/simple_design_patterns/tree/master/visitor-pattern/src/main/java/com/iluwatar/visitor









2.  https://github.com/devwebcl/simple_design_patterns/tree/master/visitor-pattern/src/main/java/com/behavioural/visitor




References:


  1. https://github.com/chirey/designPatternsThoughtsCode
  2. https://github.com/iluwatar/java-design-patterns/tree/master/visitor



Java Threads API Evolution

After searching again for this cool article: https://howtodoinjava.com/java/multi-threading/java-multi-threading-evolution-and-topics/

Here there is a summary of Threads evolution through the years:

JDK 1.0

java.lang.Thread
java.lang.ThreadGroup
java.lang.Runnable
java.lang.Process
java.lang.ThreadDeath

JDK 1.1

The Thread.stop, Thread.suspend, and Thread.resume methods are deprecated as of JDK 1.1.

JDK 1.2 and JDK 1.3 

had no noticeable changes

JDK 1.4

There were few JVM level changes to suspend/resume multiple threads with single call.

JDK 1.5 

was first big release after JDK 1.x; and it had included multiple concurrency utilities. Executor/ExecutorService, semaphore, mutex, barrier, latches, concurrent collections and blocking queues;

JDK 1.6

was more of platform fixes than API upgrades.

JDK 1.7 

added support for ForkJoinPool which implemented a work-stealing technique to maximize the throughput. Also, Phaser class was added.

JDK 1.8 

is largely known for Lambda changes, but it also had few concurrency changes as well. Two new interfaces and four new classes were added in java.util.concurrent package e.g. CompletableFuture and CompletionException.

The Collections Framework has undergone a major revision in Java 8 to add aggregate operations based on the newly added streams facility and lambda expressions; resulting in a large number of methods added in almost all Collection classes, and thus in concurrent collections as well.

JDK 9

JEP 266: More Concurrency Updates defines an interoperable publish-subscribe framework for reactive streams, enhancements to the java.util.concurrent.CompletableFuture class, and various other improvements.



08 September 2019

06 September 2019

05 September 2019

Haskell Quick Syntax Reference

Technical reviewed:

© 2019
Haskell Quick Syntax Reference
A Pocket Guide to the Language, APIs, and Library
Authors: Nita, Stefania Loredana, Mihailescu, Marius

https://www.apress.com/gp/book/9781484245064


04 September 2019

Introducing Markdown and Pandoc

Technical reviewed:

Introducing Markdown and Pandoc: Using Markup Language and Document Converter Paperback – August 20, 2019
by Thomas Mailund

https://www.apress.com/gp/book/9781484251485


03 September 2019

02 September 2019

WebAssembly in Action

Technical reviewed:

WebAssembly in Action
With examples using C++ and Emscripten

Gerard Gallant
November 2019 ISBN 9781617295744 448 pages

https://www.manning.com/books/webassembly-in-action


Blog Archive

Disclaimer

Qux