Sign in

Sophomore && CSE Undergrad

Kubernetes would be too overkill

In March, i tried learning nginx, a load balancer, reverse proxy and much more. At the same time, i was looking into buying a domain for my portfolio site. Now trying to apply this new super power that i got, i tried to deploy it my static resume site on a virtual machine. How i did it, continue reading the article …

Step 1 : Dockerize your site

I use Vite-vue to make my portfolio site. Why you may ask, because i can break down different sections into components and also easier for me to update information. …

Take a look at GC running visually

Photo by li hao on Unsplash

Quick Look at Garbage Collector

‌A simple program that creates a byte array of 100000000 elements and lets print the memory allocations.

package mainimport ("fmt""runtime""time")func printStats(mem runtime.MemStats) {runtime.ReadMemStats(&mem)fmt.Println("mem.Alloc:", mem.Alloc)fmt.Println("mem.TotalAlloc:", mem.TotalAlloc)fmt.Println("mem.HeapAlloc:", mem.HeapAlloc)fmt.Println("mem.NumGC:", mem.NumGC)fmt.Println("-----")}func main() {var mem runtime.MemStatsfor i := 0; i < 2; i++ {s := make([]byte, 100000000)if s == nil {fmt.Println("Operation failed!")}printStats(mem)}time.Sleep(time.Second)// adding time.Sleep so that GC finishes it works and print out the output to terminal}

‌Understanding the code

There is a package in Golang…

Super Simple

Photo by Roman Synkevych on Unsplash

Code we will be testing :

package mainimport (    "fmt"    "log"    "net/http")func main() {  http.HandleFunc("/", helloWorldEndPoint)  fmt.Println("Server :  http://localhost:8080")  log.Fatal(http.ListenAndServe(":8080", nil))}func helloWorldEndPoint(
writer http.ResponseWriter,
request *http.Request) {
fmt.Fprintf(writer, "hello world")}

Testing web server in Golang

  • create a file with name <anything>_test.go, these files are ignore by compiler
  • write a func matching func TestXxx(*testing.T) where Xxx does not start with a lowercase letter. The function name serves to identify the test routine.
  • To run the test : go test

Writing Test‌

  • inorder to test the handler, we call it by passing http.ResponseWriter and *http.Request
  • to create a new…

Title Image By Uday Yadav

You can simply get started with my boilerplate on GitHub :

Or here is the procedure :

The Big Question: Why this article when there are hundreds of similar articles on this topic.

Answer: When I tried to create a typescript server with node, I faced issues that weren't addressed in procedures I followed.

So let’s get started

  1. Create a new project folder
  • Create a new project folder on your computer and open it in your terminal
  • Run the following command to initialize an npm project
npm init

2. Installing Dependencies :

Install the following dependencies that will get you started

npm install typescript express @types/express @types/node ts-node ts-node-dev

Add tsc in scripts inpackage.json

"scripts": {

Photo by Markus Spiske on Unsplash

It was amazing!

Disclaimer: I don’t claim to be an expert in any of them. This was just a thought experiment

Here’s how it all began :

In the last week of May, I was working on the front-end part of my personal project, which got me frustrated and bored to some extend. So I decided to take 1–2 days off to refresh myself. I decided to take a deeper look at the world of competitive coding (i do solve some questions, but not very seriously). So wandering on the internet I came to this website called code wars. While signing up, they asked to pick…

Also an amazing programming language for mathematical modeling data science, statistics, and machine learning.

For those of you who don’t know what Julia is, here is a quick and short intro :

  • Julia is a high-level, high-performance, dynamic programming language, designed and developed by Jeff Bezanson, Alan Edelman, Stefan Karpinski, Viral B. Shah
  • While it is a general-purpose language and can be used to write any application, many of its features are well-suited for numerical analysis and computational science.
  • Julia proves to be faster than Python as it keeps reaching the speed of C, puts up a pretty impressive performance…

The hot new server-side high-performance language.

For those of you who don’t know what Golang is, here is a quick and short intro :

  • Go is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. Go is syntactically similar to C.
  • It has memory safety ( uses a garbage collector ), structural typing, and CSP [communicating sequential processes]-style concurrency.
  • In simple words, Golang is like Java in terms of processing but written like C

Why Golang?

We live in a world where Java handles the majority of critical processes, but the thing is, java…

and it’s compiler is just mind-blowing

Original Artwork by Uday Yadav

For those of you who don’t know what Rust is, here is a quick and short intro

  1. Rust was originally designed by Graydon Hoare at Mozilla Research, yes the company that makes Mozilla web browser.
  2. Rust is a programming language focused on performance and safety, especially safe concurrency. Rust provides memory safety without using garbage collection (like Go).
  3. It’s a systems programming language, hence it can run as fast as C and sometimes even faster.

Why Rust

In the world where C/C++ powers everything we know, what brings us to Rust? …

It’s super easy !!!

  • Step 1: Install dependencies

You will be needing the following packages

npm i express dotenv
  • Step 2: Create a server file in Project Folder

Inside your project folder, create a file named “server.js” and copy the following contents inside it.

const path = require('path');const express = require('express');const app = express();const port = process.env.PORT || 3000;app.use(express.static(path.join(__dirname, 'build')));app.get('/*', (req, res) => {res.sendFile(path.join(__dirname, 'build', 'index.html'));});app.listen(port, () => {console.log('Server is up!');});
  • Step 3: Push to GitHub

Add git add all your files, commit them and push them to GitHub, we…

When speed meets power !!!

From here, you have 2 options

  • Utilize Colab’s GPU
  • Just run on CPU

Just using CPU

Create a file with .ipynb extension and paste the following JSON in it

This article was written in June of 2020, please check for the newer version, if you can find it.

"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "Julia on Colab.ipynb",
"version": "0.3.2",
"provenance": []
"kernelspec": {
"name": "julia-1.2",
"display_name": "Julia 1.2" …

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