In the following article we’ll dive into Gradient Descent, and I’ll explain it with the help of an example scenario which we’ll solve using Supervised Learning and Python. We won’t use any ML framework like PyTorch or TensorFlow for that. The complete source code is available at GitHub.

Supervised Learning


When I started using Node.js for building REST APIs on the server side, I struggled a lot with the same question over and over again:

How should the folder structure look like?

Obviously there’s not a perfect or 100% correct answer to this question but after reading some articles regarding this topic, I found a folder structure that fits my needs pretty well. So today I’d like to show you how I structure my REST APIs.

I also published a GitHub repository including an example application which you can use as template for your own project.

The APIs are mostly…

Zobrist hashing, named for its inventor Albert Zobrist, is a technique to represent game board positions, like from chess or Go, as hash value. It’s mainly used with transposition tables, a special kind of hash table that is indexed by a board position and used to avoid analyzing the same board position more than once.

What it’s good for

In game theory, there are algorithms like Minimax or AlphaBeta that are used to analyze board positions and find the best possible move in the given situation. This might be applied to games like chess, Go or tic-tac-toe.

These algorithms take a given starting position…

Docker is a term you might already have heard or read about in the tech scene since it’s a quite upcoming trend in the last couple of years. Docker is platform as a service (PaaS) mostly used by software developers to develop, deploy, and run applications. A big benefit of it is that you can ship and run your application (almost) anywhere without having any external software installed on your operating system that is needed for your app besides Docker.

So, what exactly is Docker? (Source)

Docker is a tool designed to make it easier to create, deploy, and run…

Some time ago I searched for an easy way to establish a communication channel between a mobile device and a Node.js webserver. My goal was to exchange messages over this channel and receive information about the weather, public transportation and more.

For example I send the message /train and receive a response with realtime details about train departure times of preconfigured routes. So the Node.js server receives the incoming message, processes it and sends a response back to the client.

After doing some researches I finally came up with Telegram bots since they are very easy to setup and fit…

A definition by Oracle (source)

The Stack class represents a last-in-first-out (LIFO) stack of objects. …

by Katerina Limpitsouni

Some days ago I wrote a story about how I structure my Node.js REST APIs. However, I didn’t cover any test scenarios in there. So it’s time to catch up on this now.

We’re going to write an unit test for a single API component based on the project structure from my other story. The goal is to test the component by mocking a database and sending an HTTP request to its routes.

For writing tests I use the following node modules:

  • Mocha
  • Chai
  • Supertest

Project structure

This is the project structure I mentioned above. …

In this article, I will walk you through setting up path aliases in your TypeScript project and show you how to clean up your code.

The problem

In Node.js (or TS/JS in general) you can import modules into your code. This might look like the following:

import { User } from '../../user/model';
import { Article } from '../../article/model';
import { Cache } from '../../../../cache';
import { MongoDB } from '../../../../mongodb';

Notice these dots ../../ to access parent directories.

The problem we have here is that the deeper your project tree is, the more ../ are required to access modules in higher layers…

Lars Wächter

cs student | software developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store