<?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: Douglas R Andreani</title>
    <description>The latest articles on Forem by Douglas R Andreani (@andreanidouglas).</description>
    <link>https://forem.com/andreanidouglas</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%2F29224%2F2ae000d4-5a71-4094-83bc-087ba301ffc2.jpeg</url>
      <title>Forem: Douglas R Andreani</title>
      <link>https://forem.com/andreanidouglas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/andreanidouglas"/>
    <language>en</language>
    <item>
      <title>What is the last open-source project that you found?</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Wed, 07 Aug 2019 17:33:11 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/what-is-the-last-open-source-project-that-you-found-j05</link>
      <guid>https://forem.com/andreanidouglas/what-is-the-last-open-source-project-that-you-found-j05</guid>
      <description>&lt;p&gt;Open-Source is awesome, so let's talk about them: What is the last one that you found and blow your mind? Something that someone/some team spent a lot of hours (or just a few) and delivered an amazing product?&lt;/p&gt;

&lt;p&gt;Links are appreciated :)&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>project</category>
      <category>thread</category>
      <category>discuss</category>
    </item>
    <item>
      <title>The new kid in town: Fedora Silverblue!</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Wed, 31 Jul 2019 17:08:50 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/the-new-kid-in-town-fedora-silverblue-j0g</link>
      <guid>https://forem.com/andreanidouglas/the-new-kid-in-town-fedora-silverblue-j0g</guid>
      <description>&lt;p&gt;On April 30th, 2019 the &lt;a href="https://getfedora.org/" rel="noopener noreferrer"&gt;Fedora Project&lt;/a&gt; released version 30 of its Linux distribution.&lt;/p&gt;

&lt;p&gt;After the acquisition by IBM, Fedora is no longer maintained by Red Had, it's now a complete community-based Distribution based on the &lt;strong&gt;4 Foundations&lt;/strong&gt; (Freedom, Friends, Features, and First).&lt;/p&gt;

&lt;p&gt;For this release also, Fedora delivered 3 additional &lt;em&gt;emerging&lt;/em&gt; to complete its lineup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fedora CoreOS (minimal container focus distro)&lt;/li&gt;
&lt;li&gt;Fedora IoT (OSS platform for IoT infrastructure)&lt;/li&gt;
&lt;li&gt;Fedora Silverblue (Immutable workstation based on container workflows)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On this article, I will cover the last, but let me know in the comments and we can discuss the other two as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overall
&lt;/h2&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%2Fdocs.fedoraproject.org%2Fen-US%2Ffedora-silverblue%2F_images%2Fsilverblue-logo.svg" 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%2Fdocs.fedoraproject.org%2Fen-US%2Ffedora-silverblue%2F_images%2Fsilverblue-logo.svg" alt="silverblue"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Silverblue is a new concept on the linux distribution. As described earlier is an immutable operating system. As is, it aims to be a powerful, stable and reliable platform for developers and professionals alike.&lt;/p&gt;

&lt;p&gt;Being immutable means that each and every installation will be exactly the same, being easier to develop and test making it less prone to bugs. But it also means that changes in the structures of the OS are not allowed by the user.&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/http%3A%2F%2Fabhirockzz.files.wordpress.com%2F2014%2F01%2Fimmutable-defined.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/http%3A%2F%2Fabhirockzz.files.wordpress.com%2F2014%2F01%2Fimmutable-defined.png" alt="immutable"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The userland experience will be a bit different from a standard Linux distro though. At first glance, you will have your normal Gnome environment and the &lt;strong&gt;Applications Store&lt;/strong&gt; will have most of the familiar application you need. They will work as regular applications besides the fact that they will not be installed directly to the OS. Each application will live in a sandbox environment called Flatpak.&lt;/p&gt;

