teleren/devto huggingface dataset:
Island Peak Climbing
Tags: webdev, javascript, beginners, programming
Published: 2024-06-10 04:28:07

**_[Island Peak Climbing](https://www.nepalsocialtreks.com/trip/island-peak-climbing/)_** is one of the most beautiful trekking and peak climbing centers in the Himalayas. Located in the Everest/Khumbu region of Eastern Nepal, Island Peak Climbing is perfect for you if you are an adventure lover and enthusiast of energetic and challenging treks. The 19 days journey takes you through some of the surreal landscapes of the Everest/Khumbu Region until you conquer the top of magical Island Peak.

Island Peak, also known as Imja Tse, stands at 6189 meters (20305ft) above sea level. It stands in the picturesque Imja Valley in the Everest region, only a few miles from Mount Everest (8848m). The peak looks like an island from a distance amidst the icy waters guarded by silver mountains.

Your enthralling journey gets underway with an adventurous flight to Tenzing–Hillary Airport, Lukla, from the capital city. You will enjoy seeing magnificent views from the top before landing amidst the high hills in one of the world’s most extreme airports.

After an enticing flight, you will commence the trek that takes you through some of the beautiful trails. From exploring the gateway of Mount Everest: Namche Bazar to visiting the historical Tengboche monastery, you will get lost in the tranquility of the beautiful nature. Moreover, the expedition presents you the chance to stroll around the Everest Base Camp, from where the dreams of many climbing enthusiasts of conquering the great Mount Everest begins.

The summit of Island Peak gets underway once you reach the Island Peak Base Camp. From there, you will climb towards the High Camp and acclimatize your body properly before the ultimate summit. Our Sherpa guides will involve you in some drills and physical exercises before you begin the most fun part of the expedition.

Ascending the Island Peak is not that challenging; however, you have to face some physical difficulties before reaching the top. Nevertheless, your efforts won’t go in vain as the summit offers you some bone-chilling views of Lhotse (8516m), Mount Pumori (7161m), Mera Peak, Mt. Barunste and other surrounding peaks.

You can climb Island Peak during two seasons on either side of the monsoon, spring (mid-March to May) and autumn (mid-September to November). Likewise, it is possible to climb the peak during the winter, but cold temperatures will create additional difficulties.

We are here to make sure that you achieve your quest to conquer the top of Island Peak without any difficulties. We have a team of expert climbers, who have the experience of completing any kind of climbs with minimal or no risks. Besides, they will provide you the necessary assistance even during the grueling scenarios.

This Island Peak Climbing trip offers you an opportunity to explore the Everest/Khumbu region of Nepal from its core.
Cookie consent in NextJs
Tags: javascript, react, nextjs, programming
Published: 2024-06-10 04:27:39


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u88fo5xgv29rnaaishwg.png)

This article discusses how to add cookie consent to a NextJs app using `cookies-next` package.

## **Install the required packages:**

To install the package, type one of the following commands based on your package manager

For npm:
```
npm install cookies-next
```

For yarn:
```
yarn add cookies-next
```

## **Cookie consent implementation:**

When there is no cookie present, the cookie consent popup should be shown.

`cookies-next` package has `hasCookie`, `setCookie` functions with which the cookies can be accessed and managed. Here is how its managed in a React component.

```
const [showConsent, setShowConsent] = React.useState(true);
React.useEffect(() => {
  setShowConsent(hasCookie("localConsent"));
}, []);
const acceptCookie = () => {
  setShowConsent(true);
  setCookie("localConsent", "true", {});
};
```

Here is a full example of how a cookie consent component works in Next.js. Add the component to your `pages/index.js` to be visible.

```
import React from "react";
import { hasCookie, setCookie } from "cookies-next";

const CookieConsent = (props) => {
  const [showConsent, setShowConsent] = React.useState(true);

  React.useEffect(() => {
    setShowConsent(hasCookie("localConsent"));
  }, []);

  const acceptCookie = () => {
    setShowConsent(true);
    setCookie("localConsent", "true", {});
  };

  if (showConsent) {
    return null;
  }

  return (
    <div className="fixed inset-0 bg-slate-700 bg-opacity-70">
      <div className="fixed bottom-0 left-0 right-0 flex items-center justify-between px-4 py-8 bg-gray-100">
        <span className="text-dark text-base mr-16">
          This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.
        </span>
        <button className="bg-green-500 py-2 px-8 rounded text-white" onClick={() => acceptCookie()}>
          Accept
        </button>
      </div>
    </div>
  );
};

export default CookieConsent;
```

