<?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: Ebenezer Enietan (Niza)</title>
    <description>The latest articles on DEV Community by Ebenezer Enietan (Niza) (@niza).</description>
    <link>https://dev.to/niza</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%2F869389%2F9430ecef-394c-4e21-88fb-a422743fe4b4.jpeg</url>
      <title>DEV Community: Ebenezer Enietan (Niza)</title>
      <link>https://dev.to/niza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/niza"/>
    <language>en</language>
    <item>
      <title>Code Optimization Is Tricky</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Sat, 15 Jul 2023 17:54:50 +0000</pubDate>
      <link>https://dev.to/niza/code-optimization-is-tricky-2ebb</link>
      <guid>https://dev.to/niza/code-optimization-is-tricky-2ebb</guid>
      <description>&lt;p&gt;I want you to look at the code below and guess which code will run faster. The console.time() method starts a timer you can use to track how long an operation takes.  After guessing run the script and check your console to find out which one runs faster let me know if you guessed right&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
  &amp;lt;title&amp;gt;speed test&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;h1&amp;gt;check your console&amp;lt;/h1&amp;gt;
  &amp;lt;script&amp;gt;
    console.time("first");
      console.groupCollapsed()
      let count = 2;
      while( count &amp;lt;= 5000){
        if(count % 2 == 0 ){
          console.log(count);
        }
        count ++;
      }
      console.groupEnd()
    console.timeEnd("first");


    console.time("second");
      console.groupCollapsed()
      let trick = 2;
      while( trick &amp;lt;= 5000){
        console.log(trick);
        trick += 2;
      }
      console.groupEnd()
    console.timeEnd("second");
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Goodbye StackOverflow</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Sun, 04 Jun 2023 09:26:08 +0000</pubDate>
      <link>https://dev.to/niza/goodbye-stackoverflow-2cm7</link>
      <guid>https://dev.to/niza/goodbye-stackoverflow-2cm7</guid>
      <description>&lt;p&gt;If you've been a programmer for more than two years, you're probably familiar with Stack Overflow, a popular online forum where developers can ask and answer questions about programming languages and problems. It's a valuable resource for programmers of all levels, and it's also a source of many jokes about developers who rely too heavily on Stack Overflow answers.&lt;/p&gt;

&lt;p&gt;I've recently noticed that there is an increasing reliance on ChatGPT, Bard, and other AI platforms among up-and-coming programmers. Could this signal the end of Stack Overflow? Are these new AI tools good replacements for Stack Overflow? Is the idea of relying on a platform for debugging a good one?&lt;/p&gt;

&lt;p&gt;In conclusion, are AI-generated codes suitable for young developers to add to their codebase without extensive refactoring? I'd love to hear your thoughts.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Legislating AI</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Sun, 19 Mar 2023 09:31:20 +0000</pubDate>
      <link>https://dev.to/niza/legislating-ai-2a6e</link>
      <guid>https://dev.to/niza/legislating-ai-2a6e</guid>
      <description>&lt;p&gt;Every field including artificial intelligence calls for the development of public sector policies and laws for regulating them in every jurisdiction (all legal boundaries) globally,  Regulation is necessary to both encourage AI and manage associated risks. I liken the current state of AI regulation to kids playing and all of a sudden they come back crying with various injuries because no rules were laid down for how they should play.&lt;/p&gt;

&lt;p&gt;There are still a lot of unanswered questions in many territories about simple things like copyright; do AI(s) have copyrights? if an AI is modeled on a person's data does the person have any ownership? are there forbidden AI algorithms or is it the wild west? these and many more are some of the things to consider deliberately.&lt;/p&gt;

&lt;p&gt;It is important that there are legislative frameworks for judges and lawyers to follow on how to approach AI-related cases. If all the legal cases involving AI are brought to court without existing legal frameworks the AI companies will win most of the cases; they typically have more money and better lawyers. It will also continue to favour them in future because of the legal precedence established.&lt;/p&gt;

&lt;p&gt;What do you think important components of AI law should be?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>When she marries one of you!</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Thu, 02 Feb 2023 05:56:52 +0000</pubDate>
      <link>https://dev.to/niza/when-she-marries-one-of-you-9ip</link>
      <guid>https://dev.to/niza/when-she-marries-one-of-you-9ip</guid>
      <description>&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%2F9ar245gcx0z2z7d81pcq.jpg" 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%2F9ar245gcx0z2z7d81pcq.jpg" alt="photo content for when she marries one of you?" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>crypto</category>
      <category>web3</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Alternatives To Node Js</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Thu, 19 Jan 2023 04:06:21 +0000</pubDate>
      <link>https://dev.to/niza/alternatives-to-node-js-48h9</link>
      <guid>https://dev.to/niza/alternatives-to-node-js-48h9</guid>
      <description>&lt;p&gt;There are a lot of standalone JavaScript runtime built on various engines like V8 but in order for them to qualify as an alternative to node they must be actively developed and designed to be used as back-end for web. These really narrows down the list; with that in mind here are the alternatives to node js.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deno
