jamie street 368704 unsplash - RXJS ERROR HANDLING
Angular, Reactive

RXJS ERROR HANDLING 

Errors are first class citizens in reactive programming. The error flow is adopted as a valid case of all observables. This is an essential and great feature but also one of the less understood parts. In this post we explore some of the most common…

fancycrave 342526 unsplash - GENERIC JENKINS FILE
CI/CD, Cloud

GENERIC JENKINS FILE 

What if you have multiple projects all having similar Jenkins file? (If not, you can follow this post to create one or more) Is there a way we can template this so can maintain this file in one place? Turns out there is. We need…

alex machado 435966 unsplash - DOCKER ON JENKINS
CI/CD, Cloud, Docker

DOCKER ON JENKINS 

A lot of companies use Docker to unify their build process. Here we show how to set up a Jenkins pipeline using Docker. First follow my older post JENKINS ON MINIKUBE to get your own Jenkins instance running on minikube. Simple test application We need…

claudia ramirez 1134444 unsplash - MULTIPLE GIT USERS
Freelance, Git

MULTIPLE GIT USERS 

Ever wanted to commit something with a different git user? Here are some strategies. Switch git user for one repository Suppose you checkout a repository for a different customer where you have a different git user. To set the user for this new repo use…

annie spratt 723013 unsplash - UPGRADING TO ANGULAR 7
Angular

UPGRADING TO ANGULAR 7 

Let’s begin with the basics. From Angular 6 upgrading Angular versions can be done with the cli. This makes life a lot easier: Rxjs Angular 7 uses RxJS v6.3 so update RxJS: Typescript Angular 7 supports Typescript v3.1 so here we go again: Other libraries…

chase clark 509092 unsplash - MOVE A GIT REPOSITORY
Git

MOVE A GIT REPOSITORY 

This week we moved our git repositories to a new platform used in the company. This operation is simpler than a move from say SVN to git. Still here are some points not to overlook. Copy The actual copy is straight forward some commands: Notes…

daiga ellaby 154936 unsplash - ANGULAR VIEWCHILD
Angular

ANGULAR VIEWCHILD 

When you want to control a child component, directive or DOM element from its parent component, you can use the ViewChild decorator in Angular. ViewChild returns the first element that matches a give child component, directive or DOM element and updates it if the reference…

freestocks org 728031 unsplash - GIT CHERRYPICKING
Angular, Git, Java

GIT CHERRYPICKING 

Ever been in the situation where you want a change from another branch but not all? I did… and ended up merging everything and reverting all the things I didn’t need. Turns out git has a command for this! Git cherry-pick You can take any…

jordan harrison 1208586 unsplash - RXJS FLATTENING
Angular, Reactive

RXJS FLATTENING 

From functional programming we all know map and flatmap. With reactive programming just flattening is not enough information. We have to make a decision about what to do when either observable emits the next element of completes. We have the following choices: mergeMap — deciding not to…

erico marcelino 235177 unsplash - ANGULAR 6 TREE SHAKING
Angular

ANGULAR 6 TREE SHAKING 

Working in reasonably big companies for the last years I’ve come across big Angular projects. As you would expect these were modular projects consisting of a bunch of modules. One of the things I never took in consideration was ‘tree shaking’. Tree Shaking Tree shaking…

andrew seaman 547770 unsplash - SPRING BEAN LOADING ORDER
Java, Spring Boot

SPRING BEAN LOADING ORDER 

Spring beans are not always loaded in the same order. The Spring container has freedom in the way beans are loaded and even in the smallest projects the order changes. One of the restrictions is a direct dependency between beans via the @Autowired annotation. In the following…

markus spiske 771011 unsplash - NPM PEER DEPENDENCIES
Angular

NPM PEER DEPENDENCIES 

Comming from the java world I realised npm resolves dependencies differently than for example maven. Maven demands one unique version of a dependency amongst who depend on it. This sometimes results in a so called ‘dependency hell’. NPM depencendy tree In contrast to maven, npm…