&lt;p&gt;For developers the name of the game is containerization. Silverblue provides lots of functionality to create and deploy containers for all your projects.&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%2Fwww.marineinsight.com%2Fwp-content%2Fuploads%2F2011%2F05%2FContainer-lashing-with-rods.jpg" 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%2Fwww.marineinsight.com%2Fwp-content%2Fuploads%2F2011%2F05%2FContainer-lashing-with-rods.jpg" alt="containers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Silverblue
&lt;/h2&gt;

&lt;p&gt;Installing Fedora Silverblue is as easy as normal Fedora workstation, just download the image from the main website &lt;a href="https://silverblue.fedoraproject.org/" rel="noopener noreferrer"&gt;silverblue.fedoraproject.org&lt;/a&gt;, create a bootable flash drive (you can user Etcher for this) and follow the instructions prompts.&lt;/p&gt;

&lt;p&gt;On your first login, you will be greeted by a nice Gnome environment, like many other Distros. If available, it will start to download any available updates for the current environment and will prompt you to install them once finished.&lt;/p&gt;

&lt;p&gt;These downloads are a new version of pieces of software, but more important OS updates. These updates are released officially by the maintainers' group and can be check with the command &lt;code&gt;$ rpm-ostree status&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;To force the download of new releases just issue &lt;code&gt;$ rpm-ostree update&lt;/code&gt; (every update requires a reboot of the workstation). If any upgrade manages to break your OS or any functionality simply rollback to a previous state &lt;code&gt;$ rpm-ostree rollback&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The software can be acquired by the &lt;strong&gt;Software Center&lt;/strong&gt; (read this &lt;a href="https://docs.fedoraproject.org/en-US/fedora-silverblue/getting-started/" rel="noopener noreferrer"&gt;link&lt;/a&gt; to add more repositories to the list).&lt;/p&gt;

&lt;p&gt;For developers, the most important feature is the &lt;strong&gt;Toolbox&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Toolboxes are container-based development environments where you can create and explore without damaging the base system. A simple container can be created by entering &lt;code&gt;# toolbox create --container=&amp;lt;container_name&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This will download an up-to-date image of a minimum fedora container, issue &lt;code&gt;# toolbox enter --container=&amp;lt;container_name&amp;gt;&lt;/code&gt; to enter a shell session within it. From here, you can treat it as a normal Fedora Workstation distro, the command &lt;code&gt;dnf&lt;/code&gt; will be your friend to download any necessary packages (e.g. &lt;code&gt;$ dnf install python3.7&lt;/code&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&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%2Fcdn1.iconfinder.com%2Fdata%2Ficons%2Fgot-idea-vol-2%2F128%2Fassumption-512.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%2Fcdn1.iconfinder.com%2Fdata%2Ficons%2Fgot-idea-vol-2%2F128%2Fassumption-512.png" alt="conclusion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, what are your thoughts about this new approach? Do you see yourself leveraging any of the features of Silverblue? My laptop already has Silverblue installed and ready to use, a static immutable OS is a great idea. No more messing up with kernel versions or dealing with multiple versions of the same software (e.g python2.7 vs python3.7).&lt;/p&gt;

</description>
      <category>linux</category>
      <category>fedora</category>
      <category>silverblue</category>
      <category>operatingsystems</category>
    </item>
    <item>
      <title>Introduction to Data Structures (Queues)</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Thu, 21 Mar 2019 19:21:46 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/introduction-to-data-structures-queues-5b8o</link>
      <guid>https://forem.com/andreanidouglas/introduction-to-data-structures-queues-5b8o</guid>
      <description>&lt;h1&gt;
  
  
  Introduction to data structures (Queues)
&lt;/h1&gt;

&lt;p&gt;One of the most overlooked concepts within computer science is data structures. Have a good understanding of its concepts, design and application can transform you from a simple coder to a more capable and resourceful professional.&lt;/p&gt;

&lt;p&gt;One can briefly summarize a generic data structure as a mean to store data in memory as an organized fashion. And for that, there are several types of structures, each one with its specific use case and scenario.&lt;/p&gt;

