<?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: James Sheppard</title>
    <description>The latest articles on Forem by James Sheppard (@jshep23prog).</description>
    <link>https://forem.com/jshep23prog</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%2F1139131%2F7c08683d-1d0d-4d8f-b5aa-312b0b95257e.jpg</url>
      <title>Forem: James Sheppard</title>
      <link>https://forem.com/jshep23prog</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jshep23prog"/>
    <language>en</language>
    <item>
      <title>Godot Game Engine</title>
      <dc:creator>James Sheppard</dc:creator>
      <pubDate>Thu, 28 Dec 2023 23:20:33 +0000</pubDate>
      <link>https://forem.com/jshep23prog/godot-game-engine-1ca8</link>
      <guid>https://forem.com/jshep23prog/godot-game-engine-1ca8</guid>
      <description>&lt;p&gt;I have been a fan of the Godot Game Engine for a few years now. A sleek game called &lt;a href="https://rawfury.com/games/dome-keeper/"&gt;Dome Keeper&lt;/a&gt; set me down my Godot path. I thought to myself, one day I will make a game like this, and I'll do it with Godot. Now that  I am at the end of my Immersion course, I decided to do just that. I used the Godot engine to program a game and although it is a far cry from Dome Keeper, It was nice to finally dig into the sandbox of the engine and produce a tangible result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7vajXvY7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opj2ejk5haab57iw675i.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7vajXvY7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/opj2ejk5haab57iw675i.jpg" alt="Dome Keeper Poster" width="225" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;br&gt;
Originally developed by Argentinian developers Juan Linietsky and Ariel Manzur in 2014. It went through many name iterations before landing on Godot. Names included Larvotor, Legacy, NG3D, and Larvita. The developer environment can run on and export to many platforms. While there is a concentration on 2D and 3D games it can be used to develop non-gaming software, including editors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--klj7eoRJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7eypi5vymrlzefqyv8hu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--klj7eoRJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7eypi5vymrlzefqyv8hu.png" alt="Metroid Start Screen" width="648" height="68"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;br&gt;
While looking into Godot, I saw that they have a step-by-step instruction manual for &lt;a href="https://docs.godotengine.org/en/stable/getting_started/first_2d_game/index.html"&gt;making your own game&lt;/a&gt;. They give you three options of languages: C++, C# and GDScript. I had started this journey with the intent to code in C#, but the GDScript caught my eye. It is Godot's proprietary language with syntax similar to Python where the code is indented rather than using a lot of semicolons and brackets. I download the engine onto my machine and boot it up. The engine itself was intimidating at first, but like with anything coding-related, the more time you spend with it the more comfortable you get. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZvCjmO1U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgoiq0vekkcpdehp987l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZvCjmO1U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgoiq0vekkcpdehp987l.png" alt="Godot Editor" width="800" height="488"&gt;&lt;/a&gt;&lt;br&gt;
Godot uses a hierarchy of nodes to create your game. Nodes are organized into "Scenes" as seen in the above picture's red rectangle. These scenes can then be assigned a main node from which all descendent nodes in the scene stem. Each of the descendants can be assigned all manner of behaviors such as timers, paths on which to travel, labels, and music or sound effects. These descendant nodes also have tons of modularity as seen in the green rectangle. Each script also has four main tabs as seen in the blue rectangle. The 2D and 3D are for the modeling of the asset and for placement of where it belongs in the defined space. The Script area is where the logic of that asset can be written. The Node tab in the green rectangle can be used to link different functions between scenes to other scene's nodes. The step-by-step instructions are fairly clear (although admittedly I had to hop on YouTube to get some clarification on some parts I was stuck on.) &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r2piM5C8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p7z959sxjczzz3okordy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r2piM5C8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p7z959sxjczzz3okordy.png" alt="Dodge the Creeps" width="242" height="372"&gt;&lt;/a&gt;&lt;br&gt;
The Player and Mob scenes were fun to work on. In those scenes, I can add animation cells (which I customized with my own character) and you can add collision logic so that when the player and the mob collided, the logic of ending the game would fire off. For the mobs, I had to place boundaries of where they would spawn around the stage and at random intervals. Their logic would be to just move in a straight line at varying speeds.  Later I would like to add logic for their speed to increase as the games' duration increases ala Space Invaders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W05MgwpW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ls2d0ke67zmqfusqs8lb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W05MgwpW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ls2d0ke67zmqfusqs8lb.jpg" alt="Game Over" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
In conclusion, I enjoyed my time with Godot Game Engine. It was easy enough to pick up but will take a lot of time to become adept at it. My next steps in this journey will be to redo this project in C# and then try my hand at creating a 3D game. If you are interested in game design, I highly encourage you to give Godot a try and hit the ground running with a game you can build in less than a day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Godot_(game_engine)"&gt;https://en.wikipedia.org/wiki/Godot_(game_engine)&lt;/a&gt; &lt;br&gt;
&lt;a href="https://godotengine.org/article/godot-history-images/"&gt;https://godotengine.org/article/godot-history-images/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://gamefromscratch.com/the-evolution-history-of-the-godot-game-engine/"&gt;https://gamefromscratch.com/the-evolution-history-of-the-godot-game-engine/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.godotengine.org/en/stable/getting_started/introduction/index.html"&gt;https://docs.godotengine.org/en/stable/getting_started/introduction/index.html&lt;/a&gt; &lt;br&gt;
&lt;a href="https://gdscript.com/"&gt;https://gdscript.com/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>gdscript</category>
      <category>gamedev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>C# vs. Javascript</title>
      <dc:creator>James Sheppard</dc:creator>
      <pubDate>Sun, 10 Dec 2023 22:42:20 +0000</pubDate>
      <link>https://forem.com/jshep23prog/c-vs-javascript-2co9</link>
      <guid>https://forem.com/jshep23prog/c-vs-javascript-2co9</guid>
      <description>&lt;p&gt;Having a deep understanding of Javascript can leave you hungry for more knowledge. What other languages could one learn to diversify their skillset? If one is especially interested in game design, like the author, one would need to learn a language that is the most compatible. While Javascript is a powerful language &lt;a href="https://www.galvanize.com/blog/the-top-10-javascript-games-you-can-play-right-now/"&gt;that can make some fun games&lt;/a&gt;, it seems the industry leans towards C#. In this blog, we will assume you have a working knowledge of JavaScript as we take a closer look at C#.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jc_9BKJM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5xd1hc087xp5fzl5fed.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jc_9BKJM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5xd1hc087xp5fzl5fed.png" alt="Evolution of Code" width="257" height="218"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;A Brief History&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It all starts with C. C is a general-purpose programming language that was created in 1972.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then came C++. Released in 1985, it is a faster, yet more complex object-oriented programming language&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In 1999, Anders Hejlsberg made a team to build a new Language for Microsoft called Cool (C-like Object Oriented Language)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Microsoft decided to drop the Cool name for trademark reasons and shift to C#. It is a reference to the C language and some wordplay on C++. You can view the pound sign as four interconnected pluses (C++++)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y-vcxDuF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmg7tcf5tmewql5q5p05.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y-vcxDuF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmg7tcf5tmewql5q5p05.png" alt="C++++" width="740" height="489"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Data Types&lt;/em&gt;&lt;br&gt;