&lt;/h2&gt;

&lt;p&gt;Deno is a JavaScript/TypeScript runtime built with V8 JavaScript engine, (the same as Node js). It was created by Ryan Dahl, the original creator of Node.js, in 2018. Are you thinking what I'm thinking?&lt;/p&gt;

&lt;p&gt;Deno Claims to provide a more secure and efficient runtime environment for JavaScript and TypeScript development, Deno includes built-in support for features such as TypeScript, WebAssembly, WebSocket, more modern and secure approach to handling modules, file system access, network operations and implements fetch API* &lt;em&gt;(a pain point for many Node developers which is fixable with the Node-Fetch API only starting with the Node version 17.5)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Deno does not use a package manager such as npm. Instead, it uses a more modern approach where modules can be imported directly from a URL. Documentation, tutorials, and examples can be found at &lt;a href="https://deno.land/" rel="noopener noreferrer"&gt;Deno website&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Deno is relatively new so it's not as widely adopted as Node.js but it is getting there. As for speed; they are almost the same with node having slight advantage generally performance is a big argument among developers. Your Node js project are not easily migrated to deno.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bun
&lt;/h2&gt;

&lt;p&gt;Bun is a JavaScript runtime that stands out for its speed and built-in bundling &amp;amp; transpiling features. Developed using the Zig programming language, Bun constructs its runtime on the lightning-fast  JavaScriptCore engine, used in Apple’s Safari web browser. It was released in 2022 by former Stripe developer Jared Sumner.&lt;/p&gt;

&lt;p&gt;Other runtimes rely on outside tools for bundling your JavaScript projects and for transpiling code from another language. Bun handles all of these features. It also implements the Node.js algorithm for resolving modules. This means that Bun can make use of NPM packages. Bun’s bundler can find and install packages from the vast NPM repository and manage their dependencies, it also comes with first-class support for the TypeScript and JSX languages.&lt;/p&gt;

&lt;p&gt;Bun claims to offer some advantages over Node.js in simplicity of tooling and speed. Documentation, tutorials, and examples can be found at &lt;a href="https://bun.sh/" rel="noopener noreferrer"&gt;Bun Website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you tried any of these alternatives? please share your experience.&lt;/p&gt;

</description>
      <category>design</category>
      <category>tailwindcss</category>
      <category>ui</category>
      <category>productivity</category>
    </item>
    <item>
      <title>These newer programming Languages could be the future</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Sun, 15 Jan 2023 10:49:11 +0000</pubDate>
      <link>https://dev.to/niza/these-newer-programming-languages-could-be-the-future-182c</link>
      <guid>https://dev.to/niza/these-newer-programming-languages-could-be-the-future-182c</guid>
      <description>&lt;p&gt;It is commonly said that one "dog year" is equivalent to seven "human years". Sometimes I feel like programming years are like "dog years", so let say a dog lives 15 years; in this article i will like to list some of the note worthy languages of the past 15 years and links to their official documentation. Here is my list in no particular order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Rust 2010 &lt;a href="https://doc.rust-lang.org/book/" rel="noopener noreferrer"&gt;Rust Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Dart 2011 &lt;a href="https://dart.dev/guides" rel="noopener noreferrer"&gt;Dart Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Julia 2012 &lt;a href="https://docs.julialang.org/en/v1/" rel="noopener noreferrer"&gt;Julia Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Swift 2014 &lt;a href="https://developer.apple.com/documentation/swift" rel="noopener noreferrer"&gt;Swift Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Kotlin 2016 &lt;a href="https://kotlinlang.org/docs/" rel="noopener noreferrer"&gt;Kotlin Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; TypeScript 2012 &lt;a href="https://www.typescriptlang.org/docs/home.html" rel="noopener noreferrer"&gt;Typescript Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Ballerina 2017 &lt;a href="https://ballerina.io/learn/" rel="noopener noreferrer"&gt;Ballerina Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Crystal 2014 &lt;a href="https://crystal-lang.org/docs/" rel="noopener noreferrer"&gt;Crystal Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; Nim 2008 &lt;a href="https://nim-lang.org/docs/index.html" rel="noopener noreferrer"&gt;Nim Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Zig 2013 &lt;a href="https://ziglang.org/documentation/master/" rel="noopener noreferrer"&gt;Zig Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Elixir 2011 &lt;a href="https://elixir-lang.org/docs.html" rel="noopener noreferrer"&gt;Elixir Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Go 2009  &lt;a href="https://golang.org/doc/" rel="noopener noreferrer"&gt;Go Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Red  2011 &lt;a href="https://www.red-lang.org/p/documentation.html" rel="noopener noreferrer"&gt;Red Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Perl 6 2015 &lt;a href="https://docs.perl6.org/" rel="noopener noreferrer"&gt;Perl 6 Docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Ceylon 2012  &lt;a href="https://ceylon-lang.org/documentation/" rel="noopener noreferrer"&gt;Ceylon Docs&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So there you have it, how many of these have you used, and what would you add or remove from the list?&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>community</category>
      <category>welcome</category>
    </item>
    <item>
      <title>JavaScript null is weird</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Sun, 08 Jan 2023 10:10:26 +0000</pubDate>
      <link>https://dev.to/niza/javascript-null-is-weird-33o9</link>
      <guid>https://dev.to/niza/javascript-null-is-weird-33o9</guid>
      <description>&lt;p&gt;JavaScript has a unique way of implementing common programming concepts. Some things you assume will work a certain way will definitely give you a result but not the one you were expecting.&lt;/p&gt;