&lt;h2&gt;
  
  
  Queues
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fwww.dailyexcelsior.com%2Fwp-content%2Fuploads%2F2014%2F05%2Fpage1-19.jpg" 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/http%3A%2F%2Fwww.dailyexcelsior.com%2Fwp-content%2Fuploads%2F2014%2F05%2Fpage1-19.jpg" alt="Queue of people!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Imagine you are excited to ride in this new attraction at the park. You arrive, there are a hundred people waiting in line for the same ride.&lt;/p&gt;

&lt;p&gt;Queues can be very useful when you want to process data in the order. &lt;strong&gt;First in, First out&lt;/strong&gt; or (FIFO). Every data element must be inserted at the end and removed from the top.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;newqueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queue&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;/// Add element to the queue. O(1)&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;enqueue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;e&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;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;;&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="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;aux&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;end&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&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="c1"&gt;/// Remove element from the queue O(1)&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;dequeue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;/// Get size of the queue. O(n)&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="n"&gt;curr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;++&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="o"&gt;++&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;/// Peek at the nth element of the queue. O(n)&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;peek&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;element&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="nb"&gt;NULL&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;n&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="n"&gt;curr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;curr&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;next&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&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;The form presented above is the most standard implementation. You can implement queues only shifting elements on a dynamic array, but this would cause the queue/enqueue operations to drop their efficiency to O(n).&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples where queues can be useful
&lt;/h2&gt;

&lt;p&gt;Now that you understand a queue and it's implementation. Let's discuss where to implement them.&lt;/p&gt;

&lt;p&gt;The most common case for a queue implementation is inside the producer/consumer scenario. The producer will generate data to be consumed and it can be faster than the consumer. For that reason, a queue at the consumer will organize the data income allowing it to be consumed in order of oldest to newest data.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>tutorial</category>
      <category>c</category>
      <category>beginners</category>
    </item>
    <item>
      <title>MY Top 5 youtube channels (code version)</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Sun, 16 Sep 2018 23:11:25 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/my-top-5-youtube-channels-code-version-2ef4</link>
      <guid>https://forem.com/andreanidouglas/my-top-5-youtube-channels-code-version-2ef4</guid>
      <description>&lt;p&gt;As youtube replaced TV, for the most part, there are several channels that I follow that have great topics for developers in general, if you are starting or not.&lt;/p&gt;

&lt;p&gt;5- &lt;a href="https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJS"&gt;justforfunc&lt;/a&gt;. Francesc Campoy is a really awesome Go developer that use to work at Google. His main focus is Go, but you can follow him even if you don't use Go, because he has a very straightforward approach and very good coding practices.&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=XaMr--wAuSI"&gt;https://www.youtube.com/watch?v=XaMr--wAuSI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4- &lt;a href="https://www.youtube.com/user/sentdex"&gt;sentdex&lt;/a&gt;. If python is your thing, you definitely need to check out this channel. With a very solid way of teaching things, he can teach you from simple Python to Machine Learning using pure Tensorflow.&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=ne-dpRdNReI"&gt;https://www.youtube.com/watch?v=ne-dpRdNReI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3- &lt;a href="https://www.youtube.com/channel/UCQALLeQPoZdZC4JNUboVEUg"&gt;Jabrils&lt;/a&gt;. Between code, fun, and a brilliant charisma, Jabrils is not learning channel but can give you ideas for a lot of fun projects.&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=Y4cOmMDCUJc"&gt;https://www.youtube.com/watch?v=Y4cOmMDCUJc&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2- &lt;a href="https://www.youtube.com/watch?v=zUkrx1Vd1G4"&gt;CodingGarden&lt;/a&gt;. This channel is pretty new to me, but the energy and knowledge of CJ is contagious. Worth checking.&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=zUkrx1Vd1G4"&gt;https://www.youtube.com/watch?v=zUkrx1Vd1G4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Honorable Mention- &lt;a href="https://twitch.tv/noopkat"&gt;noopkat&lt;/a&gt;. Not youtube, but live this time. Sue is a very cute Australian that develops most in javascript. She is responsible for creating one of the best APIs for dealing with Arduinos in JS (which you can see her maintaining live) and a lot of other side projects. It's a great fun for all your Sunday morning.&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=UwX0ntmJ61A"&gt;https://www.youtube.com/watch?v=UwX0ntmJ61A&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1- &lt;a href="https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw"&gt;The Coding Train&lt;/a&gt;. If I give Dan a quarter for each time I learn something new from him, he would be a millionaire by now. This NY ITP teacher has a focus on creative coding, but he covers a lot of different algorithms in both JS and Processing (Java API).&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=0jjeOYMjmDU"&gt;https://www.youtube.com/watch?v=0jjeOYMjmDU&lt;/a&gt;&lt;/p&gt;

