<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Panda Quests</title>
    <description>The latest articles on DEV Community by Panda Quests (@pandaquests).</description>
    <link>https://dev.to/pandaquests</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F232650%2Ff28e2bac-c28b-4050-ae18-1265027f8dd5.png</url>
      <title>DEV Community: Panda Quests</title>
      <link>https://dev.to/pandaquests</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pandaquests"/>
    <language>en</language>
    <item>
      <title>Socket.io for beginners</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sat, 04 Feb 2023 12:34:07 +0000</pubDate>
      <link>https://dev.to/pandaquests/socketio-for-beginners-9b3</link>
      <guid>https://dev.to/pandaquests/socketio-for-beginners-9b3</guid>
      <description>&lt;p&gt;This &lt;a href="https://levelup.gitconnected.com/beginners-guide-to-socket-io-6161157fc3b9" rel="noopener noreferrer"&gt;post was first published on my blog&lt;/a&gt;. If you want to know more details, read my blog:&lt;br&gt;
&lt;a href="https://levelup.gitconnected.com/beginners-guide-to-socket-io-6161157fc3b9" rel="noopener noreferrer"&gt;https://levelup.gitconnected.com/beginners-guide-to-socket-io-6161157fc3b9&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or follow me here or on &lt;a href="https://pandaquests.medium.com/" rel="noopener noreferrer"&gt;my blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Socket.IO is a JavaScript library that enables real-time, bidirectional communication between clients and servers. It allows you to create web applications that can handle a high volume of concurrent connections and enables you to build real-time features such as chat, notifications, and collaborative editing. In this article, we'll give you a brief introduction to Socket.IO and how it works. We'll also discuss some of the key features of the library and show you how to get started with Socket.IO in your own projects.&lt;br&gt;
This is just one out of many articles about IT. Feel free to follow or support pandaquests for more great content about JavaScript, web development, and software development. We try to publish multiple times a week. Make sure not to miss any of our great content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;br&gt;
As mentioned in the beginning, Socket.IO is a JavaScript library that enables real-time, bidirectional communication between clients and servers. It allows you to create web applications that can handle a high volume of concurrent connections and enables you to build real-time features such as chat, notifications, and collaborative editing.&lt;br&gt;
Features&lt;br&gt;
Some of the key features of Socket.IO are:&lt;br&gt;
Real-time, bidirectional communication between clients and servers: Socket.IO enables you to send and receive data in real time between the client and server.&lt;br&gt;
Cross-platform compatibility: Socket.IO can be used to build real-time applications for the web, mobile devices, and desktop applications.&lt;br&gt;
Automatic reconnection: Socket.IO will automatically try to reconnect if the connection is lost, making it easy to build highly available real-time applications.&lt;br&gt;
Event-based communication: Socket.IO uses an event-based model for communication, where the client and server can emit and listen for events. This makes it easy to build real-time features such as chat, notifications, and collaborative editing.&lt;br&gt;
Fallback transports: Socket.IO can use WebSockets or fall back to other techniques such as long-polling if WebSockets are not available. This makes it easy to use Socket.IO in a wide variety of environments.&lt;br&gt;
Binary support: Socket.IO can send and receive binary data, making it easy to build real-time applications that transfer files or other binary data.&lt;br&gt;
Namespaces: Socket.IO allows you to divide your application into multiple "namespaces", each with its own set of connections and events. This can be useful for organizing your real-time application into logical components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functionality&lt;/strong&gt;&lt;br&gt;
Socket.IO uses a combination of WebSockets, polling, and other technologies to enable real-time communication. When a client (such as a web browser) wants to establish a connection with the server, Socket.IO establishes a WebSocket connection if the browser supports it. If the browser does not support WebSockets, Socket.IO falls back to other techniques such as long-polling to establish a connection.&lt;br&gt;
We wrote an article about WebSockets here already.&lt;br&gt;
Long polling works by having the client send a request to the server, and then the server keeps the request open until it has new data to send back to the client. Once the server has new data, it sends a response to the client and the client sends a new request immediately. This process is repeated, allowing the client and server to communicate in real-time.&lt;br&gt;
One of the main drawbacks of long polling is that it requires a new HTTP request-response cycle for each piece of data that is exchanged between the client and server. This can result in increased latency and reduced efficiency compared to WebSockets. However, long polling can be a good choice in certain situations, such as when the client and server need to communicate over HTTP rather than a dedicated WebSocket connection.&lt;br&gt;
Once the connection is established, the client and server can send data to each other in real time. Socket.IO uses an event-based model for communication, where the client and server can emit and listen for events. For example, the client might emit a "message" event with some data, and the server could listen for that event and respond by emitting a "response" event with some data of its own.&lt;br&gt;
Socket.IO is a popular choice for building real-time web applications because it abstracts away the complexities of real-time communication and provides a simple, easy-to-use API. It is also cross-platform, meaning it can be used to build real-time applications for the web, mobile devices, and desktop applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
To get started with Socket.IO in your own projects, you'll need to do the following:&lt;br&gt;
Install the Socket.IO library: You can install Socket.IO using npm or yarn by running npm install socket.io or yarn add socket.io. Alternatively, you can include the Socket.IO client library in your HTML file by adding a script tag to your HTML file: &lt;br&gt;
Set up the server: On the server side, you'll need to set up Socket.IO to listen for incoming connections. Here's an example of how you might set up Socket.IO with an express server in Node.js:&lt;/p&gt;