&lt;p&gt;Let's say you read some literature that Null is a data type then you run typeof(null) then you find out null is not an object, but it is of type object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let x = null;
console.log(typeof x);  // logs "object"
//also this not-object-fake-object  has no properties
let x = null;
console.log(x.prop);  // TypeError: Cannot read property 'prop' of null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also consider this, in JavaScript, null is considered a falsy value, which means it will be coerced to false when used in a boolean context. This means that when null is compared to 0 using the less-than-or-equal-to operator (&amp;lt;=), the result will be true.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(null &amp;lt; 0);  // logs "false"
console.log(null &amp;gt; 0);  // logs "false"
console.log(null == 0);  // logs "false"
console.log(null === 0);  // logs "false"
console.log(null &amp;lt;= 0);  // logs "true"
console.log(null &amp;gt;= 0);  // logs "true"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Talking about weird things here is another example NaN is never equal to NaN the best way to test NaN is to use isNaN();&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NaN === NaN; //false
console.log(isNaN(NaN)); // true
console.log(isNaN(123)); // false
console.log(isNaN('hello')); // true
//But beware
console.log(isNaN('123')); // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I know you have experienced other weirdness in your JavaScript journey, please share it and the reason why you think it exists? Do you think there were too many opinions in the development of the language? Are there too many people taking advantage of these quirks for them to be changed? Let me know your opinion.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Asymmetric encryption</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Fri, 30 Dec 2022 18:35:13 +0000</pubDate>
      <link>https://dev.to/niza/asymmetric-encryption-55np</link>
      <guid>https://dev.to/niza/asymmetric-encryption-55np</guid>
      <description>&lt;p&gt;Asymmetric encryption is a method of encrypting data so that the encryption and decryption keys are different. This means the key used to encrypt the data is not the same as the key used to decrypt it.&lt;/p&gt;

&lt;p&gt;In asymmetric encryption, there are two keys: a public key and a private key. The public key is used to encrypt the data, while the private key is used to decrypt it. The public key can be shared with anyone, while the private key should be kept secret.&lt;/p&gt;

&lt;p&gt;One of the main benefits of asymmetric encryption is that it allows for secure communication between two parties without needing to exchange a shared secret key beforehand. This makes it useful for secure communication over the internet and other untrusted networks.&lt;/p&gt;

