May 10, 2019

Nginx Proxy Pass

In a previous post, we saw how we could host an ASP.NET Core application behind Nginx. We saw that Kestrel works as a selfhost webserver and that in order to get request forwarded to it, we need to proxy them using the location and proxy_pass directives. Today we will look into some details regarding path handling, ensuring that our requests are forwarded properly.

NGINX

May 03, 2019

Nginx Gzip

When building single page applications, like Angular applications, where the entire application is sent over HTTP, compressing static files before serving them can provide a major boost in performance, drastically reducing latency. One of the most common compression algorithm widely supported by reverse proxies and browsers is Gzip. Today we will see how we can enable gzip compression on Nginx.

NGINX

Apr 26, 2019

Angular Webpack Proxy Dev Server

Angular CLI provides an easy way to host Angular applications during development by using Webpack dev server. Due to the fact that Webpack dev server is a web server, our frontend gets hosted on a separate web server which causes CORS issues if we want to call endpoints on a backend which we also host locally for development. Today we will see how we can use one of the features of Webpack dev server to setup a proxy during development which will proxy calls from the Angular application to our local backend hence by passing the CORS issue.

Angular

Apr 19, 2019

Delayed Evaluation And Infinite Stream

In our previous post on mutability, we discussed the fact that time was to be taken into consideration when mutability was involved. We observed objects lifetime as instant by instant, computing and assigning objects states for each instant. Another way to look at time is to consider the state as a discrete set of values. From this perspective, we can see the time as being an infinite sequence, a stream, and the state can also be seen as a stream computed out of time.

Racket

Apr 12, 2019

Powershell

PowerShell is versatile command line shell which comes with a powerful scripting language. It is now even more available than before with the new PowerShell Core which makes it available on Linux. Even though the main commands in the scripting language have been around for ages, I always see myself having to re-learn how to use it every time I need to write a script.

Azure

Apr 05, 2019

The Cost And Benefit Of Mutability

Mutability is a topic of high interest in the view of developers adventuring themselves in functional programming languages where it is generally unwelcomed and, in some instances, made voluntarily hard to implement. In contrast, object oriented programming has assignment at its core. Objects are represented as entity with a state modifiable over the lifetime of the application.

Racket

Mar 29, 2019

Understand Data Abstraction With Examples

Data abstraction allows us to think about complex systems in term of their properties rather than their implementations. Reasoning in term of properties provides a ground of assumptions which can be used to create new systems. In common programming languages, abstraction is present everywhere, as interfaces, as abstract and regular classes, as functions, as function signatures, as user interfaces, etc. All of theses tools provide a way to build layers of abstraction which we can work on top of to create new functionalities by manipulating data on the appropriate layer.

Racket

Mar 22, 2019

Angular Progressive Web App

Progressive Web App allows an Angular website to be installed locally and be available on the app drawer and on the home screen of a phone. Today we will see how to use Angular Progressive Web App module to transform our app into a mobile app.

Angular

Mar 06, 2019

Cycle Detection With Floyd Tortoise And Hare

Floyd’s Tortoise and Hare is a cycle detection algorithm operating on a linked list. The algorithm is based on two pointers, the tortoise and the hare, moving on the linked list at a different speed. The algorithm can be used to find cycle existence, deduces the beginning of the cycle, and the length of a cycle. Today we will explore the mathematical proof behind the algorithm and we will implement it in Racket.

Racket Python

Mar 01, 2019

The Basket Of Apples Problem With Tree

Working with trees is an interesting task. Today we will look into the Basket of Apples problem, which can be solved using a tree structure. This deep dive will allow us to explore how we can reason around trees and understand concepts allowing us to vocalize ideas.

Mathematics

Feb 22, 2019

Fixed Point And Newton Method

Last week, we briefly looked into the Y Combinator also known as fixed-point combinator. Today we will explore more on the territory of fixed-points by looking at what a fixed-point is, and how it can be utilized with the Newton’s Method to define an implementation of a square root procedure.

Racket

Feb 14, 2019

Recursion With Fibonacci

Recursion refers to the property of a function to be defined in term of itself. The Fibonacci sequence is a great example of a recursive problem where a Fibonacci number is calculated from a combination of precedent Fibonacci numbers. Recursion can be implemented in many forms, it is even possible to implement recursion without explicit self calling. Today we will look at different implementations of Fibonacci and discover their properties.

Racket

Feb 06, 2019

Lambda Calculus And Closure

In programming, we often hear about Closures. Closures are present in any languages possessing functions as first class citizen. This includes functional languages and also widespread languages such as C#, Python and JavaScript. Today we will look at the origin of closures and understand what they are.

Racket

Jan 30, 2019

Implementing Exceptions With Continuations Racket Lisp

Last week a colleague of mine introduced me to the concept of continuation in Racket (the best of Scheme and Lisp - at least that is what racket-lang.org states). I knew about the existence of Lisp but I never really paid attention to what it provided as language features. So I took the bite and started to read the post shared to me on continuations, written by Matt Might and oh boy… was I confused. Everything about the code confused me, the notation, the syntax, and of course the flow of the program itself. What I understood was that this piece was implementing Exceptions by using continuations which was enough to make me want to understand it.

Racket