Friday, May 12, 2017

Thursday, May 11, 2017

NGINX HTTP server

"NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.
NGINX is one of a handful of servers written to address the C10K problem. Unlike traditional servers, NGINX doesn’t rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture ..."
https://www.nginx.com/resources/wiki/

Tuesday, April 11, 2017

Summary of Interface Enhancements

Summary of Interface Enhancements

  • Constants (until Java 1.7)
  • Method signatures (until Java 1.7)
  • Nested types (until Java 1.7)
  • Default methods (since 1.8)
  • Static methods (since 1.8)
  • Private methods (since 1.9)
  • Private static methods (since 1.9)

Thursday, March 16, 2017

Abstract vs. Interface in Java8

While member variables of an interface are explicitly public and final, an abstract class does not sanction their members about access modifiers ...
https://dzone.com/articles/java-interface-vs-abstract-class

Wednesday, December 7, 2016

REST API Best Practices

"If they are used as POST mediumgameapi.com/getaccounts, it gives the feeling that our objective is contradicting the URL structure.
Hence, it is assumed to be better to have it in nonverbal format. For example, if it is mediumgameapi.com/accounts, it can be preceded with any HTTP methods like ... "

Wednesday, November 30, 2016

REST with Spark

"Spark focuses on being as simple and straight-forward as possible, without the need for cumbersome (XML) configuration, to enable very fast web application development in pure Java with minimal effort..."
http://sparkjava.com/documentation.html

Java Type Inference

"Type inference is a Java compiler's ability to look at each method invocation and corresponding declaration to determine the type argument (or arguments) that make the invocation applicable. The inference algorithm determines the types of the arguments and ..."
http://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html

Monday, November 28, 2016

Java9 Jigsaw

"So what is a module?
Describing a module is actually quite simple – it is a unit of software that declares the answers to three questions about itself in a file named module-info.java:
  • What is its name?
  • What does it export?
  • What does it require?"
More info here: https://blog.codecentric.de/en/2015/11/first-steps-with-java9-jigsaw-part-1/

Friday, November 11, 2016

Wednesday, November 9, 2016

Friday, October 28, 2016

The CAP Theorem

"The easiest way to understand CAP is to think of two nodes on opposite sides of a partition. Allowing at least one node to update state will cause the nodes to become inconsistent, thus forfeiting C. Likewise, if the choice is to preserve consistency, one side of the partition must act as if it is unavailable, thus forfeiting A. Only when nodes communicate is it possible to preserve both consistency and availability, thereby forfeiting P. The general belief is that for wide-area systems, designers cannot forfeit P and therefore have a difficult choice between C and A. In some sense, the NoSQL movement is about creating choices that focus on availability first and consistency second; databases that adhere to ACID properties (atomicity, consistency, isolation, and durability) do the opposite. The "ACID, BASE, and CAP" sidebar explains this difference in more detail."

Read more here: https://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed

Moving to Erlang&NoSql ...

https://www.infoq.com/articles/key-lessons-learned-from-transition-to-nosql?utm_campaign=rightbar_v2&utm_source=infoq&utm_medium=articles_link&utm_content=link_text

Speedment framework


Pre Java 8:

List<Hare> hares = session.createQuery("SELECT h FROM Hare h", Hare.class).getResultList();
for (Hare hare : hares) {
  if (hare.getId() == 1) {
    System.out.println(hare.getName());
  }
}


With Java 8 aware Hibernate 5.2:
List<Hare> hares = session.createQuery("SELECT h FROM Hare h", Hare.class).getResultList();
hares.stream().filter(h -> h.getId() == 1).forEach(h -> System.out.println(h.getName()));



With Speedment
hares.stream().filter(h -> h.getId() == 1).map(Hare::getName).forEach(System.out::println);



??? what happened?
How could that work ?!! Where is the query ?!