&lt;p&gt;There are many different algorithms that can be used for asymmetric encryption, including RSA, ElGamal, and Diffie-Hellman. These algorithms use complex mathematical operations to generate public and private keys, and they are designed to be challenging to crack even with advanced computing power.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript libraries that provide support for asymmetric encryption&lt;/strong&gt;&lt;br&gt;
node-rsa: &lt;a href="https://www.npmjs.com/package/node-rsa" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/node-rsa&lt;/a&gt;&lt;br&gt;
jsrsasign: &lt;a href="https://kjur.github.io/jsrsasign/" rel="noopener noreferrer"&gt;https://kjur.github.io/jsrsasign/&lt;/a&gt;&lt;br&gt;
jsencrypt: &lt;a href="https://www.npmjs.com/package/jsencrypt" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/jsencrypt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PHP libraries that provide support for asymmetric encryption&lt;/strong&gt;&lt;br&gt;
OpenSSL: &lt;a href="https://www.php.net/manual/en/book.openssl.php" rel="noopener noreferrer"&gt;https://www.php.net/manual/en/book.openssl.php&lt;/a&gt;&lt;br&gt;
phpseclib: &lt;a href="https://github.com/phpseclib/phpseclib" rel="noopener noreferrer"&gt;https://github.com/phpseclib/phpseclib&lt;/a&gt;&lt;br&gt;
Sodium: &lt;a href="https://www.php.net/manual/en/book.sodium.php" rel="noopener noreferrer"&gt;https://www.php.net/manual/en/book.sodium.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python libraries that provide support for asymmetric encryption&lt;/strong&gt;&lt;br&gt;
pycryptodome: &lt;a href="https://pycryptodome.readthedocs.io/en/latest/" rel="noopener noreferrer"&gt;https://pycryptodome.readthedocs.io/en/latest/&lt;/a&gt;&lt;br&gt;
pycrypto: &lt;a href="https://pypi.org/project/pycrypto/" rel="noopener noreferrer"&gt;https://pypi.org/project/pycrypto/&lt;/a&gt;&lt;br&gt;
cryptography: &lt;a href="https://cryptography.io/en/latest/" rel="noopener noreferrer"&gt;https://cryptography.io/en/latest/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Asymmetric encryption has various applications, including secure communication between two parties, digital signatures to verify the authenticity of messages, secure login systems, secure key exchange, and secure file transfer, secure API. It is a powerful tool for protecting data and communication in many different contexts, such as online banking, e-commerce, and secure messaging. Asymmetric encryption uses a public key to encrypt data, which can only be decrypted using a private key, ensuring that only the intended recipient can access the data.&lt;/p&gt;

</description>
      <category>devmeme</category>
    </item>
    <item>
      <title>Alternatives to Git.</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Mon, 26 Dec 2022 20:12:20 +0000</pubDate>
      <link>https://dev.to/niza/alternatives-to-git-4p6m</link>
      <guid>https://dev.to/niza/alternatives-to-git-4p6m</guid>
      <description>&lt;p&gt;Git is a popular version control system that is widely used by software developers to track changes to their code and collaborate with other team members. However, there are several alternative version control systems available that offer similar functionality to Git. Here are a few examples:&lt;/p&gt;

&lt;h2&gt;
  
  
  Mercurial:
&lt;/h2&gt;

&lt;p&gt;Mercurial is a free, open-source version control system that is similar to Git in many ways. It is known for its simplicity and speed, and is popular among developers who prefer a lightweight tool. The official website for Mercurial is &lt;a href="https://www.mercurial-scm.org/" rel="noopener noreferrer"&gt;https://www.mercurial-scm.org/&lt;/a&gt;. Some basic commands in Mercurial include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hg init: Initializes a new Mercurial repository.
hg clone: Makes a copy of an existing repository.
hg add: Adds a new file to the repository.
hg commit: Saves changes to the repository.
hg push: Sends changes to a remote repository.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Subversion:
&lt;/h2&gt;

&lt;p&gt;Subversion (also known as SVN) is another popular version control system that is similar to Git. It is known for its reliability and simplicity, and is often used in large organizations. The official website for Subversion is &lt;a href="https://subversion.apache.org/" rel="noopener noreferrer"&gt;https://subversion.apache.org/&lt;/a&gt;. Some basic commands in Subversion include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;svn checkout: Downloads repository from a remote server.
svn add: Adds a new file to the repository.
svn commit: Saves changes to the repository.
svn update: Downloads latest changes from a remote repository.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  CVS:
&lt;/h2&gt;

