Full Stack Web Developer | Tech Enthusiast

These are actually in a code base somewhere

Image for post
Photo by Ben White on Unsplash

Code comments are a human-readable explanation of what a computer program does. They are added to make the code easier for humans to understand.

Well, in this article, you will see how code commenting can be funny, too. Here is a list of comments that were actually written in the code.

1.

/*
* Dear Maintainer
*
* Once you are done trying to ‘optimize’ this routine,
* and you have realized what a terrible mistake that was,
* please increment the following counter as a warning
* to the next guy.
*
* total_hours_wasted_here = 73
*

2.

Exception up = new Exception("Something is really…


A list of jokes and memes relatable to all programmers

Image for post
Photo by chaitanya pillala on Unsplash

Being a programmer is a fun job, and many funny incidents occur throughout a programmer’s career. Here is a list of few jokes that can be relatable to you as a programmer.

I hope you enjoy the below compilation of jokes. Let’s get started.

1. A junior developer, after fixing a bug


Extensions that add functional benefits and visual flair to your development workspace

Image for post
Photo by Joshua Aragon on Unsplash

Since its introduction, the Visual Studio Code has very quickly become one of the most widely used lightweight text editors. Despite it being a lightweight editor, it has the potential of a full-fledged IDE, thanks to its vast library of extensions.

These extensions make the VS Code one of the most popular and easy to use text editor among the community.

Here you will find a list of useful extensions for VS Code for both functional advantages and also to add some visual flair to your workspace.

1. Material Theme


A list of jokes and memes relatable to all programmers

Image for post
Photo by Ahmed Zayan on Unsplash

Being a programmer is a fun job. And many funny incidents occur throughout a programmer’s career. Here are a few jokes that can be relatable to you as a programmer.

I hope you enjoy the below compilation of jokes. Let’s get started.

1. Every programmer be like


JavaScript

Checking equality in JavaScript

The Equality and the Strict Equality operators in JavaScript
The Equality and the Strict Equality operators in JavaScript (Image by the author)

In JavaScript, you can check the equality of any two objects using == or ===. Both the operators check whether the given two objects are equal or not, but in a whole different way.

Below, you can see in detail how each operator checks for equality of the given two objects.

Equality operator (==)

The equality operator (==) compares two operands to check whether they are equal or not and returns a Boolean result. It tries to convert the operand(s) before checking the equality if they are of different types.

You can see below how the equality operator (==) tries to compare the two operands.

Different types

  • If you compare a string and a number, it tries to convert the string to a number before comparison. …


Different ways to load JavaScript onto your HTML page

Loading the JavaScript into your HTML page
Loading the JavaScript into your HTML page (Photo by the author)

When you think of improving page load performance, you try to optimize the back-end code, database connections, and so on. But one of the easiest ways to improve the page load speeds is by making some small adjustments to how you load the JavaScript using the script tag in the HTML page.

Problem With the Normal Way of Loading JavaScript

When you load JavaScript into the HTML page, you add the script tag in the head section of the web page. There is a problem here, but to have a better grasp of it, you need to understand how a web page renders.

When the browser opens a web page, it starts to render the page tag by tag and begins to construct the DOM. And whenever the parser sees the tags to load images and style sheets, those requests are handled in parallel to the render. …


JavaScript

A detailed guide to JSON, and the use of parse() and stringify() in JavaScript

JSON
JSON ( Image by author )

JavaScript Object Notation (JSON) is a lightweight data representation consisting of an object/array of objects that has data in the form of key-value pairs. In this article, you will see in detail what JSON is and the use of parse and stringify methods that are part of the JSON Object.

An overview of the JSON format

  • Easy to read/write.
  • Used for API requests for transfer of data between the server and the client-side, and vice-versa.
  • Used as a configuration file format for many technologies/tools.
  • Has easy integration with most of the programming languages.

Here is how a JSON file looks like


10 useful things that you can do with the console for better debugging and improved workflow

Image for post
Console in JavaScript ( Photo by author )

In JavaScript, the goto way of debugging the code is using console.log(). We use console.log() to log something to the console then check whether the data is correct and functionality is working as expected. The JavaScript Console offers many other methods as well that you can use in addition to the console.log().

Here, you will see in detail the ten methods you can use that are part of the Console Object of JavaScript. These methods will help you in improving the debugging and development workflow as well.

1. log, info, debug, warn️, and error

You can use these methods to display messages to the console with different log levels. …


Using var, let and const in JavaScript, and how each differs in their behavior

Different types of variable declarations in JavaScript
Different types of variable declarations in JavaScript ( Photo by author )

Variable declaration is one of the basic concepts you can learn when you start learning a new programming language. JavaScript has three different keywords (var, let, and const) that you can use to declare a variable, and they each have their characteristics and behaviors.

In this article, you will see:

  • How to declare variables using each keyword
  • The scope of the declared variable using each keyword in different scenarios.
  • Can we reassign and redeclare variables for each type of declaration?
  • A Brief discussion on variable and function hoisting when we declare variables using the var keyword.
  • Which one you should and should not use, based on the different scenarios. …


How for, for…in and, for…of loops work and how to use them effectively in JavaScript

Different for loops in JavaScript
Different for loops in JavaScript ( Photo by author )

JavaScript has three different types of for loops, so there may be slight confusion for someone new to JavaScript on which kind of for loop to use for a given scenario. So, here you will see:

  • How a for loop works and how to use it.
  • How a for…in loop works and how we can use it to iterate over enumerable objects.
  • How a for…of loop works and how we can use it to iterate over iterable objects.
  • When to use each of them.
  • The main difference between for…in and for…of.

We will go through each of them in detail.

1. for

for statement is used to create a loop that runs based on the given three parameters separated by a semicolon. …

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