Let's take a closer look at what types of data C# uses and how to declare them. In C#, a variable stores a specific data type value. You can declare/assign a value to a variable by int y = 10. Int is the data type, y is the variable name and the = assignment operator that points at the value 10. Here are some more examples:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;//&amp;lt;data type&amp;gt; &amp;lt;var name&amp;gt; = &amp;lt;value&amp;gt; ;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;101&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="n"&gt;rate&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;6.2f&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// floating point, only fills at least 6&lt;/span&gt;
&lt;span class="c1"&gt;//character spaces (including the decimal separator), with&lt;/span&gt;
&lt;span class="c1"&gt;//exactly 2 digits after the ".", padded with empty space.&lt;/span&gt;
&lt;span class="kt"&gt;decimal&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="m"&gt;5.5M&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'C'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//singe quotes for characters&lt;/span&gt;
&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"James"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//double quotes for strings&lt;/span&gt;
&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;isInformative&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;C# also has complex data types similar to Javascript. Arrays are still zero-indexed, the elements can be of any type, including Arrays. They are declared by 'data type' [] 'name' = 'array'.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Declare a single-dimensional array of 4 integers&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;array1&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="c1"&gt;//Declare and set array element values&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;array2&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="c1"&gt;//for more than one data type Object is the data type&lt;/span&gt;
&lt;span class="n"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;mixedArray&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sc"&gt;'2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sc"&gt;'A'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Class and Objects&lt;br&gt;
A class is a blueprint of a particular object that has certain attributes. Take the famous example of a car. It should have attributes like wheels, doors, mirrors, etc. It should also have some functions like acceleration and braking. Any object that has these functions and attributes is a car. In this example, a car is a defining class. Each single car is an object of the car class. The car you own is an object of the car class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// a private field that cannot be accessed directly. &lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="c1"&gt;//only accessed with the public property&lt;/span&gt;
    &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;CarId&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;get&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;//returns value of id field&lt;/span&gt;
        &lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;value&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;// assigns value to field id&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;&lt;em&gt;Printing to Console&lt;/em&gt;&lt;br&gt;
Similar to JS, there is a Console function, but there are two types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Console.Write() prints data without printing a new line&lt;/span&gt;

&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"C#"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"is"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"fun"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;//output C#isfun&lt;/span&gt;

&lt;span class="c1"&gt;//Console.WriteLine() prints data along with a new line&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"C#"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"is"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"fun"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;//output&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;
&lt;span class="k"&gt;is&lt;/span&gt;
&lt;span class="n"&gt;fun&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Uses&lt;/strong&gt;&lt;br&gt;
C# can be used in many applications, but some of the more popular ones Windows programs, Cloud Backend services like &lt;a href="https://azure.microsoft.com/en-us/"&gt;Azure&lt;/a&gt; and game design. As a developer who is highly interested in game design, C# is one of the languages I want to understand better. It is a robust language that is useful in game creation as it has the infrastructure built for it already. From a practical standpoint, as a game developer, chances are you will not write a game engine from scratch. That would take way too much time and the learning curve is steep. A game dev would more than likely use a pre-existing mainstream engine such as Unity, CryEngine, or Godot. These engines come fully developed with robust features and use C# as the main language for logic and implementation. C# is programmer-friendly and has efficient performance uses. &lt;/p&gt;




&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kHM2TEso--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1n7mn0t0qxcso4mh110j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kHM2TEso--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1n7mn0t0qxcso4mh110j.jpg" alt="Unity Game Engine" width="768" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Conclusion&lt;/strong&gt;&lt;br&gt;
I hope this blog has inspired you to look deeper into the wonderful world of C#. Its learning accessibility, computing power, and a myriad of applications make it an attractive choice for developers who want to take the next step of their Polyglot Journey. Check out my references to dive deeper and stay Sharp out there. See?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/C_Sharp_(programming_language)#"&gt;https://en.wikipedia.org/wiki/C_Sharp_(programming_language)#&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.mygreatlearning.com/blog/difference-between-c-and-c/#"&gt;https://www.mygreatlearning.com/blog/difference-between-c-and-c/#&lt;/a&gt;&lt;br&gt;
&lt;a href="https://narrasoft.com/top-c-sharp-game-engines/"&gt;https://narrasoft.com/top-c-sharp-game-engines/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.tutorialsteacher.com/csharp/csharp-variable"&gt;https://www.tutorialsteacher.com/csharp/csharp-variable&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/difference-between-console-write-and-console-writeline-in-c-sharp/"&gt;https://www.geeksforgeeks.org/difference-between-console-write-and-console-writeline-in-c-sharp/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/arrays"&gt;https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/arrays&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.tutorialsteacher.com/csharp/csharp-class"&gt;https://www.tutorialsteacher.com/csharp/csharp-class&lt;/a&gt;&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Website Monetization</title>
      <dc:creator>James Sheppard</dc:creator>
      <pubDate>Sat, 25 Nov 2023 15:19:08 +0000</pubDate>
      <link>https://forem.com/jshep23prog/website-monetization-2543</link>
      <guid>https://forem.com/jshep23prog/website-monetization-2543</guid>
      <description>&lt;p&gt;So you have done it! Your website is a hit and is generating a lot more traffic than you anticipated it would. How do you keep the cost of hosting and scaling database storage from sinking your ship? In this blog, we will take a look at ways one can monetize their site to help absorb some of the new costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advertising&lt;/strong&gt;&lt;br&gt;
