Oct 02, 2020

Angular Async Pipe

The async pipe is used in Angular to unwrap a value from an asynchronous primitive. An asynchronous primitive can either be in a form of an observable or a promise. It is one of the most important pipes of Angular as it allows us to remove the complexity of handling subscription to data coming from asynchronous sources like HTTP clients. The code of the async pipe is surprisingly simple and understanding it will allow us to avoid traps like the default null value. So in today’s post, we will reimplement the async pipe in a toned down version of it.

Angular

Sep 25, 2020

Create Stored Procedure In Mysql

A stored procedure in MySQL acts as a method stored in the database. It has a name and accepts a set of arguments and can be invoked via CALL statement. In this post we will look at how we can define a stored procedure, how the parameters and variables work, and lastly how we can define transactions and handle exceptions accordingly.

MySQL

Sep 18, 2020

Handle Polymorphic Array Serialization With Marshmallow

Few months ago we looked into Marshmallow, a Python serialisation and validation framework which can be used to translate Flask request data to SQLAlchemy model and vice versa. In today’s post we will look at how we can serialise an array containing polymorphic data.

Python

Sep 11, 2020

Postgres Window Function

Window functions are calcultions done accross a set of rows in relation to the current row. In Postgres, we can use window functions with the keywords OVER to calculate useful aggregate functions like average, ranking or count over a partition of the data. In today’s post we will look at example of window function usage.

PostgreSQL

Sep 04, 2020

Ngrx Metareducer

When building Angular application with Ngrx, it is helpful to see the action flowing into our states for debugging. The quick and easy way to debug is to make use of the Redux DevTools which shows the list of actions and provide time travelling functionalities. Another way is to simply log the action, the state prior applying the action, and the resulting state. In Ngrx, we are able to do that using a Meta-reducer.

Angular NGRX

Aug 28, 2020

Postgres Full Text Search

In today’s post we will look at how PostgreSQL Full Text Search functionalities can be used to retrieved ranked documents. We’ll start by looking at the basics of matching documents, then we’ll move on to how we can define indexes for performance improvement and we’ll end by looking at weights and ranking.

PostgreSQL

Aug 21, 2020

Debugging Angular App With Chrome Devtools

When developing Angular application, or any sort of frontend application, we ensure that the application works properly by displaying it on the browser. Chrome comes with built-in devtools enhancing greatly our debugging toolkit. In today’s post we will look at the source panel of the devtools and discover the most important functionalities.

Angular

Aug 14, 2020

Getting Started With Sqlalchemy Orm

In a previous post, we talked about Alembic which is a migration tool built on top of SQLAlchemy. SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM). In today’s post, we will look at how the ORM part can be leverage to easily create and manage a simple database schema.

SQLAlchemy Python

Aug 07, 2020

Using Vscode Task To Detect Compilation Errors In Angular

Working with Angular is Visual Studio Code (VSCode) is extremely easy. One feature which allowed me to quickly debug and find errors is the task feature combined with the Angular CLI. In today’s post, we will see how we can setup a task that uses the Angular CLI to highlight compilation problems in the application.

Angular

Jul 31, 2020

Understand Exportas In Angular Directive

A few weeks ago we looked into ViewChild and ContentChild. We saw how template variable could be used to get references on the element they were defined on. In today’s post we will see how exportAs facilitates the creation of template variables.

Angular

Jul 24, 2020

Python Interactive With Vscode

In a previous post we talked about Jupyter notebook. We looked at the support of notebooks from Visual Studio Code and how we could write a notebook almost like a story with interactive code. Continuing on the same line, in today’s post we will be looking at Visual Code Python Interactive and see how it can be used to write Python scripts or quickly test prototypes.

Python

Jul 17, 2020

Jupyter Notebooks With Visual Studio Code

Few months ago we talked about IPython, a powerful interactive shell to discover modules, test functionalities and applications. On top of that, IPython is also used as a Python kernel for Jupyter. Jupyter allows us to combine Markdown text with executable Python code in a notebook, called a Jupyter notebook. Visual Studio Code has a direct support for Jupyter notebooks which have the extension.ipynb (for IPython notebook). In today’s post we will see how we can create our first notebook and experience the benefit of this technology.

Python

Jul 10, 2020

Version Angular Application

In frontend application, it is common to have the version displayed on the footer which allows us to quickly debug which version is getting served by our server. In today’s post, we’ll look at how we can get the version baked into the bundle so that it can be used and displayed on the frontend of an Angular application.

Angular

Jul 03, 2020

Contentchild Decorator Angular

Continuing on our discovery of Angular decorators, in this week post we will be looking at ContentChild and ContentChildren. What the differences are, and when to use one or another.

Angular

Jun 26, 2020

Viewchild Decorator Angular

Last week we looked into HostBinding and HostListener decorators and how they could be used. In this week post we continue on our discovery of great decorators by looking at ViewChild and ViewChildren. What the differences are, and when to use one or another.

Angular