We never have time. We are strapped inside this three dimensional world and we like it. We wake up, we work, we sleep. Doing this routine for a long period makes you empty inside.

It was one of those evenings where I was procrastinating on LinkedIn, sometimes spying on old university colleagues. I saw this guy posting something about a course. Teaching kids pro bono how to code. Volunteering in Romania. I sip from my beer and I reflect a bit at my life. I don’t know what means to be a volunteer. You see, I grew up with the…


A sketch crated by Captain V illustrating a futuristic all-in-one windows pc and a droid that talks using his nose saying: SSH.
A sketch crated by Captain V illustrating a futuristic all-in-one windows pc and a droid that talks using his nose saying: SSH

Well not really. I understand all the obsession with Linux simplicity and Unix systems in general but if you stop being a fanboy of all *nix systems you realise that the dev experience under Windows is quite amazing and these days is smooth as fuck (I personally use Windows, Linux and Apple machines on a daily basis so I know what I am talking about). Let me show you how to create and add an SSH key to your GitHub account on a Windows machine. What is an SSH key? Well just google it but basically you will be able…


A sketch presenting a cup of coffee with the inscription: “Everyone is entitled to my opinion!” — Created by Captain V
A sketch presenting a cup of coffee with the inscription: “Everyone is entitled to my opinion!” — Created by Captain V

Today I woke up positive. I made a cup of coffee and thought to write a medium post. Then reality struck and I could not stop myself writing a bit of a rant post. So take some pinches of Himalayan salt when reading this and take home what applies to you.

I spent decades on building web apps and user interfaces for small and large companies, private and public. I worked for governments, database companies as well as famous fashion brands or games. In my humble experience there were endless times when I encountered a lack of reasoning when we…


Data binding in vanilla js using proxy
Demo of the data binding in vanilla JS using Proxy

What if I tell you that is not that hard to achieve data binding in vanilla JavaScript? Wait whaaat? Is that even possible without a framework like Vue or React or Angular? Of course it is. Let me show you and introduce you to the Proxy object.

Overview

The way I like to bind things together in JavaScript world is by making independent components that react to data changes. I like to build highly cohesive, loosely coupled components so I don’t end up with messy monoliths. …


My very bad inking skills trying to create a medium blog post worthy image. I used a Faber-Castell fountain pen and Waterman Havana brown ink as only cool boys write with brown inks 🤣

Hello folks, here we are with another short story from the frontend world. We are going to learn how to add and remove multiple CSS classes from a DOM node, in our case a div.

The boring way 🤢

To add a CSS class all you have to do is to add some string with the class name on the node inside the value of the class attribute. Basically here:

<div class='ADD HERE YOUR CLASSES'></div>

Now, to do this, we will be using a special method called setAttribute. Let’s assume we have the DOM node saved in the myNode variable.

myNode.setAttribute('class', 'my-special-css-class');

But that…


The DOM node factory, somewhere by the Black Sea in Năvodari, Romania

Creating and deleting DOM Nodes

Hello folks, here we are with another quick tutorial. We will learn how to create a function that generates DOM nodes for us and one that deletes them. In this frontend world we often need to create and delete nodes so why not create our own set of tools to do this tedious job.
Also, just to be fancy, let’s create a class for the sake of it. If you don’t know what is a class, don’t worry, I don’t know either. Let’s assume a class is a way to group common functionality and values. So, we will define a class…


Hello folks, this is short post so by the time you finish your cup of tea, you will know how to efficiently render a bunch of nodes on the screen without causing much refresh of flickering unicorns on your screen.

Let’s get going. First, let me introduce you to the a special node that is a document fragment. A document fragment is like an invisible shopping bag that you can use to collect nodes you wanna put on the screen at a later time. So, to create one, all you need to do is:

const docFrag = document.createDocumentFragment();

Now that…

Captain V

I fly and code for fun

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