Most sites that you visit have some form of advertisements on them. From the ubiquitous Google Search Engine to our coding workhorses Stack Overflow and Mdn Web Docs. As annoying as it can be to see advertisements scattered across a page, they serve the important purpose of keeping the page free for the user to navigate. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p_iRZn7p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6n1r505jywf7moknxov.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p_iRZn7p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6n1r505jywf7moknxov.jpg" alt="A collage of fake ads" width="698" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the easier ways to generate revenue is to begin hosting advertisements on your site. There are a few different techniques associated with advertising but they all share the same purpose- catching the attention of your users.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pay-Per-Click&lt;/em&gt;&lt;br&gt;
Pay-per-click (PPC) is an advertising model in which an advertiser will pay a website owner when the ad is clicked. The PPC technique is most effective on websites that have search engines associated with them. When users type queries into a search engine, advertisers can bid on keyword phrases that are relevant to their target market and have those ad links show up at the top of the result list. The ad company will then pay when the ads are clicked. If a site is more content-driven, banner ads are more common with a fixed price per click as opposed to a bidding system.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cost per Impression&lt;/em&gt;&lt;br&gt;
Cost per Impression (CPI) and Cost per Thousand Impression (CPM [M stands for the Mille, Latin for thousand]) is an advertising model where advertisers will pay a certain amount each time an ad is displayed. Instead of relying on a user to click your ad, which is not guaranteed to happen, you can receive revenue based on site traffic instead. A new metric has been established in recent years to address advertisers being charged for low-value impressions: viewable CPM. Now an ad is counted as viewable if at least 50% of the display ad is shown for over a second, or if a video ad continuously plays for over two seconds. This monetization method has led to the rise of clickbait articles. Some of the more egregious examples are articles that need you to click to another page to advance the article as you read it. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Google AdSense&lt;/em&gt;&lt;br&gt;
Google AdSense is one of the most popular options because it takes most of the guesswork out of ad implementation. Simply create an account, factor your ad preferences and paste the following line in your code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://pagead2.googlesyndication.com
/pagead/js/adsbygoogle.js?client={CLIENT_NUMBER}"&lt;/span&gt;
     &lt;span class="na"&gt;crossorigin=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And there you have it. As long as the script is in any of the page components you want to have advertisements on, Google will automatically show ads in all the best places for your site. It achieves this with the Auto Ads feature. After implementation, Auto Ads will scan your site and will automatically place ads where they are more likely to perform better and generate more revenue. It also places ads based on page layout, the amount of content on the page, and other existing Google Ads. Below is an example of what one layout could look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d918NxPt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkiyva9z14c5bguhrlu2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d918NxPt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkiyva9z14c5bguhrlu2.png" alt="Ad layout example" width="557" height="415"&gt;&lt;/a&gt;&lt;br&gt;
With convenience comes cost and the payout is not as spectacular as you might imagine. However, every little bit helps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3CyTxOSx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myb6euyg2vcfzxivrip5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3CyTxOSx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/myb6euyg2vcfzxivrip5.jpg" alt="Graphic of a hand converting numbers into currency" width="311" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Monetization&lt;/strong&gt;&lt;br&gt;
If advertising isn't the direction you want to go in, you can try your hand at data monetization. Users that visit your site are a wealth of data. From current location, spending habits, and demographic information, each user has unique patterns that can be harvested. Ethically, however, this is a very gray area. Individuals who generate the data have a claim to ownership of said data, as well as businesses that generate data through the course of operations(commerce over the site) also have a claim to certain data. Sites like Google or Facebook require that upon sign-up a user forfeits some ownership of their data in order to access their services. This collected data can be sold to different entities at a rate that is dependent upon the amount and content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hmQ3EHjD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ng72ahthtn0q4gya290z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hmQ3EHjD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ng72ahthtn0q4gya290z.jpg" alt="Arcade Insert Coin" width="183" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paid subscriptions&lt;/strong&gt;&lt;br&gt;
The final method we will discuss is the subscription-based method. If you have a feature that you believe your user base would pay to have access to, you could lock the feature behind a paywall. While this method is a direct user-to-host finance exchange, one has to take extra care with its web security to prevent unauthorized access to the content. Signing up for a service should be as easy for the user as possible. To quote Jenifer Acosta in her article on &lt;a href="https://www.geekwire.com/sponsor-post/planning-to-implement-a-subscription-based-payments-model-here-are-the-key-steps-you-need-to-get-right/"&gt;GeekWire&lt;/a&gt;: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;if it’s not easy to subscribe, users won’t bite. Friction is the enemy of subscription growth. A declined payment, a ten-step signup process, overly aggressive marketing or making it difficult to cancel can turn off a potentially loyal customer for good.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This approach is especially successful when it comes to news and gaming sites where the product itself is the content of the site, rather than items to purchase. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Conclusion&lt;/strong&gt;&lt;br&gt;
There are many ways to monetize your website to enjoy the fruits of your labor. You just have to make sure to implement the methods that are right for you. Advertising, data aggregation, and subscription services are a few of the many ways to alchemize your traffic into gold.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Website_monetization"&gt;https://en.wikipedia.org/wiki/Website_monetization&lt;/a&gt;&lt;br&gt;
&lt;a href="https://support.google.com/adsense/answer/9261805?hl=en#auto_ads"&gt;https://support.google.com/adsense/answer/9261805?hl=en#auto_ads&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Pay-per-click"&gt;https://en.wikipedia.org/wiki/Pay-per-click&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Cost_per_impression"&gt;https://en.wikipedia.org/wiki/Cost_per_impression&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Data_monetization"&gt;https://en.wikipedia.org/wiki/Data_monetization&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.nichepursuits.com/5-simple-adsense-layout-examples-for-increasing-click-through-rates/"&gt;https://www.nichepursuits.com/5-simple-adsense-layout-examples-for-increasing-click-through-rates/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geekwire.com/sponsor-post/planning-to-implement-a-subscription-based-payments-model-here-are-the-key-steps-you-need-to-get-right/"&gt;https://www.geekwire.com/sponsor-post/planning-to-implement-a-subscription-based-payments-model-here-are-the-key-steps-you-need-to-get-right/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Web Security Encryption</title>
      <dc:creator>James Sheppard</dc:creator>
      <pubDate>Mon, 16 Oct 2023 11:54:20 +0000</pubDate>
      <link>https://forem.com/jshep23prog/web-security-encryption-3bom</link>
      <guid>https://forem.com/jshep23prog/web-security-encryption-3bom</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2j-H_1Rh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/entqt6pz05vjb8y939xy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2j-H_1Rh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/entqt6pz05vjb8y939xy.jpg" alt="Graphic of a lock over hexidecimal characters" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can't go more than a few months without hearing about a data breach that affects some random company or government body. It tends to filter into the background, unless, of course, we happen to be personally affected by it. &lt;br&gt;