</description>
      <category>youtube</category>
      <category>dev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Challenge: Write the recursive Fibonacci algorithm in a different language.</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Tue, 21 Aug 2018 11:11:23 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/challenge-write-the-recursive-fibonacci-algorithm-in-a-different-language-fc2</link>
      <guid>https://forem.com/andreanidouglas/challenge-write-the-recursive-fibonacci-algorithm-in-a-different-language-fc2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hellow &lt;a href="//dev.to"&gt;DEV&lt;/a&gt; community, how are you?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Can we challenge ourselves in this fun "game"?&lt;/p&gt;

&lt;p&gt;Let's see how many languages we can enumerate by writing the Fibonacci recursive algorithm on the comments. Are you in?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;: this is not about having the fast/better code, just to have some fun&lt;/p&gt;

</description>
      <category>challenge</category>
      <category>beginners</category>
      <category>fun</category>
    </item>
    <item>
      <title>File search (and more) with `find`</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Mon, 25 Jun 2018 19:47:43 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/file-search-and-more-with-find-3le3</link>
      <guid>https://forem.com/andreanidouglas/file-search-and-more-with-find-3le3</guid>
      <description>&lt;p&gt;Being able to use the command line is a productivity booster, all system operations that can be done with a mouse and keyboard on fancy GUI applications are doable ove CLI.&lt;/p&gt;

&lt;p&gt;The find command is impressive by its versatility, for example, you can lookup for a file that you "lost" on your hard-drive.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;find / -name mylostfile&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;by steps, the first argument to the file program is the initial path for search (recursevely, "/" for root):&lt;/p&gt;

&lt;p&gt;the &lt;code&gt;-name&lt;/code&gt; parameter specifies the file name that you are looking for.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BONUS:&lt;/strong&gt; you can use wildcards in the &lt;code&gt;-name&lt;/code&gt; parameters&lt;/p&gt;

&lt;p&gt;&lt;code&gt;find / -name "*.jpg"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This basic functionality, find already is worth a ton, but just looking for a file is just the tip of this Titanic killer iceberg.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The exec parameter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is where &lt;code&gt;find&lt;/code&gt; shines, you can execute any command on the list of the files that you found, just replace the file name with {}&lt;/p&gt;

&lt;p&gt;&lt;code&gt;find . -name "*.mp4" -exec ffmpeg -i {} -r 30 {.}.avi \;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;again step by step:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-name "*.mp4"&lt;/code&gt; search for any file with the mp4 extension&lt;/p&gt;