Note: The above example uses tailwindcss. To know more, [refer here](https://tailwindcss.com/docs/guides/nextjs)



![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qd5lae72ag4o6cc3d1kg.png)

## Be Amazed!
Hooray! We have successfully added cookie consent in Next.js.
𝐌𝐚𝐬𝐭𝐞𝐫𝐢𝐧𝐠 𝐃𝐞𝐬𝐢𝐠𝐧 𝐏𝐚𝐭𝐭𝐞𝐫𝐧𝐬 𝐢𝐧 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭: 𝟏/𝟔 - 𝐓𝐡𝐞 𝐌𝐨𝐝𝐮𝐥𝐞 𝐏𝐚𝐭𝐭𝐞𝐫𝐧
Published: 2024-06-10 04:17:23

🎯 𝐌𝐚𝐬𝐭𝐞𝐫𝐢𝐧𝐠 𝐃𝐞𝐬𝐢𝐠𝐧 𝐏𝐚𝐭𝐭𝐞𝐫𝐧𝐬 𝐢𝐧 𝐉𝐚𝐯𝐚𝐒𝐜𝐫𝐢𝐩𝐭: 𝟏/𝟔 - 𝐓𝐡𝐞 𝐌𝐨𝐝𝐮𝐥𝐞 𝐏𝐚𝐭𝐭𝐞𝐫𝐧

𝖨𝗇 𝗈𝗎𝗋 𝖿𝖺𝗌𝗍-𝗉𝖺𝖼𝖾𝖽 𝗍𝖾𝖼𝗁 𝗐𝗈𝗋𝗅𝖽, 𝗐𝗋𝗂𝗍𝗂𝗇𝗀 𝖼𝗅𝖾𝖺𝗇 𝖺𝗇𝖽 𝗆𝖺𝗂𝗇𝗍𝖺𝗂𝗇𝖺𝖻𝗅𝖾 𝖼𝗈𝖽𝖾 𝗂𝗌 𝖾𝗌𝗌𝖾𝗇𝗍𝗂𝖺𝗅. 𝖳𝗁𝖾 𝐌𝐨𝐝𝐮𝐥𝐞 𝐏𝐚𝐭𝐭𝐞𝐫𝐧 𝗂𝗇 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝗂𝗌 𝖺 𝗉𝗈𝗐𝖾𝗋𝖿𝗎𝗅 𝖽𝖾𝗌𝗂𝗀𝗇 𝗉𝖺𝗍𝗍𝖾𝗋𝗇 𝗍𝗁𝖺𝗍 𝗁𝖾𝗅𝗉𝗌 𝖺𝖼𝗁𝗂𝖾𝗏𝖾 𝗍𝗁𝗂𝗌 𝖻𝗒 𝖾𝗇𝖺𝖻𝗅𝗂𝗇𝗀 𝗉𝗎𝖻𝗅𝗂𝖼 𝖺𝗇𝖽 𝗉𝗋𝗂𝗏𝖺𝗍𝖾 𝖾𝗇𝖼𝖺𝗉𝗌𝗎𝗅𝖺𝗍𝗂𝗈𝗇 𝗐𝗂𝗍𝗁𝗂𝗇 𝖺 𝗌𝗂𝗇𝗀𝗅𝖾 𝗈𝖻𝗃𝖾𝖼𝗍.

🚀 𝐖𝐡𝐲 𝐔𝐬𝐞 𝐭𝐡𝐞 𝐌𝐨𝐝𝐮𝐥𝐞 𝐏𝐚𝐭𝐭𝐞𝐫𝐧?
𝟣. 𝐄𝐧𝐜𝐚𝐩𝐬𝐮𝐥𝐚𝐭𝐢𝐨𝐧: 𝖪𝖾𝖾𝗉 𝗉𝖺𝗋𝗍𝗌 𝗈𝖿 𝗒𝗈𝗎𝗋 𝖼𝗈𝖽𝖾 𝗁𝗂𝖽𝖽𝖾𝗇 𝖺𝗇𝖽 𝗉𝗋𝗈𝗍𝖾𝖼𝗍𝖾𝖽.
𝟤. 𝐌𝐚𝐢𝐧𝐭𝐚𝐢𝐧𝐚𝐛𝐢𝐥𝐢𝐭𝐲: 𝖲𝗂𝗆𝗉𝗅𝗂𝖿𝗒 𝖼𝗈𝖽𝖾 𝗆𝖺𝗂𝗇𝗍𝖾𝗇𝖺𝗇𝖼𝖾 𝖻𝗒 𝗈𝗋𝗀𝖺𝗇𝗂𝗓𝗂𝗇𝗀 𝗋𝖾𝗅𝖺𝗍𝖾𝖽 𝖿𝗎𝗇𝖼𝗍𝗂𝗈𝗇𝗌 𝖺𝗇𝖽 𝗏𝖺𝗋𝗂𝖺𝖻𝗅𝖾𝗌.
𝟥. 𝐍𝐚𝐦𝐞𝐬𝐩𝐚𝐜𝐞 𝐌𝐚𝐧𝐚𝐠𝐞𝐦𝐞𝐧𝐭: 𝖯𝗋𝖾𝗏𝖾𝗇𝗍 𝗀𝗅𝗈𝖻𝖺𝗅 𝗇𝖺𝗆𝖾𝗌𝗉𝖺𝖼𝖾 𝗉𝗈𝗅𝗅𝗎𝗍𝗂𝗈𝗇.

𝖧𝖾𝗋𝖾'𝗌 𝖺 𝗊𝗎𝗂𝖼𝗄 𝖾𝗑𝖺𝗆𝗉𝗅𝖾 𝗍𝗈 𝗂𝗅𝗅𝗎𝗌𝗍𝗋𝖺𝗍𝖾 𝗍𝗁𝖾 𝖬𝗈𝖽𝗎𝗅𝖾 𝖯𝖺𝗍𝗍𝖾𝗋𝗇 𝗂𝗇 𝖺𝖼𝗍𝗂𝗈𝗇:

```
𝖼𝗈𝗇𝗌𝗍 𝗆𝗒𝖬𝗈𝖽𝗎𝗅𝖾 = (𝖿𝗎𝗇𝖼𝗍𝗂𝗈𝗇() {
 𝖼𝗈𝗇𝗌𝗍 𝗉𝗋𝗂𝗏𝖺𝗍𝖾𝖵𝖺𝗋𝗂𝖺𝖻𝗅𝖾 = '𝖨 𝖺𝗆 𝗉𝗋𝗂𝗏𝖺𝗍𝖾';
 𝖿𝗎𝗇𝖼𝗍𝗂𝗈𝗇 𝗉𝗋𝗂𝗏𝖺𝗍𝖾𝖬𝖾𝗍𝗁𝗈𝖽() {
 𝖼𝗈𝗇𝗌𝗈𝗅𝖾.𝗅𝗈𝗀(𝗉𝗋𝗂𝗏𝖺𝗍𝖾𝖵𝖺𝗋𝗂𝖺𝖻𝗅𝖾);
 }
𝗋𝖾𝗍𝗎𝗋𝗇 {
 𝗉𝗎𝖻𝗅𝗂𝖼𝖬𝖾𝗍𝗁𝗈𝖽: 𝖿𝗎𝗇𝖼𝗍𝗂𝗈𝗇() {
 𝗉𝗋𝗂𝗏𝖺𝗍𝖾𝖬𝖾𝗍𝗁𝗈𝖽();
 }
 };
})();
𝗆𝗒𝖬𝗈𝖽𝗎𝗅𝖾.𝗉𝗎𝖻𝗅𝗂𝖼𝖬𝖾𝗍𝗁𝗈𝖽(); // 𝖮𝗎𝗍𝗉𝗎𝗍: 𝖨 𝖺𝗆 𝗉𝗋𝗂𝗏𝖺𝗍𝖾
```

🔍 𝐊𝐞𝐲 𝐓𝐚𝐤𝐞𝐚𝐰𝐚𝐲𝐬:

𝟣. 𝐏𝐫𝐢𝐯𝐚𝐭𝐞 𝐕𝐚𝐫𝐢𝐚𝐛𝐥𝐞𝐬 𝐚𝐧𝐝 𝐌𝐞𝐭𝐡𝐨𝐝𝐬: 𝖣𝖾𝖿𝗂𝗇𝖾𝖽 𝗂𝗇𝗌𝗂𝖽𝖾 𝗍𝗁𝖾 𝗆𝗈𝖽𝗎𝗅𝖾, 𝗍𝗁𝖾𝗒 𝖺𝗋𝖾 𝗂𝗇𝖺𝖼𝖼𝖾𝗌𝗌𝗂𝖻𝗅𝖾 𝖿𝗋𝗈𝗆 𝗈𝗎𝗍𝗌𝗂𝖽𝖾.
𝟤. 𝐏𝐮𝐛𝐥𝐢𝐜 𝐌𝐞𝐭𝐡𝐨𝐝𝐬: 𝖱𝖾𝗍𝗎𝗋𝗇𝖾𝖽 𝖿𝗋𝗈𝗆 𝗍𝗁𝖾 𝗆𝗈𝖽𝗎𝗅𝖾, 𝖺𝗅𝗅𝗈𝗐𝗂𝗇𝗀 𝖼𝗈𝗇𝗍𝗋𝗈𝗅𝗅𝖾𝖽 𝖺𝖼𝖼𝖾𝗌𝗌 𝗍𝗈 𝗉𝗋𝗂𝗏𝖺𝗍𝖾 𝗆𝖾𝗆𝖻𝖾𝗋𝗌.

𝖨𝗇𝖼𝗈𝗋𝗉𝗈𝗋𝖺𝗍𝗂𝗇𝗀 𝗍𝗁𝖾 𝖬𝗈𝖽𝗎𝗅𝖾 𝖯𝖺𝗍𝗍𝖾𝗋𝗇 𝗂𝗇𝗍𝗈 𝗒𝗈𝗎𝗋 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝗉𝗋𝗈𝗃𝖾𝖼𝗍𝗌 𝖼𝖺𝗇 𝗌𝗂𝗀𝗇𝗂𝖿𝗂𝖼𝖺𝗇𝗍𝗅𝗒 𝖾𝗇𝗁𝖺𝗇𝖼𝖾 𝗒𝗈𝗎𝗋 𝖼𝗈𝖽𝖾'𝗌 𝗌𝗍𝗋𝗎𝖼𝗍𝗎𝗋𝖾 𝖺𝗇𝖽 𝖼𝗅𝖺𝗋𝗂𝗍𝗒.


🔗 𝖶𝗁𝖺𝗍 𝖽𝖾𝗌𝗂𝗀𝗇 𝗉𝖺𝗍𝗍𝖾𝗋𝗇𝗌 𝗁𝖺𝗏𝖾 𝗒𝗈𝗎 𝖿𝗈𝗎𝗇𝖽 𝗆𝗈𝗌𝗍 𝗎𝗌𝖾𝖿𝗎𝗅 𝗂𝗇 𝗒𝗈𝗎𝗋 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝗃𝗈𝗎𝗋𝗇𝖾𝗒? 𝖲𝗁𝖺𝗋𝖾 𝗒𝗈𝗎𝗋 𝖾𝗑𝗉𝖾𝗋𝗂𝖾𝗇𝖼𝖾𝗌 𝖺𝗇𝖽 𝗅𝖾𝗍'𝗌 𝖽𝗂𝗌𝖼𝗎𝗌𝗌! 💬
The Booming Field with Bite (and a Few Bytes of Caution)
Tags: discuss, web3, webdev
Published: 2024-06-10 04:09:35


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zs5efs6569l43bv7sm59.jpg)