Web security is a concern for everyone, from the Facebook lurker to the tech CEO. How does it work? What can we do to be more secure online? In this blog, we will explore the surface of this ocean and dip our toes in a little.&lt;/p&gt;
&lt;h1&gt;
  
  
  Encryption
&lt;/h1&gt;

&lt;p&gt;One of the oldest forms of web security comes in the form of encryption. It is inspired by real-world encryption. Basically, you are taking your information and applying a method to render it unreadable. This happens by converting the individual letters or numbers into a code that is difficult to understand without a guide or decoder. Morse code is one of the more famous examples. Most people cannot understand the series of dots and dashes, but if you had the decoder in front of you, you could eventually figure out what was being said. This leads to more elaborate codes being used to try to thwart those who would try to glean the information. In World War II the United States even used &lt;a href="https://www.nationalww2museum.org/war/articles/american-indian-code-talkers"&gt;Apache Language&lt;/a&gt; to communicate sensitive information.&lt;/p&gt;

&lt;p&gt;Encryption is viewed in the same way. It is an ever-evolving arms race with forces on both sides working tirelessly to either create or crack. This Sisyphean task leads to cutting-edge innovation. Let us take a look at some examples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sXajju_r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03dvagnqex6wupgk374a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sXajju_r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03dvagnqex6wupgk374a.png" alt="Wall of indecipherable text" width="512" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BASE64&lt;/strong&gt;&lt;br&gt;
No, we're not talking about the next Nintendo Console. Base64 is a binary-to-text encoding that represents binary data. JavaScript has a native function built into it that allows you to pass in a string and it will convert to the Base64 characters. btoa() and it's counterpart atob().&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;let&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;btoa&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The password is drowssap&lt;/span&gt;&lt;span class="dl"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// =&amp;gt; VGhlIHBhc3N3b3JkIGlzIGRyb3dzc2Fw&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;encrypt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;atob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;VGhlIHBhc3N3b3JkIGlzIGRyb3dzc2Fw&lt;/span&gt;&lt;span class="dl"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;//=&amp;gt; The password is drowssap&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Despite internet rumors that btoa and atob stand for 'Binary to ASCII' and 'ASCII to Binary', respectively, the true meaning is much less exciting. Brendan Eich, the creator of JavaScript tweeted:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Old Unix names, hard to find man pages rn but see (&lt;a href="https://t.co/lWkceMwFad"&gt;https://t.co/lWkceMwFad&lt;/a&gt;). The names carried over from Unix into the Netscape codebase. I reflected them into JS in a big hurry in 1995 (after the ten days in May but soon).&lt;br&gt;
— BrendanEich (@BrendanEich) May 21, 2018&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Like our aforementioned Morse code, it is easy to decrypt if you have the converter for it.  &lt;/p&gt;

&lt;h1&gt;
  
  
  HTML Encryption
&lt;/h1&gt;

&lt;p&gt;With the advent of websites and the prevalence of HTML-based sites, advances in encryption had to be made to secure sensitive data. With HTML encryption programs, you can control who can see your sites, what info they can access, and when the page expires. If you have ever done an image search (like to populate a blog) and when you try to save the image and it saves a site instead, congratulations! You have been thwarted by HTML Encryption. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SrqW0mqd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vg3n3eqcpl7g7z6d118a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SrqW0mqd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vg3n3eqcpl7g7z6d118a.jpg" alt="HTTP bouncer at a nightclub" width="627" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  HTTPS
&lt;/h1&gt;

&lt;p&gt;If you are ever surfing the web and come across a website that is prefaced by a warning, then that site is not encrypted with HTTPS (Hypertext Transfer Protocol Secure). It encrypts the communication protocol using Transport Layer Security (formerly SSL or Secure Sockets Layer). TLS communicates across networks and is designed to prevent tampering and eavesdropping. HTTPS's TLS authentication requires a third party to issue digital certificates on the server side of the operation. The client will then confirm the validity of said certificate before starting. This multi-step procedure ensures that information passed from server to user is protected.&lt;/p&gt;

&lt;h1&gt;
  
  
  Password Encryption
&lt;/h1&gt;

&lt;p&gt;Most of us can remember the early days of the Internet when password lengths were not a huge concern. Some people thought that 'password' as a password was sufficient. Enter Brute Force attacks-- a program that was designed to test every possible combination in order to guess your password. With processors growing in power each year, hackers can perform millions to billions of password combinations per second. In this infographic from &lt;a href="https://www.techrepublic.com/article/how-an-8-character-password-could-be-cracked-in-less-than-an-hour/"&gt;TechRepublic&lt;/a&gt;, we can see how quickly a password can be brute forced.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mua0gMOB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0tz9ogsn6cowuc7fpcm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mua0gMOB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0tz9ogsn6cowuc7fpcm.jpg" alt="Password Cracking infographic" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is why generated passwords are so popular. The iOS version can create passwords that are 20 characters long and contain a melange of uppercase and lowercase letters, two hyphens, and digits. That is 37 possibilities to the power of 20 characters which results in 2.3122484e+31 combinations. Assuming the hacker can conduct a billion trials per second, it would take over a billion years to crack. Good odds.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;There is a huge variety of encryption methods that exist. &lt;br&gt;
We have explored simple built-in functions to cutting-edge tech all with the same goal in mind: protection. Seeking out methods to protect your data will not only benefit you but give you peace of mind. I hope this has been thought-provoking and will send you into research mode for more data encryption techniques. &lt;/p&gt;

