How to use Google Optimize A/B test tool in a React SPA Application

Hello everyone. How to install and use google optimize with React + Typescript in a SPA ? I will teach you today how to use Google Optimize A/B test tool in a SPA (Single Page Application) architecture, for example while using NEXTJS like in my case. First install the script by just adding

before including google analytics script. By...

String encoding challenge solution

Description Given a non-empty string, encode the string such that its encoded length is the shortest. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note: k will be a positive integer and encoded string will not be empty or have extra space. You may assume that the input string contains only lowercase English letters. The string’s length is...

String decompression challenge solution

I am sharing my solution in Java to one of the former Google interview questions, which is posted by Google itself here: https://techdevguide.withgoogle.com/resources/compress-decompression/ I am copying the description below just in case the original link gets removed, and without it the solution will not have any meaning. The Challenge In this exercise, you’re going to decompress a compressed string. Your...

Functional programming in C

Before explaining how to implement functional programming in C, I will explain shortly what functional programming is. What is functional programming? Functional programming is a way of building software by composing pure functions, avoiding shared state, mutable data and side effects. Pure functions Pure functions are those functions which always return the same result, for the giving arguments and do...

Lessons learned from The Innovator’s Dilemma book

“The Innovator’s Dilemma” book by Professor Clayton Christensen is one of the best books I have read regarding disruptive technologies and how can the management of established companies handle them properly since their early stages. I will share in this post my main takeaways from the book. The book explains the effects of disruptive technologies in the hard drive industry,...