&lt;p&gt;CVS (Concurrent Versions System) is an older version control system that is still used by some developers today. It is known for its simplicity and ease of use, but lacks some of the more advanced features found in newer systems like Git and Mercurial. The official website for CVS is &lt;a href="https://www.nongnu.org/cvs/" rel="noopener noreferrer"&gt;https://www.nongnu.org/cvs/&lt;/a&gt;. Some basic commands in CVS include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cvs checkout: Downloads repository from a remote server.
cvs add: Adds a new file to the repository.
cvs commit: Saves changes to the repository.
cvs update: Downloads latest changes from a remote repository.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Comparison of Git, Mercurial, Subversion, and CVS
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Speed:&lt;/strong&gt;&lt;br&gt;
Git is generally considered the fastest version control system, as it utilizes a decentralized model and stores data in the form of hashed values, allowing for faster data transfer and retrieval. Mercurial is also known for its speed, as it utilizes a similar decentralized model and stores data in a similar manner. Subversion and CVS are both centralized systems and may not be as fast as Git and Mercurial in terms of data transfer and retrieval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Flexibility:&lt;/strong&gt;&lt;br&gt;
Git and Mercurial are both highly flexible version control systems, as they allow for the creation of multiple branches and merging of changes easily. Subversion is also flexible, but may not be as user-friendly in terms of branching and merging compared to Git and Mercurial. CVS is not as flexible as the other version control systems, as it does not support branching and merging as easily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Security:&lt;/strong&gt;&lt;br&gt;
Git and Mercurial both utilize a decentralized model, which means that there is no central repository for data. This makes it more difficult for data to be lost or compromised. Subversion also has good security measures, as it uses SSL/TLS encryption for data transfer and has options for authentication and authorization. CVS has weaker security measures compared to the other version control systems, as it does not utilize encryption for data transfer and has limited options for authentication and authorization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Ease of use:&lt;/strong&gt;&lt;br&gt;
Git and Mercurial can both be somewhat difficult for new users to learn, as they utilize a command-line interface and have a steep learning curve. Subversion is more user-friendly, as it has a GUI interface and is easier to understand for new users. CVS is also user-friendly, as it has a simple command-line interface and is easy to learn for new users.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Reading, writing and handling files/directories why should a web developer care?</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Fri, 23 Dec 2022 18:57:25 +0000</pubDate>
      <link>https://dev.to/niza/reading-writing-and-handling-filesdirectories-why-should-a-web-developer-care-4cmf</link>
      <guid>https://dev.to/niza/reading-writing-and-handling-filesdirectories-why-should-a-web-developer-care-4cmf</guid>
      <description>&lt;p&gt;I teach programming and sometimes while going through a class and its properties/methods a student will ask why they are learning a certain method and what can it be used for in the real world. With the exception of shell scripting and maybe python programmers Many programmers, especially self-thought programmers ignore certain things like how to read, write and handle files/directories in their chosen language.&lt;/p&gt;

&lt;p&gt;Regardless of your chosen language here are some things you can do when you learn how to read, write and handle files/directories&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Multi-themed applications &lt;/li&gt;
&lt;li&gt;Document generators&lt;/li&gt;
&lt;li&gt;Website builders&lt;/li&gt;
&lt;li&gt;Self-installing/updating apps&lt;/li&gt;
&lt;li&gt;File-based data storage&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Multi-themed applications
&lt;/h2&gt;

&lt;p&gt;File and directory reading and writing functions can be useful in creating a multi-themed application, which is an application that allows the user to switch between multiple visual themes or styles.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To create this, you could follow these steps:&lt;/li&gt;
&lt;li&gt;Determine the structure and content of the application, including the different visual themes or styles that will be available.&lt;/li&gt;
&lt;li&gt;Create separate directories or files for each theme or style, and include the necessary CSS, image, and other files for each theme.&lt;/li&gt;
&lt;li&gt;Write a program that uses the file and directory reading and writing functions to read in the appropriate theme or style files based on the user's selection. The program could also allow the user to create and save custom themes or styles.&lt;/li&gt;
&lt;li&gt;Test the multi-themed application &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's worth noting this process can be complex and requires careful planning and testing to ensure that the themes or styles are applied correctly and consistently throughout the application. Also, the specific steps and approach you take will depend on your specific needs and requirements. &lt;/p&gt;

&lt;h2&gt;
  
  
  Document generators
&lt;/h2&gt;

&lt;p&gt;A document generator is a program that generates documents automatically, either by creating new documents from scratch or by modifying existing documents.&lt;br&gt;
To create a document generator you could follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Determine the type of documents you want to generate and the information that needs to be included in the documents.&lt;/li&gt;
&lt;li&gt;Create a template for the documents, using placeholders for the information that will be filled in by the generator.&lt;/li&gt;
&lt;li&gt;Iterate through the template and replace placeholders with the actual information, and generate the final documents.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This can be especially useful for generating large numbers of documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Website builders
&lt;/h2&gt;