&lt;h1&gt;
  
  
  Sources
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.hacksparrow.com/webdev/javascript/why-base64-encoder-decoder-named-btoa-atob.html"&gt;https://www.hacksparrow.com/webdev/javascript/why-base64-encoder-decoder-named-btoa-atob.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/HTTPS"&gt;https://en.wikipedia.org/wiki/HTTPS&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Transport_Layer_Security"&gt;https://en.wikipedia.org/wiki/Transport_Layer_Security&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.techrepublic.com/article/how-an-8-character-password-could-be-cracked-in-less-than-an-hour/"&gt;https://www.techrepublic.com/article/how-an-8-character-password-could-be-cracked-in-less-than-an-hour/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/34048475/how-long-to-brute-force-16-character-secret-key"&gt;https://stackoverflow.com/questions/34048475/how-long-to-brute-force-16-character-secret-key&lt;/a&gt;&lt;br&gt;
&lt;a href="https://support.apple.com/guide/security/automatic-strong-passwords-secc84c811c4/1/web/1"&gt;https://support.apple.com/guide/security/automatic-strong-passwords-secc84c811c4/1/web/1&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Ruby vs. JavaScript</title>
      <dc:creator>James Sheppard</dc:creator>
      <pubDate>Mon, 09 Oct 2023 13:21:02 +0000</pubDate>
      <link>https://forem.com/jshep23prog/ruby-vs-javascript-2gae</link>
      <guid>https://forem.com/jshep23prog/ruby-vs-javascript-2gae</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wcnoYemu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zdd49mp3euilv4hnn45.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wcnoYemu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zdd49mp3euilv4hnn45.jpg" alt="Literal Ruby shining" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the myriad advantages of becoming fluent in a language like JavaScript is the ability to transfer those skills to other languages. It's almost the equivalent of learning Latin as your base language. You can understand romantic languages such as Italian, Spanish, or French more easily with the Latin base. The same goes for programming. Learning the ins and outs of one language will make it easier to pick up another language. Today we are comparing Javascript and Ruby: the similarities and differences between Data Types and Functions, and the advantages of each language.&lt;/p&gt;

&lt;p&gt;Note: in this blog, I assume you are familiar with JavaScript terminology. &lt;/p&gt;

&lt;h1&gt;
  
  
  DATA TYPES
&lt;/h1&gt;

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

&lt;p&gt;Strings, Numbers, Mathematical Operators (+, -, *, /, %), Arrays that are 0 indexed. Identifiers are names of variables and are case-sensitive. Identifiers can use alphanumeric and underscore characters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Differences&lt;/strong&gt;: &lt;br&gt;
&lt;em&gt;Javascript example: Ruby example&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Null: Nil, Ruby's null. &lt;br&gt;
Objects: Hashes. Hashes look similar, but they are versatile with their keys as they can be any data type. Symbols, which are immutable strings, are copied by reference similar to objects and the symbols can be used as keys. Javascript allows us to pass functions as values for objects, which allows for greater functionality compared to Ruby's hashes. &lt;br&gt;
Comment out: '#' for Ruby, // for JS.&lt;/p&gt;
&lt;h1&gt;
  
  
  FUNCTIONS
&lt;/h1&gt;

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

&lt;p&gt;console.log(): puts. Ruby has different versions of a printing function: puts, print, and p. puts will add a new line automatically after it is invoked. print will not add a new line and continue to use the current line. p is useful for debugging as it will display a more 'raw' form of data that includes linebreaks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"Hola World!"&lt;/span&gt;
&lt;span class="c1"&gt;# OUTPUT: Hola World!&lt;/span&gt;

&lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="mi"&gt;456&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt; &lt;span class="mi"&gt;789&lt;/span&gt;
&lt;span class="c1"&gt;#print continues on same line&lt;/span&gt;
&lt;span class="mi"&gt;123456789&lt;/span&gt;

&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;
&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="mi"&gt;456&lt;/span&gt;
&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="mi"&gt;789&lt;/span&gt;
&lt;span class="c1"&gt;#puts gives every message its own line&lt;/span&gt;
&lt;span class="mi"&gt;123&lt;/span&gt;
&lt;span class="mi"&gt;456&lt;/span&gt;
&lt;span class="mi"&gt;789&lt;/span&gt;
&lt;span class="c1"&gt;#also affects arrays differently&lt;/span&gt;
&lt;span class="nb"&gt;puts&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="nb"&gt;print&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&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="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;DIFFERENCES&lt;/strong&gt;&lt;br&gt;
Variable Declaration&lt;/p&gt;

&lt;p&gt;Local Variables must start with an _ or lowercase letter. They are local to the method or code block they are declared in. &lt;/p&gt;

&lt;p&gt;Global variables start with $ and are accessible across different classes. Global variable assignments alter the global status and are not recommended. They can make debugging difficult.&lt;/p&gt;

&lt;p&gt;Class variables start with a @@ sign. They are accessible by the child objects of the class. &lt;/p&gt;

&lt;p&gt;Ruby functions are called Methods. Ruby uses the keyword def to declare a method and end to finish the method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Example&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;method&lt;/span&gt;
   &lt;span class="n"&gt;local&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'variable1'&lt;/span&gt;
   &lt;span class="n"&gt;_local&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;underscore&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="s1"&gt;'variable2'&lt;/span&gt;
   &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="c1"&gt;#end of method&lt;/span&gt;
   &lt;span class="vc"&gt;@@numberoflocals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="c1"&gt;#class variable &lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="c1"&gt;#end of class&lt;/span&gt;