The tech industry is hot right now, let's face it. However, those aren't the only benefits—free kombucha on tap is also a pretty great bonus. It's difficult to find the special combination of challenge, advancement, and stability that IT employment offer elsewhere. Here are some reasons why a job in IT might be ideal for you:

## 1. Demand is Skyrocketing:
While COVID-19 wasn't quite kind to everyone, it did manage to get us all online. With the rise of e-commerce and remote employment, businesses are depending more than ever on technology. Given that the Bureau of Labor Statistics projects a 13% growth rate in computer and information technology jobs by 2030 [BLS reference], IT professionals are in great demand.

## 2. From Code Wizards to Cloud Architects: Variety is the Spice of IT Life:
There is no one-size-fits-all approach in the IT industry. There's a niche out there for you, whether you enjoy the delicate dance of cloud computing, the logic of coding, or the excitement of cybersecurity. You can choose a career that complements your interests and strengths thanks to this variety.

## 3. Lifelong Learning, Limitless Earning:
Since technology is always changing, careers in information technology are far from static. You'll face ongoing challenges to keep up with the latest developments and pick up new talents. The favorable tidings? This insatiable curiosity is satisfied. IT occupations are renowned for offering generous opportunities for growth and good pay.

### But wait—it's not all sunshine and unicorns—or unicorns with superhuman coding abilities:

