Blog Posts

Dependency Injection In Typescript With Typedi

Nov 26th, 2021

TypeDI is a dependency injection library for Typescript. It makes use of decorators to ease the registration and injection of services. Today we’ll look at how we can use TypeDI in multiple scenarios with code samples.

How To Debug Typescript Node Application With Vscode

Nov 19th, 2021

In today’s post we will look at how we can enable the debugger with a Typescript Node application which uses nodemon and ts-node with the goal of being able to breakpoint in VSCode our Typescript Node application.

Manage Your Monorepo With Rushjs

Nov 12th, 2021

Rush is build orchestrator facilitating management of Javascript and Typescript monorepos. In today’s post we will look at the common functionalities used in daily development making developers life easier.

Define Graphql Schema With Typegraphql In Typescript

Nov 5th, 2021

Last week we looked at how to setup an Apollo server to serve graphql requests. We went through the setup by defining a TemplateStringArray for the schema and defining functions in an object map for the resolvers. In this week post, we will look at how to simplify this two areas by leveraging Typescript features using typegraphql package.

Get Started With Apollo Server In Typescript

Oct 29th, 2021

Apollo server is a GraphQL server quick and easy to setup. In today’s post, we will look at how we can kick start a new Apollo server with a simple graph in Typescript.

Python Dataclass

Oct 22nd, 2021

A data class is a class which is identified by the value stored in their attributes. The most common way of holding values in Python is via tuples. Data classes make is easier to construct a class with a name and meaning while keeping the value aspect in term of equality. In today’s post we will see how we can define data classes using the dataclass decorator from the dataclasses module.

Python Itertools

Oct 15th, 2021

Python itertools module provides a set of iterator blocks that can be used to combine iterators into a new iterator which will apply some modifications during the iteration of the sequences. For example building blocks like cycle allows infinitely cycling through a sequence, another example is groupby which provides a new iterator giving the groups on each iteration. In today’s post, we will look at some of the functions provided by itertools with examples.

Python Collections

Oct 8th, 2021

Python comes with general purpose datatypes like dict, list or set. Those types are commonly used everywhere with the best tradeoff in term of performance and application scope. But there are times where we might see ourselves repeating a specific implementation, for example counting values while storing them in a dict is one of those cases. To cater for those repeated scenarios, the collections module gives us access to alternative types that can be used for specialized purposes. In today’s post we will look at some of those types with examples.

Sorting In Python

Oct 1st, 2021

Sorting lists in Python is very easy provided that we know how to use the sorting functionalities. Python comes with list.sort() and sorted() function, both behaving somewhat in the same way with the only different that the first one sorts in place whereas the later returns a new sorted list without altering the existing list. In today’s post we will look at different sorting scenarios and how we can achieve them using Python sort functionalities.

Decorators In Python

Sep 24th, 2021

In Python, we can add extra functionalities to existing functions with decorators but this comes with small gotchhas. The functools module comes with a special wraps decorator which addresses those issues. In today’s post we will look at how to use wraps with example.

Function Overload In Python With Single Dispatch

Sep 17th, 2021

Python supports overloading functions via single dispatch. With single dispatch we can define multiple implementations of a function and have it chosen based on a single argument. In this post we will look at how single dispatch works with example.

Partial Function Application In Python

Sep 10th, 2021

Partial function application is a useful tool to reduce the signature of a function by fixing the first arguments which then result in a new function with the remaining arguments. In this post, we will see when partial application is useful in Python and how we can implement it.

Depth First Seach And Breath First Search In Python

Sep 3rd, 2021

In Python, it is very easy to implement depth first search (DFS) and breath first search (BFS) algorithms using the built in data types and recursion. In today’s post, we will look at some different flavours of DFS and BFS together with examples where they are used.

Random Module In Python

Aug 27th, 2021

The random module in Python provides a way to generate pseudo-random numbers for various distributions. In this post, we will explore the most commmonly used functionalities of the random module; generating random integers and selecting randomly from sequences.

Python Built In Functions

Aug 20th, 2021

Python comes with a handful of built in functions provided by the standard library. In today’s post, we will look some of them which are very useful in day to day programming.

Designed, built and maintained by Kimserey Lam.