&lt;span class="vg"&gt;$global_variable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Hello World!'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;BEGIN and END block. Code you put in here will unconditionally execute either before or after anything else when the file loads, regardless of the position in the interpreter. Code executes in a top-down function. Similar to JS but we have hoisting of functions and var keywords&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"This is the main Ruby Program"&lt;/span&gt;

&lt;span class="k"&gt;END&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"Now we Terminate the Ruby Program"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;BEGIN&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"First we Initialize the Ruby Program"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;# produces:&lt;/span&gt;
&lt;span class="c1"&gt;# First we Initialize the Ruby Program&lt;/span&gt;
&lt;span class="c1"&gt;# This is the main Ruby Program&lt;/span&gt;
&lt;span class="c1"&gt;# Now we Terminate the Ruby Program&lt;/span&gt;

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

&lt;/div&gt;



&lt;h1&gt;
  
  
  ADVANTAGES OF EACH
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Advantages&lt;/strong&gt;&lt;br&gt;
-Application&lt;br&gt;
Javascript leans toward front-end programming, focusing on client-side applications, server-side, and browser interaction and changes. &lt;/p&gt;

&lt;p&gt;-Speed&lt;br&gt;
Due to its optimized engine, Javascript can be up to 20 times faster than Ruby in some cases&lt;/p&gt;

&lt;p&gt;-Need&lt;br&gt;
JavaScript accounts for the basis of over 97% of all websites and because of this, there is always a demand for Javascript Developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ruby Advantages&lt;/strong&gt;&lt;br&gt;
-Application&lt;br&gt;
Ruby leans toward back-end programming where we can generate HTML pages that run server-side and interact with the database.&lt;/p&gt;