## 1. The Never-ending Quest for Knowledge:
IT's never-ending development might occasionally feel intimidating. It takes commitment and a constant desire to learn new things to stay up to date with the newest trends and technology.

## 2.The Work-Life Seesaw:
Remote work and flexible schedules are a major perk in IT, but they can also blur the line between work and personal life. It's important to establish boundaries to avoid burnout.

## 3. The Pressure to Perform:  
IT infrastructure is the foundation of many businesses. IT professionals are frequently the first to respond when something goes wrong. This might result in tense circumstances, particularly when deadlines are approaching.

So, are you suited for a career in IT? Yes, definitely, if you're a problem-solver who loves challenges and lifelong learning! With the demand for IT professionals always increasing, now is a fantastic moment to join the sector as it offers a safe and fulfilling career path. But keep in mind that even the most glamorous jobs have their share of difficulties. But hey, you can get through them and have a genuinely rewarding tech career if you take the appropriate approach.
Automatically Update the Local Branch with the Remote Version When Switching Branches in Git
Tags: git, learning, beginners, productivity
Published: 2024-06-10 04:07:54

When you switch to your main branch during development, do you ever forget to perform a `git pull`?

When you `checkout` to a particular branch, you can utilize a feature called "Git Hooks" to have a `git pull` executed automatically.