&lt;p&gt;&lt;code&gt;-exec ffmpeg -i {} -r 30 {.}.avi \;&lt;/code&gt; call ffpmeg to perform a operation, keeping a 30fps on a video file and converting it to avi.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{}&lt;/code&gt; current file.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{.}&lt;/code&gt; current file without extension.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;PS:&lt;/em&gt;: the semi-colon in the end of the command is uterly important, you can find more details at: &lt;a href="https://linux.die.net/man/1/find"&gt;&lt;code&gt;file&lt;/code&gt; man file&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ffmpeg details: &lt;a href="https://ffmpeg.org/ffmpeg.html"&gt;ffmpeg&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Do you like using the terminal? Share your experiences with &lt;code&gt;find&lt;/code&gt; in the comments and we can learn togheter!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>productivity</category>
      <category>macos</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Lazy names are lazy</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Tue, 20 Mar 2018 19:25:24 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/lazy-names-are-lazy-5epc</link>
      <guid>https://forem.com/andreanidouglas/lazy-names-are-lazy-5epc</guid>
      <description>&lt;p&gt;If you are starting a project, but you have no idea how to call it, maybe just a placeholder, how do you name it?&lt;/p&gt;

&lt;p&gt;My goto is &lt;strong&gt;Douglas1&lt;/strong&gt; or &lt;strong&gt;test1&lt;/strong&gt;, how about yours?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>But, what the heck is Linux?</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Thu, 30 Nov 2017 19:29:29 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/but-what-the-heck-is-linux-d6g</link>
      <guid>https://forem.com/andreanidouglas/but-what-the-heck-is-linux-d6g</guid>
      <description>&lt;p&gt;On a recent article, I explored the possibility to move your workflow to Linux, but without covering too much the elephant in the room.&lt;br&gt;
&lt;strong&gt;What the heck is Linux?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In the beginning, it was UNIX&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Back to late 60’s, two developers from Bell Labs (an AT&amp;amp;T subsidiary at that point), decided to create an operating system that was capable of serving more people at a time. So by the year 1969, &lt;a href="https://en.wikipedia.org/wiki/Dennis_Ritchie"&gt;Dennis Ritchie&lt;/a&gt; (who also developed the C programming language) and &lt;a href="https://en.wikipedia.org/wiki/Ken_Thompson"&gt;Ken Thompson&lt;/a&gt; created Unix: a multi-user system designed for the PDP-8.&lt;br&gt;
For many years Unix was the state of the art for enterprise computing and mainframes.&lt;/p&gt;

&lt;p&gt;Late in the 80’s, the Unix system was the inspiration by University of Berkeley researchers to create BSD and with the introduction of 32bit processors by Intel on 1985, led the scientist and professor, Andrew S. Tanenbaum, to create &lt;a href="http://www.minix3.org/"&gt;MINIX&lt;/a&gt;. An OS suited for academic use to complement the book published by himself (Operating Systems: Design and Implementation).&lt;/p&gt;

&lt;p&gt;By 1991 the highly adopted book by Tanenbaum became the motivation for the student of the University of Helsinki, Linus Torvalds, to develop what later will become the Linux Kernel (first major release on 1994).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linux as Free Software&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By its first release, there was no proper free licensing to the kernel itself. By using the tools from the GNU Project (mainly the GNU Bash Shell) by the American activist Richard Stallman. &lt;/p&gt;

&lt;p&gt;Later in 1992, Linus started to consider the adoption of the GPL (GNU Public Licensing) for its project with a proper release by 1993.&lt;/p&gt;

&lt;p&gt;Later in the year 1999, the licensing was moved to the &lt;a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html"&gt;GPLv2&lt;/a&gt; and later he refused to move to the new GPLv3 &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Today Linux is everywhere&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You may not notice it, but Linux is everywhere around you. From your Android device to the server that delivers your internet content. Within the Windows 10 subsystem to the International Space Station.&lt;/p&gt;

&lt;p&gt;Linux became part of our lives. The work from the Linux Foundation to create and maintain a stable, reliable and powerful OS made the internet and will continue to shape our future into a brighter path. &lt;/p&gt;

