Finding which version my jar was compiled

All

Well, a quick hint here.

I was doing some tests with a pre-compiled jar and an older version of java. But I didn’t know which version specifically it was compiled – javaassist.jar

To solve this mistery then:

# jar xf javassist.jar

# cd javassist/

# file Loader.class

Result: Loader.class: compiled Java class data, version 51.0 (Java 1.7)

 

1.7 Therefore, we are all good.

jmap -permstat estimation – pt 1

All

Intro

Reading about some issues with jvm here and I found that recently that jmap is actually an estimation based on <sizes for the different types of data a classloader loads>

jmap

Jmaps is used to verify several memory statistics from the jvm. I mean, it’s quite useful.

This tutorial is very helpful btw

jmap failure

Sometimes this estimation might fail quite a bit as in this case.

sun.jvm.hotspot.tools.PermStat.computeSize:

private long computeSize(InstanceKlass k) {
  long size = 0L;

  // the InstanceKlass object itself
  size += k.getObjectSize();

  // Constant pool
  ConstantPool cp = k.getConstants();
  size += cp.getObjectSize();
  size += objectSize(cp.getCache());
  size += objectSize(cp.getTags());

  // Interfaces
  size += arraySize(k.getLocalInterfaces());
  size += arraySize(k.getTransitiveInterfaces());

  // Inner classes
  size += objectSize(k.getInnerClasses());

  // Fields
  size += objectSize(k.getFields());

  // Methods
  ObjArray methods = k.getMethods();
  int nmethods = (int) methods.getLength();
  if (nmethods != 0L) {
     size += methods.getObjectSize();
     for (int i = 0; i < nmethods; ++i) {
        Method m = (Method) methods.getObjAt(i);
        size += m.getObjectSize();
        size += objectSize(m.getConstMethod());
     }
  }

  // MethodOrdering - an int array that records the original
  // ordering of methods in the class file
  size += arraySize(k.getMethodOrdering());

  return size;
}

I think it worth doing part two about this.

REFs

 

Intro to BPM – pt 1

All

Trend

It has gradually become common within organizations and is already considered by many managers and professionals in several areas as a worldwide trend, this is BPM.

BPM

BPM is an acronym for Business Process Management. It is a discipline, a methodology of work with practices aimed at transforming the company through the management and optimization of its work processes, improving the organizational performance. Therefore it is neither a tool nor a software.

Processes are the basis of work in BPM, they are any activity or set of activities that takes an input, adding to it a value, and provides output generating a valued product. Then in a process are known the steps to be followed, the sequences in which they will occur, the people (or profile) involved in all the activities and the final product to be produced.

Harrington summarizes well the role of the process in a company: “Processes use the organization’s resources to deliver objective results to their customers” (Harrington, 1991).

All process has a flow, with beginning, processing and end. To help visualize this flow and still create a design pattern, the BPMN was developed, a a symbology and normative for process modeling, but this topic will be discussed in a new post.

 

-Gabriel A.

Angular Directives (ng-app)

All

Intro

I remember working with JS and using Angular framework, back in 2014/2015, and it was quite interesting to use the ng-app directive. But I actually never saw what was behind this directive on the html.

Angular directives – ng-app directives

Actually, after seeing the init function, we verify that you can use more than one directive to start Angular framework. Be careful though, some validators DOES NOT RECOGNIZE ALL THEM. – if that’s the case, please declare a namespace

<html xmlns:ng="http://angularjs.org" ng-app>

Init Function

This function takes the following names (angular directives)

    names = [‘ng:app’, ‘ng-app’, ‘x-ng-app’, ‘data-ng-app’]

REFs

inline

Container-based application design

All

Intro

I just realized that I actually never wrote about Openshift here.

OpenShift

This a platform as service, PaaS, above IaaS and below the application, with Kubernetes and Docker. It is based in OpenShift Origin community project.

Container based Paper

The original paper, they explains several principles regarding the design of software for cloud based containers.

I think we can get the main points, which should not be ignored:

• Aim for small image

• Support arbitrary user IDs.

• Mark important ports.

• Use volumes for persistent data.

• Set image metadata.

• Synchronize host and image.

Container based Patterns

The paper I think is very much complemented by the Container based patterns, presented in the end

> Module Container

> Adapter

> Sidecar /Sidekick patterns

> Container chains

(I love this presentation btw, Matthias is very funny and left the url’s for the photos in the end).

Reviews

Actually it is interesting this site , trust radius, that brings reviews about productions.

REFs

inline

Conscript/foundweekends/

All

Intro

I was reading this weekend about SSL and security protocols that I got catch with Conscript and how it’s so interesting.

But I also got in contact with foundweekends and their goals to teach programming the weekend.

Conscript

Conscript is this security protocol developed by google. According to them, Conscript is

   <<Java Security Provider that implements parts of the Java Cryptography Extension and Java Secure Socket Extension >>

 

foundweekends and here

And here too

It’s this cool group to teach programming during the weekend. Very cool, nice materials too.

 REFs

inline

Jai Guru Deva Om – जय गुरुदेव ॐ

All

Intro

Well, first of, I really hope this जय गुरुदेव ॐ means actually what I’m thinking it is. It might not be, so yeah, bear with me on this one.

Friday = Beatles

So, when I used to work at Voith back in Sao Paulo, 2012, I remember that all the Fridays were special days, i.e. Beatles day. It’s the day we only listen to their songs. My boss that time, Renato C., aka campix, used to explain stories about each one of the songs, including this one – Across the Universe[1].

Although I left Voith to pursue my career in Canada, I still remember to play Beatles on Fridays’ evenings. It’s kind of a connection to the past and good memories. Also, it reminds me of a good friend that it’s no longer nearby.

Jai Guru Deva Om means I give thanks to Guru Dev.

REFs

[1] https://www.youtube.com/watch?v=R_ApBrVJD48