<?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>Forem: Ali Mohamed</title>
    <description>The latest articles on Forem by Ali Mohamed (@ali_mohamed_ai2).</description>
    <link>https://forem.com/ali_mohamed_ai2</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%2F1970352%2F3b424738-a70c-44e8-bacf-f2207b364a64.jpg</url>
      <title>Forem: Ali Mohamed</title>
      <link>https://forem.com/ali_mohamed_ai2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ali_mohamed_ai2"/>
    <language>en</language>
    <item>
      <title>nextjs</title>
      <dc:creator>Ali Mohamed</dc:creator>
      <pubDate>Tue, 25 Mar 2025 15:30:32 +0000</pubDate>
      <link>https://forem.com/ali_mohamed_ai2/nextjs-bak</link>
      <guid>https://forem.com/ali_mohamed_ai2/nextjs-bak</guid>
      <description></description>
      <category>nextjs</category>
    </item>
    <item>
      <title>Programmer vs Software Enginner</title>
      <dc:creator>Ali Mohamed</dc:creator>
      <pubDate>Sun, 22 Sep 2024 13:40:23 +0000</pubDate>
      <link>https://forem.com/ali_mohamed_ai2/programmer-vs-software-enginner-2711</link>
      <guid>https://forem.com/ali_mohamed_ai2/programmer-vs-software-enginner-2711</guid>
      <description>&lt;p&gt;every software enginner is a programmer but not every programmer is a software enginner, you might think that there is no differnces between a programmer and a software enginner but actually there is a big differnce, i will walk you through this diffrences so you can understand the key diffrences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Diffrences
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Education&lt;/li&gt;
&lt;li&gt;Responsibilities&lt;/li&gt;
&lt;li&gt;Role in the Development Lifecycle&lt;/li&gt;
&lt;li&gt;Developmental Approach&lt;/li&gt;
&lt;li&gt;Skills&lt;/li&gt;
&lt;li&gt;Work Dynamic&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1.Education
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Software Enginner:
&lt;/h4&gt;

&lt;p&gt;A software engineer has formal training and often possesses at least a bachelor’s degree in engineering, computer science or information technology. Pursuing a master’s degree may also help engineers get higher-paying jobs.&lt;/p&gt;

&lt;h4&gt;
  
  
  Programmer:
&lt;/h4&gt;

&lt;p&gt;A programmer often has a bachelor’s degree in computer science, but some employers will hire an individual with an associate’s degree and relevant experience. The U.S. Bureau of Labor Statistics said programmers may have to take classes to supplement their degree, depending on the specific industry they want to work in. Some employers also prefer hiring programmers who have internship experience. &lt;/p&gt;

&lt;h2&gt;
  
  
  2.Responsibilities
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Software Enginner:
&lt;/h4&gt;

&lt;p&gt;Software engineers evaluate client and company needs alongside user needs to conceptualize a software system that meets necessary requirements. They are responsible for testing and maintaining the system and often pass along individual tasks to developers or programmers so they can spend more time overseeing the system’s overall construction&lt;/p&gt;

&lt;h4&gt;
  
  
  Programmer:
&lt;/h4&gt;

&lt;p&gt;Programmers translate the software engineer’s instructions into lines of code the computer can understand and follow. They are responsible for identifying and fixing bugs in the system. A programmer’s job description can include correcting issues discovered during testing, maintaining documentation, adding contingencies like error messages into programs and training end users. They can find work in a range of industries from blockchain to cybersecurity.&lt;/p&gt;

&lt;h2&gt;
  
  
  3.Role in the Development Lifecycle
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Software Enginner:
&lt;/h4&gt;

&lt;p&gt;A software engineer oversees the entire development life cycle, from initial design to maintenance. &lt;/p&gt;

&lt;h4&gt;
  
  
  Programmer:
&lt;/h4&gt;

&lt;p&gt;A programmer is involved with one stage of the development life cycle.&lt;/p&gt;

&lt;h2&gt;
  
  
  4.Developmental Approach
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Software Enginner:
&lt;/h4&gt;

&lt;p&gt;A software engineer leverages the scientific method and engineering best practices to come up with solutions. They are analytical, consider the entire system and are concerned with its stability and interdependency.&lt;/p&gt;

&lt;h4&gt;
  
  
  Programmer:
&lt;/h4&gt;

&lt;p&gt;A programmer develops one component at a time. They consider individual programs and are concerned with each one’s functionality and visual appearance.&lt;/p&gt;

&lt;h2&gt;
  
  
  5.Skills
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Software Enginner:
&lt;/h4&gt;

&lt;p&gt;A software engineer has extensive knowledge of advanced mathematics and a strong background in programming. A 2022 Hired survey also revealed software engineers’ five favorite coding languages are Python, JavaScript, Java, TypeScript and C#. The top overall skills for people in this field are being able to work with Go, Ruby on Rails, Scala, Ruby and React Native. Knowledge of Amazon Web Services and Google Cloud Platform are also popular proficiencies for software engineers in management roles.&lt;/p&gt;

