<?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: Tykok</title>
    <description>The latest articles on Forem by Tykok (@tykok).</description>
    <link>https://forem.com/tykok</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%2F767381%2Fca904f69-0c37-4c6a-97d7-aecd5d8802fc.jpg</url>
      <title>Forem: Tykok</title>
      <link>https://forem.com/tykok</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tykok"/>
    <language>en</language>
    <item>
      <title>PokeAPI Library 🚀</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Thu, 05 Oct 2023 20:10:19 +0000</pubDate>
      <link>https://forem.com/tykok/pokeapi-library-43d3</link>
      <guid>https://forem.com/tykok/pokeapi-library-43d3</guid>
      <description>&lt;p&gt;I deploy my first library on Maven Central: &lt;a href="https://central.sonatype.com/artifact/fr.tykok/pokeapi" rel="noopener noreferrer"&gt;https://central.sonatype.com/artifact/fr.tykok/pokeapi&lt;/a&gt;. ✨🎉&lt;br&gt;
You can use this library to wrap easily all the data from pokeapi.co API.&lt;/p&gt;

&lt;p&gt;Here I'm gonna explain why I create &lt;a href="https://github.com/Tykok/PokeAPI-Kotlin" rel="noopener noreferrer"&gt;&lt;code&gt;PokeAPI-Kotlin&lt;/code&gt;&lt;/a&gt;  for the &lt;a href="https://pokeapi.co/" rel="noopener noreferrer"&gt;pokeapi.co&lt;/a&gt;, and how I deploy it on Maven Central.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fxglahgxohsi9vcij2tn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fxglahgxohsi9vcij2tn5.png" alt="PokeApi Kotlin"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find all about this project on GitHub: &lt;a href="https://github.com/Tykok/PokeAPI-Kotlin" rel="noopener noreferrer"&gt;PokeApi-Kotlin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You are free to contribute to this project 🙌🏽&lt;/p&gt;
&lt;h2&gt;
  
  
  What is a library?
&lt;/h2&gt;

&lt;p&gt;Many library are available on &lt;a href="https://central.sonatype.com/artifact/fr.tykok/pokeapi" rel="noopener noreferrer"&gt;Maven Central&lt;/a&gt;, but what is a library? 🤔&lt;br&gt;
A library is just a piece of &lt;strong&gt;reusable code&lt;/strong&gt; created by a developer or a team. A library can contains specific &lt;strong&gt;functions&lt;/strong&gt;, &lt;strong&gt;classes&lt;/strong&gt; or &lt;strong&gt;modules&lt;/strong&gt; that can be used by other developers to simplify their work when creating software.&lt;/p&gt;

&lt;p&gt;In short, a library is a set of pre-written codes that developers can use to solve common problems and &lt;strong&gt;accelerate&lt;/strong&gt; the development of their software. &lt;br&gt;
It's like a &lt;strong&gt;toolbox&lt;/strong&gt; for developers, where they can find ready-made solutions for their needs.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why I create a library 🆕
&lt;/h2&gt;

&lt;p&gt;I create this library to improve my skills and to understand how a library is deployed to Maven Central. My goal was also to create my own tool that I would use later, and that others can use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FXaAbmtzzz35IgW3Ntn%2Fgiphy.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FXaAbmtzzz35IgW3Ntn%2Fgiphy.webp" alt="https://i.giphy.com/media/XaAbmtzzz35IgW3Ntn/giphy.webp"&gt;&lt;/a&gt;&lt;/p&gt;


🧑🏼‍💻 For this project, I used &lt;a href="https://kotlinlang.org/" rel="noopener noreferrer"&gt;Kotlin&lt;/a&gt; with &lt;a href="https://docs.gradle.org/current/userguide/kotlin_dsl.html" rel="noopener noreferrer"&gt;Gradle Kotlin DSL&lt;/a&gt;.


&lt;p&gt;This desire also came from a desire to create an application on the Play Store.&lt;/p&gt;

&lt;p&gt;I wanted to create an Android application, to improve myself but also to understand how to deploy an application on the Play Store.&lt;br&gt;
The aim was also to have one more app to add to my portfolio, and above all to have fun!&lt;/p&gt;

&lt;p&gt;Problem: the Kotlin library offered on &lt;a href="http://pokeapi.co/" rel="noopener noreferrer"&gt;pokeapi.co&lt;/a&gt; has been out of date for a while (2021) and I've been getting errors when installing dependencies.&lt;br&gt;
I didn't look far to correct this problem, as I saw an opportunity to create my own library that I'd later use for my application project.&lt;/p&gt;

&lt;p&gt;That's how I managed to deploy my very first library on Maven Central!&lt;/p&gt;
&lt;h2&gt;
  
  
  How I deploy it on Maven Central
&lt;/h2&gt;

&lt;p&gt;To deploy a package to Maven Central, you need to have an account on &lt;strong&gt;Jira&lt;/strong&gt;.&lt;/p&gt;


💬 Go to &lt;a href="https://issues.sonatype.org/secure/Dashboard.jspa" rel="noopener noreferrer"&gt;Jira&lt;/a&gt; to create your account. 


&lt;p&gt;When it’s done, you need to create an &lt;strong&gt;Issue&lt;/strong&gt; on Jira with your logged account. When you create an issue, you need to provide many information about your project :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Group Id&lt;/code&gt; : For me it was &lt;code&gt;fr.tykok.pokeapi&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Project URL: Link it to your GitHub repository&lt;/li&gt;
&lt;li&gt;SCM URL: The URL to your source control system (just add &lt;code&gt;.git&lt;/code&gt; to your GitHub URL)&lt;/li&gt;
&lt;/ul&gt;


⚠️ If you use a custom domain for your `groupId` you need to prove the domain it’s your by adding a `DNS TXT record`.
If you want, you can use `io.github` for your domain if you don’t want to pay for domain name.

&lt;h3&gt;
  
  
  Configure your Graddle Kotlin DSL
&lt;/h3&gt;

&lt;p&gt;First, you need to define two variable will be used soon at the top of your &lt;code&gt;build.gradle.kts&lt;/code&gt; file. Here is mine :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"PokeApi is a simple library you can use to make request to get data about Pokémon."&lt;/span&gt;
&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"fr.tykok"&lt;/span&gt;
&lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0.0.3"&lt;/span&gt;