&lt;p&gt;-Learning Curve&lt;br&gt;
As Lane said in his blog, [(&lt;a href="https://blog.boot.dev/javascript/ruby-vs-javascript-which-language-should-you-learn-first/"&gt;https://blog.boot.dev/javascript/ruby-vs-javascript-which-language-should-you-learn-first/&lt;/a&gt; )]&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If your main objective is to pick up an easy, fun language and work in backend development, then Ruby is a great choice. Ruby helps build good programming habits, and is truly a language built for beginners and laying down a solid foundation for you to learn more languages later on.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;At the end of the day, whichever language you decide to learn will only further your familiarity with coding concepts, patterns, and applications. Once you understand what to look for and how to translate these skills to other languages, picking up a new language will not only be fun but increase your worth as a developer. Javascript, Ruby, C++ and so on all have advantages and disadvantages that a skilled developer can navigate. I hope that you will too. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tDGQbTd8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8mdaf9uw5bq4650pb04o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tDGQbTd8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8mdaf9uw5bq4650pb04o.jpg" alt="Ruby from Steven Universe" width="800" height="801"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Sources&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.educba.com/javascript-vs-ruby/"&gt;https://www.educba.com/javascript-vs-ruby/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://medium.com/@asiddiqui0692/are-hashes-in-ruby-the-same-as-objects-in-javascript-53bf7e4949c1"&gt;https://medium.com/@asiddiqui0692/are-hashes-in-ruby-the-same-as-objects-in-javascript-53bf7e4949c1&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.rubyguides.com/2018/10/puts-vs-print/"&gt;https://www.rubyguides.com/2018/10/puts-vs-print/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.educba.com/javascript-vs-ruby/"&gt;https://www.educba.com/javascript-vs-ruby/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blog.boot.dev/javascript/ruby-vs-javascript-which-language-should-you-learn-first/"&gt;https://blog.boot.dev/javascript/ruby-vs-javascript-which-language-should-you-learn-first/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.codecademy.com/resources/docs/ruby/variables"&gt;https://www.codecademy.com/resources/docs/ruby/variables&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.tutorialspoint.com/ruby/ruby_classes.htm"&gt;https://www.tutorialspoint.com/ruby/ruby_classes.htm&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>ruby</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Terminal Shortcuts and Aliases</title>
      <dc:creator>James Sheppard</dc:creator>
      <pubDate>Sun, 01 Oct 2023 20:23:09 +0000</pubDate>
      <link>https://forem.com/jshep23prog/terminal-shortcuts-and-aliases-240b</link>
      <guid>https://forem.com/jshep23prog/terminal-shortcuts-and-aliases-240b</guid>
      <description>&lt;p&gt;We see terms like Terminal, Shell, and Alias thrown around all the time. But what do they mean? What is the difference? How can we utilize them more efficiently to our benefit? In this blog, my aim is to demystify these concepts by using the awesome power of Keyboard Shortcuts and Aliases. But first...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lkg51-Bj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/biw1jqfe86pty4bmzw28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lkg51-Bj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/biw1jqfe86pty4bmzw28.png" alt="The DEC VT100, a widely emulated computer terminal" width="800" height="710"&gt;&lt;/a&gt; &lt;a href="https://en.wikipedia.org/wiki/Computer_terminal"&gt;The DEC VT100, a widely emulated computer terminal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is the &lt;strong&gt;Terminal&lt;/strong&gt;?&lt;br&gt;
Before the days of fancy Graphical User Interfaces(GUI) like Windows or Mac, there was the terminal. A simple screen interface that one could enter command prompts for the machine to execute. A modern version of this is the Terminal Emulator which is included in the GUI. The terminal serves as a text input and output environment for your computer. You can enter and execute commands with it and receive a visual representation of what is going on under the hood. If you think a console is the same thing, you are basically correct! The only difference is that the console is a specific interface that communicates only with the attached computer system. &lt;/p&gt;

&lt;p&gt;What is a &lt;strong&gt;Shell&lt;/strong&gt;? Shell is terminology that refers to an interface that provides the user access to the services of an operating system. They can be command line shells (like Unix or DOS) or GUI shells (like Microsoft Windows)&lt;/p&gt;

&lt;p&gt;What is the &lt;strong&gt;Bash&lt;/strong&gt;?&lt;br&gt;
A bash is simply, one of the command line shells. It is one of the more popular ones that are available. A bash’s main job is to start other programs.&lt;/p&gt;

&lt;p&gt;I know the abyss of the dark screen seems daunting at first, but let us look into some helpful tips to help navigate the waters. The more you learn about something, the less intimidating it becomes. So let’s explore some of the more useful keyboard shortcuts to become more efficient at using terminals.&lt;/p&gt;

&lt;p&gt;After researching, I have pulled together a list of shortcuts I find to be the most helpful.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LSvvKClS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vq89fbk3r0u9ho5zilb0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LSvvKClS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vq89fbk3r0u9ho5zilb0.png" alt="Tab Cola" width="580" height="684"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Ode to Tab&lt;/strong&gt;&lt;br&gt;
As Waseem Mansour put it in their blog &lt;a href="https://www.redhat.com/sysadmin/top-10-shortcuts"&gt;https://www.redhat.com/sysadmin/top-10-shortcuts&lt;/a&gt;, "Tab is my ultimate friend - it never lets me down. It is the handiest shortcut and time saver ever developed."  After a busy morning of reviewing and toy problems, I can't count how often I clone down a repository only to type "cd" into the terminal and then look blankly at the screen. What was the name of the directory that I was to code in again? Enter The Tab button. One press and it will either autocomplete the string or it will display the available options.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//go from this...
James-MacBook-Pro:Junior jprogram$ cd //uhhhh
//to this with TAB
James-MacBook-Pro:Junior jprogram$ cd //tab populates the list!
immersion-20XX-09-self-assessment-week-00/
immersion-20XX-09-self-assessment-week-01/
immersion-20XX-09-classiest-of-dance-parties/
immersion-20XX-09-underbar-again/
James-MacBook-Pro:Junior jprogram$ 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CTRL + L&lt;/strong&gt;&lt;br&gt;
Is your terminal cluttered? Ctrl + L will "clear" your Terminal Screen. You can still see your command history if you scroll up!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CTRL + U and CTRL + K&lt;/strong&gt;&lt;br&gt;
Typing in a long command only to realize you messed up in some way? Instead of pressing Backspace twenty times, position your cursor to where the mistake is. CTRL + U will erase everything from the beginning of the line to the cursor, CTRL + K will erase everything from the end of the line to the cursor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CTRL + _&lt;/strong&gt;&lt;br&gt;
How many times have I pressed Ctrl + Z in my terminal only to see nothing undone? Ctrl + _ to the rescue!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CTRL + N and CTRL + P&lt;/strong&gt;&lt;br&gt;
Finally, Ctrl + N and Ctrl + P are the next command from the history and the previous command from the history, respectively. You can use these to pull up commands from your recent history instead of retyping. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Aliases&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Not content with default shortcuts? Why not make your own?&lt;br&gt;
Aliases are a fun little time saver that you can program yourself into your Code Editor! In your terminal, type alias, followed by the keystrokes you want to assign to the alias, the equal sign, and then the command you want to truncate in quotes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "so tired of typing git commit"
//let us use an alias!
alias gc="git commit -m"
gc "so much easier"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to untether your alias, simply type unalias &amp;lt;-and your alias-&amp;gt; and press enter. Your imagination is really the limit when it comes to creating these timesavers! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--801EtCdY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2zrjs4e3domy3tu16t3h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--801EtCdY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2zrjs4e3domy3tu16t3h.png" alt="Terminal Ailness" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: aliases are exclusive to their individual terminals, if you exit out or create a new terminal, you will have to set the alias up again. If you want a permanent alias setup method here are some instructions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//first open your file editor. In this case, VSCode 
// Then enter:
code ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will open the zshrc file in your editor. Enter the aliases you want to use and then save the file. Here are some examples:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4c2YxyrP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vfp4hvgvzeorcksszkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4c2YxyrP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6vfp4hvgvzeorcksszkh.png" alt="zsh file" width="302" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, run your source command, which sources the file to your current shell to make the aliases in that file available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.zshrc
//You will have to run this on every new terminal
//to access your alias list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you will have a list of aliases ready to go! The efficiency is staggering!&lt;/p&gt;

&lt;p&gt;In conclusion, I hope this blog helps you to become more familiar with the quality-of-life features that are built into your terminal. Mastering these shortcuts and aliases can level up your programming experience if you make an effort to use them. Soon they will become second nature faster than you can say 'Command + C and Command + V'! &lt;/p&gt;

&lt;p&gt;Sources:&lt;br&gt;
Terminal/Shell:&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Computer_terminal"&gt;https://en.wikipedia.org/wiki/Computer_terminal&lt;/a&gt;&lt;br&gt;
&lt;a href="https://simple.wikipedia.org/wiki/Shell_(computing)"&gt;https://simple.wikipedia.org/wiki/Shell_(computing)&lt;/a&gt;&lt;br&gt;
Keyboard Shortcuts:&lt;br&gt;
&lt;a href="https://www.redhat.com/sysadmin/top-10-shortcuts"&gt;https://www.redhat.com/sysadmin/top-10-shortcuts&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/9679776/how-do-i-clear-delete-the-current-line-in-terminal"&gt;https://stackoverflow.com/questions/9679776/how-do-i-clear-delete-the-current-line-in-terminal&lt;/a&gt;&lt;br&gt;
Aliases:&lt;br&gt;
&lt;a href="https://jonsuh.com/blog/bash-command-line-shortcuts/"&gt;https://jonsuh.com/blog/bash-command-line-shortcuts/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.atatus.com/blog/14-useful-bash-aliases-that-make-shell-less-complex-and-more-fun/"&gt;https://www.atatus.com/blog/14-useful-bash-aliases-that-make-shell-less-complex-and-more-fun/&lt;/a&gt;&lt;br&gt;
Permanent Aliases:&lt;br&gt;
&lt;a href="https://adamtheautomator.com/zsh-alias/#:%7E:text=But%20remember%2C%20creating%20an%20alias,available%20in%20each%20new%20shell"&gt;https://adamtheautomator.com/zsh-alias/#:~:text=But%20remember%2C%20creating%20an%20alias,available%20in%20each%20new%20shell&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=hFCb-hFjHf0&amp;amp;t=260s"&gt;https://www.youtube.com/watch?v=hFCb-hFjHf0&amp;amp;t=260s&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Recursion Recursion Recursion</title>
      <dc:creator>James Sheppard</dc:creator>
      <pubDate>Thu, 17 Aug 2023 13:33:09 +0000</pubDate>
      <link>https://forem.com/jshep23prog/recursion-recursion-recursion-3jfn</link>
      <guid>https://forem.com/jshep23prog/recursion-recursion-recursion-3jfn</guid>
      <description>&lt;p&gt;Are you tired of the convenience that loops provide? Then do we have the solution for you!&lt;/p&gt;

&lt;p&gt;Much like a for or while loop, recursive functions will continue to execute until it is stopped via code.&lt;/p&gt;

&lt;p&gt;The recursive function accomplishes this feat by calling its own function within the function itself. Sound confusing? Well let's break it down.&lt;/p&gt;

&lt;p&gt;Recursion has two important parts to keep it working. The base case and recursion case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Recursion case?&lt;/strong&gt;&lt;br&gt;
A recursion case is a function that will invoke itself unless it is stopped by the base case. If there is no base case to stop it, the recursive case will call itself forever. Take a look at this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function infinite(){
  console.log('Invoked');
  infinite();
}

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

&lt;/div&gt;


&lt;p&gt;In the above example we can see that we are invoking the infinite function that will console.log 'Invoked' and then call itself again. This will happen because there is no Base Case to stop it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lErIYvXe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/la9o8emgh3b7i5qzwr8o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lErIYvXe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/la9o8emgh3b7i5qzwr8o.png" alt="Infinite Loop" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Base Case?&lt;/strong&gt;&lt;br&gt;
A base case is usually a boolean that will execute when the argument meets the specific criteria of the boolean. In a for loop, this can either be ending point of the loop statement or a return statement within. In a recursive function, a Base Case is declared before the recursive case so the argument is tested before it gets sent to the recursive case. If a base case wasn't in the recursive function, the function would loop over itself an infinite number of times!&lt;/p&gt;

&lt;p&gt;Let's see an example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function countDown(num){
//base case (this is what will eventually end the recursion)
if (num === 0) {
 return;
}
//recursion case (if the base case was not triggered,
// the recursion case executes)
console.log(num); // we print the current argument for the countdown
countDown(num - 1); // here we call the function inside itself 
//passing the argument -1. This repeats 
//the process until base case executes.

} 
countDown(5);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In this example, we invoke our recursive function with the argument of 5. It first goest to the base case to check if the argument(5) strictly equals 0. It does not, so the program proceeds to the next line which logs the argument. After the log, we come to the recursive case. Here we call the function with the argument being decremented. &lt;br&gt;
// logs 5, calls countDown with (5 - 1 === (4))&lt;br&gt;
//logs 4, calls countDown with (4 - 1 === (3))&lt;br&gt;
//logs 3, calls countDown with (3 - 1 === (2))&lt;br&gt;
//logs 2, calls countDown with (2 - 1 === (1))&lt;br&gt;
//logs 1, calls countDown with (1 - 1 === (0))&lt;/p&gt;

&lt;p&gt;When we execute the function again, the Base Case is triggered and ends the program.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple Base Cases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sometimes one Base Case is not enough. Check this out:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uqP_6IzE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9bcmh2w8lr95e3jjp5v.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uqP_6IzE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9bcmh2w8lr95e3jjp5v.jpeg" alt="isBear" width="800" height="430"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function isBear(str){
//base case
if (str === 'bear') {
return console.log(true);
}
//recursion case
isBear(str.slice(1));
}