&lt;p&gt;const express = require('express');&lt;br&gt;
const app = express();&lt;br&gt;
const server = require('http').Server(app);&lt;br&gt;
const io = require('socket.io')(server);&lt;br&gt;
server.listen(3000);&lt;br&gt;
Set up the client: On the client side, you'll need to create a Socket.IO client and connect to the server. Here's an example of how you might do this in JavaScript:&lt;/p&gt;

&lt;p&gt;const socket = io('&lt;a href="http://localhost:3000'" rel="noopener noreferrer"&gt;http://localhost:3000'&lt;/a&gt;);&lt;br&gt;
Send and receive events: Once the client is connected to the server, you can use the emit and on methods to send and receive events. For example, the client can emit a "message" event with some data, and the server can listen for that event and respond by emitting a "response" event with some data of its own:&lt;/p&gt;

&lt;p&gt;// On the client:&lt;br&gt;
socket.emit('message', 'Hello, server!');&lt;br&gt;
// On the server:&lt;br&gt;
io.on('connection', (socket) =&amp;gt; {&lt;br&gt;
  socket.on('message', (data) =&amp;gt; {&lt;br&gt;
    console.log(data); // 'Hello, server!'&lt;br&gt;
    socket.emit('response', 'Hello, client!');&lt;br&gt;
  });&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;That's the basic idea! With these steps, you should be able to get started with Socket.IO in your own projects. There are many more advanced features and configurations available in Socket.IO, so be sure to check out the documentation for more information&lt;/p&gt;

&lt;p&gt;We hope you enjoyed this article. Do you have any questions? Let us know and comment below.&lt;/p&gt;

&lt;p&gt;For more details you can read them on my blog:&lt;br&gt;
&lt;a href="https://levelup.gitconnected.com/beginners-guide-to-socket-io-6161157fc3b9" rel="noopener noreferrer"&gt;https://levelup.gitconnected.com/beginners-guide-to-socket-io-6161157fc3b9&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devto</category>
      <category>web3</category>
      <category>cryptocurrency</category>
      <category>announcement</category>
    </item>
    <item>
      <title>How to persistently saving custom objects in Android</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Thu, 29 Dec 2022 17:39:44 +0000</pubDate>
      <link>https://dev.to/pandaquests/how-to-persistently-saving-custom-objects-in-android-jmk</link>
      <guid>https://dev.to/pandaquests/how-to-persistently-saving-custom-objects-in-android-jmk</guid>
      <description>&lt;p&gt;This &lt;a href="https://medium.com/gitconnected/how-to-create-an-android-app-that-persistently-saves-custom-objects-5362f277cb29" rel="noopener noreferrer"&gt;post was first published on my blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In almost any app you need to persistently save custom information in your app and later load it and display it to the user. Unfortunately Android doesn’t provide you this functionality out of the box. Therefore in this tutorial, I’ll show you how to create an app that persistently saves custom objects with gson.&lt;/p&gt;

&lt;p&gt;The technologies I’ll use are as follows:&lt;/p&gt;

&lt;p&gt;Android studio&lt;br&gt;
android 28&lt;br&gt;
gson&lt;br&gt;
gradle&lt;br&gt;
This article is mainly based on &lt;a href="https://codinginflow.com/tutorials/android/save-arraylist-to-sharedpreferences-with-gson" rel="noopener noreferrer"&gt;this post&lt;/a&gt;. But because &lt;a href="https://developer.android.com/jetpack/androidx/migrate/class-mappings" rel="noopener noreferrer"&gt;some API have changed&lt;/a&gt;, you won’t be able to create an app if you follow the above mentioned tutorial. It took me a while to get it going. In order to save you time, I create this tutorial for you. Also I added some additional information that was not mentioned in my above mentioned reference post and that may be helpful for beginners.&lt;/p&gt;

&lt;p&gt;First create a new app via android studio select the empty app template and call it e.g. MyApplication. Then add the following dependencies into your build.gradle file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dependencies {&lt;br&gt;
 implementation 'com.android.support:design:28.0.+'  &lt;br&gt;
 implementation 'com.google.code.gson:gson:2.8.5'&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We need for our UI some designs that is not provided by the standard android SDK. Therefore we have to add the design dependency:&lt;br&gt;
implementation com.android.support:design:28.0+&lt;/p&gt;

&lt;p&gt;Google provides you with gson methods you can use to serialize and deserialize java objects: &lt;a href="https://github.com/google/gson" rel="noopener noreferrer"&gt;https://github.com/google/gson&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mind you, the number 28 in i.e. com.android.support:design:28.9.+ refers to your target SDK version. make sure that these are always the same number. In my example it’s 28. Your’s may differ. In order to know which target version you are using, you can also check in your gradle-file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;android {&lt;br&gt;
    compileSdkVersion 28&lt;br&gt;
    defaultConfig {&lt;br&gt;
 ...&lt;br&gt;
        targetSdkVersion 28&lt;br&gt;
 ...&lt;br&gt;
    }&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
Once you have added the above dependencies, click on the “sync” (at the top right corner) so gradle can download the needed dependencies.&lt;/p&gt;

&lt;p&gt;The next step is to design our main layout. We want two input fields where we type in some data (that we will later save) and two buttons: Insert and save. The Insert button inserts our newly created object into the list displayed in the main view. The save button saves it persistently on our app. In the layout folder write inside the activity_main.xml file this:&lt;/p&gt;

&lt;p&gt;`&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;

    xmlns:app="http://schemas.android.com/apk/res-auto"&lt;br&gt;
    xmlns:tools="http://schemas.android.com/tools"&lt;br&gt;
    android:layout_width="match_parent"&lt;br&gt;
    android:layout_height="match_parent"&lt;br&gt;
    tools:context="de.pandaquests.myapplication.MainActivity"&amp;gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;androidx.recyclerview.widget.RecyclerView
    android:id="@+id/recyclerview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginBottom="100dp"
    android:background="@android:color/darker_gray" /&amp;gt;

&amp;lt;EditText
    android:id="@+id/edittext_line_1"
    android:layout_width="180dp"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_alignParentBottom="true"
    android:layout_marginBottom="52dp"
    android:hint="Line 1" /&amp;gt;

&amp;lt;EditText
    android:id="@+id/edittext_line_2"
    android:layout_width="180dp"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_alignParentBottom="true"
    android:hint="Line 2" /&amp;gt;

&amp;lt;Button
    android:id="@+id/button_insert"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@id/edittext_line_1"
    android:layout_marginStart="13dp"
    android:layout_marginTop="23dp"
    android:layout_toEndOf="@id/edittext_line_1"
    android:text="insert" /&amp;gt;

&amp;lt;Button
    android:id="@+id/button_save"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@id/button_insert"
    android:layout_toEndOf="@+id/button_insert"
    android:text="save" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;Next is we create the UI for our custom element. The custom element represents the data we insert into the list. Create in the layout folder a file named example_item.xml by right clicking and choose new -&amp;gt; Layout resource file. Write example_item.xml as the name and ignore the rest, because we will overwrite everything inside of that file with the following code inside of it:&lt;/p&gt;

&lt;p&gt;`&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br&gt;

    xmlns:app="http://schemas.android.com/apk/res-auto"&lt;br&gt;
    android:layout_width="match_parent"&lt;br&gt;
    android:layout_height="wrap_content"&lt;br&gt;
    android:layout_margin="4dp"&amp;gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_margin="4dp"&amp;gt;

    &amp;lt;TextView
        android:id="@+id/textview_line1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Line 1"
        android:textColor="@android:color/black"
        android:textSize="20sp"
        android:textStyle="bold" /&amp;gt;

    &amp;lt;TextView
        android:id="@+id/textview_line_2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/textview_line1"
        android:layout_marginStart="8dp"
        android:text="Line 2"
        android:textSize="15sp" /&amp;gt;

&amp;lt;/RelativeLayout&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;Once we are done with that, we will create the needed functionality for our main activity. Inside the MainActivity.java file write the following:&lt;/p&gt;

&lt;p&gt;`package de.pandaquests.myapplication;&lt;/p&gt;

&lt;p&gt;import android.content.SharedPreferences;&lt;br&gt;
import android.os.Bundle;&lt;br&gt;
import androidx.appcompat.app.AppCompatActivity;&lt;br&gt;
import androidx.recyclerview.widget.LinearLayoutManager;&lt;br&gt;
import androidx.recyclerview.widget.RecyclerView;&lt;br&gt;
import android.view.View;&lt;br&gt;
import android.widget.Button;&lt;br&gt;
import android.widget.EditText;&lt;/p&gt;

&lt;p&gt;import com.google.gson.Gson;&lt;br&gt;
import com.google.gson.reflect.TypeToken;&lt;/p&gt;

&lt;p&gt;import java.lang.reflect.Type;&lt;br&gt;
import java.util.ArrayList;&lt;/p&gt;

&lt;p&gt;public class MainActivity extends AppCompatActivity {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ArrayList&amp;lt;ExampleItem&amp;gt; mExampleList;
private RecyclerView mRecyclerView;
private ExampleAdapter mAdapter;
private RecyclerView.LayoutManager mLayoutManager;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    loadData();
    buildRecyclerView();
    setInsertButton();

    Button buttonSave = findViewById(R.id.button_save);
    buttonSave.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            saveData();
        }
    });
}

private void saveData() {
    SharedPreferences sharedPreferences = getSharedPreferences("shared preferences", MODE_PRIVATE);
    SharedPreferences.Editor editor = sharedPreferences.edit();
    Gson gson = new Gson();
    String json = gson.toJson(mExampleList);
    editor.putString("task list", json);
    editor.apply();
}

private void loadData() {
    SharedPreferences sharedPreferences = getSharedPreferences("shared preferences", MODE_PRIVATE);
    Gson gson = new Gson();
    String json = sharedPreferences.getString("task list", null);
    Type type = new TypeToken&amp;lt;ArrayList&amp;lt;ExampleItem&amp;gt;&amp;gt;() {}.getType();
    mExampleList = gson.fromJson(json, type);

    if (mExampleList == null) {
        mExampleList = new ArrayList&amp;lt;&amp;gt;();
    }
}

private void buildRecyclerView() {
    mRecyclerView = findViewById(R.id.recyclerview);
    mRecyclerView.setHasFixedSize(true);
    mLayoutManager = new LinearLayoutManager(this);
    mAdapter = new ExampleAdapter(mExampleList);

    mRecyclerView.setLayoutManager(mLayoutManager);
    mRecyclerView.setAdapter(mAdapter);
}

private void setInsertButton() {
    Button buttonInsert = findViewById(R.id.button_insert);
    buttonInsert.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            EditText line1 = findViewById(R.id.edittext_line_1);
            EditText line2 = findViewById(R.id.edittext_line_2);
            insertItem(line1.getText().toString(), line2.getText().toString());
        }
    });
}

private void insertItem(String line1, String line2) {
    mExampleList.add(new ExampleItem(line1, line2));
    mAdapter.notifyItemInserted(mExampleList.size());
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;You’ll probably see lots of errors. But don’t worry it’s because there are still files missing. Next we create the ExampleAdapter.java. Create in your project folder (the folder where also your MainActivity.java file is) a file named ExampleAdapter.java&lt;/p&gt;

&lt;p&gt;`package de.pandaquests.myapplication;&lt;/p&gt;

&lt;p&gt;import androidx.recyclerview.widget.RecyclerView;&lt;br&gt;
import android.view.LayoutInflater;&lt;br&gt;
import android.view.View;&lt;br&gt;
import android.view.ViewGroup;&lt;br&gt;
import android.widget.TextView;&lt;/p&gt;

&lt;p&gt;import java.util.ArrayList;&lt;/p&gt;

&lt;p&gt;public class ExampleAdapter extends RecyclerView.Adapter {&lt;br&gt;
    private ArrayList mExampleList;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static class ExampleViewHolder extends RecyclerView.ViewHolder {
    public TextView mTextViewLine1;
    public TextView mTextViewLine2;

    public ExampleViewHolder(View itemView) {
        super(itemView);
        mTextViewLine1 = itemView.findViewById(R.id.textview_line1);
        mTextViewLine2 = itemView.findViewById(R.id.textview_line_2);
    }
}

public ExampleAdapter(ArrayList&amp;lt;ExampleItem&amp;gt; exampleList) {
    mExampleList = exampleList;
}

@Override
public ExampleViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.example_item, parent, false);
    ExampleViewHolder evh = new ExampleViewHolder(v);
    return evh;
}

@Override
public void onBindViewHolder(ExampleViewHolder holder, int position) {
    ExampleItem currentItem = mExampleList.get(position);

    holder.mTextViewLine1.setText(currentItem.getLine1());
    holder.mTextViewLine2.setText(currentItem.getLine2());
}

@Override
public int getItemCount() {
    return mExampleList.size();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;Now we only need our custom Object. Let’s create ExampleItem.java file in your project folder and paste in the following code:&lt;/p&gt;

&lt;p&gt;`package de.pandaquests.myapplication;&lt;br&gt;
public class ExampleItem {&lt;br&gt;
    private String mLine1;&lt;br&gt;
    private String mLine2;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public ExampleItem(String line1, String line2) {
    mLine1 = line1;
    mLine2 = line2;
}

public String getLine1() {
    return mLine1;
}

public String getLine2() {
    return mLine2;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;We should now be set. Press on run and you should see a working sample app that saves custom data.&lt;/p&gt;

&lt;p&gt;You can download the whole app here from &lt;a href="https://github.com/pandaquests/AndroidSaveData" rel="noopener noreferrer"&gt;my gitHub&lt;/a&gt; and tweak it as you like. Use it as a base for your own projects.&lt;/p&gt;

&lt;p&gt;If you used the code I provided, then tell my what projects you intend to implement or already implemented. I’m really curious to know. So long.&lt;/p&gt;

&lt;p&gt;More details can be found in the &lt;a href="https://medium.com/gitconnected/how-to-create-an-android-app-that-persistently-saves-custom-objects-5362f277cb29" rel="noopener noreferrer"&gt;original article&lt;/a&gt;. If you want to know more, drop a line or follow me here or on &lt;a href="https://pandaquests.medium.com/" rel="noopener noreferrer"&gt;my tech blog&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>showdev</category>
    </item>
    <item>
      <title>URI vs. URL vs. URN</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Wed, 28 Dec 2022 17:47:59 +0000</pubDate>
      <link>https://dev.to/pandaquests/uri-vs-url-vs-urn-5hj2</link>
      <guid>https://dev.to/pandaquests/uri-vs-url-vs-urn-5hj2</guid>
      <description>&lt;p&gt;This &lt;a href="https://medium.com/javascript-in-plain-english/what-are-the-differences-between-uri-url-and-urn-e0b2e05b3fee"&gt;post was first published on my blog&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;You may have come across these terms before. And you may have used it interchangeably. But there are differences between them and if you are a professional software developer or working in the field of web development, it’s important to discern these terms.&lt;/p&gt;

&lt;p&gt;An URI (Uniform Resource Identifier) identifies a resource on the Internet either by location, or by name, or both. There are two subsets of URIs: The URL (Uniform Resource Locator) and the URN (Uniform Resource Name).&lt;/p&gt;

&lt;p&gt;The URL specifies where an identified resource is located and the mechanism for retrieving it. In case of an HTTP URL it is the HTTP protocol. But the machanism for retrieving the resource, doesn’t have to be HTTP URL, i.e. “http://”, an URL can also be “ftp://” (File Transfer Protocol for computer files) or “smb://” (Server Message Block for shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network).&lt;/p&gt;

&lt;p&gt;The URN is part of a larger Internet information architecture and unambigously identifies a resource. Contrary to the URL it does not imply availability of the identified resource.&lt;/p&gt;

&lt;p&gt;The URL is similar to a person’s address, as it defines somethings’s location, while the URN is similar to the ISBN of a book, as it unambigosly defines something’s identity. In other words: The URL answers the question Where something is while the URN answers the question Who something is.&lt;/p&gt;

&lt;p&gt;Source(s) and for more information:&lt;br&gt;
RFIC3986: &lt;a href="http://www.ietf.org/rfc/rfc3986.txt"&gt;http://www.ietf.org/rfc/rfc3986.txt&lt;/a&gt;&lt;br&gt;
&lt;a href="http://en.wikipedia.org/wiki/File_Transfer_Protocol"&gt;http://en.wikipedia.org/wiki/File_Transfer_Protocol&lt;/a&gt;&lt;br&gt;
&lt;a href="http://en.wikipedia.org/wiki/Server_Message_Block"&gt;http://en.wikipedia.org/wiki/Server_Message_Block&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you followed or subscribed to us, yet? We are publishing articles about JavaScript and software development in general multiple times a week. Make sure not to miss any of our great content.&lt;/p&gt;

&lt;p&gt;More details about this and many other topics on &lt;a href="https://medium.com/javascript-in-plain-english/what-are-the-differences-between-uri-url-and-urn-e0b2e05b3fee"&gt;my blog&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How HTTP works</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Mon, 26 Dec 2022 08:41:36 +0000</pubDate>
      <link>https://dev.to/pandaquests/how-http-works-3p6m</link>
      <guid>https://dev.to/pandaquests/how-http-works-3p6m</guid>
      <description>&lt;p&gt;This article was first published on my blog. For more details or to support me, read that &lt;a href="https://link.medium.com/E83Xdf5j4vb"&gt;article on my blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When browsing the internet you are using the HTTP/HTTPS protocol. Whenever you are clicking a button, calling an address in the browser, download a file on the internet, you are making an HTTP request. As simple as they may seem, there are process behind the curtain that make it all work. Have you ever wondered how it works behind the curtain? In this article I’ll explain to you how HTTP works.&lt;/p&gt;

&lt;p&gt;HTTP is a so called request response protocol. Meaning the client sends the request and the Server replies with a response. Request and response are both carefully formatted messages that the other can understand. Both messages are different message types. They are exchanged in a single HTTP transaction. These messages are in ASCII text and formatted according to the HTTP standard so client and server know how to interpret the content correctly.&lt;/p&gt;

&lt;p&gt;Any application that is able to open a network connection to a server machine and is able send data over the network can make an HTTP request. Even you can try this. Just type in manually the HTTP request by using Telnet from the command line. Heads up: A normal telnet session connects over port 23. As it was mentioned before, in order to connect to a server via HTTP we have to use port 80.&lt;/p&gt;

&lt;p&gt;In the following example we will use Telnet in order to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;connect to a server&lt;/li&gt;
&lt;li&gt;make an HTTP request&lt;/li&gt;
&lt;li&gt;receive an HTTP response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;telnet &lt;a href="http://www.google.com"&gt;www.google.com&lt;/a&gt; 80&lt;/p&gt;

&lt;p&gt;This command tells the computer to connect to a server with the host name “www.google.com” on port 80. After the connection is established you can write the HTTP request message:&lt;/p&gt;

&lt;p&gt;GET / HTTP/1.1&lt;/p&gt;

&lt;p&gt;The “GET” part tells the server we want to retrieve a resource.&lt;br&gt;
The “/” tells the server that the resource we want to retrieve is located at the root resource of the home page.&lt;br&gt;
“HTTP/1.1” tells the server we are using the HTTP 1.1 protocol to speak to him.&lt;/p&gt;

&lt;p&gt;Next you type this line:&lt;/p&gt;

&lt;p&gt;host: &lt;a href="http://www.google.com"&gt;www.google.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That line specifies the requested resource on the server, because one server could host multiple websites.&lt;/p&gt;

&lt;p&gt;After you type in this and pressed ENTER twice, you should see the HTTP response. The response is plain and simple HTML code. If the code would send to a browser then he would take the code render it into a website.&lt;/p&gt;

&lt;p&gt;Do you have any questions? Please leave a comment and I’ll get back to you as soon as possible.&lt;/p&gt;

&lt;p&gt;This article was first published on my blog. For more details or to support me, read, share, and like that &lt;a href="https://link.medium.com/E83Xdf5j4vb"&gt;article on my blog&lt;/a&gt;. Thank you in advance &lt;/p&gt;

</description>
      <category>http</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>URL encoding</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sun, 25 Dec 2022 21:00:23 +0000</pubDate>
      <link>https://dev.to/pandaquests/url-encoding-32le</link>
      <guid>https://dev.to/pandaquests/url-encoding-32le</guid>
      <description>&lt;p&gt;This post was first published &lt;a href="https://javascript.plainenglish.io/url-encoding-fb8e6ea4a1a4" rel="noopener noreferrer"&gt;on my blog&lt;/a&gt;. For more details check it out.&lt;/p&gt;

&lt;p&gt;In my last article I talked about what an URL is. In this article I’ll go a little bit further and talk in easy to understand way about what URL encoding is and why it is so important to URL encode.&lt;/p&gt;

&lt;p&gt;Photo by NASA on Unsplash&lt;br&gt;
URL was designed to make it as usable and interoperable as possible. Therefore the internet standard defines so called “unsafe characters”.&lt;/p&gt;

&lt;p&gt;Examples for unsafe characters are:&lt;br&gt;
The space “ ”, because they seem to disappear when printed or you don’t know how man space characters are there.&lt;br&gt;
The pond/sharp character “#”, because it is reserved for the fragment (we covered what a “fragment” is here already).&lt;br&gt;
The caret “^”, because not all network devices transmit this character correctly.&lt;/p&gt;

&lt;p&gt;What is considered a safe and what an unsafe character is defined in the RFC 3986. RFC stands for Request for Comments. It’s a recommendation made by the IETF (Internet Engineering Task Force). Even though it is officially a recommendation only it is considered a de facto standard.&lt;/p&gt;

&lt;p&gt;The RFC 3986 defines safe characters as alpha numeric characters in the US-ASCII and a few special characters like the colon “:” and the slash mark “/”.&lt;/p&gt;

&lt;p&gt;If you want to transmit one of these unsafe characters, then you have to “percent-encode” or also called “URL encode” them. For example if you want to store on the server foo.com the file “^hello world.txt”, then the valid URL would look like: “&lt;a href="http://foo.com/%5Ehello%20world.txt%E2%80%9D" rel="noopener noreferrer"&gt;http://foo.com/%5Ehello%20world.txt”&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see the caret “^” and the space “ ” have been replaced with “%5E” resp. “%20”. The characters after the percent characters “%” represent the corresponding hexadecimal number in the US-ASCII charachter table, i.e. “5E” and “20” are stands for “^” resp. “ ” in the US-ASCII table.&lt;/p&gt;

&lt;p&gt;The full US-ASCII table can be found here.&lt;/p&gt;

&lt;p&gt;Once these characters arrive at the server as a request it has parsed through an URL decoder. An URL decoder basically reverses the process of URL encoding. So, instead of having “%5E” or “%20”, you’ll have the caret “^” or the space “ ” character again.&lt;/p&gt;

&lt;p&gt;Have you used URL encoding before? What kind of project was it? Do you have any questions? Comment below and let me know.&lt;/p&gt;

&lt;p&gt;This article was first published on my blog. For more details or to support me, &lt;a href="https://javascript.plainenglish.io/url-encoding-fb8e6ea4a1a4" rel="noopener noreferrer"&gt;read that article on my blog &lt;/a&gt;&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>How I stay productive and healthy during home office</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sat, 17 Dec 2022 20:09:53 +0000</pubDate>
      <link>https://dev.to/pandaquests/how-i-stay-productive-and-healthy-during-home-office-2ggo</link>
      <guid>https://dev.to/pandaquests/how-i-stay-productive-and-healthy-during-home-office-2ggo</guid>
      <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Covid19 and the lockdown hit us really hard and has made workplace more challenging than we could anticipate. While for some home office has it’s perks, for others it has some daunting effect on health and work-life-balance. By now most of us thought things would be back to where it used to be. But it seems like home office or at least hybrid work is here to stay&lt;/p&gt;

&lt;p&gt;In this article I’ll share 6 tips of how you can stay fit even when working at home.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Simulate that you go to work&lt;br&gt;
Dress up like you normally would. Then go out of your house. Walk around your house and then go back to your house and start working. This will trick your mind that you are going to your actual office to work. It also gets your blood flowing and you’ll be more active when you start working.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take breaks&lt;br&gt;
When there’s a lunch break go to lunch. Don’t work through the breaks and postpone your meals. Otherwise this will have detrimental effects on your body — especially if you are a little older like me. Also make small breaks once in a while during work. It’s important to take breaks throughout the day to recharge and refocus. This can be as simple as getting up to stretch or going for a short walk.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take care of yourself&lt;br&gt;
Working from home can be demanding, so it’s important to take care of yourself. Make sure to eat healthy meals, get regular exercise, and get enough sleep. You probably sit longer than usual. So, it’s important to stretch your body. This will help you stay focused and productive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a dedicated place for you to work&lt;br&gt;
Those with small rooms decorate your table. At least make it distinguishable between work and normal life. Choose a quiet, clutter-free space in your home to serve as your office. Having a dedicated workspace can help you stay focused and avoid distractions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Log out&lt;br&gt;
I found out I worked more when being in home office. Because there is only a short distance to my workplace. Even when work is done and dinner is ready, I would constantly think about work, because it’s so close. So, my advice is, once your daily work is done, log out. Log out also mentally. Don’t think of work, once work is done.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stay connected with others&lt;br&gt;
Working from home can sometimes feel isolating, so it’s important to stay connected with your colleagues. Use video conferencing tools to have regular meetings, and make sure to communicate regularly through email or instant messaging. Even if you are an introvert (like me), stay connected. Inform yourself about the latest information in your organisation. Set up an appointment at lunch to video chat. It helps you not only to keep in touch with your co workers but with your work so you won’t become detached from it. Maybe even schedule a meeting with one of them once in a while (but bear the personal distance in mind)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What has been your experince with working from home? Do you have any tips that made your life easier when working from home? Please share and comment below.&lt;/p&gt;

</description>
      <category>workfromhome</category>
      <category>webdev</category>
      <category>softwaredeveloper</category>
      <category>wfh</category>
    </item>
    <item>
      <title>What simple side hustle would you recommend for a software developer? I would even take one that pays $1 a day</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sun, 26 Dec 2021 15:38:27 +0000</pubDate>
      <link>https://dev.to/pandaquests/what-simple-side-hustle-would-you-recommend-for-a-software-developer-i-would-even-take-one-that-pays-1-a-day-37fb</link>
      <guid>https://dev.to/pandaquests/what-simple-side-hustle-would-you-recommend-for-a-software-developer-i-would-even-take-one-that-pays-1-a-day-37fb</guid>
      <description></description>
      <category>programming</category>
      <category>javascript</category>
      <category>java</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Do you openly talk about money at your workplace?</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sun, 26 Dec 2021 15:11:35 +0000</pubDate>
      <link>https://dev.to/pandaquests/do-you-openly-talk-about-money-at-your-workplace-1nfo</link>
      <guid>https://dev.to/pandaquests/do-you-openly-talk-about-money-at-your-workplace-1nfo</guid>
      <description></description>
    </item>
    <item>
      <title>Do you guys invest in the stock market? What broker do you use? What strategy do you follow? What stocks do you invest in?</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sun, 26 Dec 2021 15:11:05 +0000</pubDate>
      <link>https://dev.to/pandaquests/do-you-guys-invest-in-the-stock-market-what-broker-do-you-use-what-strategy-do-you-follow-what-stocks-do-you-invest-in-142h</link>
      <guid>https://dev.to/pandaquests/do-you-guys-invest-in-the-stock-market-what-broker-do-you-use-what-strategy-do-you-follow-what-stocks-do-you-invest-in-142h</guid>
      <description></description>
      <category>productivity</category>
      <category>stock</category>
      <category>money</category>
    </item>
    <item>
      <title>Why did you become a software engineer? How did it all started?</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sat, 25 Dec 2021 18:26:03 +0000</pubDate>
      <link>https://dev.to/pandaquests/why-did-you-become-a-software-engineer-how-did-it-all-started-3mao</link>
      <guid>https://dev.to/pandaquests/why-did-you-become-a-software-engineer-how-did-it-all-started-3mao</guid>
      <description></description>
      <category>productivity</category>
      <category>work</category>
      <category>programming</category>
    </item>
    <item>
      <title>How do you know if someone is a good developer?</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sat, 25 Dec 2021 18:24:54 +0000</pubDate>
      <link>https://dev.to/pandaquests/how-do-you-know-if-someone-is-a-good-developer-41n</link>
      <guid>https://dev.to/pandaquests/how-do-you-know-if-someone-is-a-good-developer-41n</guid>
      <description></description>
      <category>productivity</category>
      <category>work</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>What perks does your employer give to you?</title>
      <dc:creator>Panda Quests</dc:creator>
      <pubDate>Sat, 25 Dec 2021 18:24:07 +0000</pubDate>
      <link>https://dev.to/pandaquests/what-perks-does-your-employer-give-to-you-l50</link>
      <guid>https://dev.to/pandaquests/what-perks-does-your-employer-give-to-you-l50</guid>
      <description></description>
      <category>productivity</category>
      <category>work</category>
    </item>
  </channel>
</rss>