&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;artifact&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"pokeapi"&lt;/span&gt;
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;projectName&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"PokeApi"&lt;/span&gt;
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;sonarSnapshotUri&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://s01.oss.sonatype.org/content/repositories/snapshots/"&lt;/span&gt;
&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;sonarReleaseUri&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"https://s01.oss.sonatype.org/content/repositories/releases/"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To define which URL, you need to use, I create a small function in my &lt;code&gt;build.gradle.kts&lt;/code&gt; file :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;getUriSonar&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;endsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"SNAPSHOT"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;sonarSnapshotUri&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;sonarReleaseUri&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, you need to add this &lt;code&gt;plugins&lt;/code&gt; in your &lt;code&gt;build.gradle.kts&lt;/code&gt; file :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;plugins&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;`maven-publish`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, you need to configure the &lt;strong&gt;Maven publication&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;publishing&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;publications&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;MavenPublication&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="s"&gt;"library"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;components&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"java"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nf"&gt;repositories&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;maven&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;getUriSonar&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
            &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;projectName&lt;/span&gt;
            &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;
            &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt;
            &lt;span class="nf"&gt;credentials&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"ossrh.username"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;
                    &lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"OSSRH_USERNAME"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"ossrh.password"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;
                    &lt;span class="o"&gt;?:&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"OSSRH_PASSWORD"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📝 If you want, you can check the documentation for &lt;a href="https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:publications" rel="noopener noreferrer"&gt;&lt;code&gt;MavenPublication&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You need to add the &lt;code&gt;credentials&lt;/code&gt; too in the &lt;a href="http://gradle.properties" rel="noopener noreferrer"&gt;&lt;code&gt;gradle.properties&lt;/code&gt;&lt;/a&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="n"&gt;ossrh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;
&lt;span class="n"&gt;ossrh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👀 Here, I use &lt;code&gt;Sytem.getenv()&lt;/code&gt; function to get the credentials from Github Actions too.&lt;/p&gt;

&lt;p&gt;If you want, you can check the &lt;a href="https://central.sonatype.org/publish/publish-guide/" rel="noopener noreferrer"&gt;main documentation&lt;/a&gt; I follow to publish my library.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the next step ?
&lt;/h2&gt;

&lt;p&gt;Next step for me… Create a Pokedex on the Play Store with this library!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FZZT3Wag0jrTD3dpIfe%2Fgiphy.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.giphy.com%2Fmedia%2FZZT3Wag0jrTD3dpIfe%2Fgiphy.webp" alt="Pokedex"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want, you can contribute to this project on &lt;a href="https://github.com/Tykok/PokeMobile" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ko-fi.com/U7U7PBV82" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fko-fi.com%2Fimg%2Fgithubbutton_sm.svg" alt="ko-fi"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow me
&lt;/h2&gt;

&lt;p&gt;Twitter: &lt;a href="https://twitter.com/TreportElie1" rel="noopener noreferrer"&gt;https://twitter.com/TreportElie1&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/Tykok" rel="noopener noreferrer"&gt;https://github.com/Tykok&lt;/a&gt;&lt;br&gt;
Medium: &lt;a href="https://medium.com/@tykok" rel="noopener noreferrer"&gt;https://medium.com/@tykok&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tutorial</category>
      <category>opensource</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Follow me on medium ❤️</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Thu, 05 Oct 2023 20:02:06 +0000</pubDate>
      <link>https://forem.com/tykok/follow-me-on-medium-2f7g</link>
      <guid>https://forem.com/tykok/follow-me-on-medium-2f7g</guid>
      <description>&lt;p&gt;Hello 👋🏼&lt;/p&gt;

&lt;p&gt;I started writing articles on dev.to, and I'm currently trying to do some on Medium as well whenever I'm passionate about a topic or want to share something with you.&lt;/p&gt;

&lt;p&gt;When I write an article, I'll publish it here and on Medium! So if you have a Medium account and want to follow me, you can do so here: &lt;a href="https://medium.com/@tykok"&gt;https://medium.com/@tykok&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;See you soon 👋🏼&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OH72erEH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://media3.giphy.com/media/l1J3CbFgn5o7DGRuE/giphy.gif%3Fcid%3Decf05e47pfphpyl53x6smwa0rcxla0klmc2np2w8zuohloj6%26ep%3Dv1_gifs_search%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OH72erEH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_800/https://media3.giphy.com/media/l1J3CbFgn5o7DGRuE/giphy.gif%3Fcid%3Decf05e47pfphpyl53x6smwa0rcxla0klmc2np2w8zuohloj6%26ep%3Dv1_gifs_search%26rid%3Dgiphy.gif%26ct%3Dg" alt="See you soon" width="480" height="309"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>discuss</category>
      <category>writing</category>
    </item>
    <item>
      <title>Chinese npm package 汉译英</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Fri, 24 Feb 2023 12:35:17 +0000</pubDate>
      <link>https://forem.com/tykok/chinese-npm-package-yi-yi-ying-310d</link>
      <guid>https://forem.com/tykok/chinese-npm-package-yi-yi-ying-310d</guid>
      <description>&lt;h2&gt;
  
  
  Why create a npm package ?
&lt;/h2&gt;

&lt;p&gt;Just to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand what i use when i use &lt;code&gt;npm i ...&lt;/code&gt; or &lt;code&gt;yarn add ...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Especially understand how they made it !&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, i create my first package !&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the library ?
&lt;/h2&gt;

&lt;p&gt;The library named &lt;a href="https://www.npmjs.com/package/@tykok/cedict-dictionary" rel="noopener noreferrer"&gt;&lt;strong&gt;Cedict dictionary&lt;/strong&gt;&lt;/a&gt; and it's actually available on &lt;a href="https://www.npmjs.com/" rel="noopener noreferrer"&gt;npm.js&lt;/a&gt; and &lt;a href="https://yarnpkg.com/package/@tykok/cedict-dictionary" rel="noopener noreferrer"&gt;yarnpkg.com&lt;/a&gt; !&lt;/p&gt;

&lt;p&gt;This library simply give you some functions and a large JSON file with for each object the :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Traditional character in Chinese&lt;/li&gt;
&lt;li&gt;Simplified character in Chinese&lt;/li&gt;
&lt;li&gt;Pinyin pronunciation&lt;/li&gt;
&lt;li&gt;English translation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Wh6vs1icbibhm/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Wh6vs1icbibhm/giphy.gif" alt="Thank you Panda"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is an example of what you can have in an object :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="nl"&gt;traditional&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;上天入地&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="nx"&gt;simplified&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;上天入地&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="nx"&gt;pinyin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;shang4&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="nx"&gt;english&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lit. to go up to heaven or down to Hades (idiom)/fig. to go to great lengths/to search heaven and earth/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;ℹ️ I do not currently speak Chinese while writing this article! &lt;br&gt;
It’s a really complex language, though the C language and all its pointers 🤣.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  What is the Cedict ?
&lt;/h3&gt;

&lt;p&gt;The Cedict, called &lt;a href="https://www.mdbg.net/chinese/dictionary?page=cedict" rel="noopener noreferrer"&gt;CC-CEDICT&lt;/a&gt; is a continuation of the CEDICT project.&lt;/p&gt;

