Front-End

Adding Polyfills in TypeScript App

A polyfill is code that fills in functionality missing from the older browser. For example, Internet Explorer does not have Promise like other modern browsers. In this case, we can use a promise polyfill so that the code that uses Promise can work in IE. There are two ways of …

Front-End

Troubleshooting Promise Polyfill Not Working as Expected

I had an interesting problem with Promise Polyfill to make promise and finally work on IE11. The page has multiple JS bundles. The existing JS bundles all had Promise polyfill from older version of core-js (babel-core@7.0.0-bridge.0). import ‘core-js/es6/promise’; Then, I added another JS bundle with the latest Promise polyfill. The …

Front-End

IE11 Support for amazon-connect-chatjs

I recently built a chat widget that supports Amazon Connect Chatbot with amazon-connect-chatjs. It turned out the library does not support IE11 (see the issue I raised here). The good news is that if we add polyfills, we can make it work. AWS will probably update the library with IE …

Front-End

How to Bundle Audio File into JS App

By using the HTML audio element, we can embed sound in documents. When your app in running in a server, we can add audio files and refer to the paths in the audio element’s src attribute. What if you are creating an JS bundle that can be injected into a …

Front-End

Resizing Image for Frontend with Python

We can optimise the load time by using different image sizes for different screen widths. There is no point in loading a huge image for a mobile when the width is only for 200px. Here is the quick Python script to resize images. By changing the array, you can output …

Data Engineering

Sending XML Payload and Converting XML Response to JSON with Python

If you need to interact with a REST endpoint that takes a XML string as a payload and returns another XML string as a response, this is the quick guide if you want to use Python. If you want to do it with Node.js, you can check out the post …

Data Engineering

Sending XML Payload and Converting XML Response to JSON with Node.js

Here is the quick Node.js example of interacting with a rest API endpoint that takes XML string as a payload and return with XML string as response. Once we get the response, we will convert it to a JSON object. For this example, we will use the old-school QAS (Quick …

Sitecore

How to Configure Synonyms in Solr

To improve search results, one of the easiest way is to add synonyms. For example, a product may have an official name as well as commonly used name. When it is indexed against only the official name because the product name field doesn’t have a commonly used name, typing the …

Infrastructure

10 Books to Read for Software Engineers

Being a software engineer does not mean all you need to do is to code. The modern software engineer cannot be a lone genius with a single-minded focus on only coding. We must work well in the team, understand business, have a sharp focus on delivering business values, practice continuous …

Java

Fixing No Compiler is Provided in this Environment Error for Maven Project with Eclipse

When you try to run a Maven project Java Servlet app first time, you might get this No Compiler is Provided error Eclipse/Maven error: “No compiler is provided in this environment” The solution is simple. You need to add tools.jar to installed JRE. (1) Eclipse –> Window –> Preference (2) …