This article explains how to configure it.

# Setup procedure

1. Go to the `.git/hooks` directory of the repository of your choice.
2. Create a file named `post-checkout` in the `.git/hooks` directory.
3. In this `post-checkout`, write the following code:

```bash
#! /bin/sh

# Get the current branch name
branch=$(git rev-parse --abbrev-ref HEAD)

# Do a git pull when you move to the `master` branch
if [ "$branch" = "master" ]; then
    git pull origin $branch
fi
```

4. After editing `post-checkout`, go to the root of the desired repository in a terminal.
5. Execute the following command in the terminal to give the `post-checkout` file the permission to execute the script.

```cmd
chmod +x .git/hooks/post-checkout
```

This completes the configuration. The `post-checkout` file above will automatically perform a git pull when you git checkout (or git switch) from any branch to the `master` branch.

## If you want to set up "automatic local modernization on branch move" for multiple branches

```bash
#!/bin/sh

# Get the current branch name
branch=$(git rev-parse --abbrev-ref HEAD)

# Handle the 'master' and 'develop' branches
if [ "$branch" = "master" ] || [ "$branch" = "develop" ]; then
    # Calling exec < /dev/tty assigns standard input to the keyboard
    exec < /dev/tty
    read -n 1 -p "Do you want to pull the '$branch' branch? (y/n): " answer
    echo "\n"

    if [ "$answer" = "y" ]; then
        # Break line
        git pull origin $branch
    else
        echo "Skipping 'git pull' for the '$branch' branch."
    fi
# Handle other branches
else
    echo "Skipping 'git pull' for the '$branch' branch."
fi
```
# Referenced articles

