Author Archives: guedebyte

Simple and small success with Angular and Type-a-head

Simple and small success with Angular and Type-a-head

Sometimes, small things are very satifiying and enjoyable, and this one is such a thing.

The setup / probleme / situation…

You have this field, where you can select a user for your application. The behavior should be simple. You type the start of the first name and…. voilà all user are available as a drop down. If you use Angular 11 and Material Design, your code for the HTML will look like this:

<mat-form-field class="recipientSearch">
<input type="text" placeholder="Suche..." matInput formControlName="recipientSearch" [matAutocomplete]="auto" />
<mat-autocomplete #auto="matAutocomplete" (optionSelected)="select($event)">
<mat-option *ngFor="let recipient of filteredRecipients | async" [value]="recipient"> <div class="namePicker"> <img class="avatar" [src]="getProfileImage(recipient) | async" (error)="getAltPicture($event)" /><span class="nameEntry">{{ recipient.displayValue }}</span> </div>

2 Things to mention here:
– formControlName=”recipientSearch” means that we have in our controller a FormControl that is bound to the input field
– *ngFor=”let recipient for filteredRecipients | async” tells you that there is an observable with the result of the some service involved.

On the controller (typescript) side is the following code inplace:

this.recipientSearch.valueChanges.subscribe((value) => {
if (value === '') {
this.filteredRecipients = of([]);
} else {
this.filteredRecipients = this.userService.searchRecipient(value);

Very simple code. If a value is changed in the recipientSearch, we will get informed and we do call the userService to searchRecipient. And there we do some simple stuff and call the MS-Graph API via httpClient. Something like this here:

const graphUsersEndpoint = '';

searchRecipient(search: string): Observable<User[]> {
const searchQuery = graphUsersEndpoint + "?$filter=startswith(displayName,'" +

search + "') or startswith(mail,'" + search + "') or startswith(surname,'" +
search + "')";
return this.httpClient.get<User[]>(searchQuery).pipe(map((val: any) => val.value));

Not huge rocket science.. be aware to set the Bearer token correct (thats something for another blogpost). But there is an issue here. This pattern leads to building unused Oberservables. Let me show you with some slight code modification, what I mean:

I’m logging each generation of the Observable, with the following result in the console:

Searching for John to find John Doe results in 4 Observables and based on my type speed and the Angular Componente Lifecycle, up to 4 calls to the Graph API will be made. To make this visible, I’ve changed the following code:

With the correspondig result:

But how to eliminate this unwanted calls? Is there a way to delay or debounce my keyboard entries? You wont believe, but the solution is very simple and charming:

This simple construct of .pipe(debounceTime(500)) has a huge effect on the value that is provided via subscribe. Inside the pipe, debounceTime acts as puffer that delays the output for 500ms if no new value is coming thru the pipe. Saying this, with my normal type speed, I get the following console output:

Simple, charming and very effective. A good reason to understand Observables, pipes and the pipe operators from RxJS.

1 Comment

Posted by on February 1, 2021 in OpenNTF


If you use Prettier in Visual Studio Code and Angular Projects….

Prettier is a very cool and nice tool for Visual Studio Code. It helps me to format my code in a nice way. But a change to the core of Prettier has driving me crazy in searching for the cause…. and a solution…

I’m a fan of single quotes in my Typscript files. So TSlint is configured and Prettier is also configured to support me. But there was a change in the core of Prettier to support also .editorconfig. A file that exists in many of my Angular projects. The change in Prettiers core is now to ignore all my Visual Studio Code Settings for Prettier, once .editorconfig exists.

The good news… Prettiers support some ideas mentioned at .editorconfig’s GitHub Page. And in this particular case the new value quote_type = single. I’ve to update all my projects now… but this is a good solution to go. I hope the Angular Team will implement this setting in the creation process of a new Angular project.

Leave a comment

Posted by on November 29, 2019 in Development


Tags: , , ,

Learning and some explorations

Machine learning and cognitive computing is dominating in todays IT world everything. A long time, I had the impression that this is too much rocket sciences for my brain, and specially the part with big data did distract me. But as usual, when you start to dig into a topic, you figure out that the rocket sciences is already done and the basic are easy to consume. Or in other words: There are giants and you can stand on their shoulders!

But there is also another component that did get my attention. Once I did understand the basic about a neutral network, I figured out that there are so many interesting books beside IT-related stuff about learning, that I already head read and they became relevant. Ono of my favorite is Daniel Kahnemanns, Thinking: Fast and Slow. Btw. this book is easy to read but very interesting, and this not always the case with authors that earned the Nobel Prize! Daniel Kahnemann is describing how we learn and that when we achieve a certain maturity in learned topic, our thinking is becoming incredible faster. Let me explain this with an example:

Shift gear! In Switzerland the most care are manual cars. So one of the first thing, you have to learn is how to shift gear. I remember very clear, how I did train this. Doing with full attention the complete sequence. But after I while, it became more common and then, I didn’t even have to think about it. It changed from a thing I’ve done with a huge effort to an effortless “no brainer”.

Kahnemann state in his book, that you can achieve this maturity of effortless “no brainer” in your core expertise. So writing Java code is a no brainer, but I’m currently learning TypeScript, that need more my attention.

But what are we doing with our brain, while we do the training? We are using our own neural network, to learn pattern and recognize patterns. Once we have learned the pattern (which could be a sequence of action to shift a gear, or writing Java Code), our brain switches back from learning to executing. Using the “programmed” neural network. And this network is in execution incredible fast! And with the execution, we are getting even more maturity in what we are doing. Now combine this knowledge with the observation that Kathy Sierra is presenting here:

(I know I did already share this, but it’s so cool…)

But here is the point. Machine learning has a lot to do with how we are learning. So it is important to understand our learning approaches. And it leads us to a next observation: we are not continuously learning. Once we have achieved a certain maturity, we do execute very fast, and we need some kind of reflection to review if the stuff we have learned is still accurate. And maybe we have to train our neural network for the next challenge.

But let me share some observation and let my play a bit a prophet.

  1. We will see that trained neural networks will come to devices, we could not imagine and there the networks will “ennoble” data and support fast decisions.
  2. We will build feedback loops (In human terms: reflection and reviews) to train and improve this networks, but we will split the workload for training and execution. Training will be done in huge data center, while the execution of a network will be as near as possible to the point where data are measured /happens
  3. We will see that trainings will start depend on “trained” basic functions. Like letters to words to sentences.

But there is another thing, I’m observing: My son Simon and my son David have different learning approaches. Simon is the trial and error type of learner. When he learned to walk, he did stand up and tumble until he did get it. David is the “I can’t until I can” type. Means he is NOT training him self with trail and error. He did not stand up and tumble. He did stand up and start walking. He did not train to say words, he started to talk.

There must also be a way, how you can jump over this “trail and error” phase, direct to success. Means learning could be more “effort less”.  And this last thing, I want to share. David is not in school, he cannot read, but he is a passionate “Ticket to Ride” Player. A game where you have to “read” locations and build connections between locations by acquiring the routes. So his neural network is capable to recognize the pattern of city names, combine them to the spoken city name, without reading the letter. That’s very cool, and that’s what computers also doing 🙂

And as always

Have Fun!

(Because Fun is the best precondition to learn)


Leave a comment

Posted by on July 27, 2017 in ThinkTank


Tags: , ,

OpenSky Computing

In today’s world, everybody is talking about the Cloud. If people talk about Cloud, they are talking in the most case about the location where data are processed and stored.

In the mean time, while the “common” people are adopting the concept of Cloud Computing, Fog Computing or Edge Computing is the new upcoming term. Fog Computing is a concept that seems to be driven by the IoT Movement. Fog Computing brings the power of data refinement to the sensors. For several reasons:

  1. There is a huge amount of data that could be processed before they are transmitted to the cloud
  2. Processing the data on the device / sensors gives you the capability to intercept and react in the right moment!
  3. It reduces the amount of data that has to be transmitted to the cloud and processed in the cloud.
  4. It limits also some security issues.

But is Fog Computing the final solution? It will implement a lot of new problems, that the cloud has solved. One of them is “How to have all my sensor updated with the most recent release and machine Learning algorithm”. This will bring us to the point, where we have to start to think about Cloud Computing as a delivery model rather than a location.

Cloud as a location, will never solve the data residency issues. And to be honest the current political movement stands not for openness, but more for protection of your data and business processes. In a time where the economic war country against country has restarted, data residency is becoming more important. But not only this is a major impact. The Cloud as a delivery model has a bright future. The change to a micro service based approach in cooperation with a containerized delivery model, will let software vendors deliver their solution in the same easy way as it is to deploy the same code to their Cloud.

But we need OpenSky Computing. Why OpenSky Computing? I will try to illustrate it. When I heard the first time about Cloud Computing, my first word association was “rain” but not only rain, storm and disaster came also a cross my mind. Having my data and processes somewhere in the Cloud (Cloud as a location) was and is still scary. But to make the things more complex, Fog Computing is coming. Fog… sorry in the Fog you get lost! Cloud, Rain, Storm, Fog, disaster, NO NO NO. We need clarity! We need an OpenSky, where we have light on our data, business logic and processes. But even more, if we want touch the stars, Clouds and Fog prevent us to see the sky.

I know,  a great game with word associations, but think more about this. Cloud is a great delivery model and helps to reduce the cost of development and deployment. Fog / Edge Computing helps us to refine data at the moment when they are happening. I saw at the EnterJS (@enterjsconf) Conference JavaScript code executing a neural network in the browser (by @CarmenPopoviciu). And here is the point, not the training was done in the browser, only the trained network was executed in the browser. Now think the next step. We can train neural network on big machines and once they understand the domain, we can distribute the trained network to small devices….

… and all in my body is crying: If software is becoming such a huge impact on our life, we need clarity what is happening where! OpenSky Computing should solve this problem and give you back the power of choice. No matter what service you want to use, you should be capable to define the location where the service is execute, as you should be capable to define the data residency. And at your fingertip, you should be able to tell where are you data, processes and business logic.

Time to dream about stars!

1 Comment

Posted by on June 24, 2017 in ThinkTank


The IBM Domino Developer Edition – It’s coming in Q3 – finally ;)

Antwerp – Engage, 1st Day: What an important announcement, there will be a free for non production use licence of the latest and greatest IBM Domino Server. No time bomb and the only limitation is the usage. The purpose of this licence is very simple: Developers of all kind and nature are getting access to the huge ecosystem of IBM Notes/Domino/XPages Application Development.

With this announcement, a dream comes true: It’s about equality and same possibilities comparing with any other development platform. This removes the barriers for young students to choose IBM Domino as their developement platform. If you want to give Domino / XPages a try, here you are, no costs, no limits.

Some may say – It’s too late! Probably yes, but the way how the world of app development has changed, to todays micro service focused way of doing things with containers and NodeJS in the middle of all thinking, would happen anyway. I believe it’s not too late. It is right on time: We have millions of Notes Applications out there, serving a good job to their users. Some of them need only some kind of a face lifting and a transformation to become a micro service. And of course, they should be accessible via Web browser and become integrable in today’s world.

With the announcement, we are capable to get the right people on board to do this job. Because any application in today’s world that serves a good job to the business has a price less value, no matter how complex they are! And now think about this: There is a project out there on OpenNTF (called SmartNSF) to help you preserve the Business Logic of a Notes Application and expose it as a REST API. The “only” thing that has to be done is defining this API in a single file and building a new accurate Web UI! But even think more… This approach encapsulate your NSF to a micro service with a huge business value.

But for this we need Developers with knowledge of IBM Domino and the market with this huge amount of Notes Application is big. Even companies which have left IBM Domino since years (to another mail platform) do have remaining applications. Rebuilding such applications from scratch is because of the amount of work and knowledge, the time and the available money nearly impossible! Why not transforming them to a micro service?

But for today one point of the bucket list is done. The following are remaining:

  1. Docker Support for IBM Domino (only the support, the community knows how to do it)
  2. Authentication Framework which extends the DSAPI Filter do a OSGI Container
  3. Application based running licence (like XWorkServer)


Have Fun!


Leave a comment

Posted by on May 11, 2017 in OpenNTF


Watson Workspace & Work Services needs Code, Code, Code, Community, Code, Code and even more Code and Community….

IBM has give us glimpse of their plans for the future. IBM has understand the power of conversation. Everything mankind has ever done is based on conversation. Ideas, Research, Progress, Contracts, Family, Love and even Dispute, Conflicts and Wars are based on Conversation. Conversations are the base of our human being. You can believe it or not, but God himself use conversation as part of his creation process. God speaks and thing happens. And so we do to. We speak, make plans and then things happens. But Conversation is a chaotic process. Sometimes it follows some rules, but that’s not the nature of conversation. Imagine computer could follow our conversation, could summaries, could give us advises what kind of action we have to do to fulfill our plans. How powerful would this kind of cognitive capabilities be.

Having BigData and the capability to analyse this data is great. Making strong decision based on this result, also great and needed in our world. But understanding conversations…. that’s a complete different story. And IBM has made the first move to enter to this story by releasing the Preview of IBM Watson Workspace. And with the release of IBM Watson Workspace, we as Developers became also access to the public API. And as Developers, we ask always for documentation, and yes there is documentation. But take a look at the following conversation that Paul Withers and I had during developing our first prototype:

slack-watsonThe fun part was, that all the info that I gave to Paul came to me by two approaches.

  1. I had read the documentation
  2. I had tinkered with the API and found the solution by myself

But I’ve als to give credits to Luis Benitez who convinced my with his explanations that the way I’ve done it, was the right way. My learning curve and also Paul’s Learning curve where part of a conversation and also part of a community approach.

To unleash the power of Watson Workspace its a must to have a community. Watson Workspace is not “another chat tool”, it should become the place where conversations happens and conversations can be analyzed with the cognitive capabilities of Watson Work Services.

But how to build a community? Do we have to multiply the conversation that Luis, Paul and I had? Writing Blog Posts? What is the UNIQUE and UNIVERSAL Language of an Open Source Community? You wont belief. It’s Code. Code, Samples, Snippets. Code is one of the purest form of conversation. If you write a Unit test, you express yourself what you expect to see that your code will do. To learn an API, we do not need to understand all the concepts and Ideas at first, we need simple, nice and well designed code.

Lets start to build code! Let’s start build a community! Here is my first code sample in Python:

Have Fun



One last thing. Watch this video and try to understand why I want to be more focused on providing code:

Leave a comment

Posted by on October 28, 2016 in Community, Development, IBM, Java, OpenNTF


XPages Designer Plugin 4 Eclipse – The Basics!

First, and please keep it in mind, I’m talking about XPages. Nothing more, nothing else. Some years ago, in an open discussion between the XPages Community and the XPages Development Team, we agreed that it would have a huge value, to have a XPages Designer which is based on the latest and greatest Eclipse Release and can be installed as Plugin / Addon.

But where to start? Try to make the IBM Domino Designer loadable from Eclipse? Extract the relevant Plugins from the IBM Domino Designer and make them installable? Or? All this approaches seems to be a pain. So I started to RETHINK the whole stuff.

What does the IBM Domino Designer make, when he has to build an XPages Application?

  1. Convert all XPages / CustomControls to Java Files
  2. Compile all Java Files to classes
  3. Attach all the results in the .NSF Files on the right place

You think this is too simple? Things are become complex without our help 🙂 But let’s assume that this is the way how the IBM Domino Designer builds the XPages Stuff. If you want to proof it, open a Notes Application in the navigator view in the IBM Domino Designer and you will find the following:


Adminsettings.xsp becomse (xsp Package) and then Adminsettings.class & Adminsettings$AdminsettingsPage.class

So how does the IBM Domino Designer this? And is there some special knowledge needed to figure this out? I try to explain it with a simple example. The XPages is an XML file, which describes the combination of Components. Lets assume we have in that file the component . The IBM Domino Designer parse this file and will hit the tag. Based on the xp the IBM Domino Designer searchs all Plugins that are responsible for the XP prefix. If you build your own Plugin, you have to specify an own namespace, like wgcpoi. wgcpoi holds all tags for POI4XPages. But lets go on with the xp:panel. It will figure out which plugin is responsible and the .xsp-config file in the plugin describes what with a panel tag has to be done. It will figure out that a panel tag is hold be a component and it will also give back the name of the class that is responsible for the xp:panel.

With the knowledge of the class name, the IBM Domino Designer build a function that creates a UIComponent (the root of all components) and instantiate the class like this

private UIComponent createPanel(....) {
         UIPanelEx panel = new UIPanelEx();
         return panel;

For each property that is defined in the XML there is a corresponding setter defined in the .xsp-conf. This is the way how the designer builds the Java .class. I know it sounds simple, but there is some more complexity.

Now this class is be compiled and then the whole package is stored in the .NSF.

Already open sourced!

The fun part now is, that the transformation of .xsp -> .java is already open sourced. It is in the XPages Bazaar available.

XPages Designer Plugin 4 Eclipse

Based on all this I’ve builded an Eclipse Plugin that does the following:

  1. Build an NSF like project structure
  2. Transform .xsp -> .java
  3. Compile .java -> .class
  4. Build a .xpjar of all the files and publish this to a IBM Domino Server with some build instructions

On the IBM Domino Server runs a Plugin that receives the .xpjar File (via http) and does

  1. Parse the build instructions (JSON)
  2. Access or create the target Database
  3. Loop thru the .xpjar and produce the neede “Note” Documents in the NSF to store the produced and compiled files.

While I get you some Insides now, I’m working on the first Alpha release. All I’ve pointed out works like a charm, but the preparation of the environment is not “Alpha” ready. But stay tuned 😉

And have fun




Posted by on April 2, 2016 in Java, OpenNTF, XPages


Building NSF using the maven headlessdesigner plugin from OpenNTF

Building NSF using the maven headlessdesigner plugin from OpenNTF

Sometimes I think it would be good to have an assistant who does finalize all my tasks. Specially the tasks, I was not aware that I did not deliver all information to the community. And what a shame, one of my most favorite project was such an unfinished business. The real bad thing was, I didn’t blog about how to use all the code I’ve developed while I was last time in Ireland to meet my friends at IBM.

But a nice blog post by Eric McCormick ( reminds me about my duties. Now Eric, time to explain you how simple you can build full XPages Applications with the headlessdesigner-maven-plugin:

The Project Setup

I’m using the JUnit4XPages Project to explain how to build the example database with the headlessdesigner-maven-plugin. This project is fully mavenized and uses the tycho plugins to build the plugins, feature and the updatesite. The project is with a parent – child structure organized. The following stuff in the parent is relevant for the building of the XPages Application:


ddehd.designerexec and ddehd.notesdata are in this example “externalized” to the environment variables notes-designer and notes-data. Both values are import to invoke the headlessdesigner-maven-plugin. With mvn clean install -Dnotes-designer= -Dnotes-data= can the build be customized.


There is an additional profile, which is only executed if the notes-designer variable is seted. This has the good behavior, that the NSF is only build, if you have specified the location of your IBM Domino Designer. The module org.openntf.junit.odp is with purpose at the end of the  sequence, because we need the updatesite first.

The org.openntf.junit.odp contains in the sub directory “on-disk-project” the on-disk representation of the NSF, which means all the code. This Code need the org.openntf.junit.xsp.feature installed on the IBM Domino Designer environment to build. This is the reason, why we build the updatesite before.

The headlessdesigner-maven-plugin supports the deployment of the feature. The pom.xml for org.openntf.junit.xsp.odp looks like this:


ddehd.odpdirectory points to the on-disk-project. Pro Tip: Take this in a subdirectory otherwise the IBM Domino Designer eats your pom.xml ;).

ddehd.targetdatabasename contains the name of your resulting database. is used to build a timestamp that matches the format of the feature.

feature.url points to the file location of the updatesite. This is very powerful, because you can also point to a URL and I think also to a p2 repository. This means for XPages Application, you are capable to point to all the updatesites of the dependencies you have (yes there is a reason why every new plugin project at OpenNTF should have a p2 repository, and why we push them on the website, more about this later)

feature.version calculates the current version number. We are using for this the org.codehouse.mojo / build-helper-maven-plugin

In the plugins section is the org.openntf.maven / headlessdesigner-maven-plugin with all additional configurations. I want to point to the features / feature block, where you can define all the features that has to be installed for the headless designer to be able to build your application.

templateBuildNames and templateBuildVersion is a powerful add-on from Jesse Gallagher and results in the following information on the database:2016-03-26_22-14-32

With all that configurations, I’m now able to start the build direct from my eclipse


And it will build the full project:


Done…. (btw. the headlessdesigner-maven-plugin is available in the maven central repository, no installation needed for this, only the IBM Domino Designer must be installed).

Have Fun!



Posted by on March 26, 2016 in Java, Maven, OpenNTF, XPages


A developers dream – for sure

OpenNTF is in the middle of his biggest transformation since the beginning. Core of the this transformation is building communities around visions, problems and projects. This needs communication…. Continious communication, a flow of questions, answers and ideas.

But how to communicate continuously, several topic’s, restricted content, open content, and involving everybody who is interested to become a part of this community? I the middle of this storm of changing culture and using technology, Jesse discovers “by accident” slack. We (Jesse and I) decided to register, to get some experience and figure out if slack would help us.

2 weeks later, after some testing, which includes also the integration of our Atlassian suite, it was clear – a developers dream. Mulit channel / topic and content federation… how wonderful.

But how to on board as many people as possible. At this point, Declan Lynch came on the plan and pointed to A node.js project with an auto deploy to Heroku. But Heroku offers a free offering with 6h downtime in 24h. Sorry, not an option and to be honest, that has not looked like the next challenge I want to conquer.

But Declan explained that this is a node.js app, it could also run on IBM Bluemix….. And YES I’ve a IBM Bluemix Account. But node.js? And how to give this “Slackin – Thing” some parameters during the startup?

As a good conditioned Java Developer, my first step was to download the needed eclipse plugin. Go to IBM Bluemix, build a new Organisation and then create a node.js app. Not a boilerplate, only the runtime.

Next step was creating a JavaScript Project in Eclipse, configure the IBM Bluemix Server, Change the ProjectFacet to node.js, assign the project to IBM Bluemix Server. And….. nothing happens, but hey it didn’t crash the whole Bluemix Environment 😉

Let’s go to github and clone the slackin project. I copied the files, including all Licence stuff to my project and all was pushed directly to IBM Bluemix. But the application fails to start…. I did expect this, but how to give this node.js program the variables? (Yes, I’m a bit a newbie about node.js…)

Let’s open the IBM Bluemix console and take a look there. What’s that, there is a point called environment variables. Let’s give it a try. I’ve defined the 2 parameters with the name that was given in the app.json in the IBM Bluemix Console, filled them with the accurate values and restarted the app……

…. And wow, IT WORKS. How cool is that. No Plan of node.js, using an OpenSource project from github, no installation of any server and the application is running in less than an hour. Okay thats definitely also a developers dream.

The integration on the OpenNTF Page was done some Minutes later and look at this:


And now join and following the OpenNTF Community.

Leave a comment

Posted by on December 1, 2015 in OpenNTF


Another nice journey with Maven – or how to sign a jar file

Yes I love Maven, for sure. Maven gives you the capability to build project everytime the same and in every environment. I often explain Maven as a brilliant facility manager, who is able to put all the build, test, package and delivery instruments togehter and then build all the stuff according to your building instructions.

But what if I have to sign a JAR file with a code signer certificat? And this certificate is owned by another company, and they will not provide this certifacte to me. How can I setup a project with Maven that let me build and sign the project by a selfsigned certifacte, while my customer other my build server can use the code cert?

First step…

I need a selfsigned code certificat in a keystore. Read the following tutorial on how you can do this Add this keystore now to the project. My keystore is named awfstore

Once we have done this, let the Maven project know that we want to sign the jar file by adding the following snipped to the build section in the pom.xml.


We are using the “maven-jarsigner-plugin”. The configuration is done by some variables, starting with “sign.”. The values for this variables are definied in the properties:


You can build now the project and it will sign your project with the certificat awf from the awfstore. Replace this values, with your values. But how can we achieve that a Buildserver like Jenkins or Atlassian Bamboo can use other values?

Add the following definition to your pom.xml:


This will activate the Profile compSignerKeyStore, which will override the variables with new settings. This settings can be placed in the setting.xml of your Buildserver or of any developer. It can looks like this:


Have fun


Leave a comment

Posted by on November 26, 2015 in Java, Maven, OpenNTF