&lt;p&gt;A website builder is a program that generates a website automatically.&lt;br&gt;
To create a website you could follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Determine the structure and content of the website that you want to generate. This could include the layout of the pages, the types of content that will be included (such as text, images, and videos), and the navigation structure of the site.&lt;/li&gt;
&lt;li&gt;Create templates for the different types of pages/components and content that will be included on the website. These templates could include placeholders for the actual information that will be filled in by the builder.&lt;/li&gt;
&lt;li&gt;Read in the templates and map placeholder to actual information and then generate the final website. The program could also create the necessary directories and files for the website, such as the HTML files for the pages, the CSS files for the styles, and the image and video files.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php

// Read in the template file
$template = file_get_contents('template.html');

// Read in the variable data from a CSV file
$data = array_map('str_getcsv', file('data.csv'));

// Replace the placeholders in the template with the actual data
$page = str_replace('[TITLE]', $data[0][0], $template);
$page = str_replace('[HEADING]', $data[0][1], $page);
$page = str_replace('[CONTENT]', $data[0][2], $page);

// Write the generated page to a file
$filename = 'index.html';
file_put_contents($filename, $page);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You could make the example above mor interactive by receiving actual information from the user through form elements and visually display the result as the fill out the forms&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-installing/updating apps
&lt;/h2&gt;

&lt;p&gt;a self-installing or self-updating website, which is a website that can install or update itself automatically without requiring manual intervention.&lt;br&gt;
To create a self-installing or self-updating website you could follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Determine the structure and content of the website, including any updates or changes that will be made to the site.&lt;/li&gt;
&lt;li&gt;Write the program by using the file and directory reading and writing functions to track the current version in the case of an update then download the necessary files for the website from a remote server and install them on the local server. &lt;/li&gt;
&lt;li&gt;It's worth noting that creating a self-installing or self-updating website can be complex and requires careful planning and testing to ensure that the process goes smoothly. For example, you will need to consider issues such as security, compatibility, and rollback in case of errors or incompatibility of system requirements.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  File-based data storage
&lt;/h2&gt;

&lt;p&gt;To build a custom data storage system using file reading and writing functions in any programming language, you will need to perform the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open a file in the appropriate mode (e.g. write mode to store data, read mode to retrieve data).&lt;/li&gt;
&lt;li&gt;Write the data to the file using the appropriate method (e.g. write() in Python, fwrite() in C).&lt;/li&gt;
&lt;li&gt;Close the file when you are finished writing to it.&lt;/li&gt;
&lt;li&gt;Open the file again in the appropriate mode (e.g. read mode to retrieve data).&lt;/li&gt;
&lt;li&gt;Read the data from the file using the appropriate method (e.g. read() in Python, fread() in C).&lt;/li&gt;
&lt;li&gt;Close the file when you are finished reading from it.&lt;/li&gt;
&lt;li&gt;Here is an example of how this might look in Python:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Open a file in write mode
with open('data.txt', 'w') as f:
  # Write some data to the file
  f.write('This is some data that we are storing in the file.\n')
  f.write('We can store any type of data, such as numbers: 1, 2, 3\n')
  f.write('Or even lists: [1, 2, 3]\n')

# Open the file in read mode
with open('data.txt', 'r') as f:
  # Read the contents of the file
  contents = f.read()
  print(contents)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: The choice of data structures and algorithms can have a significant impact on the performance, efficiency, and scalability of the storage system; data structure and a sorting algorithm can allow for fast insertion and retrieval of data,&lt;/p&gt;

</description>
      <category>gratitude</category>
      <category>motivation</category>
    </item>
    <item>
      <title>JavaScript Regular/Normal vs Arrow Function: My Beef with Arrow Functions.</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Thu, 08 Dec 2022 19:21:24 +0000</pubDate>
      <link>https://dev.to/niza/javascript-regularnormal-vs-arrow-function-my-beef-with-arrow-functions-3b49</link>
      <guid>https://dev.to/niza/javascript-regularnormal-vs-arrow-function-my-beef-with-arrow-functions-3b49</guid>
      <description>&lt;p&gt;When I First encountered arrow functions, I was exited about the syntax difference. So I started putting them in everything; that was a huge mistake. I soon noticed abnormal unwanted behavior in the "this" keyword, so for a while I hated arrow functions but we have reconciled.&lt;/p&gt;

&lt;p&gt;Both function declaration and expression can be written as Normal/Regular Function&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// function declaration
function test(mama) {
   return ` ${mama} is the best`
}

