Use MutationObserver to spy on the DOM

Have you ever wished that you could “listen to” changes that happen in the DOM? Of course, you have “event handlers” for this, it’s as easy as this: View the code on Gist. However, you can’t catch everything with that. Indeed, what if you want to be notified when the text or an attribute value […]

Create objects on the stack using stackalloc

Imagine we want to create a method that generates an array composed by square values of its indexes and the only parameter we want to pass to this method is the size of the array. A straight-forward approach would be this: View the code on Gist. We could have displayed the values of the array […]

Using TypeScript with Webpack

“TypeScript” is a great language that powers up “JavaScript” and in this post, we’ll see how to ingrate it with “webpack”. If you’re not comfortable with “webpack”, consider reading this post. Start by initializing our web application: yarn init -y Then, install the following packages: yarn add webpack webpack-cli typescript ts-loader -D “webpack” and “webpack-cli” […]

Getting started with RxJS

If you like “promises”, you’ll love “observables”. “Observables” are “something” that you can subscribe to and from which you’ll receive values over time. I’m sure everyone knows what is a “rsa securId” but for those who don’t know, it’s a little device that displays a random access token that changes every X minutes. You can […]

Getting started with webpack 4

Face it, it’s over… It’s over the time when you just added a simple “script” element to your page in order to use a library, it does not work like that anymore… Now your application probably uses a “JavaScript” framework (Angular, React, etc…), it also plays with DOM (jQuery) and as you’re a cool guy, […]

Dapper, a real alternative to Entity Framework

So you have a great idea for web application and you decided to use “ASP.NET” (Core I hope 😉 ). Now, you’re wondering how you will handle the communication between your application and your database. There are of course a lot of possibility for you: Hard code SQL queries using standard BCL (“SqlCommand”, “SqlDataAdapter”). Mini […]

Install new TeamCity build agent on Windows

TeamCity is an awesome tool that can be used to build a lot of different variety of projects. In its free version, it comes with a maximum of 100 build configurations and 3 configurable build agents (note that these values have been considerably increased quite recently as before it was only 20 build configurations and […]