&lt;p&gt;This project provide a complete downloadable Chinese to English dictionary, and all of this in a specific format of CC-CEDICT.&lt;br&gt;
It's an &lt;strong&gt;open source&lt;/strong&gt; project who is actually frequently updated !&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;ℹ️ If you want, you can go to her &lt;a href="https://dev.towikiCedictLink"&gt;wiki&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  How the &lt;a href="https://www.npmjs.com/package/@tykok/cedict-dictionary" rel="noopener noreferrer"&gt;@tykok/cedict-dictionary&lt;/a&gt; package work
&lt;/h3&gt;

&lt;p&gt;The project have two parts :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The part who get data and format the Cedict into a JSON.&lt;/li&gt;
&lt;li&gt;The part who simply exploit the JSON.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;To get the final JSON, we need to &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the &lt;code&gt;.zip&lt;/code&gt; on &lt;a href="https://www.mdbg.net/chinese/dictionary?page=cedict" rel="noopener noreferrer"&gt;CC-CEDICT&lt;/a&gt; project.&lt;/li&gt;
&lt;li&gt;Unzip it.&lt;/li&gt;
&lt;li&gt;Get the file who contain the dictionary.&lt;/li&gt;
&lt;li&gt;Parse it into a JSON file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All this actions are in a script called by a cronjob who simply execute this script and update the JSON Cedict of the library.&lt;/p&gt;



&lt;p&gt;The second part is more simply than the previous one !&lt;/p&gt;

&lt;p&gt;Here, we have a JSON file. And we can simply exploit it with some functions to get for example a chinese object with a traditional character.&lt;/p&gt;
&lt;h3&gt;
  
  
  A simple start with &lt;a href="https://www.npmjs.com/package/@tykok/cedict-dictionary" rel="noopener noreferrer"&gt;@tykok/cedict-dictionary&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;To start, use &lt;code&gt;yarn&lt;/code&gt; or &lt;code&gt;npm&lt;/code&gt; to install the dependency :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# With yarn&lt;/span&gt;
yarn add @tykok/cedict-dictionary

&lt;span class="c"&gt;# With npm&lt;/span&gt;
npm i @tykok/cedict-dictionary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, just import the global class to use the Cedict :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Cedict&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@tykok/cedict-dictionary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And, with the &lt;code&gt;Cedict&lt;/code&gt; class, you can use some function to get a specific chinese character, the pronunciation or all the cedict !&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To know how to use this package, you can go to the &lt;a href="https://tykok.github.io/cedict-chinese-transformation/" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;This project is not just for fun. I create it to learn some things i actually don't know or improve it !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FbGgsc5mWoryfgKBx1u%2Fgiphy.gif%3Fcid%3D790b761115bee9bc49639ad6455d739de8e5ea0f6a333594%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FbGgsc5mWoryfgKBx1u%2Fgiphy.gif%3Fcid%3D790b761115bee9bc49639ad6455d739de8e5ea0f6a333594%26rid%3Dgiphy.gif%26ct%3Dg" alt="Code boy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, this project is &lt;strong&gt;open source&lt;/strong&gt; and you can come to contribute to this project. There are still many things to improve !&lt;/p&gt;




&lt;p&gt;Tell me if you have any suggestions, or remarks for the project. And of course if this article was interesting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>npm</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Please, comment your code...</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Sun, 02 Oct 2022 00:52:30 +0000</pubDate>
      <link>https://forem.com/tykok/please-comment-your-code-4jj0</link>
      <guid>https://forem.com/tykok/please-comment-your-code-4jj0</guid>
      <description>&lt;h2&gt;
  
  
  Why should I comment my code ?
&lt;/h2&gt;

&lt;p&gt;If you're actually code in Java, JavaScript, Python, PHP. You're probably hear about technical documentation and some things like :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html" rel="noopener noreferrer"&gt;JavaDoc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jsdoc.app/" rel="noopener noreferrer"&gt;JSDoc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://peps.python.org/pep-0257/" rel="noopener noreferrer"&gt;DocString&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.phpdoc.org/" rel="noopener noreferrer"&gt;PHPDoc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And if you had not heard anything about "how to comment your code". So you were, you are or you will be confronted to THE question : &lt;/p&gt;

&lt;p&gt;"&lt;em&gt;What this code do ???&lt;/em&gt;"&lt;/p&gt;

&lt;p&gt;And you know how it's painful when something doesn't work and you can't understand WHY !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fik10lqhr0HTUc%2Fgiphy.gif%3Fcid%3D790b7611dad632c5bd948dd23b5953c627afdb6c9db30c81%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fik10lqhr0HTUc%2Fgiphy.gif%3Fcid%3D790b7611dad632c5bd948dd23b5953c627afdb6c9db30c81%26rid%3Dgiphy.gif%26ct%3Dg" alt="Rage developer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you use an external program, your reflex is to read documentation about this program to understand how to use this.&lt;/p&gt;

&lt;p&gt;When you comment your code, the objectives is the same. You'll write some details for you in the future or for the people who use or improve this code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Objectives
&lt;/h3&gt;

&lt;p&gt;The objectives is multiple, just think about you in 2 years in this code. You'll be happy to see somes comments who explain what is this weird classes you added before 😆.&lt;/p&gt;

&lt;p&gt;Now, if you don't code alone. Think about you're associate will read and use your code.&lt;/p&gt;

&lt;p&gt;And PLEASE, think about all people who use your code in the future if you're make an open source program.&lt;/p&gt;




&lt;p&gt;I think you understand now, when you comment your code you actually :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You &lt;strong&gt;saves time&lt;/strong&gt; for you, and for other peoples&lt;/li&gt;
&lt;li&gt;Describe, and have a &lt;strong&gt;readable code&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Your code will be &lt;strong&gt;accessible&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  When should I comment ?
&lt;/h2&gt;

&lt;p&gt;It's recommended to comment your &lt;strong&gt;class&lt;/strong&gt;, you're &lt;strong&gt;function&lt;/strong&gt; and use &lt;strong&gt;inline documentation&lt;/strong&gt; when is necessary. I think it's the minimal requirement for a readable code.&lt;/p&gt;

&lt;p&gt;A code has commented, is a readable code. &lt;strong&gt;BUT&lt;/strong&gt;, use comment whith thriftiness.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Of course, if you're function is named &lt;code&gt;sum&lt;/code&gt; for example, and take two arguments. It will be really simple to know what the function do.&lt;br&gt;
Personaly I think you should comment for function when the function is over 10 lines, and it's required for classes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And please remember, a developer does not only code. &lt;/p&gt;