“In the Speedment framework, the resulting SQL query is the responsibility of the framework. Thus, a program leveraging Speedment does not use any explicit query language. Instead, all the data operations are expressed as a pipeline of operations on a stream of data and the framework will create the SQL query.

See more here:


Tuesday, October 25, 2016

Java 8 / Collection.removeif()

... Java 8 introduced the removeIf method as a default method [...] in the Collection interface. This new method 'removes all of the elements of this collection that satisfy the given predicate'

https://dzone.com/articles/towards-more-functional-java-using-lambdas-as-pred?edition=233183&utm_source=Spotlight&utm_medium=email&utm_campaign=java%202016-10-25

Wednesday, September 14, 2016

Meaningful Names

I agree that "a name is too long, ONLY when a shorter name exists that equally conveys the same behavior"
"One difference between a smart programmer and a professional programmer is that the professional understands that clarity is king. Professionals use their powers for good and write code that others can understand." (from Clean Code)
... a good summary of Meaningful Names: http://www.itiseezee.com

Friday, August 5, 2016

Is java community aging faster than other languages?


"Although the question was asked in the context of the past year, the biggest change to the Java ecosystem over the past few years is that the Java community is aging faster than other language camps due to a lack of interest or training in Java among our newest programmers"


https://dzone.com/articles/biggest-change-to-the-java-ecosystem-new-blood

Refactoring?! Just do it ...


couldn't agree more:

https://dzone.com/articles/dont-talk-about-refactoring-club

Understanding the Developer ...

... nice article about the stereotypes Developer and Manager

https://dzone.com/articles/technical-leadership-in-software-companies

Thursday, October 15, 2015

The Scale Cube

X axis: Scale by duplication (load balancer etc.)
Y axis: Functional decomposition (micro services)
Z axis: Data partitioning

http://microservices.io/articles/scalecube.html

Thursday, September 17, 2015

Never forget about Right-BICEP

Right - Are the results right?
B - are all the boundary conditions correct?
I - can you check the inverse relationships?
C - can you cross-check results using other means?
E - can you force error conditions to happen?
P - are performance characteristics within bounds?

Friday, May 29, 2015

Core Kanban Principles

Kanban is Japanese for “visual signal” or “card.” Toyota line-workers used a kanban (i.e., an actual card) to signal steps in their manufacturing process. A picture is worth a thousand words for scientific reasons: The brain processes visual information 60,000 times faster than text. Kanban helps you harness the power of visual information by using sticky notes on a whiteboard to create a “picture” of your work. 
Four Core Kanban Principles:
1. Visualize Work
2. Limit Work in Process: By limiting how much unfinished work is in process, you can reduce the time it takes an item to travel through the Kanban system.
3. Focus on Flow: improve the smooth flow of work, collect metrics to analyze flow, and even get leading indicators of future problems
4. Continuous Improvement: Teams measure their effectiveness by tracking flow, quality, throughput, lead times and more

Reas more here: http://leankit.com/kanban/what-is-kanban/

Wednesday, April 8, 2015

How to refresh Materialized Views

CREATE MATERIALIZED VIEW my_view_1
   TABLESPACE ...
   REFRESH FAST NEXT sysdate + 7
   AS SELECT * FROM ...;
"The statement does not include a START WITH parameter, so Oracle Database determines the first automatic refresh time by evaluating the NEXT value using the current SYSDATE. A materialized view log was created for the employee table, so Oracle Database performs a fast refresh of the materialized view every 7 days, beginning 7 days after the materialized view is created."


CREATE MATERIALIZED VIEW my_view_2
   TABLESPACE ...
   REFRESH START WITH ROUND(SYSDATE + 1) + 11/24
   NEXT NEXT_DAY(TRUNC(SYSDATE), 'MONDAY') + 15/24
   AS SELECT * FROM ...;
"Oracle refreshes this materialized view tomorrow at 11:00 a.m. and subsequently every Monday at 3:00 p.m." 


http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_6002.htm