&lt;h4&gt;
  
  
  Programmer:
&lt;/h4&gt;

&lt;p&gt;A programmer should be fluent in a few programming languages, as well as have the ability to read and write algorithms. The most in-demand programming languages are Python, Java, JavaScript, C++, C# and R. Other important skills for programmers include attention to detail, ability to manage time and follow deadlines, creative problem solving and communicating among different teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  6.Work Dynamic
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Software Enginner:
&lt;/h4&gt;

&lt;p&gt;A software engineer typically works as part of a team of engineers.&lt;/p&gt;

&lt;h4&gt;
  
  
  Programmer:
&lt;/h4&gt;

&lt;p&gt;A programmer typically works independently, but receives direction from software engineers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;the software enginner and the programmer work in differnt ways but they have the same goal that is to provide the overall project and they work with each other to acheive this.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Cryptography in Javascript</title>
      <dc:creator>Ali Mohamed</dc:creator>
      <pubDate>Sun, 01 Sep 2024 20:07:55 +0000</pubDate>
      <link>https://forem.com/ali_mohamed_ai2/cryptography-in-javascript-1nh6</link>
      <guid>https://forem.com/ali_mohamed_ai2/cryptography-in-javascript-1nh6</guid>
      <description>&lt;h2&gt;
  
  
  7 ways to use cryptography in javascript
&lt;/h2&gt;

&lt;p&gt;1- hashing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { createHash } = require('crypto');

// Create a string hash

function hash(str) {
    return createHash('sha256').update(str).digest('hex');
}

// Compare two hashed passwords

let password = 'hi-mom!';
const hash1 = hash(password);
console.log(hash1)

/// ... some time later

password = 'hi-mom';
const hash2 = hash(password);
const match = hash1 === hash2;

console.log(match ? '✔️  good password' : '❌  password does not match');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2- Salt&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { scryptSync, randomBytes, timingSafeEqual } = require('crypto');

function signup(email, password) {
    const salt = randomBytes(16).toString('hex');
    const hashedPassword = scryptSync(password, salt, 64).toString('hex');

    const user = { email, password: `${salt}:${hashedPassword}` }

    users.push(user);

    return user
}

function login(email, password) {
    const user = users.find(v =&amp;gt; v.email === email);

    const [salt, key] = user.password.split(':');
    const hashedBuffer = scryptSync(password, salt, 64);

    const keyBuffer = Buffer.from(key, 'hex');
    const match = timingSafeEqual(hashedBuffer, keyBuffer);

    if (match) {
        return 'login success!'
    } else {
        return 'login fail!'
    }
}

const users = [];

const user = signup('foo@bar.com', 'pa$$word');

console.log(user)

const result = login('foo@bar.com', 'password')

console.log(result)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3- HMAC&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { createHmac } = require('crypto');

const password = 'super-secret!';
const message = '🎃 hello jack'

const hmac = createHmac('sha256', password).update(message).digest('hex');

console.log(hmac)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4- Symmetric Encryption&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { createCipheriv, randomBytes, createDecipheriv } = require('crypto');

/// Cipher

const message = 'i like turtles';
const key = randomBytes(32);
const iv = randomBytes(16);

const cipher = createCipheriv('aes256', key, iv);

/// Encrypt

const encryptedMessage = cipher.update(message, 'utf8', 'hex') + cipher.final('hex');
console.log(`Encrypted: ${encryptedMessage}`);

/// Decrypt

const decipher = createDecipheriv('aes256', key, iv);
const decryptedMessage = decipher.update(encryptedMessage, 'hex', 'utf-8') + decipher.final('utf8');
console.log(`Deciphered: ${decryptedMessage.toString('utf-8')}`);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5- Keypairs&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { generateKeyPairSync } = require('crypto');

const { privateKey, publicKey } = generateKeyPairSync('rsa', {
  modulusLength: 2048, // the length of your key in bits
  publicKeyEncoding: {
    type: 'spki', // recommended to be 'spki' by the Node.js docs
    format: 'pem',
  },
  privateKeyEncoding: {
    type: 'pkcs8', // recommended to be 'pkcs8' by the Node.js docs
    format: 'pem',
  },
});

console.log(publicKey);
console.log(privateKey);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6- Asymmetric Encryption&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const {  publicEncrypt, privateDecrypt } = require('crypto');
const { publicKey, privateKey } = require('./keypair');


const encryptedData = publicEncrypt(
    publicKey,
    Buffer.from(secretMessage)
  );


console.log(encryptedData.toString('hex'))


const decryptedData = privateDecrypt(
    privateKey,
    encryptedData
);