&lt;p&gt;A developer maintain, debug, keep an eye on evolution, document, and think how to resolve problems. &lt;br&gt;
So please, comment your code and make happy the "you" of tomorrow and all people who read your code. And you'll make a step to become a programming god 😃.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FCXnj3jCwvETngjy11B%2Fgiphy.gif%3Fcid%3D790b76113b8a42da37b27a4555a248ec931afe31a9ddc04b%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FCXnj3jCwvETngjy11B%2Fgiphy.gif%3Fcid%3D790b76113b8a42da37b27a4555a248ec931afe31a9ddc04b%26rid%3Dgiphy.gif%26ct%3Dg" alt="God developer"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Tell me if you have any suggestions, or remarks and of course if this article was interesting.&lt;br&gt;
There is so much to say about this, feel free to express your point of view, so don't hesitate. 😜&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>discuss</category>
      <category>tutorial</category>
      <category>vscode</category>
    </item>
    <item>
      <title>Why the object approach with JavaScript methods is the best for me</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Sat, 23 Jul 2022 21:12:00 +0000</pubDate>
      <link>https://forem.com/tykok/the-object-approach-with-javascript-methods-is-the-best-for-me-1p5j</link>
      <guid>https://forem.com/tykok/the-object-approach-with-javascript-methods-is-the-best-for-me-1p5j</guid>
      <description>&lt;h2&gt;
  
  
  What is an object in JavaScript ?
&lt;/h2&gt;

&lt;p&gt;Like the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" rel="noopener noreferrer"&gt;mdn web docs&lt;/a&gt; says :&lt;/p&gt;

&lt;p&gt;"The Object type represents one of &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures" rel="noopener noreferrer"&gt;JavaScript's data types&lt;/a&gt;. It is used to store various keyed collections and more complex entities. Objects can be created using the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/Object" rel="noopener noreferrer"&gt;Object()&lt;/a&gt; constructor or the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer" rel="noopener noreferrer"&gt;object initializer / literal syntax&lt;/a&gt;."&lt;/p&gt;

