add functionality to a Java class without polluting its hierarchy with a common superclass

M-am lovit de problema asta, unele workflow-uri sa trimita mesaje de GDPR,

– Favor composition over Inheritance

– Inheritance
Toate clasele Workflow care vor sa aiba behaviour-ul asta in puls, sa extinda DefaultWorkflow si sa faca chestia aia in pulus

– Composition
– Behavior-ul asta in plus sa fie adus de un adaptor Class,

– Sau inca o abordare,
“if you want to add some sort of functionality to Java classes without polluting their hierarchy with a common superclass, consider creating a separate interface just for this one utility method.”
https://zeroturnaround.com/rebellabs/java-8-best-practices-cheat-sheet/

see the Debuggable example

Create Native Linux Apps from a WebPage

For work we use 1Password, and they don’t have an App for Linux.
So using this tool I was able to create a ‘Native’ app for Linux.

Nativefier

https://github.com/jiahaog/nativefier

Details on how to do it
https://discussions.agilebits.com/discussion/comment/337240/#Comment_337240


Install nativefier:
npm install nativefier -g

Run
nativefier --name "1Password" --disable-context-menu --disable-dev-tools "https://.1password.com/"

JavaScript Essentials: Objects

https://codeburst.io/javascript-essentials-objects-56373a1a6bfb

In this blog I have found a clear explication for the this in JS

What is This?

I’m literally referring to this in JavaScript. This is perhaps the part of JS that confuses people the most.

This — a variable created by JavaScript that points to an object.
this is created when an execution context is created ( i.e running a function )

1. We understand this is an object given to us by JavaScript when a function is run.

2. What determines the object this points to? That depends on how the function is called.

  • Implicit Binding — if the function is called with a containing object then this refers to that object. i.e person.greet
    When a function is called as a method of an object, that function’s this argument is set to the object the method is called on.

Intro Machine Learning

Here is my very basic intro/understanding of Machine Learning.

Wes Reisz once said at a Company Meeting, something like: ML is data analysis, extracting hidden/new facts from the data

Then we have a similar definition from
What is Machine Learning? (AI Adventures)

ML is using data to answer questions.

The 7 Steps of Machine Learning (AI Adventures)

—–
View at Medium.com

Machine Learning – Algorithms whose performance improve as they are exposed to more data over time


– The program instructions are not fixed. They program can adjust his instructions based on the data is working on.
– So we have a feed-back system, data feeds back into the program, and the program evolves