The Internet Layers — An In-Depth Breakdown of PDU Contents

This article originally appeared on vahid.blog.

In Part II, we learned how an HTTP request travels across the Internet to the correct destination server, through several layers, and returns with a response. But how does this happen reliably and securely, without becoming corrupted or being intercepted by a malicious hacker? And what’s HTTPS?

To be able to answer these questions, we need to first dig deeper into what each layer’s protocol data unit (PDU) contains. In this process, we’ll appreciate how each layer contributes to reliability. …


The Internet Layers — Overview of the OSI and TCP/IP Models

This article originally appeared on vahid.blog.

What exactly happens when you enter a URL in your browser? How does your browser know what content to display? To answer this question, we need to understand how the various layers of the Internet work.

That’s what we’ll cover here, which is Part II of the three-part series on How the Internet Works.

If you haven’t read Part I, please go read that first. Everything here builds on the foundations covered in Part I.

II. The Layers of the Internet


The Internet Infrastructure — A bird’s eye view

This article originally appeared on vahid.blog.

ISPs, routers, gateways, LANs, HTTP, the cloud, the web… the Internet is so complex that we could spend days, months, and even years studying this stuff, and we still wouldn’t be done.

But just several minutes is all we need to at least get the basics down.

Let’s first understand the main components of the Internet–the infrastructure that supports the entire web. …


The Foundational Building Blocks of Object-Oriented Programming

This article originally appeared on vahid.blog.

Did you know that Ruby was good for the environment? It is, because it follows strict EPA principles… Encapsulation, Polymorphism, and Abstraction. [Ducks a volley of Tomato objects thrown at him].

In a previous post, we discussed the importance of classes in OOP, and developed the mental image of classes as providing more defined jobs and roles to our data. To summarize: classes allow us to build applications that scale well and deal with more complex and customized data structures. They do this by enabling us to store data in specific ways (i.e., attributes)…


This article originally appeared on vahid.blog.

I have a confession to make. I’m an addict. I love everything about–and can never get enough of–learning. I keep coming back for another hit, over and over again. I’ve been doing it for over 30 years.

Everyone reading this knows what I’m talking about. Learning is probably the single most defining characteristic of human beings–it’s our superhero power. …


This article originally appeared on https://vahid.blog.

Integers, floats, strings, arrays, objects, functions, loops, scope? Piece of cake. Classes? Not so easy.

Understanding what classes are, how they work, and how to incorporate them into your code is critical to developing any working enterprise application. Even more importantly, however, developing a better mental model and appreciation for classes will transform you from a mere programming hobbyist to a software craftsman demigod.

Let’s get to it.

Every data structure, including all the ones listed above, is a class. Programming languages each come with your basic and fundamental class types, like numbers, strings…


This article originally appeared on https://vahid.blog.

Let’s say your React application has a smart component (i.e. the component has its own state), and you want a child component to be able to not only access, but actually modify that parent component’s state.

How can you give a child component this functionality?

  1. Define this state-modifying function in the parent component.
  2. Pass this function to the child component as a prop.
  3. Have a trigger inside the child component that calls this function

Here’s an example.

We have an App component, which has a state that includes blogs (an array), and searchfield (a…


This article originally appeared on https://vahid.blog.

I recently completed Dr. Barbara Oakley’s very useful course, Learning How to Learn.

I gained so many shareworthy insights that are helping me to study and remember things more efficiently and confidently that summarizing them in a post made much sense.

1. Focused mode v.s. diffuse mode

The most fundamental and mind shifting concept from the course is that the brain continuously alternates between two different modes, each having unique characteristics and ramifications for the learning process: the focused mode and the diffuse mode.

The focused mode is what we most commonly associate with the process of learning: it requires…


This article originally appeared on https://vahid.blog.

What’s a framework? What’s a library? Aren’t the two terms interchangeable? Is React a framework or a library? What about NodeJS? And what’s Rails? Who cares, anyway? So many good questions, you have.

Answers, I shall offer you.

Let’s actually answer the last question first, because it’s the most important: why should you care about the difference?

Knowing the difference will help you better understand how to make sense of all the existing resources currently available for web application development, and all future resources that are sure to keep popping up.

Moreover, understanding whether…


Last summer, I was fishing with family at a lake in Connecticut. We caught some fish, and placed them in a narrow but tall bucket, where the fish were very tightly constrained. We left the bucket on the beach sand, and went back into the lake for some more fishing and swimming.

Within a few minutes, and one after the other, the fish vigorously leaped out of the bucket, and flipped themselves over and over, struggling painfully across the beach sand, all the way until they were finally reunited with the vastness and freshness of the open and cool lake…

Vahid Dejwakh

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