&lt;p&gt;You are free to choose wherever OS fits your needs but be aware that at some level you will bump into the most loved/hated kernel of all time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.amazon.com/Just-Fun-Story-Accidental-Revolutionary/dp/0066620732"&gt;Just For Fun&lt;/a&gt; by Linus Torvalds&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.linuxfoundation.org/"&gt;LinuxFoundation.org&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>linux</category>
      <category>workflow</category>
      <category>beginners</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Moving your workflow to Linux</title>
      <dc:creator>Douglas R Andreani</dc:creator>
      <pubDate>Sun, 12 Nov 2017 18:12:37 +0000</pubDate>
      <link>https://forem.com/andreanidouglas/moving-your-workflow-to-linux-1ae</link>
      <guid>https://forem.com/andreanidouglas/moving-your-workflow-to-linux-1ae</guid>
      <description>&lt;p&gt;Since forever, I've been a Windows user with almost zero knowledge of other Operational Systems. But I always found to develop inside Windows environments to be a little tricky since and if you are out of the Visual Studio environment things are even more complicated.&lt;/p&gt;

&lt;p&gt;After a period considering a change to a MacOSX environment, I decided to try Linux, since it's free and work on (most) any hardware that works with Windows.&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%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F6%2F66%2FTUX_G2.svg%2F2000px-TUX_G2.svg.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%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2F6%2F66%2FTUX_G2.svg%2F2000px-TUX_G2.svg.png" alt="Linux TUX"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HOW&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;First, you will need to choose a distribution (flavor) of Linux that will suit your needs. I like to recommend &lt;a href="https://ubuntu-mate.org/download/" rel="noopener noreferrer"&gt;Ubuntu Mate&lt;/a&gt; to new users for a couple of reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It has the support and features of one of the most used distributions on the Linux world plus a great UI (Mate) that have a lot in common with other OS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just use &lt;a href="https://etcher.io/" rel="noopener noreferrer"&gt;Etcher&lt;/a&gt; to burn the image into a USB stick and plug into the PC before booting it. Your BIOS/UEFI must be set to read from the USB. Follow the instructions on the screen to install the OS (Backup any relevant data first, because this will erase your HD).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LANGUAGE SUPPORT&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Most Linux distributions have a large support for programming languages, from C to GO, you will only need to find the correct package for your distribution. To start just run the command &lt;code&gt;sudo apt install build-essential&lt;/code&gt; to have the most common toolchain for C/C++ compiling that will help to install a lot of other development software like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python: &lt;code&gt;sudo apt install python2 python3 python3-pip&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Java: &lt;code&gt;sudo apt install jdk8-openjdk&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Javascript/Node: &lt;code&gt;sudo apt install nodejs npm&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;PS: &lt;code&gt;apt&lt;/code&gt; is a command line tool to help install packages into the system, like brew for MacOSX or choco for Windows, used by Debian like systems (Debian, Ubuntu, Mint). You can learn more at &lt;a href="http://manpages.ubuntu.com/manpages/zesty/man8/apt.8.html" rel="noopener noreferrer"&gt;&lt;code&gt;man apt&lt;/code&gt;&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TEXT EDIT&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Most common text editors will work without any sweat, like Atom, Visual Studio Code, Sublime. Even some exclusive editors can make your life easier like Kate, Gedit, Geany and KDevelop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GIVE IT A TRY&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;If you are not comfortable to move an entire system to a Linux environment, you can still try it using some Virtual Machine environment, like VMWare Workstation or Oracle VirtualBox. You can see for yourself if it suits you and what you can learn from it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CONCLUSION&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Linux systems are very powerful and fully feature to be your next development environment, just remember is not the same thing as Windows or MacOSX and you should approach it with an open mind. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And Remember&lt;/strong&gt; Google is your friend. Do not be afraid to search for dumb things such: &lt;em&gt;How to move a file from directory&lt;/em&gt; or &lt;em&gt;How to install sublime on Linux&lt;/em&gt;. You are learning everything again and some easy things should not stop you.  &lt;/p&gt;

</description>
      <category>linux</category>
      <category>workflow</category>
      <category>beginners</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