&lt;p&gt;So an object, is simply a &lt;strong&gt;structure with many properties have data assigned to them&lt;/strong&gt;. Here is an exemple of an object :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;simplePerson&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jean&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can store everything you want ! You can store too a function for example :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jean&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;print&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`Id : &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; -
            Name : &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; -
            Age &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you can store an object into a property too !&lt;/p&gt;

&lt;h2&gt;
  
  
  How use this ?
&lt;/h2&gt;

&lt;p&gt;When you have an object, you can access all property inside of them.&lt;/p&gt;

&lt;p&gt;For example, with the object person build before we gonna access the value of the property &lt;code&gt;name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fw8y8kgsy22ac32szqx13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fw8y8kgsy22ac32szqx13.png" alt="Result of propertie name"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Like you can see in this pictures, is simple to access properties of an object an use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I would use object for my function parameters ?
&lt;/h2&gt;

&lt;p&gt;Because it's &lt;strong&gt;very useful&lt;/strong&gt;. Imagine, you have a function with 10 parameters. When you call your function you need to &lt;strong&gt;give the value in order of each argument&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Some code here...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// When you call you're function&lt;/span&gt;
&lt;span class="nf"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jean&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If the order of each parameters changes in you're function declaration or you decided to add or remove some parameters, you need to change &lt;strong&gt;ALL&lt;/strong&gt; function call to not have bugs !&lt;/p&gt;

&lt;p&gt;It's &lt;em&gt;not maintenable&lt;/em&gt;...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So i personally recommended to use object parameter instead of a list of parameters. And you have many ways to do that.&lt;/p&gt;

&lt;h3&gt;
  
  
  First way
&lt;/h3&gt;

&lt;p&gt;You can for example use only one parameters for your function declaration. This object gonna have specific properties needed when you're gonne call the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Some code here...&lt;/span&gt;
  &lt;span class="c1"&gt;// person.id ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Build the object directly with call&lt;/span&gt;
&lt;span class="nf"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jean&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Or build it before calling&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Jean&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Here if we want, we can easily change the order of the property in the object. They don't change create a bug in you're function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Second way
&lt;/h3&gt;

&lt;p&gt;The second way is to use the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call" rel="noopener noreferrer"&gt;&lt;code&gt;call&lt;/code&gt;&lt;/a&gt; method. When you use &lt;code&gt;call&lt;/code&gt; in your function you can use the &lt;code&gt;this&lt;/code&gt; statement.&lt;/p&gt;

&lt;p&gt;Here is an exemple.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;calcRectArea&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;calcRectArea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;span class="c1"&gt;// Will show 30&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Third way
&lt;/h2&gt;

&lt;p&gt;The third and the last way to make this is to simply define an object parameters an declare your properties into this object parameters.&lt;/p&gt;

&lt;p&gt;To understand what i say, i show you an example here :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;calcRectArea&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;calcRectArea&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;span class="c1"&gt;// Will show 30 too&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here for me the declaration is simpler than the 2 previous ones, because you can know what properties names the object needs and it's not necessary to read the function.&lt;/p&gt;

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

&lt;p&gt;For me, the object approach for the declaration of a function is really useful, because you &lt;strong&gt;don't need to have a list of each parameters&lt;/strong&gt; you need for one function and you can &lt;strong&gt;define named arguments&lt;/strong&gt; when you call you're function like Python, for example !&lt;/p&gt;

&lt;p&gt;Of course, this approach is not useful for a function with one parameter for example. But with this approach you can &lt;strong&gt;easily maintain your code and make updates on it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;But wait... for all parameters declaration, &lt;em&gt;we don't know the type of the function parameters and how we can know this&lt;/em&gt; ?&lt;/p&gt;

&lt;p&gt;I'll try to explain this in an other section talk about JSDoc 😜&lt;/p&gt;




&lt;p&gt;Tell me if you have any suggestions, or remarks and of course if this article was interesting. 😜&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How i spent 1 hour of my time for a line break in a Bash.</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Thu, 12 May 2022 21:11:02 +0000</pubDate>
      <link>https://forem.com/tykok/how-i-spent-1-hour-of-my-time-for-a-line-break-in-a-bash-2m8m</link>
      <guid>https://forem.com/tykok/how-i-spent-1-hour-of-my-time-for-a-line-break-in-a-bash-2m8m</guid>
      <description>&lt;p&gt;I hope this article will help you if you want to use Bash to create a small script.&lt;/p&gt;

&lt;p&gt;So yes, I confirm, I spent 1 HOUR OF MY TIME for a little break.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FEtB1yylKGGAUg%2Fgiphy.gif%3Fcid%3Decf05e47y0ym2zr8uv108ufm3jj7hkhymbkmyqwnqc1e6j1k%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2FEtB1yylKGGAUg%2Fgiphy.gif%3Fcid%3Decf05e47y0ym2zr8uv108ufm3jj7hkhymbkmyqwnqc1e6j1k%26rid%3Dgiphy.gif%26ct%3Dg" alt="'A panda rage'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this happening ?
&lt;/h2&gt;

&lt;p&gt;Because line break in Windows are not the same for Linux and when you run your Bash script you can have an error like this :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F853xzuxk1n139iig3i4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F853xzuxk1n139iig3i4z.png" alt="'The problem'"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you can search for a long time in your codes, why this error appeared.&lt;/p&gt;

&lt;p&gt;And this error appear just because the encoding of your file using the unicode of your line break is "&lt;code&gt;CR+LF&lt;/code&gt;" (&lt;code&gt;000D&lt;/code&gt; + &lt;code&gt;000A&lt;/code&gt;) instead of "&lt;code&gt;LF&lt;/code&gt;" (&lt;code&gt;000A&lt;/code&gt;).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;CR&lt;/code&gt; is for "cariage return" and &lt;code&gt;LF&lt;/code&gt; is for "line feed".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you press enter, one of this Unicode is used. And Linux doesn't like the &lt;code&gt;CR+LF&lt;/code&gt; because he represents all line endings by a &lt;code&gt;LF&lt;/code&gt; and in my case, he gave me some problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to solve it ?
&lt;/h2&gt;

&lt;p&gt;To solve it, you have many solutions. The most easily it's to use your favorite IDE and change the line ending.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For exemple in VSCode it's at the bottom.&lt;br&gt;
&lt;a href="https://media.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%2Fop1tb0wgwyskve7wb4s1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fop1tb0wgwyskve7wb4s1.png" alt="VSCode tips"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you use Git, you can use a file named &lt;a href="https://git-scm.com/docs/gitattributes" rel="noopener noreferrer"&gt;&lt;code&gt;.gitatttributes&lt;/code&gt;&lt;/a&gt;. You can in this file, specify to get what is the end of the line of a specific file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.sh        text eol=lf
*.md        text=auto
*.txt       text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;In the first line we declare the end of the lines for all files with &lt;code&gt;.sh&lt;/code&gt; extension by &lt;code&gt;LF&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And the last solution is to use the command &lt;a href="https://manpages.ubuntu.com/manpages/bionic/man1/dos2unix.1.html" rel="noopener noreferrer"&gt;dos2unix&lt;/a&gt; you can use to convert all lines endings of a file.&lt;/p&gt;

&lt;h2&gt;
  
  
  And you, have you ever have an absurd problem like that ?
&lt;/h2&gt;

&lt;p&gt;Main sources :&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://support.nesi.org.nz/hc/en-gb/articles/218032857-Converting-from-Windows-style-to-UNIX-style-line-endings" rel="noopener noreferrer"&gt;website &lt;/a&gt;solves my problems (and save me).&lt;/p&gt;

&lt;p&gt;Microsoft explains &lt;a href="https://docs.microsoft.com/en-us/visualstudio/ide/encodings-and-line-breaks?view=vs-2022" rel="noopener noreferrer"&gt;line endings&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Use variables in your package.json</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Wed, 11 May 2022 17:36:14 +0000</pubDate>
      <link>https://forem.com/tykok/use-variables-in-your-packagejson-331j</link>
      <guid>https://forem.com/tykok/use-variables-in-your-packagejson-331j</guid>
      <description>&lt;p&gt;Yes, you can use variable in your &lt;code&gt;package.json&lt;/code&gt; file &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2F3o7527pa7qs9kCG78A%2Fgiphy.gif%3Fcid%3Decf05e47flesuf0ff2zn2pdq2sodkx2agghc3h0r1sbp1l4m%26rid%3Dgiphy.gif%26ct%3Dg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2F3o7527pa7qs9kCG78A%2Fgiphy.gif%3Fcid%3Decf05e47flesuf0ff2zn2pdq2sodkx2agghc3h0r1sbp1l4m%26rid%3Dgiphy.gif%26ct%3Dg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I'm gonna show you how you can use variables in this file.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the "&lt;code&gt;package.json&lt;/code&gt;" ?
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://nodejs.dev/learn/the-package-json-guide" rel="noopener noreferrer"&gt;&lt;code&gt;package.json&lt;/code&gt;&lt;/a&gt; is like the official NodeJS website defines it to us :&lt;/p&gt;

&lt;p&gt;&lt;cite&gt;&lt;br&gt;
A kind of a manifest for your project. It can do a lot of things, completely unrelated. It's a central repository of configuration for tools, for example. It's also where npm and yarn store the names and versions for all the installed packages.&lt;br&gt;
&lt;/cite&gt;&lt;/p&gt;

&lt;p&gt;For more precision in the &lt;code&gt;package.json&lt;/code&gt; you can declare :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The name of your application&lt;/li&gt;
&lt;li&gt;The version&lt;/li&gt;
&lt;li&gt;The Licence&lt;/li&gt;
&lt;li&gt;The description of your project&lt;/li&gt;
&lt;li&gt;The dependencies of your project (for production, and development)&lt;/li&gt;
&lt;li&gt;Script for your project (Run project, run tests, run Lint, run the build, ...)&lt;/li&gt;
&lt;li&gt;The engine of tools (Node, npm, ...)&lt;/li&gt;
&lt;li&gt;The author name of the project&lt;/li&gt;
&lt;li&gt;All contributors&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And a lot of other things...&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use variables into my &lt;code&gt;package.json&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Imagine, you define a command in your &lt;code&gt;scripts&lt;/code&gt; section into the &lt;code&gt;package. Jason&lt;/code&gt; of your own project to use many Bash files you created and has really useful for your project.&lt;/p&gt;

&lt;p&gt;And all the Bash files are in the &lt;code&gt;.bin&lt;/code&gt; repository, inside your project.&lt;/p&gt;

&lt;p&gt;Your script section gonna be like that :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"bash1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash .bin/yourFirstBash.sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"bash2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash .bin/yourSecondBash.sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"bash3"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash .bin/yourThirdBash.sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;All it's ok, but now if for any reasons you need to move this bin into another directory you need to change your &lt;code&gt;package.json&lt;/code&gt; for each line. &lt;/p&gt;

&lt;p&gt;And here you can use variables to change quickly the destination of your Bash script 😄.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to use variables in your &lt;code&gt;package.json&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;To use variable, you need to declare a section named &lt;code&gt;config&lt;/code&gt; (or something else, but not a name was already taken by the &lt;code&gt;package.json&lt;/code&gt;). And in this section, you can declare ALL YOUR VARIABLES :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"config"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"path"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".bin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"entrypoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"server.js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"testFolder"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"src/test"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;

&lt;p&gt;And to use a variable, you just need to write &lt;code&gt;$npm_package_&lt;/code&gt; + &lt;code&gt;config&lt;/code&gt; (name of the section) + &lt;code&gt;_path&lt;/code&gt; (name of the variable).&lt;/p&gt;

&lt;p&gt;Here is an example with the previous section of &lt;code&gt;scripts&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"bash1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash $npm_package_config_path/yourFirstBash.sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"bash2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash $npm_package_config_path/yourSecondBash.sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"bash3"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash $npm_package_config_path/yourThirdBash.sh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;


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

&lt;/div&gt;
&lt;h2&gt;
  
  
  And you what do you think about using variables into your &lt;code&gt;package.json&lt;/code&gt; ?
&lt;/h2&gt;

&lt;p&gt;Main source : &lt;a href="https://brianchildress.co/variables-in-package-json/" rel="noopener noreferrer"&gt;https://brianchildress.co/variables-in-package-json/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.buymeacoffee.com%2Fbutton-api%2F%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>node</category>
    </item>
    <item>
      <title>Meta announce the use of NFT</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Tue, 19 Apr 2022 12:52:42 +0000</pubDate>
      <link>https://forem.com/tykok/meta-announce-the-use-of-nft-2cgi</link>
      <guid>https://forem.com/tykok/meta-announce-the-use-of-nft-2cgi</guid>
      <description>&lt;p&gt;Today we hear a lot of things about &lt;strong&gt;NFT&lt;/strong&gt;'s. And with this growing trend the Meta's CEO wants to develop the usage of this by integrating this usage into Instagram.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.facebook.com/zuck"&gt;Mark Zuckerberg&lt;/a&gt;&lt;/strong&gt; make this announce on occasion of the event of &lt;strong&gt;&lt;a href="https://www.sxsw.com/"&gt;South by SouthWest&lt;/a&gt;&lt;/strong&gt;, and he say the teams of Instagram work on this integration in the social network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wait, what is an NFT ?
&lt;/h2&gt;

&lt;p&gt;An NFT, is an abreviation to say  &lt;strong&gt;N&lt;/strong&gt;on-&lt;strong&gt;F&lt;/strong&gt;ungible &lt;strong&gt;T&lt;/strong&gt;oken. Is a token who represent an &lt;strong&gt;object with a numerical identity&lt;/strong&gt; was store on a blockchain.&lt;/p&gt;

&lt;p&gt;An NFT is considered as a property deed, for example it is possible to buy a car through an NFT. And with this NFT you can say this car is your !&lt;/p&gt;

&lt;p&gt;But an NFT can be all you want, for example a collection named &lt;a href="https://opensea.io/collection/boredapeyachtclub"&gt;Bored Ape Yacht Club&lt;/a&gt; have a lot of pictures, and the most expansive cost only &lt;em&gt;100 000 000 000 000&lt;/em&gt; ETH (&lt;a href="https://ethereum.org/en/"&gt;Ethereum&lt;/a&gt;) and &lt;em&gt;289 721 000 000 000 000,00&lt;/em&gt; in dollar (currently).&lt;/p&gt;

&lt;p&gt;Don't panic, you can get a lot of NFT for a small price, and you can also create your own NFT and sell it. &lt;/p&gt;

&lt;p&gt;The world of NFT is very large, but what does Meta's CEO want to do with it?&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Meta's CEO gonna do with that ?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Meta
&lt;/h3&gt;

&lt;p&gt;To introduce this part, we gonna talk first about &lt;a href="https://about.facebook.com/meta/"&gt;"Meta"&lt;/a&gt; was in the past "Facebook".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rzRA2P8G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://siecledigital.fr/wp-content/uploads/2021/10/logo-meta-anime.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rzRA2P8G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://siecledigital.fr/wp-content/uploads/2021/10/logo-meta-anime.gif" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Facebook is changing its name in October 2021 to become &lt;a href="https://about.fb.com/news/2021/10/founders-letter/"&gt;&lt;strong&gt;Meta&lt;/strong&gt;&lt;/a&gt;. Indeed this name was not a coincidence, this name refer to the &lt;a href="https://en.wikipedia.org/wiki/Metaverse"&gt;Metaverse&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  What is the Metaverse ?
&lt;/h4&gt;

&lt;p&gt;The metaverse is a "Meta-universe", a virtual space accessible through virtual reality. &lt;/p&gt;

&lt;p&gt;In the Metaverse you can globally do everything you can do in the real world, you can for example touch and feel object in the Metaverse like your mouse you use currently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/ALyFXxPgdsaPvSvP0x/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/ALyFXxPgdsaPvSvP0x/giphy.gif" alt="Metaverse example" width="379" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To go in the Metaverse you need an &lt;strong&gt;Avatar&lt;/strong&gt;, this avatar represent you and it's your &lt;strong&gt;identity&lt;/strong&gt; in the Metaverse.&lt;/p&gt;

&lt;p&gt;This subject was &lt;em&gt;really large&lt;/em&gt;, and to understand approximately what the metaverse and how it can be in the future I advise to see the American movie named "&lt;a href="https://en.wikipedia.org/wiki/Ready_Player_One_(film)"&gt;Ready Player One&lt;/a&gt;".&lt;/p&gt;

&lt;p&gt;This movie is really nice and let you imagine what the Metaverse could be in the future.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Pq1TbYMMAIM5G/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Pq1TbYMMAIM5G/giphy.gif" alt="Ready player one" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The future of Instagram
&lt;/h3&gt;

&lt;p&gt;The global objective, it's to use NFT's with Instagram and more precisely in the Metaverse of Meta.&lt;/p&gt;

&lt;p&gt;The NFT's gonna be &lt;strong&gt;based and your profile&lt;/strong&gt; and your &lt;strong&gt;life&lt;/strong&gt; (Meta have a lot of information about that) and can be used in Instagram, Facebook, ....&lt;/p&gt;

&lt;p&gt;For example, with your account you have an avatar and this avatar have some clothes. You can &lt;strong&gt;personalize this avatar&lt;/strong&gt; with many things and &lt;strong&gt;exchanges virtual objects&lt;/strong&gt; you have with other people in the Metaverse. All your clothes, accessories, etc. gonna be yours and gonna be linked with your account.&lt;/p&gt;

&lt;p&gt;This new world is an opportunity for many marks, who can for example, create a special shoe with a large rarity.&lt;/p&gt;

&lt;p&gt;But all I say here, it's &lt;strong&gt;assumption&lt;/strong&gt; because the Metaverse is not for tomorrow, and the Meta group need a lot of time to develop this new virtual world.&lt;/p&gt;

&lt;p&gt;But imagine what could be possible in the future...&lt;/p&gt;



&lt;h2&gt;
  
  
  And you, what do you want to be able to do in the Metaverse ?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiPYfN9W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.buymeacoffee.com/button-api/%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00" width="226" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>news</category>
      <category>metavers</category>
      <category>nft</category>
    </item>
    <item>
      <title>A French IA win against eight world champion of bridge</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Thu, 07 Apr 2022 23:11:14 +0000</pubDate>
      <link>https://forem.com/tykok/a-french-ia-win-against-eight-world-champion-of-bridge-2akp</link>
      <guid>https://forem.com/tykok/a-french-ia-win-against-eight-world-champion-of-bridge-2akp</guid>
      <description>&lt;h1&gt;
  
  
  What is the Bridge ?
&lt;/h1&gt;

&lt;p&gt;The bridge, it's a card game (52 cards) played with four people, in a team of two against two.&lt;/p&gt;

&lt;p&gt;It's a game based on the communication (because we play at two) and it's a game need a strategic reflexion and it's a random game.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gB1MpeQ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrqjz2k52xahgaw5uusg.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gB1MpeQ8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrqjz2k52xahgaw5uusg.JPG" alt="Image description" width="320" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Why this is a real advance
&lt;/h1&gt;

&lt;p&gt;It's a real advance in IA, because of the particular difficulty to play in this game. &lt;/p&gt;

&lt;p&gt;Indeed, this game, it's a random game played with partial information for each players. With this game, the IA makes many choices without knowing the cards of other players.&lt;/p&gt;

&lt;p&gt;So we can say the bridge as a really hard game, modelled on the real life.&lt;/p&gt;

&lt;p&gt;In real life we make sometimes choices without knowing the result or the consequences of these choices.&lt;/p&gt;

&lt;p&gt;It's a really different IA of &lt;a href="https://en.wikipedia.org/wiki/AlphaGo"&gt;AlphaGo&lt;/a&gt; (Go) and &lt;a href="https://en.wikipedia.org/wiki/Deep_Blue_(chess_computer)"&gt;Deep blue&lt;/a&gt; (Chess). Because unlike of the bridge, in Chess and Go, all information is observable and available for the IA. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AlphaGo IA reportage.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/8dMFJpEGNLQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Who created this IA ?
&lt;/h1&gt;

&lt;p&gt;That AI is called Nuke, and it was founded by a French start-up named &lt;a href="https://nukk.ai/"&gt;Nukkai&lt;/a&gt;. This start-up was created to make many searches on IA.&lt;/p&gt;

&lt;p&gt;An for &lt;a href="https://www.linkedin.com/in/veronique-ventos-28704190/"&gt;Veronique Ventos&lt;/a&gt; (the founder of Nukkai) the bridge was a really good game to explore the potential of IA.&lt;/p&gt;

&lt;p&gt;So this IA, was created to explore the many possibilities of IA and try to make a new challenge.&lt;/p&gt;

&lt;h1&gt;
  
  
  How Nuke globally work ?
&lt;/h1&gt;

&lt;p&gt;Nuke was trained with the &lt;a href="https://en.wikipedia.org/wiki/Monte_Carlo_method"&gt;simulation of "Monte Carlo"&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This simulation is named &lt;a href="https://en.wikipedia.org/wiki/Monte_Carlo"&gt;"Monte Carlo"&lt;/a&gt; (Monaco place)  because of many randomnes games.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/7ESK5SaP-bc"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's not all, Nuke it's not a "black box" for human. Indeed, he makes decisions and explain all of human in many different levels of comprehension.&lt;br&gt;
This makes a real difference, because here we gonna understand exactly how the IA works unlike of AlphaGo for example who win but we don't know how exactly how he win.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The redifusion of Nukkai challenge &lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/pKzzIOyHJhQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;


&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What do you think about the evolution of AI ?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiPYfN9W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.buymeacoffee.com/button-api/%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00" width="226" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A particular thanks to &lt;a href="https://siecledigital.fr/2022/04/04/une-ia-victorieuse-au-bridge-contre-huit-champions-du-monde/"&gt;"Siècle digital" &lt;/a&gt; and &lt;a href="https://www.mondenumerique.info/nukkai-l-ia-explicable-qui-joue-au-bridge-itw-jean-baptiste-fantun/"&gt;"Monde numérique"&lt;/a&gt; who giving me information about this news. &lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>news</category>
    </item>
    <item>
      <title>An auctions due to the close of "United Front Games" studio make a gamer really happy</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Tue, 22 Mar 2022 19:42:25 +0000</pubDate>
      <link>https://forem.com/tykok/an-auctions-due-to-the-close-of-united-front-games-studio-make-a-gamer-really-happy-dkl</link>
      <guid>https://forem.com/tykok/an-auctions-due-to-the-close-of-united-front-games-studio-make-a-gamer-really-happy-dkl</guid>
      <description>&lt;p&gt;The PS4 have now &lt;strong&gt;9 years&lt;/strong&gt;, and all this secrets are not yet revelated.&lt;/p&gt;

&lt;p&gt;Indeed, the Canadian studio at the origin of the game named &lt;strong&gt;Sleeping Dogs&lt;/strong&gt;, made an auction following the closure of the studio of many materials of the studio.&lt;/p&gt;

&lt;p&gt;We could find there : &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Server equipment&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Furniture&lt;/em&gt; (desk, lamps, TV, ...)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But above all a &lt;em&gt;PS4 devkit&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Indeed, the player named "&lt;strong&gt;kaneda2004&lt;/strong&gt;" who is in possession of this priceless object actually owns a console used by developers during the development of video games.&lt;/p&gt;

&lt;p&gt;The console is not virgin, but containing nearly 800GB of content developers could reveal secrets that have not yet seen the light.&lt;/p&gt;

&lt;p&gt;"kaneda2004" has also decided to go all the way, contacting members of Assembler Games in an attempt to extract encrypted data and reveal what they contain.&lt;/p&gt;

&lt;p&gt;The 9 year old PS4 has not yet delivered all its secrets and this despite the arrival of the PS5 2 years ago!&lt;/p&gt;

&lt;p&gt;My main source for this article : &lt;a href="https://gaming.gentside.com/console/ps4-un-joueur-fait-une-decouverte-en-fouillant-sa-console-achetee-aux-encheres_art16192.html"&gt;https://gaming.gentside.com/console/ps4-un-joueur-fait-une-decouverte-en-fouillant-sa-console-achetee-aux-encheres_art16192.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiPYfN9W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.buymeacoffee.com/button-api/%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00" width="226" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>news</category>
    </item>
    <item>
      <title>"DALL-E" Artificial intelligence that will draw your text</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Mon, 31 Jan 2022 21:35:16 +0000</pubDate>
      <link>https://forem.com/tykok/dall-e-artificial-intelligence-that-will-draw-your-text-4ogg</link>
      <guid>https://forem.com/tykok/dall-e-artificial-intelligence-that-will-draw-your-text-4ogg</guid>
      <description>&lt;h2&gt;
  
  
  Presentation of DALL-E
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;January 5, 2021&lt;/em&gt;, the &lt;a href="https://openai.com"&gt;openai.com&lt;/a&gt; website put forward an AI able to translate a word or a sentence into a picture.&lt;/p&gt;

&lt;p&gt;Say like this, it seems easy to do... But it is a really challenge !&lt;/p&gt;

&lt;p&gt;For exemple, if you give this sentence : &lt;/p&gt;

&lt;p&gt;"An armchair in the shape of an avocado." &lt;/p&gt;

&lt;p&gt;You can have this beautiful pictures :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--B9ZLrRt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yts9cjstld492okz1npn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--B9ZLrRt9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yts9cjstld492okz1npn.png" alt="Avocado chair" width="880" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Source : Website of openai.com&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This extraordinary AI is called &lt;a href="https://openai.com/blog/dall-e/"&gt;DALL-E&lt;/a&gt;, a contraction of the name of the surrealist artist Salvador Dali and the robot WALL-E.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Github official repo is &lt;a href="https://github.com/openai/dall-e"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;DALL-E is based on the GPT-3 model, which had a bad buzz this year because it suggested to a patient to commit suicide when used as a medical chatbot by &lt;a href="https://www.nabla.com/fr/"&gt;Nabla&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The GPT-3 for &lt;strong&gt;G&lt;/strong&gt;enerative &lt;strong&gt;P&lt;/strong&gt;re-trained &lt;strong&gt;T&lt;/strong&gt;ransformer &lt;strong&gt;3&lt;/strong&gt; is an &lt;strong&gt;autoregressive language model&lt;/strong&gt; that uses deep learning to produce human-like text.&lt;br&gt;
It is the successor of GPT-2, and he the third-generation language prediction model who was created OpenAI.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But openai.com had warned Nabla on the use of the GPT-3 model in medical, and had say to Nabla :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Health is in the high-stakes category because people rely on accurate medical information to make life-and-death decisions, and mistakes in this area could result in serious harm."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But with DALL-E, the risks would not be of this magnitude because the use here of GPT-3 is different.&lt;/p&gt;

&lt;h2&gt;
  
  
  The GPT-3 Model
&lt;/h2&gt;

&lt;p&gt;We already know that with this model, OpenAI is for example able to generate code from a sentence in English.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;OpenAI has shown it for example with the presentation of Codex accessible in private beta since August 2021.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/SGUCcjHTmGY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;He has been trained and is actually able to program in many langage like CSS, JSX, Python and others.&lt;/p&gt;

&lt;p&gt;Incredibly powerful, this model has also managed to write a dissertation in less than twenty minutes against three days for a student.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here is an example of many use of GPT-3 if you want to see &lt;a href="https://beta.openai.com/examples"&gt;more&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But as we have already seen, this model is not without its flaws...&lt;/p&gt;

&lt;p&gt;Indeed it can be dangerous, and can for example develop conspiracy theories on Reddit. &lt;br&gt;
But this is normal because the AI  has been trained on hundreds of billions  and he necessarily used resources present on the web, which tends to amplify the racist and sexist bias of the model. But of course researchers are already working on this problem.&lt;/p&gt;

&lt;p&gt;With this model, many technological advances can be made in the field of AI. And maybe one day machines will really be able to understand everything we say...&lt;/p&gt;




&lt;h2&gt;
  
  
  What do you think this AI will be able to do in the future ?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiPYfN9W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.buymeacoffee.com/button-api/%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00" width="226" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>news</category>
      <category>datascience</category>
      <category>machinelearning</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Microsoft announces $68.7 billion buyout of Activision Blizzard</title>
      <dc:creator>Tykok</dc:creator>
      <pubDate>Tue, 18 Jan 2022 22:17:19 +0000</pubDate>
      <link>https://forem.com/tykok/microsoft-announces-687-billion-buyout-of-activision-blizzard-5d6j</link>
      <guid>https://forem.com/tykok/microsoft-announces-687-billion-buyout-of-activision-blizzard-5d6j</guid>
      <description>&lt;p&gt;This is the &lt;strong&gt;biggest transaction&lt;/strong&gt; in Microsoft's history.&lt;/p&gt;

&lt;p&gt;Indeed, Microsoft bought &lt;a href="https://en.wikipedia.org/wiki/Activision_Blizzard"&gt;Activision Blizzard&lt;/a&gt; which is an industry of video games very well know through many different games like :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Call Of Duty&lt;/li&gt;
&lt;li&gt;Crash Bandicoot&lt;/li&gt;
&lt;li&gt;Doom&lt;/li&gt;
&lt;li&gt;World Of Warcraft&lt;/li&gt;
&lt;li&gt;Overwatch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And many others...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_DIV32qL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d31w4i57aftjqtisikv3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_DIV32qL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d31w4i57aftjqtisikv3.png" alt="Activision Blizzard Logo" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On &lt;strong&gt;18 January&lt;/strong&gt;, Microsoft reached an agreement to buy Activision Blizzard for a total of &lt;strong&gt;$68.7 billion&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Through this buy, Microsoft could be the third biggest industry of video games in the world after Tencent and Sony by adding at Microsoft 400 million monthly players in nearly 190 countries. &lt;br&gt;
Knowing that Microsoft was early implemented a strategy to compete with PlayStation by the marketing of &lt;a href="https://www.xbox.com/fr-FR/xbox-game-pass"&gt;Xbox Game Pass Ultimate&lt;/a&gt; since August 2019.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OKe1_pvU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xafecucuowl9u52brbpf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OKe1_pvU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xafecucuowl9u52brbpf.png" alt="Xbox and Activision Blizzard" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Xbox Game Pass Ultimate gives a catalog of 100 free games (and much more with the buy of Activision Blizzard) for only $15 by month at gamers of Xbox and PC.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To conclude, with this buy Microsoft could be a reference in the world of video games and could also turn more to metaverse platform development who would be the future of video games according to &lt;a href="https://en.wikipedia.org/wiki/Satya_Nadella"&gt;Satya Nadella&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/tykok"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uiPYfN9W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.buymeacoffee.com/button-api/%3Ftext%3DBuy%2520me%2520a%2520sushi%26emoji%3D%25F0%259F%258D%25A3%26slug%3Dtykok%26button_colour%3D5F7FFF%26font_colour%3Dffffff%26font_family%3DCookie%26outline_colour%3D000000%26coffee_colour%3DFFDD00" width="226" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>news</category>
    </item>
  </channel>
</rss>