// function expression
const test = function(app) {
   return `Hey ${app} is not working`
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Arrow function or fat arrow function was introduced in ES6&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const callNurse= (nurse) =&amp;gt; {
   return  `${nurse} please come! I feel a piercing arrow`
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Differences
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Implicit Return
&lt;/h2&gt;

&lt;p&gt;In normal regular functions, you must use the return keyword to return any value. If you don’t return anything then the function will return undefined. Arrow functions can return a value without the return keyword;  If the arrow function contains one expression, you can omit the curly braces, and then the expression will be implicitly returned.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Curly braces {}
&lt;/h2&gt;

&lt;p&gt;Curly braces {} are not required if its only one line of statement&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const uno = (name) =&amp;gt; name + “ ye”;
uno(“niza”);
// niza ye
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Parenthesis()
&lt;/h2&gt;

&lt;p&gt;Parenthesis () not required if you pass only one argument and you can use only underscore _ if there is no other argument as it is  one character shorter (_ and $ are valid identifiers in js )&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let add = x =&amp;gt; x + x;
let shootArrow = _ =&amp;gt; console.log("shooting arrow");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Arguments binding
&lt;/h2&gt;

&lt;p&gt;In regular functions, the arguments keywords can be used to list the arguments of which passed to the function. Arrow functions on the other hand do not have an argument binding.However, if you want to access arguments in an arrow function, you can use the rest parameter:The rest parameter syntax allows a function to accept an indefinite number of arguments as an array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function normalFunc(x,y) {
   console.log(arguments)
}
normalFunc(1,2) // Arguments[1,2]

const arrowFunc = (x,y) =&amp;gt; console.log(arguments)
arrowFunc(1,2) //ReferenceError: arguments is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var arrowFunction = (...args) =&amp;gt; {
   console.log(...args)
}arrowFunction(1,2)
// 1 2

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

&lt;/div&gt;



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

&lt;p&gt;In normal regular functions, "this" changes according to how the function is invoked. "this" may refer to the global object or undefined if you are using strict mode. It could be the object that owns the method the if the function is a method of an object. Other times it refers to the newly created instance when it is used as a constructor.&lt;/p&gt;

&lt;p&gt;Arrow functions don’t have their own “this”, and they don’t redefine the value of this within the function. “this” inside an arrow function always refer to "this" from the outer context. This is my biggest beef with arrow functions&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//normal function
const person = {
 run() {
     console.log(this);
 }
};
person.run();
// logs person object


//arrow function
const person = {
        run: () =&amp;gt; {
              console.log(this);
        }
    };
person.run();

// logs window object
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. new
&lt;/h2&gt;

&lt;p&gt;Regular functions are constructible, they can be called using the new keyword. However, arrow functions can never be used as constructor functions. Hence, they can never be invoked with the new keyword&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function add (a, b) {
   console.log(a + b)
}
let sum = new add(2,3); // 5

let add = (a, b) =&amp;gt; console.log(a + b);
const sum = new add(2,4);

// TypeError: add is not a constructor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. No duplicate named parameters
&lt;/h2&gt;

&lt;p&gt;In normal function, we can do this: row functions can never have duplicate named parameters, whether in strict or non-strict mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// allowed
function add(x, x) {}

// not allowed
'use strict';
function add(y, y) {}
// Uncaught SyntaxError: Duplicate parameter name not allowed in this context
const arrowFunc = (a,a) =&amp;gt; {}
// Uncaught SyntaxError: Duplicate parameter name not allowed in this context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  8. Function Hoisting
&lt;/h2&gt;

&lt;p&gt;In regular function, the function gets hoisting at the top. But in arrow function, function get hoisted where you define. So, if you call the function before initialization you will get a ReferenceError&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;get referenceError.
normalFunc()
function normalFunc() {
   return "Shooting bullets"
}
// "Normal Function"

arrowFunc()
const arrowFunc = () =&amp;gt; {
   return "Shooting Arrows"
}
// ReferenceError: Cannot access 'arrowFunc' before initialization
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>Terminal , Shell, CLI : Your first 20 commands;</title>
      <dc:creator>Ebenezer Enietan (Niza)</dc:creator>
      <pubDate>Sat, 03 Dec 2022 20:02:39 +0000</pubDate>
      <link>https://dev.to/niza/terminal-shell-cli-your-first-20-commands-2i0h</link>
      <guid>https://dev.to/niza/terminal-shell-cli-your-first-20-commands-2i0h</guid>
      <description>&lt;p&gt;A terminal is a program that runs a shell and allows us to enter commands. Examples of terminal emulators include: Command prompt, guake, gnome-terminal, terminator etc. Any wrapper program that runs a shell interpreter is a terminal. &lt;/p&gt;

&lt;p&gt;The shell is a command-line interpreter. The shell is the program that actually processes commands and outputs results some examples of shells are: Bash, fish, zsh, ksh, sh, tsch, Power Shell, pwsh cmd, yori, 4dos, command.com. &lt;/p&gt;

&lt;p&gt;A command-line interface(CLI) is any type of interface that is used to enter (textual) commands. One of these is the terminal, but some programs have their own command-line interfaces. &lt;/p&gt;

&lt;p&gt;We connect with computers in a variety of ways, including utilizing a keyboard and mouse, touchscreen interfaces, and speech recognition systems. A graphical user interface is a most often utilized method of interacting with personal computers (GUI). We deliver instructions with a GUI by clicking a mouse and using menu-driven interactions. This way of delivering instructions to a computer in certain cases and for certain repetitive performs poorly, so we can take advantage of the Unix shell. The Unix shell is both a command-line interface (CLI) and a scripting language that can execute repetitive tasks automatically and quickly with the proper commands.&lt;/p&gt;

&lt;p&gt;Here are a some commands and what they do; options are in parenthesis&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. $ whoami&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
It returns your username.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. $ ls&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
list the contents of the current directory(ls –F, ls -help, man ls)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. $ pwd&lt;/strong&gt;&lt;br&gt;
present working directory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. $ cd&lt;/strong&gt;&lt;br&gt;
Change direct eg cd Desktop moves user to desktop directory&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. $ mkdir&lt;/strong&gt;&lt;br&gt;
mkdir [path] creates a new directory.&lt;br&gt;
Eg. mkdir web&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. $ nano&lt;/strong&gt;&lt;br&gt;
A text editor eg to make a text list.txt use the command nano list.txt Depending on the type of work you do, you may need a more powerful text editor than Nano.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. $touch&lt;/strong&gt;&lt;br&gt;
Used to create files touch list2.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. $ rm&lt;/strong&gt;&lt;br&gt;
rm [path] removes (deletes) a file.&lt;br&gt;
Eg. rm list2.txt (rm -r remove directory and all it contents)&lt;br&gt;
The shell does not have a trash bin: once something is deleted, it’s really gone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. $ mv&lt;/strong&gt;&lt;br&gt;
mv [old] [new] moves or renames a file or directory.&lt;br&gt;
Eg. mv list.txt buy.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10. $ cp&lt;/strong&gt;&lt;br&gt;
Copy file cp [old] [new] copies a file.&lt;br&gt;
eg cp list.txt fish.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. Wild cards&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;matches zero or more characters in a filename, so *.txt matches all files ending in .txt.
Eg ls *.txt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;? matches any single character in a filename, so ?.txt matches a.txt but not any.txt.&lt;br&gt;
Eg ls list?.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. $ wc&lt;/strong&gt; &lt;br&gt;
Word counts command: it counts the number of lines, words, and characters in files&lt;br&gt;&lt;br&gt;
eg wc list.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;13. $ cat&lt;/strong&gt;&lt;br&gt;
it prints the contents of files one after another.&lt;br&gt;
eg cat list.txt&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;14. $ sort&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
command to sort the contents of a file (sort -n for numbers)&lt;br&gt;
Eg sort lists&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;15. $ echo&lt;/strong&gt; &lt;br&gt;
The echo command prints text &lt;br&gt;
Eg echo hello&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;16. $ echo hello &amp;gt; list.txt&lt;/strong&gt;&lt;br&gt;
command &amp;gt; [file] redirects a command’s output to a file (overwriting any existing content).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;17. $ echo hello &amp;gt;&amp;gt; list.txt&lt;/strong&gt;&lt;br&gt;
command &amp;gt;&amp;gt; [file] appends a command’s output to a file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;18. $ head&lt;/strong&gt; &lt;br&gt;
head displays the first 10 lines of its input.&lt;br&gt;
Eg head -n 3 animals.csv &amp;gt; animals-subset.csv&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;19. $ tail&lt;/strong&gt; &lt;br&gt;
displays the last 10 lines of its input.&lt;br&gt;
Eg tail -n 3 animals.csv &amp;gt; animals-subset.csv&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;20. $ [first] | [second]&lt;/strong&gt; &lt;br&gt;
pipeline: the output of the first command is used as the input to the second.&lt;/p&gt;

&lt;h2&gt;
  
  
  where can i learn more about shell?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://swcarpentry.github.io/shell-novice/"&gt;learn more about shell&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>unix</category>
    </item>
  </channel>
</rss>