- [https://qiita.com/t-sakamoto-0601/items/9254cd4a4a785b1b29e6]([Git] How to automatically get the remote (latest) status of a branch when you move to a specific branch locally.)
Glam Up my Markup: Beaches
Tags: devchallenge, frontendchallenge, css, javascript
Published: 2024-06-10 03:46:17

_This is a submission for [Frontend Challenge v24.04.17]((https://dev.to/challenges/frontend-2024-05-29), Glam Up My Markup: Beaches_

## What I Built

Welcome to the "Take Me to the Beach" project! This website showcases some of the most beautiful and popular beaches globally. You can explore detailed information about each beach, including its unique features and attractions. Additionally, the site includes a dark/light mode toggle for a personalized viewing experience.

Technologies Used

- HTML: For structuring the content.
- CSS: For styling the website.
- JavaScript: For interactive elements, including the dark/light mode toggle.
.

## Demo
You can visit my website here : [Take me to the Beach](https://flex0ing-ag.github.io/Take-me-to-the-beach/)
This is my Code : [GitHub](https://github.com/flex0ing-ag/Take-me-to-the-beach)

## Journey

- Learning Experience: Through this project, I deepened my understanding of HTML, CSS, and JavaScript. Implementing the dark/light mode toggle was particularly rewarding, as it challenged me to think about user experience and accessibility.

- Proud Moments: I am particularly proud of the responsive design, ensuring that the website looks great on all devices. The process of collecting and presenting beautiful images and information about the beaches was also very fulfilling.

- Challenges: One of the main challenges was optimizing the images and ensuring fast load times without compromising on quality. It was a great learning experience in balancing aesthetics and performance.

- Next Steps: I hope to expand this project by adding more beaches, user reviews, and an interactive map. Additionally, I aim to enhance the website's interactivity with more advanced JavaScript features.

Thank you for exploring this project. I hope you enjoy it as much as I enjoyed creating it!
Javascript Promise Methords
Published: 2024-06-10 03:43:13

**Summary**

**Promise.all** :- Resolves when all promises resolve, or rejects if any promise rejects.
**Promise.race** :- Resolves or rejects as soon as one of the promises resolves or rejects.
**Promise.allSettled** :- Resolves when all promises have settled, with an array of outcomes.
**Promise.any** :- Resolves as soon as any promise resolves, or rejects with an AggregateError if all promises reject.
**Promise.resolve** :- Returns a promise that resolves with the given value.
**Promise.reject** :- Returns a promise that rejects with the given reason.
Websocket
Published: 2024-06-10 03:30:39



![Websocket picture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r11nzwppzrb7elv27roy.png)

**Introduction to WebSockets**
WebSockets represent a significant advancement in web technology, enabling real-time, bidirectional communication between clients and servers. Unlike traditional HTTP requests, which are unidirectional and stateless, WebSockets provide persistent connections that facilitate instantaneous data exchange.

**How WebSockets work?**
At its core, WebSocket is a protocol that establishes a full-duplex communication channel over a single TCP connection. This means that both the client and the server can send and receive data simultaneously without the overhead of multiple HTTP requests. The initial connection is established through a standard HTTP handshake, after which the connection is upgraded to the WebSocket protocol.


![Websocket image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pluxc5fr2tytzkfcqcx0.jpg)



**Advantages of WebSockets**
One of the key advantages of WebSockets is its low latency and high throughput, making it ideal for applications that require real-time updates, such as chat applications, online gaming, financial trading platforms, and collaborative tools. Additionally, WebSockets reduce server load by eliminating the need for frequent polling, leading to more efficient use of network resources.


![Websocket, and HTTP comparison](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuzk9pawr32uaq5k0g5i.png)


**Implementing WebSockets**
Implementing WebSockets in web applications typically involves using WebSocket APIs provided by modern web browsers, along with server-side WebSocket libraries or frameworks. Popular choices include Socket.IO, ws (Node.js WebSocket library), and Django Channels (for Python-based applications). With these tools, developers can easily integrate WebSocket functionality into their applications and harness the power of real-time communication.

**WebSocket Security Considerations**
While WebSockets offer many benefits, it's essential to consider security implications when implementing them in web applications. Cross-origin resource sharing (CORS), authentication, and encryption are critical aspects of WebSocket security. Additionally, developers should be aware of potential security vulnerabilities, such as denial-of-service (DoS) attacks, message tampering, and injection attacks, and take appropriate measures to mitigate these risks.

**Future of WebSockets**
As web technology continues to evolve, WebSockets are expected to play an increasingly significant role in enabling interactive and immersive web experiences. With the advent of technologies like WebRTC (Real-Time Communication) and HTTP/3, which incorporates features like multiplexing and connection reuse, the future looks bright for real-time communication on the web.

**What are WebSocket's used for?**

- Multiplayer online games
- Live sports scores and updates
- Collaborative editing and documenting sharing
- Financial trading platforms
- Live streaming and broadcasting
Update: Live Feedback script
Tags: webdev, javascript, react, productivity
Published: 2024-06-10 02:58:35

![Live feedback banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9s4tzohcwmguj8yqfs93.png)


Hi! A few weeks ago I wrote a blog post [Introducing Live Feedback](https://dev.to/juliankominovic/introducing-live-feedback-2cg8) as a Google Chrome Extension.
Live Feedback is a script that allows you to start getting feedback directly on your website in real time from your developers, designers and everyone with a Github account.

I've been using it for a while and I realized that it would be much more useful if it was a standalone script.
So I decided to rewrite it as a script and publish it on GitHub.

**Try it out and let me know what you think!**
**Link: [Try Live Feedback](https://www.jkominovic.dev/live-feedback)**
**[Github repo](https://github.com/JulianKominovic/live-feedback)**
Interface Segregation Principle
Published: 2024-06-10 02:50:07

The Interface Segregation Principle (ISP) suggests that a class should not be forced to implement methods it doesn’t need.

### Bad Practice - Principle not followed

```java

            +------------------+
            |   <<interface>>  |
            |     IVehicle     |
            +------------------+
            | + drive()        |
            | + fly()          |
            +------------------+    
                ^         ^
                |         |               
+------------------+    +------------------+
|      Car         |    |    Airplane      |
+------------------+    +------------------+
| + drive()        |    | + drive()        |
| + fly()          |    | + fly()          |
+------------------+    +------------------+
```

### Good Practice - Principle followed

```java


+------------------+              +------------------+
|   <<interface>>  |              | <<interface>>    |
|      ICar        |              |    IAirplane     |
+------------------+              +------------------+
| + drive()        |              | + fly()          |
+------------------+              +------------------+
        ^                                ^
        |                                |
+------------------+              +------------------+
|      Car         |              |    Airplane      |
+------------------+              +------------------+
| + drive()        |              | + fly()          |
+------------------+              +------------------+
| <<implements>>   |              | <<implements>>   |
|      ICar        |              |    IAirplane     |
+------------------+              +------------------+

```
How To Get Out Of Tutorial Hell
Tags: webdev, beginners, programming, html
Published: 2024-06-10 02:45:00

Once you finish a web development Course, I would build a project that you are interested in.

Like ask yourself, what are your interests, what are your passions. What do you like?

Don't build a Netflix clone. Everybody does that.

Don't build a Meta clone. Everybody does that.

Like, you should be original.

Do something that is unique and something that you are passionate about. Not what everyone else wants you to do.

Before we continue, if you are struggling with web development, [DM me now](https://x.com/thekarlesi) and I'll get back to you.

And the advantage of this approach, is that, when you are actually building the thing, you are more likely to enjoy what it is that you are working on. Because you like the stuff that you are working on. It is something that you are actually passionate about.

So, for me, I am interested in Career development. So, I build a job board. And I really like doing that because I am super interested in whatever it is that I was building.

### Build project without framework

This is important because it reinforces the fundamental basics understanding of the language of your choice.

Like, you want to know the basics. Like, how to write functions. Like, how to write a for loop in JavaScript.

It is only about after you have developed this project in the vanilla language of your choice that you can build it in a framework.

So, after I was done building this project in Vanilla JavaScript, I then decided to rebuild the project in the framework of my choice which was React.

I was able to better understand React as a result. Like I really understood the basics of JavaScript.

This is SUPER important. Because a lot of people are going to tell you that you should immediately start building in the framework of you choice.

Happy Coding!
Karl

P.S. If you are struggling with web development, [DM me now](https://x.com/thekarlesi) and I'll get back to you.
Unity of developers is the power to advance the future
Published: 2024-06-10 02:30:27

Nowadays humanity is not united as one.
What if astronauts attack Earth?
What will humanity do then?
Will the Earth still fight among itself then?
What if humanity becomes one only then...?
Is such a sacrifice really necessary for the unity of humanity?
I want to ask everyone in the world
Is it necessary for someone to sacrifice for unity?
Is there a need for common sorrow in order to unite?