isBear('grizzlybear');
isBear('koala');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In this example, the first invocation will work as intended because we will keep recursion looping over the grizzlybear string, slicing off the first letter each iteration until only bear is left of the string. When the bear string gets to the base case, it is tested and found to strictly equal 'bear' and the program concludes by returning true. However, if we were to invoke isBear by passing koala as the argument, we will loop forever. We can solve this issue by putting another base case in:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function isBear(str){
//FIRST BASE CASE
if (str === 'bear') {
return console.log(true);
}
//SECOND BASE CASE
if (str.length === 0){
 return console.log(false)
}
//RECURSION CASE
isBear(str.slice(1));
}

isBear('grizzlybear');
isBear('koala');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now when we invoke with koala as the argument, the base case will trigger when there is no more string left to slice! This will result in printing false to the console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3y7tj8-B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8rh41n17oe4c338vma1.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3y7tj8-B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8rh41n17oe4c338vma1.jpeg" alt="Two base cases for the win!" width="236" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, recursive functions, like for/while loops will iterate over the data until their code block is triggered. Recursion is just a little more elegant of an approach. Next time when you are writing a for loop, why not give recursion a try? If you want to dive deeper, check out these helpful blogs: &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.freecodecamp.org/news/quick-intro-to-recursion/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--7BEd04jE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.freecodecamp.org/news/content/images/2019/09/cover-image.jpeg" height="448" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.freecodecamp.org/news/quick-intro-to-recursion/" rel="noopener noreferrer" class="c-link"&gt;
          A Quick Intro to Recursion in Javascript
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          The function calls itself until someone stops it. Recursion can feel difficult to new developers. Perhaps that's because many resources teach it using algorithmic examples (Fibonacci, linked-lists). This piece will hopefully introduce things plainly, using one simple example. Core Idea Recursion is when a function calls itself until someone stops
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--NR7BWmi---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.freecodecamp.org/universal/favicons/favicon.ico" width="48" height="48"&gt;
        freecodecamp.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://code.tutsplus.com/understanding-recursion-with-javascript--cms-30346t" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--CoOguK20--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cms-assets.tutsplus.com/uploads/users/1851/posts/30346/preview_image/js-preview.png" height="277" class="m-0" width="400"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://code.tutsplus.com/understanding-recursion-with-javascript--cms-30346t" rel="noopener noreferrer" class="c-link"&gt;
          Understanding Recursion With JavaScript | Envato Tuts+
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Learn the building blocks of recursion so that you are equipped to solve advanced algorithms.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--48nTVh8C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://static.tutsplus.com/packs/media/images/favicon-9279542df62646e82ddb087eab02c613.png" width="96" height="96"&gt;
        code.tutsplus.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
