<?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: Trimech Sarah</title>
    <description>The latest articles on DEV Community by Trimech Sarah (@trimech_sarah).</description>
    <link>https://dev.to/trimech_sarah</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%2F2826477%2Fa32feb23-b6a2-4ece-b5a1-84f5dd18448d.jpg</url>
      <title>DEV Community: Trimech Sarah</title>
      <link>https://dev.to/trimech_sarah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/trimech_sarah"/>
    <language>en</language>
    <item>
      <title>Top 10 ES6 Features that Every Developer Should know</title>
      <dc:creator>Trimech Sarah</dc:creator>
      <pubDate>Thu, 06 Feb 2025 21:07:52 +0000</pubDate>
      <link>https://dev.to/trimech_sarah/top-10-es6-features-that-every-developer-should-know-419a</link>
      <guid>https://dev.to/trimech_sarah/top-10-es6-features-that-every-developer-should-know-419a</guid>
      <description>&lt;p&gt;JavaScript is one of the most widely-used programming languages in the world, and its popularity continues to grow. ES6, also known as ECMAScript 2015, introduced many new and exciting features to the JavaScript language. In this blog, we'll take a look at 10 advanced ES6 features that every JavaScript developer should master in order to stay ahead of the curve. Whether you're a beginner or an experienced developer, these features are sure to enhance your JavaScript skills and take your coding to the next level.&lt;br&gt;
**&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Arrow Functions:**
Arrow functions are a concise syntax for writing anonymous functions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;For instance, instead of writing this:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const square = function (num) {
  return num * num;
};
You can write the same code with an arrow function:

const square = (num) =&amp;gt; num * num;
02. Template Literals:
Template literals allow you to embed expressions in string literals. They use backticks instead of quotes and can be multi-line as well.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const name = "John";
const greeting = `Hello, ${name}!`;
03. Destructuring:
Destructuring allows you to extract data from arrays or objects into separate variables. This makes it easier to work with complex data structures.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;Here's an example:&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
const numbers = [1, 2, 3];&lt;br&gt;
const [first, second, third] = numbers; //Array destructure&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const person ={
  name: "John",
  age: 18,
}
const {name, age} = person; // Object destructure
04. Spread Operator:
The spread operator allows you to spread elements of an array or properties of an object into a new array or object. This is useful for merging arrays or objects, or for spreading an array into function arguments.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;**&lt;br&gt;
Here's an example:**&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1, 2, 3];
const newNumbers = [...numbers, 4, 5];
05. Default Parameters:
Default parameters allow you to specify default values for function parameters in case no value is passed. This makes it easier to handle edge cases and reduces the need for conditional statements.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Here's an example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const greet = (name = "John") =&amp;gt; {
  console.log(`Hello, ${name}!`);
};
06. Rest Parameters:
Rest parameters allow you to collect an indefinite number of arguments into an array. This is useful for writing functions that can accept any number of arguments.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Here's an example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const sum = (...numbers) =&amp;gt; {
  let result = 0;
  for (const number of numbers) {
    result += number;
  }
  return result;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;07. Class Definitions:&lt;/strong&gt;&lt;br&gt;