console.log(decryptedData.toString('utf-8'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7- signing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { createSign, createVerify } = require('crypto');
const { publicKey, privateKey } = require('./keypair');

const data = 'this data must be signed';

/// SIGN

const signer = createSign('rsa-sha256');

signer.update(data);

const siguature = signer.sign(privateKey, 'hex');

console.log(siguature);

/// VERIFY

const verifier = createVerify('rsa-sha256');

verifier.update(data);

const isVerified = verifier.verify(publicKey, siguature, 'hex');

console.log(isVerified);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Benefites of System Design</title>
      <dc:creator>Ali Mohamed</dc:creator>
      <pubDate>Thu, 29 Aug 2024 16:06:14 +0000</pubDate>
      <link>https://forem.com/ali_mohamed_ai2/benefites-of-system-design-6p</link>
      <guid>https://forem.com/ali_mohamed_ai2/benefites-of-system-design-6p</guid>
      <description>&lt;p&gt;System Design is the process of designing the architecture, components, and interfaces for a system so that it meets the end-user requirements.&lt;br&gt;
System Design for tech interveiws is something can't be ignored Almost every IT giant whether it be Facebook, Amazon, Google, Apple or any other asks various questions based on System Design concepts such as scalability, load-balancing, caching, etc. in the interview.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benfites of System Design
&lt;/h2&gt;

&lt;p&gt;1 Improved Quality:&lt;/p&gt;

&lt;p&gt;One of the most important advantages of system design is the improved quality of the software system. System design helps developers to create software systems that are more reliable and efficient. Through system design, developers can identify and correct errors and bugs before they are deployed in the software system. This means that the software system is less likely to experience system failures and other problems. This improved quality can result in a better user experience, increased customer satisfaction, and higher sales.&lt;/p&gt;

&lt;p&gt;2 Reduced Development Time:&lt;/p&gt;

&lt;p&gt;System design can also help to reduce development time. By using system design, developers can create software systems quickly and efficiently. System design helps developers to identify the components, architecture, and processes that will be used in the software system. This makes it easier for developers to create a software system that meets their requirements and is ready for deployment in a shorter amount of time.&lt;/p&gt;

&lt;p&gt;3 Improved Cost-Effectiveness: &lt;/p&gt;

&lt;p&gt;The system design also helps to improve the cost-effectiveness of the software system. System design enables developers to identify and eliminate unnecessary components and processes that would otherwise increase the cost of development. By eliminating these components and processes, developers can create a software system that is more cost-effective. This can result in lower development costs, which can then be passed on to customers in the form of lower prices.&lt;/p&gt;

&lt;p&gt;4 Increased Reusability: &lt;/p&gt;

&lt;p&gt;The system design also helps to increase the reusability of the software system. By using system design, developers can create software systems that are more modular and versatile. This means that components and processes that are used in one software system can be easily reused in other software systems. This reduces the amount of time and effort required to create a new software system.&lt;/p&gt;

&lt;p&gt;5 Improved Security: &lt;/p&gt;

&lt;p&gt;System design can also help to improve the security of the software system. By using system design, developers can create software systems that are more secure and reliable. System design helps developers to identify and eliminate potential security risks before they are deployed in the software system. This can help to protect the software system from malicious attacks and other security threats.&lt;/p&gt;

&lt;p&gt;6 Improved Scalability: &lt;/p&gt;

&lt;p&gt;System design can also help to improve the scalability of the software system. By using system design, developers can create software systems that are more adaptable and versatile. This makes it easier for developers to add new features, components, and processes to the software system as needed. This can help to improve the scalability of the software system and make it easier to deploy in different environments.&lt;/p&gt;

&lt;p&gt;7 Improved User Experience: &lt;/p&gt;

&lt;p&gt;System design can also help to improve the user experience of the software system. By using system design, developers can create software systems that are more intuitive and user-friendly. This can make the software system easier to use and more enjoyable for users. This can result in improved customer satisfaction, increased sales, and better user retention rates.&lt;/p&gt;

&lt;p&gt;8 Improved Maintenance: &lt;/p&gt;

&lt;p&gt;System design can help to improve the maintenance of the software system. By using system design, developers can create software systems that are easier to maintain and update. This can reduce the amount of time and effort required to maintain the software system and ensure that it is always up-to-date and functioning properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;System design is a powerful tool that can be used to create software systems that are more reliable, efficient, and cost-effective. System design enables developers to identify and eliminate unnecessary components and processes, create software systems quickly and easily, and improve the security, scalability, user experience, and maintenance of the software system. These advantages make system design an invaluable part of the software development process.&lt;/p&gt;

&lt;h2&gt;
  
  
  See Resource
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/advantages-of-system-design/" rel="noopener noreferrer"&gt;Resource&lt;/a&gt;&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>systemdesign</category>
    </item>
  </channel>
</rss>