Class definitions provide a more object-oriented way of defining objects in JavaScript. They make it easier to create reusable objects with inheritance and encapsulation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's an example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Person {
  constructor(name) {
    this.name = name;
  }

  greet() {
    console.log(`Hello, my name is ${this.name}`);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;08. Modules:&lt;/strong&gt;&lt;br&gt;
Modules allow you to organize your code into smaller, reusable pieces. This makes it easier to manage complex projects and reduces the risk of naming collisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's a simple example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// greeting.js
export const greet = (name) =&amp;gt; {
  console.log(`Hello, ${name}!`);
};

// main.js
import { greet } from "./greeting.js";
greet("John");
09. Promise:
Promises are a way to handle asynchronous operations in JavaScript. They provide a way to handle errors, and can be combined to create complex asynchronous flows
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Here's a simple example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;const fetchData = () =&amp;gt; {&lt;br&gt;
  return new Promise((resolve, reject) =&amp;gt; {&lt;br&gt;
    setTimeout(() =&amp;gt; {&lt;br&gt;
      resolve("Data fetched");&lt;br&gt;
    }, 1000);&lt;br&gt;
  });&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;fetchData().then((data) =&amp;gt; {&lt;br&gt;
  console.log(data);&lt;br&gt;
});&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**10. Map and Set:**
The Map and Set data structures provide an efficient way to store unique values in JavaScript. They also provide a variety of useful methods for searching and manipulating the data.

**For example:**

// Creating a Map
const map = new Map();
map.set("name", "John");
map.set("age", 30);

// Accessing values in a Map
console.log(map.get("name")); // Output: John
console.log(map.get("age")); // Output: 30

// Iterating over a Map
for (const [key, value] of map) {
  console.log(`${key}: ${value}`);
}

// Output:
// name: John
// age: 30

// Creating a Set
const set = new Set();
set.add("John");
set.add("Jane");
set.add("Jim");

// Iterating over a Set
for (const name of set) {
  console.log(name);
}

// Output:
// John
// Jane
// Jim

// Checking if a value exists in a Set
console.log(set.has("John")); // Output: true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;In conclusion&lt;/strong&gt;, the advanced ES6 features outlined in this blog are essential for every JavaScript developer to master. They provide a more efficient, concise, and organized way of writing code, making it easier to work with complex data structures and handle asynchronous operations. Whether you're looking to improve your existing skills or just starting out with JavaScript, these features are an excellent starting point. Remember that becoming an expert in these features takes time and practice, so don't be discouraged if you don't understand everything right away. With consistent effort and dedication, you'll be able to master these advanced ES6 features and take your JavaScript skills to new heights.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>node</category>
      <category>typescript</category>
    </item>
    <item>
      <title>How does ChatGPT generate human-like text?</title>
      <dc:creator>Trimech Sarah</dc:creator>
      <pubDate>Thu, 06 Feb 2025 21:02:17 +0000</pubDate>
      <link>https://dev.to/trimech_sarah/how-does-chatgpt-generate-human-like-text-5c42</link>
      <guid>https://dev.to/trimech_sarah/how-does-chatgpt-generate-human-like-text-5c42</guid>
      <description>&lt;p&gt;ChatGPT, developed by OpenAI, is a cutting-edge language model that has made a significant impact in the field of natural language processing. It uses deep learning algorithms to generate human-like text based on the input it receives, making it an excellent tool for chatbots, content creation, and other applications that require natural language processing. In this post, we will explore the workings of ChatGPT to understand how it generates human-like text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Core of ChatGPT :&lt;/strong&gt;&lt;br&gt;
The backbone of ChatGPT is a transformer-based neural network that has been trained on a massive amount of text data. This training allows the model to understand the patterns and relationships between words in a sentence and how they can be used to generate new text that is coherent and meaningful. The transformer-based architecture is a novel approach to machine learning that enables the model to learn and make predictions based on the context of the input. This makes it ideal for language models that need to generate text that is relevant to the context of a conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How ChatGPT Generates Text :&lt;/strong&gt;&lt;br&gt;
ChatGPT uses an autoregressive language modeling approach to generate text. When you provide input to ChatGPT, the model first encodes the input into a vector representation. This representation is then used to generate a probability distribution over the next word in the sequence. The model selects the most likely next word and generates a new vector representation based on the new input. This process is repeated until the desired length of text has been developed.&lt;/p&gt;

&lt;p&gt;One of the key strengths of ChatGPT is its ability to handle context. The model has been trained to understand the context of a conversation and can generate text that is relevant to the current topic. This allows it to respond to questions and generate text that is relevant to the context of the conversation. This makes it an excellent tool for chatbots, as it can understand the user's intention and respond accordingly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability and Fine-tuning :&lt;/strong&gt;&lt;br&gt;
Another critical aspect of ChatGPT is its scalability. The model can be fine-tuned for specific use cases by training it on specific data sets. This allows it to generate text that is more tailored to the needs of the application. For example, if ChatGPT is being used in a customer service chatbot, it can be fine-tuned on data that is relevant to customer service queries to generate more accurate and relevant responses. This fine-tuning process can be done by using transfer learning, where the model is trained on a smaller data set, leveraging the knowledge it gained from its training on the larger data set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-world Applications :&lt;/strong&gt;&lt;br&gt;
ChatGPT has a wide range of real-world applications, from content creation to customer service. It can be used to generate news articles, creative writing, and even poetry. In customer service, ChatGPT can be used as a chatbot to respond to customer queries, freeing up human agents to handle more complex issues. Additionally, ChatGPT can be used in language translation, as it has the ability to understand the context of a conversation and translate text accordingly.&lt;/p&gt;

&lt;p&gt;In summary, ChatGPT's ability to generate human-like text and understand context makes it a versatile tool with endless potential applications. Its deep learning algorithms and transformer-based architecture allow it to generate coherent and meaningful text, making it an exciting development in the field of natural language processing. Whether it's being used in customer service, content creation, or language translation, ChatGPT has the potential to revolutionize the way we interact with machines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion :&lt;/strong&gt;&lt;br&gt;
In conclusion, this blog has explored the workings of ChatGPT, a cutting-edge language model developed by OpenAI. We have seen that the model is based on a transformer-based neural network that has been trained on massive amounts of text data, allowing it to generate human-like text based on the context of a conversation. Its scalability and fine-tuning capabilities make it a valuable tool for a wide range of applications, from customer service to content creation. With its ability to understand the context and generate coherent and meaningful text, ChatGPT has the potential to revolutionize the way we interact with machines and will play a crucial role in the development of AI-powered applications.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;disclaimer:&lt;/strong&gt;&lt;/em&gt; This post is also written using ChatGPT.&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>ai</category>
      <category>web3</category>
      <category>openai</category>
    </item>
    <item>
      <title>GitHub and EC2 manual deployment with Deploy keys</title>
      <dc:creator>Trimech Sarah</dc:creator>
      <pubDate>Thu, 06 Feb 2025 20:58:02 +0000</pubDate>
      <link>https://dev.to/trimech_sarah/github-and-ec2-manual-deployment-with-deploy-keys-3c56</link>
      <guid>https://dev.to/trimech_sarah/github-and-ec2-manual-deployment-with-deploy-keys-3c56</guid>
      <description>&lt;p&gt;For those looking to quickly deploy a project, whether it’s a prototype or a solo endeavor, manual deployment with GitHub and AWS EC2 is a reliable and efficient method. Here’s a comprehensive guide to setting up your deployment using deploy keys.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Setting Up Your EC2 Instance&lt;/strong&gt;&lt;br&gt;
Begin by launching an on-demand EC2 instance on AWS. Access this instance via SSH, and use Git to clone or pull your repository. This setup will be similar to your local development environment, except you’ll need to configure environment variables specific to your server.&lt;/p&gt;

&lt;p&gt;To ensure your server is secure, configure nginx with SSL certificates. This adds a layer of security and professionalism to your deployment.&lt;br&gt;
**&lt;br&gt;
Using GitHub Deploy Keys**&lt;br&gt;
Deploy keys provide a secure, read-only connection between your EC2 instance and your GitHub repository. Here’s how to set them up:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Generate SSH Keys&lt;br&gt;
First, generate an SSH key pair on your EC2 instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -f ~/.ssh/my_project_deploy_key -C "your_email@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using &lt;code&gt;ed25519&lt;/code&gt; instead of the more common RSA provides better security. The &lt;code&gt;-C&lt;/code&gt; flag is optional but useful if you plan to use the key for commit signing in addition to deployment.&lt;/p&gt;

&lt;p&gt;**Step 2: **Add the Public Key to GitHub&lt;br&gt;
In your GitHub repository, navigate to Settings &amp;gt; Deploy keys. Click Add Deploy Key, provide a descriptive title like "EC2 Deployment Key", and paste the contents of your public key file &lt;code&gt;(~/.ssh/my_project_deploy_key.pub)&lt;/code&gt;. For most deployment scenarios, you won’t need to enable write access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Configure SSH for Git&lt;br&gt;
To allow your EC2 instance to access multiple repositories without using the default&lt;code&gt;id_rsa&lt;/code&gt;key name, configure your SSH client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following entries to the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host github.com-my_project
  HostName github.com
  IdentityFile ~/.ssh/my_project_deploy_key
  User git

Host github.com-other_project
  HostName github.com
  IdentityFile ~/.ssh/other_deploy_key
  User git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration allows you to manage multiple repositories with different keys.&lt;/p&gt;

&lt;p&gt;To clone your repository, use the configured host&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com-my_project:your_github_org/your_repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then use &lt;code&gt;git pull&lt;/code&gt; as needed to update your project.&lt;/p&gt;

&lt;p&gt;Improving Your Deployment Process&lt;br&gt;
While this manual setup is quick and effective, it does have some limitations, such as downtime during updates. To minimize downtime, consider using a process manager like pm2, which supports zero-downtime restarts.&lt;/p&gt;

&lt;p&gt;As your project grows, SSH-based manual deployments might become cumbersome. Automating your deployment process can save time and reduce errors. You can use GitHub webhooks to trigger automatic deployments or configure your server as a Git remote to push updates directly. This approach can streamline your workflow and enhance efficiency&lt;br&gt;
&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Deploying with GitHub and EC2 using deploy keys is a straightforward and effective way to manage your projects, especially for quick prototypes and solo projects. This method allows you to leverage the power of AWS and GitHub without the overhead of more complex deployment strategies. Stay tuned for future posts where we’ll explore advanced deployment techniques and best practices.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>webdev</category>
      <category>github</category>
      <category>programming</category>
    </item>
    <item>
      <title>Build an awesome developer portfolio website.</title>
      <dc:creator>Trimech Sarah</dc:creator>
      <pubDate>Thu, 06 Feb 2025 20:50:20 +0000</pubDate>
      <link>https://dev.to/trimech_sarah/build-an-awesome-developer-portfolio-website-1b7d</link>
      <guid>https://dev.to/trimech_sarah/build-an-awesome-developer-portfolio-website-1b7d</guid>
      <description>&lt;p&gt;As a software developer, it's important to have a robust portfolio website that can display our abilities and experiences. To assist other developers, I have designed a portfolio website using Next, Tailwind CSS, and EmailJS. In this article, I will provide a step-by-step guide on the setup process, along with the GitHub link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is the live preview:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj7l2mtta9jwjf7gh0hv8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj7l2mtta9jwjf7gh0hv8.png" alt="Image description" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 01:&lt;/strong&gt;&lt;br&gt;
Clone the Repository using&lt;a href="https://github.com/Sarahtrimech/Sarahtrimech.git" rel="noopener noreferrer"&gt;&lt;/a&gt;and change the directory to the developer-portfolio.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/said7388/developer-portfolio.git
cd developer-portfolio 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;STEP 02:&lt;/strong&gt;&lt;br&gt;
Now install all packages using &lt;code&gt;npm&lt;/code&gt;or &lt;code&gt;yarn&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
# or
yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installation, all packages, Now change all data on utils/data/* according to you. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  export const personalData = {
  name: "Sarah trimech",
  profile: "/profile.png",
  designation: "Full-Stack web Developer",
  description: "My name is Sarah....",
  email: "Sarahtrimech456@gmail.com",
  phone: "+216 51637145",
  address: "tunis, Monastir",
  github: "https://github.com/Sarahtrimech/Sarahtrimech.git",
  facebook: "https://www.facebook.com/sarra.tremiche",
  linkedIn: "https://linkedin.com/in/sarah-trimech-48bb09336",
  instagram: "https://www.instagram.com/serah___tr?igshMWNtemRxYmd6NDJ3Mg",
  devUsername: "https://dev.to/trimech_sarah",
  resume: "...",
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;devusername&lt;/code&gt;properties replace it with your &lt;code&gt;dev.to&lt;/code&gt; &lt;code&gt;username&lt;/code&gt; and it will &lt;code&gt;fetch&lt;/code&gt; all blogs from your &lt;code&gt;dev.to&lt;/code&gt; website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 03:&lt;/strong&gt;&lt;br&gt;
Now we will make &lt;code&gt;a .env&lt;/code&gt;file and set up our &lt;code&gt;Email.JS&lt;/code&gt; credential in a &lt;code&gt;.env&lt;/code&gt;file. I am using &lt;code&gt;EmailJs&lt;/code&gt;in this project for the user to send mail to me and It's free. The .&lt;code&gt;env&lt;/code&gt; file will be the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;STEP 04:&lt;/code&gt;&lt;br&gt;
Now the portfolio website is ready for the run. You can run it using npm or yarn.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
# or
yarn dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you like the portfolio project Please give it a star on the GitHub Repository.&lt;br&gt;
You can connect with me on Linkedin:&lt;a href="https://linkedin.com/in/sarah-trimech-48bb09336" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>portfolio</category>
      <category>devpolio</category>
      <category>webdev</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Highly Effective 7 Habits for Developers</title>
      <dc:creator>Trimech Sarah</dc:creator>
      <pubDate>Thu, 06 Feb 2025 20:19:20 +0000</pubDate>
      <link>https://dev.to/trimech_sarah/highly-effective-7-habits-for-developers-2cpe</link>
      <guid>https://dev.to/trimech_sarah/highly-effective-7-habits-for-developers-2cpe</guid>
      <description>&lt;p&gt;As a software developer, success doesn't just come from luck or chance. It is the result of years of hard work, continuous learning and development, and forming good habits. In the fast-paced world of technology, software developers must always be learning and adapting to keep up with the latest trends and advancements in their field. In this article, we will discuss 7 habits that can help you become a highly effective software developer.&lt;br&gt;
&lt;strong&gt;01 Map out a timetable:&lt;/strong&gt;Just like in school, having a timetable is essential for software developers. It helps you keep track of your daily activities and make sure you're using your time efficiently. When you're learning a new programming language, it's important to have a schedule in place that outlines when you'll be working on it and for how long. This way, you can stay focused and avoid distractions, and make the most of your learning time.&lt;br&gt;
&lt;strong&gt;02 Embrace mistakes and learn from experiences:&lt;/strong&gt; No one is perfect, and as a software developer, you will make mistakes. It's important to embrace these mistakes and use them as opportunities to learn and grow. When you make a mistake, take time to reflect on what went wrong and what you can do better next time. This way, you'll be able to avoid making the same mistake in the future and become a better developer.&lt;br&gt;
&lt;strong&gt;03 Be consistent:&lt;/strong&gt; Consistency is key when it comes to software development. By setting aside time every day to work on your craft, you'll be able to make steady progress and become more skilled over time. Consistency also helps you identify areas that need improvement and gives you the time and motivation to work on them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;04 Find a mentor:&lt;/strong&gt; Having a mentor can be incredibly beneficial for software developers. A mentor can offer guidance, and advice, and help you overcome challenges. They can provide you with a fresh perspective and share their experiences and insights, which can be valuable when working on complex projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;05 Work on projects:&lt;/strong&gt; Learning by doing is one of the most effective ways to become a better software developer. By working on projects, you'll have the opportunity to put your skills to the test and gain real-world experience. It's important to choose projects that are aligned with your skill level and gradually increase the difficulty as you grow more comfortable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;06 Don't be a jack of all trades:&lt;/strong&gt; As a software developer, it's tempting to try and learn as many programming languages and technologies as possible. However, it's important to remember that being a jack of all trades won't necessarily make you a master of any. Instead, focus on mastering one area, and then move on to the next once you feel comfortable. This way, you'll be able to become a more specialized and in-demand developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;07 Stay up to date with the latest advancements:&lt;/strong&gt; The world of technology is constantly changing, and software developers must keep up with the latest advancements in their field. Read articles, attend webinars and conferences, and follow industry leaders on social media to stay informed and up to date with the latest trends and advancements.&lt;/p&gt;

&lt;p&gt;In conclusion, forming good habits as a software developer can greatly enhance your career and lead to long-term success. By following these 7 habits, you'll be able to become a more effective, knowledgeable, and in-demand developer in no time.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
      <category>career</category>
    </item>
    <item>
      <title>Asynchronous programming in Javascript</title>
      <dc:creator>Trimech Sarah</dc:creator>
      <pubDate>Thu, 06 Feb 2025 19:17:54 +0000</pubDate>
      <link>https://dev.to/trimech_sarah/asynchronous-programming-in-javascript-2op4</link>
      <guid>https://dev.to/trimech_sarah/asynchronous-programming-in-javascript-2op4</guid>
      <description>&lt;p&gt;JavaScript, being a single-threaded language, can only process one task at a time. This can result in long wait times for complex tasks, as the script will be blocked from executing any other tasks until it has been completed. To tackle this, JavaScript offers asynchronous programming, which allows the script to continue executing other tasks while it waits for an asynchronous task to complete. In this blog, we’ll explore the basics of asynchronous programming in JavaScript and how it can be achieved through the use of callback functions, promises, and async/await.&lt;br&gt;
&lt;strong&gt;Callback Functions&lt;/strong&gt;&lt;br&gt;
A callback function is a function that is passed as an argument to another function and is executed after the main function has been completed. Callbacks are used in asynchronous programming to wait for a task to complete before executing the next step.&lt;br&gt;
&lt;strong&gt;For example, consider the following code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function slowTask(callback) {
  setTimeout(() =&amp;gt; {
    console.log("Slow task completed.");
    callback();
  }, 1000);
}

function runProgram() {
  console.log("Program started.");
  slowTask(() =&amp;gt; {
    console.log("Callback function executed.");
  });
  console.log("Program ended.");
}

runProgram();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the&lt;code&gt;slowTask&lt;/code&gt; function takes a callback as an argument. The&lt;code&gt;slowTask&lt;/code&gt;function uses&lt;code&gt;setTimeout&lt;/code&gt; to delay the execution of a task for one second. The&lt;code&gt;runProgram&lt;/code&gt;function calls&lt;code&gt;slowTask&lt;/code&gt; and passes a callback function as an argument. The&lt;code&gt;runProgram&lt;/code&gt;function also logs "Program started" and "Program ended". When the&lt;code&gt;slowTask&lt;/code&gt; function has been completed, it logs "Slow task completed" and executes the callback function, which logs "Callback function executed".&lt;br&gt;
The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Program started.
Program ended.
Slow task completed.
Callback function executed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Promises&lt;/strong&gt;&lt;br&gt;
Promises are a more modern approach to asynchronous programming in JavaScript. A promise represents the result of an asynchronous operation and can be in one of three states: pending, fulfilled, or rejected. A promise can be created using the&lt;code&gt;Promise&lt;/code&gt;constructor, and its state can be determined using the&lt;code&gt;then&lt;/code&gt;and &lt;code&gt;catch&lt;/code&gt;methodes&lt;br&gt;
&lt;strong&gt;For example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const slowTask = new Promise((resolve, reject) =&amp;gt; {
  setTimeout(() =&amp;gt; {
    resolve("Slow task completed.");
  }, 1000);
});

function runProgram() {
  console.log("Program started.");
  slowTask
    .then((result) =&amp;gt; {
      console.log(result);
    })
    .catch((error) =&amp;gt; {
      console.error(error);
    });
  console.log("Program ended.");
}

runProgram();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;slowTask&lt;/code&gt;is a promise that is resolved after one second with the result "Slow task completed.". The &lt;code&gt;runProgram&lt;/code&gt;function calls &lt;code&gt;slowTask&lt;/code&gt; and uses the &lt;code&gt;then&lt;/code&gt;method to log the result when the promise is fulfilled.&lt;br&gt;
The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Program started.
Program ended.
Slow task completed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Async/Await&lt;/strong&gt;&lt;br&gt;
Async/await is the latest and most readable way to handle asynchronous operations in JavaScript. It allows developers to write asynchronous code that looks like synchronous code, making it easier to understand and maintain. The async keyword is used to declare an asynchronous function, and the await keyword is used to wait for a promise to be resolved.&lt;br&gt;
&lt;strong&gt;Here is an example to demonstrate the use of async/await in JavaScript:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function fetchData() {
  const response = await fetch("https://api.example.com/data");
  const data = await response.json();
  console.log(data);
}

fetchData();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;code&gt;fetchData&lt;/code&gt;function is declared as asynchronous using the &lt;code&gt;async&lt;/code&gt;keyword. The function uses &lt;code&gt;fetch&lt;/code&gt; to retrieve data from an API, and &lt;code&gt;await&lt;/code&gt; is used to wait for the fetch operation to complete. The resolved response is then transformed into a JSON object using &lt;code&gt;response.json()&lt;/code&gt;. The &lt;code&gt;await&lt;/code&gt;keyword is used to wait for the JSON transformation to complete, and the final result is logged to the console.&lt;/p&gt;

&lt;p&gt;It's important to note that the code within an asynchronous function will be executed asynchronously, but the code outside of the function will still be executed synchronously. Also, the await keyword can only be used within an asynchronous function.&lt;/p&gt;

&lt;p&gt;In conclusion, asynchronous programming in JavaScript allows the script to continue executing other tasks while it waits for an asynchronous task to complete. Callback functions, promises, and async/await are three ways to achieve asynchronous programming in JavaScript. Callback functions are the simplest and most basic way to handle asynchronous operations, while promises offer a more modern and flexible approach. Async/await provides the most readable way to handle asynchronous operations and is the recommended method for modern JavaScript programming. Understanding asynchronous programming in JavaScript is important for creating efficient and responsive applications, and is a must-have skill for any JavaScript developer.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>react</category>
    </item>
  </channel>
</rss>
