<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Peyton Strahan</title>
    <description>The latest articles on DEV Community by Peyton Strahan (@peytonstrahan).</description>
    <link>https://dev.to/peytonstrahan</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%2F1165472%2Fa4a29798-587d-4605-8dde-8f8ad77cf12f.png</url>
      <title>DEV Community: Peyton Strahan</title>
      <link>https://dev.to/peytonstrahan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/peytonstrahan"/>
    <language>en</language>
    <item>
      <title>Basic Explanation of Terraria</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 14 Apr 2025 04:59:21 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/basic-explanation-of-terraria-1ooj</link>
      <guid>https://dev.to/peytonstrahan/basic-explanation-of-terraria-1ooj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Intro (What is Terraria?)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftse2.mm.bing.net%2Fth%2Fid%2FOIP.lu7k_7VON_mT99jbnVUnnAHaEK%3Frs%3D1%26pid%3DImgDetMain" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftse2.mm.bing.net%2Fth%2Fid%2FOIP.lu7k_7VON_mT99jbnVUnnAHaEK%3Frs%3D1%26pid%3DImgDetMain" width="474" height="266"&gt;&lt;/a&gt;&lt;br&gt;
Terraria is a 2D indie video game released on May 16, 2011, that utilizes a pixelated art style and fits into the action-adventure and sandbox genres. Terraria was developed by Re-Logic, with the game's publisher being 505 Games. The game has sold millions of copies and can be played both in single player and multi-player. You can build nice structures and contraptions, go on expeditions and mining trips in the open world, go fishing, fight enemies, craft crazy items to increase your strength, fight a list of increasingly stronger bosses, and even just play golf if you feel like it (among many other activities). Let's get into it, shall we?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Little Technical Background&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.oreilly.com%2Flibrary%2Fcover%2F9780132620185%2F1200w630h%2F" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.oreilly.com%2Flibrary%2Fcover%2F9780132620185%2F1200w630h%2F" width="1200" height="630"&gt;&lt;/a&gt;&lt;br&gt;
While the Internet seems to give varying answers, The answer I see most often is that Terraria was written in C# using XNA Game Studio. C# is a Microsoft-made object-oriented programming language made in 2000 and is still used today. XNA Game Studio is also a product of Microsoft and was an old integrated development environment (can also be described as a toolkit) that stopped getting support in 2014. XNA Game Studio is an abandoned software that was meant to help build games on things like the Xbox 360 and the Windows OS, and I, while a little uncertain, am doubtful that Re-Logic even still uses the software after using it to create the earlier versions of the game and its custom engine. Nonetheless, Terraria is unique in that everything was apparently hard coded and put into a single compiled EXE file, which is possibly due to the fact that Terraria was just a passion project that was never intended to get the amount of popularity that it did, though this structure can help with having better control over the code in order to make the code more efficient. Ok, so Terraria was hard coded in C#, but what even is Terraria?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's Just 2D Minecraft! (Not Really)&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.redd.it%2Fdwgv8ewfqgv51.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.redd.it%2Fdwgv8ewfqgv51.jpg" width="485" height="524"&gt;&lt;/a&gt;&lt;br&gt;
Calling Terraria a 2D version of Minecraft is basically an inside joke in the Minecraft and Terraria communities at this point, but it does have some merit to it when it comes to helping people understand what you can do in Terraria (as Minecraft is much more well known than Terraria). Both Minecraft and Terraria involve fantasy enemies, destructible terrain in an open world, random world generation, allowing creativity with no real set goals (other than of course random game achievements as-well-as defeating the final boss and watching the credits roll if you feel like it), the ability to build structures, the ability to craft new items, an underworld area, exploration of the world, having a really good modding scene, and many other similarities. So, if you know what Minecraft is, you can imagine a 2D version of Minecraft and get a vague idea of what Terraria is. Despite this, the two games can feel a good bit different to play according to a few sources. Minecraft can feel like it focuses more on survival, building, and exploration while Terraria can feel like it focuses on becoming more powerful in order to slay the next boss (kind of like an RPG). I think enough comparisons have been made; it's time to actually talk about Terraria in detail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Starting the Game&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpreview.redd.it%2Ftoday-i-will-not-eat-two-corn-dogs-v0-ysv04f6e9mha1.jpg%3Fauto%3Dwebp%26s%3Dc6d83c3db4585a11b3755f7e924452b0569f5f29" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fpreview.redd.it%2Ftoday-i-will-not-eat-two-corn-dogs-v0-ysv04f6e9mha1.jpg%3Fauto%3Dwebp%26s%3Dc6d83c3db4585a11b3755f7e924452b0569f5f29" width="692" height="641"&gt;&lt;/a&gt;&lt;br&gt;
First you creat a character. You can customize gender, and the styles and colors of hair, eyes, skin, and clothing. Characters can be in classic (drop some money on death), mediumcore (drop all items on death), hardcore (permanent death), or journey mode (a creative-like mode where you have cheats and can make infinite copies of something after discovering enough of it). After creating your character, you can create and name a new world. The world is a massive 2D grid that will contain everything you see and do in Terraria. Created worlds can either be randomly generated and produce a seed or can have a predetermined generation created from an inputted seed. Seeds follow the format of ..., with each part being replaced with a number. Size determines how big the world will be and ranges from 1 (small) to 2 (medium) to 3 (large), with a world being able to contain up to 20,160,000 individual tiles with the largest world setting (8,400 x 2,400). Difficulty options include 1 for classic mode (default experience), 2 for expert mode (harder but has special boss rewards), 3 for master mode (hardest but has boss trophies), and 4 for journey mode (allows use of journey mode characters). The world's evil biome determines whether the world will have 1, the corruption biome, or 2, the crimson biome. The identifier is the actual seed part of the seed and is several digits long. Secret seeds also exist that instead of creating a preset world, randomly generate a new world using fun effects. Speaking of "generate", how does that work?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;World Generation&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.wondershare.com%2Ffilmora%2Farticle-images%2Fterramap-interface.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.wondershare.com%2Ffilmora%2Farticle-images%2Fterramap-interface.png" width="800" height="227"&gt;&lt;/a&gt;&lt;br&gt;
When a world is being created, it does so using steps that insert 2D blocks (tiles) into the world that sometimes use noise algorithms that make the terrain look more natural, with each step placing blocks that potentially override some blocks from the previous steps. It starts with filling the world with stone along with dirt and sand on top of said stone. It then goes throughout the world carving out caves and caverns while filling them with water or lava every now and then. It then begins to create the biomes, starting with things like the ice biome granite biomes and ending with things like the world's evil biome and the underworld. Grass and other vegetation will be added to the world at multiple points in the generation process whenever it is needed (one example is adding vegetation to the jungle right after creating the jungle biome). After biome and cave generation is dealt with, tons of little additions and modifications are made including settling liquids, adding chests, adding structures (including abandoned underground shacks/houses along with things like the dungeon and the jungle temple), adding moss to some cave walls, and many other things. There is a showcase video of &lt;a href="https://www.youtube.com/watch?v=bF-_AeRRbmU" rel="noopener noreferrer"&gt;a mod that lets you see Terraria world generation in real time&lt;/a&gt; that I was made aware of thanks to &lt;a href="https://gamedev.stackexchange.com/questions/196589/how-does-terraria-generate-such-large-worlds-initially" rel="noopener noreferrer"&gt;Steven's answer to a Game Development forum post&lt;/a&gt; that I had found (Thank you random person named Steven, I hope you are doing well). While Terraria is a sandbox game, there is one main goal that can be achieved in order to beat the game.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Progressing&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.pcinvasion.com%2Fwp-content%2Fuploads%2F2023%2F04%2Fterraria_bosses_art_large_battle-1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.pcinvasion.com%2Fwp-content%2Fuploads%2F2023%2F04%2Fterraria_bosses_art_large_battle-1.jpg" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Terraria has a large number of bosses (and hoard events) to defeat and places emphasis on fighting them to progress, with each one acting as a sort of milestone to reach before beating the final boss (the Moon Lord) and triggering the ending credits to the game, therefor "beating the game". The gameplay loop usually consists of grinding in some way to make your character a bit stronger, defeating a boss, and then using the items you get from the boss and the new things unlocked from defeating said boss to grind a bit more before going on to defeat the next boss. Grinding may involve slaying certain enemies for a rare drop, gathering or mining materials to craft useful items, creating a boss arena to give yourself buffs from special placed objects and/or to simply make it easier to move around and dodge attacks, or any action that is done with the intent to prepare or make your character stronger before the next boss fight. Sometimes the game shakes things up a little by throwing in a hoard event instead of a boss, where you fight off and eliminate a certain number of a hoard of enemies (which usually follow a certain theme depending on the current hoard event) in order to beat the event and/or simply get the loot dropped by the enemies. Whatever you are doing to progress, it is usually some tasks to make it easier for you to take down the next powerful enemy on your list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intricate Game Mechanics&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.cinepremiere.com.mx%2Fwp-content%2Fuploads%2F2019%2F09%2Fterraria.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.cinepremiere.com.mx%2Fwp-content%2Fuploads%2F2019%2F09%2Fterraria.gif" width="1024" height="1024"&gt;&lt;/a&gt;&lt;br&gt;
Terraria is a sandbox game, so there are plenty of things to do and witness, with each thing having small intricacies that make them both surprisingly complicated and interesting. For example, you have an inventory with 50 slots any and every kind of item (with the top 10 making up the hotbar), 4 slots for just coins (which are used as currency with vendors), 4 slots for just ammo, and a trash slot for deleting unwanted items. Most items stack up 9999 (the max used to be 999), but anything that is not a material or placeable item (weapons, armor, accessories, tools, etc.) cannot be stacked (with exceptions to things like the bananarang and light disc weapons). You can mark items in the inventory as "junk" or "favorited" (with favorited items being unable to be thrown away). In the inventory you can also craft items, change certain view displays, choose a team color (for PVP multiplayer purposes), view your armor stat, and view NPC housing. The inventory also allows you to equip armor, dyes, pets, grappling hooks, accessories, vanity cloths and accessories, and minecarts. While the inventory ended up being more complicated than I thought it was after trying to fully explain it (and probably missing some things as well), there are some mechanics where the little details are more interesting.&lt;/p&gt;

&lt;p&gt;While still on the concept of game mechanics, one that is interesting to talk about is biome spread. Biome spread occurs when the blocks that compose a biome spread to or "infect" the blocks around it, effectively expanding the size of the infecting biome. The three biomes capable of biome spreading include the corruption, crimson, and hallow. A block can become infected if it is within 3 tiles of an infected block and the infected block triggers a successful block infection through a block update (which is part of something called a "tile update cycle" and happens to each block every 140 seconds on the surface or every 830 seconds below the surface, with these timers being staggered for each block). The speed of biome spread can be affected by various sources. Defeating the Wall of Flesh boss increases the rate at which biome spread occurs while defeating the Plantera boss reduces it. Placing sunflowers can cut off a biome from spreading via. grass.&lt;/p&gt;

&lt;p&gt;Let's do a third one, because why not? Terraria has four different liquids with liquid physics. These liquids are water, lava, honey, and shimmer. With liquids come liquid physics. Liquids are interesting in that they can fill up a fraction of a tile (or a full tile) and can either be "flowing" or "settled". Flowing liquid is any liquid that is currently moving in between tiles while settled liquid is any liquid that has stopped moving. Going through a liquid will slow the player down (expecially so with honey) and gives the player moon-like gravity while submerged. Liquids always spread outwards when a block is underneath it (and none are at the liquid's sides) and go down into any available openings/holes beneath the liquid when said opening is found. If there is nowhere else for a liquid to flow, it changes from its flowing state to its settled state until a new empty space is made for the liquid to fill via flowing into it. Ok, that was a bunch of semi-technical speak, let's talk about mods now.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Community and Mods&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.tenor.com%2FIkS3EBd9BKsAAAAM%2Fcalamity-supreme.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.tenor.com%2FIkS3EBd9BKsAAAAM%2Fcalamity-supreme.gif" width="220" height="220"&gt;&lt;/a&gt;&lt;br&gt;
Terraria has mod support through a separate application called tModLoader, which allows you to install mods for the game. tModLoader allows you to search and install mods made by the community in order to add content to and/or to change aspects of Terraria, with the most popular mod hands-down being Calamity. Calamity has been made over the course of several years and has its own lore, gameplay changes, 27 brand new boss fights, 5 new biomes, a bunch of new items, beautiful art style, and killer 53-song-long soundtrack mostly made by DM DOKURU (with Heart Plus Up!, SixteenInMono, CDMusic, RoverdriveX, and PinpinNeon being the other composers who helped make the soundtrack). As you can see, some mods made for Terraria have a lot of love, care, and effort put into them, greatly expanding the lifespan of Terraria as a game.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwallpapers.com%2Fimages%2Fhd%2Fvillain-terraria-moon-lord-44nowbn53hcc2pet.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwallpapers.com%2Fimages%2Fhd%2Fvillain-terraria-moon-lord-44nowbn53hcc2pet.jpg" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Terraria is a 2011 passion project turned successful game made by Re-Logic. Its 2D pixelated style and music composed by mainly Scott Lloyd Shelly are instantly recognized by the millions of individuals around the world who have played the game. Terraria is a sandbox game with many intricate game mechanics, and they add so much to do in the game other than the main goal of defeating the Moon Lord.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.reddit.com/r/Terraria/comments/nhlhk/how_was_terraria_made/?rdt=65061" rel="noopener noreferrer"&gt;https://www.reddit.com/r/Terraria/comments/nhlhk/how_was_terraria_made/?rdt=65061&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.bisecthosting.com/blog/terraria-engine-specs" rel="noopener noreferrer"&gt;https://www.bisecthosting.com/blog/terraria-engine-specs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.ncesc.com/gaming-pedia/what-language-is-terraria-written-in/" rel="noopener noreferrer"&gt;https://www.ncesc.com/gaming-pedia/what-language-is-terraria-written-in/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/introduction-to-c-sharp/#" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/introduction-to-c-sharp/#&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Microsoft_XNA_Game_Studio" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/Microsoft_XNA_Game_Studio&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cyberxgaming.com/what-engine-does-terraria-use/" rel="noopener noreferrer"&gt;https://cyberxgaming.com/what-engine-does-terraria-use/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.reddit.com/r/Terraria/comments/opiqb/how_i_felt_looking_at_the_terraria_source_code/?rdt=61445" rel="noopener noreferrer"&gt;https://www.reddit.com/r/Terraria/comments/opiqb/how_i_felt_looking_at_the_terraria_source_code/?rdt=61445&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.reddit.com/r/Terraria/comments/6bztlw/is_terrias_source_code_obfuscated_or_just/" rel="noopener noreferrer"&gt;https://www.reddit.com/r/Terraria/comments/6bztlw/is_terrias_source_code_obfuscated_or_just/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://forums.terraria.org/index.php?threads/behind-the-scenes-of-journeys-end-a-q-a-with-the-programmers-and-artists-of-terraria.102130/" rel="noopener noreferrer"&gt;https://forums.terraria.org/index.php?threads/behind-the-scenes-of-journeys-end-a-q-a-with-the-programmers-and-artists-of-terraria.102130/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Terraria" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/Terraria&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://terraria.fandom.com/wiki/Terraria_Wiki" rel="noopener noreferrer"&gt;https://terraria.fandom.com/wiki/Terraria_Wiki&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.terraria.org/" rel="noopener noreferrer"&gt;https://www.terraria.org/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.businessofapps.com/data/minecraft-statistics/" rel="noopener noreferrer"&gt;https://www.businessofapps.com/data/minecraft-statistics/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gamedeveloper.com/business/re-logic-s-terraria-has-sold-58-7-million-copies-in-13-years" rel="noopener noreferrer"&gt;https://www.gamedeveloper.com/business/re-logic-s-terraria-has-sold-58-7-million-copies-in-13-years&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://steamcommunity.com/app/105600/discussions/0/1640918469767327271/" rel="noopener noreferrer"&gt;https://steamcommunity.com/app/105600/discussions/0/1640918469767327271/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://gbtimes.com/gaming/is-terraria-basically-minecraft/" rel="noopener noreferrer"&gt;https://gbtimes.com/gaming/is-terraria-basically-minecraft/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://store.steampowered.com/app/1281930/tModLoader/" rel="noopener noreferrer"&gt;https://store.steampowered.com/app/1281930/tModLoader/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://calamitymod.wiki.gg/" rel="noopener noreferrer"&gt;https://calamitymod.wiki.gg/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://forums.terraria.org/index.php?threads/what-is-the-game-engine-and-why-do-people-say-that-it-is-limiting.122886/" rel="noopener noreferrer"&gt;https://forums.terraria.org/index.php?threads/what-is-the-game-engine-and-why-do-people-say-that-it-is-limiting.122886/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://gamedev.stackexchange.com/questions/196589/how-does-terraria-generate-such-large-worlds-initially" rel="noopener noreferrer"&gt;https://gamedev.stackexchange.com/questions/196589/how-does-terraria-generate-such-large-worlds-initially&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=bF-_AeRRbmU" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=bF-_AeRRbmU&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://terraria.wiki.gg/wiki/Music" rel="noopener noreferrer"&gt;https://terraria.wiki.gg/wiki/Music&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Links to Images Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://nintendoeverything.com/wp-content/uploads/terraria-3.jpg" rel="noopener noreferrer"&gt;https://nintendoeverything.com/wp-content/uploads/terraria-3.jpg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://tse2.mm.bing.net/th/id/OIP.lu7k_7VON_mT99jbnVUnnAHaEK?rs=1&amp;amp;pid=ImgDetMain" rel="noopener noreferrer"&gt;https://tse2.mm.bing.net/th/id/OIP.lu7k_7VON_mT99jbnVUnnAHaEK?rs=1&amp;amp;pid=ImgDetMain&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://preview.redd.it/today-i-will-not-eat-two-corn-dogs-v0-ysv04f6e9mha1.jpg?auto=webp&amp;amp;s=c6d83c3db4585a11b3755f7e924452b0569f5f29" rel="noopener noreferrer"&gt;https://preview.redd.it/today-i-will-not-eat-two-corn-dogs-v0-ysv04f6e9mha1.jpg?auto=webp&amp;amp;s=c6d83c3db4585a11b3755f7e924452b0569f5f29&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.cinepremiere.com.mx/wp-content/uploads/2019/09/terraria.gif" rel="noopener noreferrer"&gt;https://www.cinepremiere.com.mx/wp-content/uploads/2019/09/terraria.gif&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://i.redd.it/dwgv8ewfqgv51.jpg" rel="noopener noreferrer"&gt;https://i.redd.it/dwgv8ewfqgv51.jpg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.oreilly.com/library/cover/9780132620185/1200w630h/" rel="noopener noreferrer"&gt;https://www.oreilly.com/library/cover/9780132620185/1200w630h/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://media.tenor.com/IkS3EBd9BKsAAAAM/calamity-supreme.gif" rel="noopener noreferrer"&gt;https://media.tenor.com/IkS3EBd9BKsAAAAM/calamity-supreme.gif&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://wallpapers.com/images/hd/villain-terraria-moon-lord-44nowbn53hcc2pet.jpg" rel="noopener noreferrer"&gt;https://wallpapers.com/images/hd/villain-terraria-moon-lord-44nowbn53hcc2pet.jpg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.pcinvasion.com/wp-content/uploads/2023/04/terraria_bosses_art_large_battle-1.jpg" rel="noopener noreferrer"&gt;https://www.pcinvasion.com/wp-content/uploads/2023/04/terraria_bosses_art_large_battle-1.jpg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://images.wondershare.com/filmora/article-images/terramap-interface.png" rel="noopener noreferrer"&gt;https://images.wondershare.com/filmora/article-images/terramap-interface.png&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What are GIFs and How Do They Work?</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 31 Mar 2025 01:55:23 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/what-are-gifs-and-how-do-they-work-3hf5</link>
      <guid>https://dev.to/peytonstrahan/what-are-gifs-and-how-do-they-work-3hf5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Intro&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.pixabay.com%2Fanimation%2F2022%2F11%2F09%2F07%2F44%2F07-44-25-260_512.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.pixabay.com%2Fanimation%2F2022%2F11%2F09%2F07%2F44%2F07-44-25-260_512.gif" width="512" height="288"&gt;&lt;/a&gt;&lt;br&gt;
GIF stands for "Graphics Interchange Format", and it is a file type used to store images. The GIF was created in 1987 by a team that was led by a developer named Steve Wilhite and operated under the company known as CompuServe. Despite being outdated, GIFs are still around due to being easy to make and highly compatible with HTML and most browsers. While a GIF file is perfectly capable of just storing any regular image, the GIF is much better known for its ability to store an animated image. GIFs became widespread and well known due to the advantage an animated image gave when trying to convey a complex thought, express a complex emotion, or just show off a joke or meme in a quick and understandable manner (for example, it is much easier and more understandable to show you an animated image of a duck riding a dog riding a horse riding a motorcycle off of a ramp into a swimming pool while the leaves of nearby trees shift in color and the birds in the sky fly around in spirals than it is to type out the entire scenario like I just did). Anyways, it is time to go into a little more detail on what GIFs are.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Slideshow in Disguise&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmir-s3-cdn-cf.behance.net%2Fproject_modules%2Fmax_3840%2F52574a179645009.64fd96ade568b.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmir-s3-cdn-cf.behance.net%2Fproject_modules%2Fmax_3840%2F52574a179645009.64fd96ade568b.gif" width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
The GIF was invented with the purpose of being able to store and share a colored image without eating up too much storage space. The GIF format achieved this through limiting its available colors to 256 and by utilizing the Lempel-Ziv-Welch algorithm to simplify reoccurring patterns in order to compress image data without losing image quality. While this original purpose of the GIF was not about its side ability to store and display multiple versions of an image, most of today's GIFs work by utilizing this optional feature to display a list of images one after the other (usually in a rapid manner) as a kind of slideshow. This "slideshow" loops back to the first image after displaying the last image, creating an infinite loop and allowing the animation to play indefinitely. Now let's make one!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Make a GIF&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.tenor.com%2F1E6HMze0mQEAAAAC%2Fdancing-cockroach-rainbow.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.tenor.com%2F1E6HMze0mQEAAAAC%2Fdancing-cockroach-rainbow.gif" width="498" height="498"&gt;&lt;/a&gt;&lt;br&gt;
There are several ways of making a GIF, though the process usually involves either stitching multiple images together or converting a video file into a GIF file. This example will utilize the &lt;a href="https://ezgif.com/maker" rel="noopener noreferrer"&gt;Ezgif GIF Maker&lt;/a&gt; to demonstrate the former method.&lt;/p&gt;

&lt;p&gt;First, you upload the images you want to turn into a GIF. For me, I found and downloaded an image of Gork (red) and an image of Mork (blue) from the Warhammer 40k series:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwh40k.lexicanum.com%2Fmediawiki%2Fimages%2Fthumb%2F7%2F72%2FGork.jpg%2F209px-Gork.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwh40k.lexicanum.com%2Fmediawiki%2Fimages%2Fthumb%2F7%2F72%2FGork.jpg%2F209px-Gork.jpg" width="209" height="240"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwh40k.lexicanum.com%2Fmediawiki%2Fimages%2Fthumb%2Fd%2Fdf%2FSr-red-waaagh-MORK.png%2F207px-Sr-red-waaagh-MORK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwh40k.lexicanum.com%2Fmediawiki%2Fimages%2Fthumb%2Fd%2Fdf%2FSr-red-waaagh-MORK.png%2F207px-Sr-red-waaagh-MORK.png" width="207" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and uploaded them both using the file uploader:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlonz40nh0cu467mp8mj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdlonz40nh0cu467mp8mj.png" alt="Image description" width="800" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After uploading, you can tinker with some of the settings. My current screen looks like this after uploading:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgj65di2xslk3sliucbdy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgj65di2xslk3sliucbdy.png" alt="Image description" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because I liked the current image order and delay speed; I scrolled down, clicked on the crossfade option (makes the images fade into one another instead of simply swapping), and clicked on "Make a GIF!" to get this result:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyf7ks2es5gtatbhpt9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxyf7ks2es5gtatbhpt9m.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then saved the GIF using the "save" button:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq41t6jy759z6ljlalgpm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq41t6jy759z6ljlalgpm.png" alt="Image description" width="97" height="122"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The resulting GIF can be seen here:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jg9hntd8x42k8qqdokj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jg9hntd8x42k8qqdokj.gif" alt="Image description" width="207" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you know how to make a GIF, one of the oldest colored image file formats. Speaking of age, that brings us to our next topic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An Aging Format&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.tenor.com%2Fu9x4r0_oMe4AAAAM%2Fold-man-grandpa.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedia.tenor.com%2Fu9x4r0_oMe4AAAAM%2Fold-man-grandpa.gif" width="220" height="338"&gt;&lt;/a&gt;&lt;br&gt;
The GIF is actually quite old, having been released in 1987, when most computer screens at that time were 8-bit based and could only support up to 256 (2^8) colors. While there have been attempts to replace the GIF (such as Mozilla's APNG format), GIF's have been commonly used for so long (thus making them compatible with most new and old browsers and websites) and are so easy to make that replacing the file format might not always be worth the effort of making a new format and then waiting for every major device, browser, photo/video editing software, and/or operating system to make updates that would provide support for the new format. Despite this, there are some new file formats that show a potential for replacing the GIF. The GIFV format, for example, is a HTML5-based video (not image) format that is more space-efficient, can use more colors, and can store and play sound as opposed to GIFs. For the current moment, GIFs are still widely used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.icegif.com%2Fwp-content%2Fuploads%2Ficegif-855.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.icegif.com%2Fwp-content%2Fuploads%2Ficegif-855.gif" width="376" height="288"&gt;&lt;/a&gt;&lt;br&gt;
The GIF was invented by Steve Wilhite's team at CompuServe in 1987. GIFs, while intended to be used as just a data-efficient way of storing and sharing images, ended up becoming one of the most popular ways of quickly sharing thoughts and reactions within Internet culture. GIFs can store and display multiple images back-to-back, creating an animation. While the compatibility and ease-of-use of GIFs has made it hard to replace the aging file format, some potential replacement formats are coming along such as the GIFV format. But until the day when GIFs are replaced by something else, we can continue efficiently sending short animations of popular memes and reactions over social platforms by using GIFs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.howtogeek.com/441185/what-is-a-gif-and-how-do-you-use-them/" rel="noopener noreferrer"&gt;https://www.howtogeek.com/441185/what-is-a-gif-and-how-do-you-use-them/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.smithsonianmag.com/history/brief-history-gif-early-internet-innovation-ubiquitous-relic-180963543/" rel="noopener noreferrer"&gt;https://www.smithsonianmag.com/history/brief-history-gif-early-internet-innovation-ubiquitous-relic-180963543/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://medium.com/ipg-media-lab/the-enduring-popularity-of-gifs-in-digital-culture-54763d7754aa" rel="noopener noreferrer"&gt;https://medium.com/ipg-media-lab/the-enduring-popularity-of-gifs-in-digital-culture-54763d7754aa&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.britannica.com/technology/GIF" rel="noopener noreferrer"&gt;https://www.britannica.com/technology/GIF&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Links to GIFs Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://th.bing.com/th/id/R.24f2f57e56c092344cfa5ee23931e8b8?rik=PpAanwthdIAdGg&amp;amp;pid=ImgRaw&amp;amp;r=0" rel="noopener noreferrer"&gt;https://th.bing.com/th/id/R.24f2f57e56c092344cfa5ee23931e8b8?rik=PpAanwthdIAdGg&amp;amp;pid=ImgRaw&amp;amp;r=0&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cdn.pixabay.com/animation/2022/11/09/07/44/07-44-25-260_512.gif" rel="noopener noreferrer"&gt;https://cdn.pixabay.com/animation/2022/11/09/07/44/07-44-25-260_512.gif&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://mir-s3-cdn-cf.behance.net/project_modules/max_3840/52574a179645009.64fd96ade568b.gif" rel="noopener noreferrer"&gt;https://mir-s3-cdn-cf.behance.net/project_modules/max_3840/52574a179645009.64fd96ade568b.gif&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://media.tenor.com/1E6HMze0mQEAAAAC/dancing-cockroach-rainbow.gif" rel="noopener noreferrer"&gt;https://media.tenor.com/1E6HMze0mQEAAAAC/dancing-cockroach-rainbow.gif&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://media.tenor.com/u9x4r0_oMe4AAAAM/old-man-grandpa.gif" rel="noopener noreferrer"&gt;https://media.tenor.com/u9x4r0_oMe4AAAAM/old-man-grandpa.gif&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.icegif.com/wp-content/uploads/icegif-855.gif" rel="noopener noreferrer"&gt;https://www.icegif.com/wp-content/uploads/icegif-855.gif&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;GIF Maker Website Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;website: &lt;a href="https://ezgif.com/maker" rel="noopener noreferrer"&gt;https://ezgif.com/maker&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;first image put into GIF maker: &lt;a href="https://wh40k.lexicanum.com/mediawiki/images/thumb/7/72/Gork.jpg/209px-Gork.jpg" rel="noopener noreferrer"&gt;https://wh40k.lexicanum.com/mediawiki/images/thumb/7/72/Gork.jpg/209px-Gork.jpg&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;second image put into GIF maker: &lt;a href="https://wh40k.lexicanum.com/mediawiki/images/thumb/d/df/Sr-red-waaagh-MORK.png/207px-Sr-red-waaagh-MORK.png" rel="noopener noreferrer"&gt;https://wh40k.lexicanum.com/mediawiki/images/thumb/d/df/Sr-red-waaagh-MORK.png/207px-Sr-red-waaagh-MORK.png&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What is Material UI? (React/JavaScript)</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 17 Mar 2025 21:46:01 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/what-is-material-ui-reactjavascript-145f</link>
      <guid>https://dev.to/peytonstrahan/what-is-material-ui-reactjavascript-145f</guid>
      <description>&lt;p&gt;&lt;strong&gt;Intro&lt;/strong&gt;&lt;br&gt;
Material UI (MUI) is a 2014 JavaScript library that's meant to be used with another JavaScript library called React. React is used to create the user interfaces of web applications, utilizing components that can be rendered within the page or within other components. While each component can have things such functions that handle logic and a state that keeps track of values, their main feature is their html that gets rendered. MUI adds many new pre-made components with new attributes that can be imported into a jsx file (the file type that React usually utilizes) and then rendered within a React component's html. MUI components are designed to mimic Google's professional look, and each component has custom attributes that can alter the component in unique ways. But before we get ahead of ourselves, we need to know more about what MUI is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is MUI&lt;/strong&gt;&lt;br&gt;
MUI is a JavaScript library that is intended to be used with React. It provides a plethora of tools (mostly React-based components) that can help build out the user interface of your application in a visually appealing way. Each MUI component, when rendered correctly, applies a nice-looking element to the DOM that can have different colors, sizes, display options and variations, and interactable properties without too much effort. These components sometimes interact with one another, but we will get to that later on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How To Use MUI&lt;/strong&gt;&lt;br&gt;
MUI can be installed as a package.json dependency by looking for &lt;code&gt;@mui&lt;/code&gt; and then importing parts of MUI to your jsx files. You will also need to install &lt;code&gt;@emotion/react&lt;/code&gt; and &lt;code&gt;@emotion/styled&lt;/code&gt; as dependencies as MUI requires both to function. Since MUI is so big, it is best to only include only the necessary MUI file paths in both your package.json and your imports. MUI imports often act as pre-made React components, which can be included as HTML tags inside of a React component's returned HTML or wherever else there is HTML. MUI components can utilize attributes that are unique to MUI components. Examples of MUI attributes include &lt;code&gt;variant&lt;/code&gt; (which usually allows you to select from a few pre-made visual variations of a component), &lt;code&gt;sx&lt;/code&gt; (which is an alternative to the style attribute that can optionally utilize methods from &lt;code&gt;@mui/system&lt;/code&gt; to achieve its styling) and &lt;code&gt;valueLabelDisplay&lt;/code&gt; (which is an attribute that I have only seen used with the Slider component, and it determines how a value linked to said component should be displayed). Talking about these components can only do so much, so let's actually show you what MUI can do.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Up for MUI Examples&lt;/strong&gt;&lt;br&gt;
Assuming that React is installed on your project and a React component is rendering to a browser page, we can install the dependencies needed for MUI. These examples will be utilizing &lt;a href="https://playcode.io/mui" rel="noopener noreferrer"&gt;Playcode's online code sandbox&lt;/a&gt; to achieve their results.&lt;/p&gt;

&lt;p&gt;Include the needed dependencies in the &lt;u&gt;package.json&lt;/u&gt; file before running &lt;code&gt;npm install&lt;/code&gt; (you must have these 6 dependencies at minimum to use both MUI materials and MUI icon materials). You should already have &lt;code&gt;react&lt;/code&gt; and &lt;code&gt;react-dom&lt;/code&gt; installed, but they are included here none-the-less:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "dependencies": {
    "@mui/icons-material": "6.4.7",
    "@mui/material": "6.4.7",
    "react": "19.0.0",
    "react-dom": "19.0.0",
    "@emotion/react": "^11.5.0",
    "@emotion/styled": "^11.13.0"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Go to the file where your React app's main (App) component is made and exported (this file is usually called &lt;u&gt;App.jsx&lt;/u&gt; and contains the React component that is applied to the application's index.html file first). At the top of the file, create the imports from &lt;code&gt;@mui/material&lt;/code&gt;, and &lt;code&gt;@mui/icons-material&lt;/code&gt; seen at the top of the code block provided below. While the code sandbox I am using for this example already had a React component utilizing MUI, I replaced the given MUI imports and components with my own (among other small modifications):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {
  Box,
  Stack,
  Slider,
  Typography
} from '@mui/material';
import {
  Circle,
  AcUnit,
  Money
} from '@mui/icons-material';
import React from 'react';

const App = () =&amp;gt; {
  return (
    &amp;lt;div&amp;gt;
     Hello
    &amp;lt;/div&amp;gt;
  )
}

export { App };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This results in a rendered view that looks like this:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92f4cukfvr7kyoqbnvd0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92f4cukfvr7kyoqbnvd0.png" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may have noticed that there are 4 dependencies related to MUI: &lt;code&gt;@emotion/react&lt;/code&gt;, &lt;code&gt;@emotion/styled&lt;/code&gt;, &lt;code&gt;@mui/material&lt;/code&gt;, and &lt;code&gt;@mui/icons-material&lt;/code&gt;. The two dependencies beginning with "@emotion" are utilized by MUI to help with applying styles to components. The two dependencies beginning with "@mui" are there to provide two of the many categories for tools that MUI offers (these examples will utilize MUI's main components and icon components). Now we can get to work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MUI Examples&lt;/strong&gt;&lt;br&gt;
First, let's start off by making a stack. Stacks are good for aligning components along an axis (vertically or horizontally):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const App = () =&amp;gt; {
  return (
    &amp;lt;div&amp;gt;
     &amp;lt;Stack direction='row' spacing={5}&amp;gt;
      &amp;lt;div&amp;gt;1&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;2&amp;lt;/div&amp;gt;
     &amp;lt;/Stack&amp;gt;
     &amp;lt;Stack direction='column' spacing={1}&amp;gt;
      &amp;lt;div&amp;gt;3&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;4&amp;lt;/div&amp;gt;
     &amp;lt;/Stack&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first stack aligns it's two inner divs across the x-axis (row) with a spacing of 5 in between the two divs. The second stack aligns it's two inner divs across the y-axis (column) with a spacing of 1 in between the two divs:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftpl5myu1d679nm5rgbja.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftpl5myu1d679nm5rgbja.png" alt="Image description" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, let's replace those divs with boxes (and get rid of the second stack). Boxes are essentially divs, but they have access to MUI attributes and the MUI theme (if said theme is set up):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const App = () =&amp;gt; {
  return (
    &amp;lt;div&amp;gt;
     &amp;lt;Stack direction='row' spacing={5}&amp;gt;
      &amp;lt;Box sx={{ bgcolor: '#4efe34', height: '20vh' }} fontSize='50px'&amp;gt;BIG LEFT&amp;lt;/Box&amp;gt;
      &amp;lt;Box sx={{ fontSize: '10px' }}&amp;gt;little right&amp;lt;/Box&amp;gt;
     &amp;lt;/Stack&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both boxes utilize the &lt;code&gt;sx&lt;/code&gt; attribute to apply styling, though the same effect can sometimes be obtained through a regular attribute (as seen with &lt;code&gt;fontSize='50px'&lt;/code&gt; in the first box and &lt;code&gt;fontSize: '10px'&lt;/code&gt; in the second box's &lt;code&gt;sx&lt;/code&gt; attribute). The first box uses sx to make its background green and to make its height '20vh'. The second box uses sx to give any text inside of the box a small (10px) size:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F37r6asare1xop069dedm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F37r6asare1xop069dedm.png" alt="Image description" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, let's make the boxes look a bit more appealing and then put a typography tag in each one. Typography tags are essentially MUI's weird version of span tags, as they are mainly used to apply preset "typographic scale" sizes to their inner text (in addition to other text altering options):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const App = () =&amp;gt; {
  return (
    &amp;lt;div&amp;gt;
     &amp;lt;Stack direction='row' spacing={5}&amp;gt;
      &amp;lt;Box sx={{ bgcolor: 'gray', height: '20vh' }}&amp;gt;
       &amp;lt;Typography variant='h4' textAlign='center'&amp;gt;
        Random Slider
       &amp;lt;/Typography&amp;gt;
      &amp;lt;/Box&amp;gt;
      &amp;lt;Box sx={{ bgcolor: 'gray', height: '20vh' }}&amp;gt;
       &amp;lt;Typography variant='h4' textAlign='center'&amp;gt;
        Random Icons
       &amp;lt;/Typography&amp;gt;
      &amp;lt;/Box&amp;gt;
     &amp;lt;/Stack&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both typography tags align their text with the middle of their respective typography component and make their text have the "heading 4" size:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg2gg8uuarwklida20sf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg2gg8uuarwklida20sf3.png" alt="Image description" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we'll apply a slider to the first box. Sliders are a type of input that takes in a number from a range of numbers represented by a slider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const App = () =&amp;gt; {

  const logger = (val) =&amp;gt; {
   console.log(val);
  }

  return (
    &amp;lt;div&amp;gt;
     &amp;lt;Stack direction='row' spacing={5}&amp;gt;
      &amp;lt;Box sx={{ bgcolor: 'gray', height: '20vh' }}&amp;gt;
       &amp;lt;Typography variant='h4' textAlign='center'&amp;gt;
        Random Slider
       &amp;lt;/Typography&amp;gt;
       &amp;lt;Slider valueLabelDisplay="auto" step={1} marks min={0} max={15} onChange={e =&amp;gt; {logger(e.target.value)}} /&amp;gt;
      &amp;lt;/Box&amp;gt;
      &amp;lt;Box sx={{ bgcolor: 'gray', height: '20vh' }}&amp;gt;
       &amp;lt;Typography variant='h4' textAlign='center'&amp;gt;
        Random Icons
       &amp;lt;/Typography&amp;gt;
      &amp;lt;/Box&amp;gt;
     &amp;lt;/Stack&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The slider tag has a label (with the slider's current number value) that appears when the little circle is hovered over (&lt;code&gt;valueLabelDisplay&lt;/code&gt;), can increment and decrement the slider value by 1 (&lt;code&gt;step&lt;/code&gt;), displays each step as a mark on the slider (&lt;code&gt;marks&lt;/code&gt;), starts at 0 (&lt;code&gt;min&lt;/code&gt;), ends at 15 (&lt;code&gt;max&lt;/code&gt;), and calls a logger function whenever the slider's value is changed (&lt;code&gt;onChange&lt;/code&gt;):&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fryspusuwjl55ojuqsh2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fryspusuwjl55ojuqsh2x.png" alt="Image description" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, we can use the icons gotten from &lt;code&gt;@mui/icons-material&lt;/code&gt;. Each icon is a little image that can be used in components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const App = () =&amp;gt; {

  const logger = (val) =&amp;gt; {
   console.log(val);
  }

  return (
    &amp;lt;div&amp;gt;
     &amp;lt;Stack direction='row' spacing={5}&amp;gt;
      &amp;lt;Box sx={{ bgcolor: 'gray', height: '20vh' }}&amp;gt;
       &amp;lt;Typography variant='h4' textAlign='center'&amp;gt;
        Random Slider
       &amp;lt;/Typography&amp;gt;
       &amp;lt;Slider valueLabelDisplay="auto" step={1} marks min={0} max={15} onChange={e =&amp;gt; {logger(e.target.value)}} /&amp;gt;
      &amp;lt;/Box&amp;gt;
      &amp;lt;Box sx={{ bgcolor: 'gray', height: '20vh' }}&amp;gt;
       &amp;lt;Typography variant='h4' textAlign='center'&amp;gt;
        Random Icons
       &amp;lt;/Typography&amp;gt;
       &amp;lt;AcUnit /&amp;gt;
       &amp;lt;Circle fontSize='inherit' /&amp;gt;
       &amp;lt;Money fontSize='medium' /&amp;gt;
      &amp;lt;/Box&amp;gt;
     &amp;lt;/Stack&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each icon component can use their name as a tag name to be rendered to the DOM. The first icon is rendered regularly. The second icon is rendered with the icon size being derived from the closest parent element that affects font size (which strangely enough creates quite a small icon when the icon element has no user-made parent elements to pull a font size from). The third icon is rendered with the icon size set to "medium":&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbii8cx90zueqoassk78.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frbii8cx90zueqoassk78.png" alt="Image description" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That was just a few of the MUI components, but this should have painted you a pretty good picture of what MUI can do. If more time was spent on this example, it could easily turn into something presentable. Now let's conclude this blog.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
MUI is a useful tool created in 2014 for creating applications with pre-built, professional-looking React components. React involves the creation and use of components to build out the client side of an application. Each MUI component utilizes new attributes that can modify their appearance and function in different ways. Once you are past the learning curve, it's relatively easy to insert MUI components within your React components to make your HTML more visually appealing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/what-is-react/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/what-is-react/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://mui.com/material-ui/getting-started/" rel="noopener noreferrer"&gt;https://mui.com/material-ui/getting-started/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.geeksforgeeks.org/what-is-material-ui/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/what-is-material-ui/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://reactgo.com/material-ui-react-tutorial/" rel="noopener noreferrer"&gt;https://reactgo.com/material-ui-react-tutorial/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://react.dev/" rel="noopener noreferrer"&gt;https://react.dev/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://legacy.reactjs.org/docs/getting-started.html" rel="noopener noreferrer"&gt;https://legacy.reactjs.org/docs/getting-started.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://v4.mui.com/company/about/" rel="noopener noreferrer"&gt;https://v4.mui.com/company/about/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://playcode.io/mui" rel="noopener noreferrer"&gt;https://playcode.io/mui&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://emotion.sh/docs/introduction" rel="noopener noreferrer"&gt;https://emotion.sh/docs/introduction&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Basic Explanation of Minecraft (Java Edition)</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 03 Feb 2025 03:46:53 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/basic-explanation-of-minecraft-java-edition-4jh2</link>
      <guid>https://dev.to/peytonstrahan/basic-explanation-of-minecraft-java-edition-4jh2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction (What is Minecraft?)&lt;/strong&gt;&lt;br&gt;
Minecraft is a best-selling video game of the survival and sandbox genres. Minecraft's first version, Classic Edition, was a Java-based game released on May 17 of 2009 by none other than the Swedish game designer Markus Persson (who also goes by the name Notch). The game is known for its blocky art style, calming and nostalgia-inducing music track by C418 and other music artists, massive community, and freedom to do basically anything you want within the game. Let's dive into what made this game what it is today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minecraft's Java-based Engine&lt;/strong&gt;&lt;br&gt;
Current-day Minecraft has two prominent versions still being worked on: Bedrock Edition and the original Java Edition. Ignoring the newer bedrock version (which uses C++), the Java version was, as the name suggests, an application written using the Java programming language. Java itself is an object-oriented, compiled, multi-threaded, and statically typed programming language. The game made use of something called the Lightweight Java Game Library (or LWJGL for short), which is a library for the Java language that helps with handling inputs, rendering graphics, and playing audio in Java applications. For a multitude of reasons, I can't exactly show you the Java code of Minecraft. What I can do is show you what Minecraft accomplishes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Randomly Generated World Made of Chunks and Blocks&lt;/strong&gt;&lt;br&gt;
Whenever you create a new world in Minecraft, the game creates a random 32-bit integer as a "seed". The same seed always results in the same world being generated. This seed is used with a Perlin noise algorithm to generate a natural-looking unique world made up of a 3D grid of 1x1x1 meter blocks. All terrain, structures, and anything else that counts as your environment are made up of blocks that are usually half the height of the player character (Steve by default). While most blocks are just a simple cube with a texture, some blocks (such as half-slabs, stairs, beds, cauldrons, etc.) have unique shapes and sizes. This world of blocks is divided up into 16x16 chunks that go from the top of the world to the bottom. When you travel around the world, these chunks load in and out of your computer's memory depending on if the chunk is in the player's render distance or not. Changes to blocks in a chunk and certain entities in a chunk are not undone whenever the chunk unloads, allowing structures made by players to persist. That's right, the player can break and place blocks and permanently change the game world around them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Player&lt;/strong&gt;&lt;br&gt;
By default, you play from the first-person perspective of a blue-shirted guy name Steve, but you can always change your character's name and skin to custom ones. The player can collect materials from mining blocks and slaying mobs, store items in chests or their inventory, craft new items from the materials they collected, build a home out of the blocks they mined, etc. Players have a health bar that shows their remaining hit points, a hunger bar that shows their current hunger, an armor bar that shows their current level of armor (armor levels reduce incoming damage), an oxygen bar that pops up when in water (you start to drown when it is emptied), an exp bar that stores exp levels to be used for enchanting items, and an item hot bar showing you a few items you can quickly switch to and use. While there are many other aspects that define the player character, doing so would be like listing off every miniscule thing a regular human being can do. Speaking of human, let's move on to something that's not about your average human.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mobs&lt;/strong&gt;&lt;br&gt;
If something is not a block, then it is an entity. Entities include all boats, minecarts, armor stands, all mobs, and players. Ignoring the two vehicles and the decorative armor stand that can store and display armor, a mob is essentially just an NPC. Mobs can be friendly, neutral, or hostile. Friendly mobs run away when attacked. Some examples include chickens that lay eggs and villagers that trade with the player. Neutral mobs attack back when attacked. Examples include wolfs that can be tamed and bees that have honey-producing hives. Hostile mobs try to attack you on sight. Examples include skeletons that shoot arrows at you and creepers that sneak up on you and try to explode next to you. All of these different mobs have shared behaviors (like wandering around) and unique behaviors (like spiders becoming neutral when in sunlight). While I don't know what Minecraft's Java code looks like, I can take a guess that there is probably a class that defines a general mob and subclasses that produce instances of specific mobs. Let me show you what I mean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simplified Example of Mob Java Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Mob {
  protected String entityType = "Mob";

  public int[] wander(int[] Coords) {
    // insert some complicated code here that takes in a mob's current coordinates and returns the new coordinates of the mob after it moved
  }
}

class Creeper extends Mob {
public int[] Coords = {76, 53, -30};
private void explode() {
  system.out.println("kaboom");
}
  public static void main(String[] args) {

    // Create an object from Creeper
    Creeper creeperInstance = new Creeper();

    // call wander
    creeperInstance.Coords = creeperInstance.wander(Coords);

    system.out.println(creeperInstance.Coords);

    // call explode
    creeperInstance.explode();
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My skills with Java are subpar, so please bear with me here. I created a Mob class and a Creeper subclass that extends from the Mob class and, as a result, inherited the entityType of "Mob" and the wander method. When an object representing a single creeper is made using the Creeper subclass, the creeperInstance object has access to the wander method in the Mob class and can use this method to reassign the individual creeper's coordinates. The creeper object has access to the explode method from the Creeper class, with said method being unavailable to be used by other mobs. Now let's talk about mods.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Community and Mod Support&lt;/strong&gt;&lt;br&gt;
Minecraft's community is passionate and has been around for many years, helping to keep the game alive with things like YouTube videos, fan art, custom game servers, animations, and mods. Mods are modifications done to a video game that adds new content and/or mechanics to the game, removes a certain quirk in the game that you may not like, or otherwise alters some aspect that makes up the video game. For Minecraft Java Edition, mod loaders like Forge and Fabric are available. A mod loader is any type of program that helps to simplify the process of organizing and installing mod files into a game. Instead of manually placing or replacing files in a game and potentially messing something up, mod loaders do that for you in a safe way (it doesn't just permanently replace the base-game's files) and usually allows the user to enable and disable mods at will. Some mod loaders even tell you when a conflict between mods is detected, with a mod conflict being when one mod's code conflicts with the code of another and causes the conflicted mods to no longer work properly. Anyways, this blog needs to end sooner or later so...&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
After being written in Java and released in 2009, Notch's game went on to be one of the most beloved video games of all time. Minecraft is set within a world made of cubes that can be shaped to the player's will while they try to survive the night and eventually defeat the ender dragon. Minecraft utilized random world generation, the ability to alter terrain, randomly spawning NPCs, different dimensions, status effects, and many other game mechanics to build up an amazing game.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.ign.com/articles/the-history-and-evolution-of-minecraft" rel="noopener noreferrer"&gt;https://www.ign.com/articles/the-history-and-evolution-of-minecraft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.gameslearningsociety.org/what-game-engine-does-minecraft-use/" rel="noopener noreferrer"&gt;https://www.gameslearningsociety.org/what-game-engine-does-minecraft-use/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://minecraft.fandom.com/wiki/Minecraft" rel="noopener noreferrer"&gt;https://minecraft.fandom.com/wiki/Minecraft&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Markus_Persson" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/Markus_Persson&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://minecraft.wiki/" rel="noopener noreferrer"&gt;https://minecraft.wiki/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.minecraft.net/en-us/article/java-or-bedrock-edition" rel="noopener noreferrer"&gt;https://www.minecraft.net/en-us/article/java-or-bedrock-edition&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.sportskeeda.com/minecraft/which-minecraft-best-you" rel="noopener noreferrer"&gt;https://www.sportskeeda.com/minecraft/which-minecraft-best-you&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://everything-minecraft.fandom.com/wiki/The_history_of_mods" rel="noopener noreferrer"&gt;https://everything-minecraft.fandom.com/wiki/The_history_of_mods&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.baeldung.com/java-lwjgl" rel="noopener noreferrer"&gt;https://www.baeldung.com/java-lwjgl&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://clickthis.blog/forge-vs-fabric-vs-quilt-which-minecraft-mod-loader-is-best-for-you/" rel="noopener noreferrer"&gt;https://clickthis.blog/forge-vs-fabric-vs-quilt-which-minecraft-mod-loader-is-best-for-you/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.w3schools.com/java/java_inheritance.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/java/java_inheritance.asp&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Link to Title Image Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://4kwallpapers.com/images/wallpapers/minecraft-pc-games-3440x1440-11212.jpg" rel="noopener noreferrer"&gt;https://4kwallpapers.com/images/wallpapers/minecraft-pc-games-3440x1440-11212.jpg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Quick Explanation of HTTP (Requests)</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 27 Jan 2025 01:17:07 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/quick-explanation-of-http-requests-21o</link>
      <guid>https://dev.to/peytonstrahan/quick-explanation-of-http-requests-21o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction to HTTP and Its Origin&lt;/strong&gt;&lt;br&gt;
The creation of the first version of Hypertext Transfer Protocol (HTTP) occurred in 1991, with the credit going to Tim Berners-Lee and the developers who were part of his team at CERN. HTTP is a standardized way to transfer data (in the form of hypermedia documents) between a client side and a server side. Each side can be either a program or a machine that is connected to the Internet's World Wide Web. When utilizing HTTP, a client would send an HTTP request towards an URL on the Internet. The server located at this URL would then receive the request, process it, and then (depending on the type of request) perform an action on the server's data before sending back a HTTP response to the origin of the HTTP request on the Internet. This response would find its way back to the client and resolve as either a successful request that yields data of some kind, or an unsuccessful request that brings back an error message. To help visualize this process, I've made an analogy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxj3xmshcj8oyrghs4vc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxj3xmshcj8oyrghs4vc.png" alt="Image description" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analogy&lt;/strong&gt;&lt;br&gt;
You can visualize the client as a king and the server as a scribe who maintains a collection of information (which takes the form of all of the legal and historical records of the kingdom in this case). If the king wants a record stating what his kingdom's wealth was two years ago, he will have to write out a request (with the scribe's home address on it of course) to obtain said info from the scribe and send it out into the world on a carrier bird. This is similar to how a client sends a HTTP GET request to the URL of the server, with the request having headers describing the specific instance or type of data that the client is asking for. The scribe receives the bird's message, sees that it is a request from the king to get the kingdom's financial record from two years ago, and then proceeds to write out a copy of the desired financial record and sends it with the carrier bird back to the king. If the king's specifications were not correctly written or if the record doesn't exist, then the scribe would just send back a message saying what went wrong with the request. This is like how a client's http requests are received and processed by a server before the server either sends back a response containing the desired info for successful requests or sends back an error message (usually a generalized error code) that explains what went wrong with the request. Let's look at what at some HTTP request methods, shall we?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP Request Methods&lt;/strong&gt;&lt;br&gt;
There are many different types of HTTP requests that do different things. As a rule of thumb, every request method receives a response that will be a result of either the request succeeding or the request failing. Here are some examples of request methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GET: Sends a request to receive certain data from a server and receives a response with a body containing the desired data from a server if successful.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;POST: Sends a request to add the data from the request body to the data in a server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PUT: Sends a request to take the data from the request body and to use it to replace some specified resource in a server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DELETE: Sends a request to delete some specified data in a server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OPTIONS: Sends a request to a server to respond back with some data that specifies what options are available for communicating with the server via HTTP request methods.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HEAD: Sends a request to receive certain data from a server and receives a response with headers relating to the desired data from a server. HEAD is like GET, but the response it receives lacks a body and the data that the request asked for.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CONNECT: Sends a request to create a "tunnel" that connects the client to the server and allows for continuous and automatic data transferring (which can be dangerous).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TRACE: Sends a request to a server that passes the request on to another server, which does the same thing until the desired server is found and sends a response back to the client. This response has a body stating what the last server in the chain received.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PATCH: Sends a request to take the data from the request body and to use it to modify some specified resource in a server. PATCH is similar to PUT, but PATCH only replaces part of the resource and not the entire resource.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ok, so we have some HTTP request methods. How would we go about using them?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP Requests General Structure (With Example)&lt;/strong&gt;&lt;br&gt;
HTTP requests (at least for requests utilizing HTTP version 1.1) usually consist of a start line, a collection of headers, an empty line, and a request body. I'll show you an example of a HTTP POST request and break it down from there.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example of a HTTP POST Request:&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST /storage/people HTTP/1.1
Host: www.somewebsite.com
Accept: */*
Content-Type: application/json
Content-Length: 88

{
"name": "Bob",
"location": "Ohio",
"favoriteColor": "light-orange"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Start line (1st line of example): Contains the HTTP request method, the URL you wish to send the request to, and the version of HTTP you wish to use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the example, we have a POST method, followed by an URL of /storage/people (the website name is excluded from the URL for HTTP/1.1 requests), followed by an HTTP version of HTTP/1.1.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Headers (lines 2-5 of example): Resembles the key/value pairs in a JavaScript object. Each header is a word followed by a colon and some metadata that the header points to. The first few headers are request headers that provide some parameters for how the http request should be processed by the server. Any headers after the request headers (in this example) are the representation headers, and they allow the data in the request body to be translated into a different form (usually the data's original form) before being processed by the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first two headers in the example are request headers. The Host header is required in HTTP/1.1, and it holds the website name, which is what would usually go in front of the URL in the start line. The Accept header tells the server what type of data it should try to send back in the response's body. Since the Accept header points to "&lt;em&gt;/&lt;/em&gt;", the header is telling the server that the data in the response's body can be of any media type. The last two headers are representation headers. Content-Type tells the server what type of data is contained within the request's body, with this example request having JSON in its body. Content-Length tells the server how many bytes of data the request's body takes up. While this example's body takes up 76 bytes, the example's Content-length is 88 to give padding to help make sure that all of the request body is received by the server.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Empty line (line 6 of example): Is just and empty line signaling the end of the headers and the beginning of the body.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is self-explanatory in the example.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Body (lines 7-11 of example): This part of the request is only needed for POST, PUT, and Patch requests. The body contains any data you wish to send to the server, with said data being used by the server to either modify an existing data collection with or to create new data collection within the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the example, the body consists of a JSON object with key/value pairs. This JSON object would be expected to be added to the other people objects in &lt;code&gt;www.somewebsite.com/storage/people&lt;/code&gt;, with the server sending back a success code of 201.&lt;/p&gt;

&lt;p&gt;HTTP responses usually have the same type of general structure as HTTP requests. Among other small differences, the main difference with HTTP response structure is that has a status line instead of a start line. This status line consists of an HTTP version, a three-digit status code that indicates either a successful request or a failed request, and a bit of text that describe the meaning of the status code. Since this section has gone on for way too long, let's conclude this blog.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
HTTP was first created by Tim Berners-Lee and his CERN team in 1991. HTTP standardized the way in which hypermedia is transmitted across the Internet. HTTP allows a client to send a response across the Internet to a server in order to GET data from, POST data to, or do something else with some data in the server. The server can process this request and send a response towards the client across the Internet that contains either a message indicating that the request was accepted (and perhaps also some data from the server's storage), or a message with an error code that indicates how the request failed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/whatis/whatis_http.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/whatis/whatis_http.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.britannica.com/technology/HTTP" rel="noopener noreferrer"&gt;https://www.britannica.com/technology/HTTP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/what-is-http/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/what-is-http/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/http-headers-host/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/http-headers-host/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Image Link Used for the Cover Image&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.psdgraphics.com/file/web-binary.jpg" rel="noopener noreferrer"&gt;https://www.psdgraphics.com/file/web-binary.jpg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;King and Scribe Image Link&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://thumbs.dreamstime.com/b/stone-relief-king-barrakib-his-scribe-near-east-museum-berlin-germany-march-vorderasiatisches-has-one-world-s-65078276.jpg" rel="noopener noreferrer"&gt;https://thumbs.dreamstime.com/b/stone-relief-king-barrakib-his-scribe-near-east-museum-berlin-germany-march-vorderasiatisches-has-one-world-s-65078276.jpg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What Is Java?</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 20 Jan 2025 03:10:05 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/what-is-java-46jb</link>
      <guid>https://dev.to/peytonstrahan/what-is-java-46jb</guid>
      <description>&lt;p&gt;&lt;strong&gt;Intro&lt;/strong&gt;&lt;br&gt;
The creation of the Java programming language was conducted between the years of 1991 and 1995 by a group of developers called the Green Team, with most of the credit going to a man named James Gosling. The Java programming language has many characteristics that differentiate it from other languages, such as being compiled, statically typed, and object-oriented. Java's purpose is mainly for creating applications that can work on almost any platform. Now let's go into more depth on what makes Java tick.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characteristics of Java&lt;/strong&gt;&lt;br&gt;
Here is a list of some of the mechanics and quirks that help define what Java is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Compiled (and compatible): Instead of being interpreted by a program that reads through the code on the fly and translates it into instructions for the computer to run, Java instead requires its code to be compiled into byte code before it can be ran by a Java Virtual Machine (which is available with most popular operating systems). Every time you create or edit Java code; you have to compile said code before the code can be ran.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Statically typed: Variables must have their data type declared before they can store information/data. Said info must be of the same datatype assigned to the variable in order to be stored in the variable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Object-oriented: Java is a programming language that emphasizes the use of objects, classes, object attributes, object methods, and an object's relations to other objects to represent an entity (a person, tool, vehicle, ball, animal, house, or really just anything else you can think of) and the entity's interactions with the "world" around it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multithreading: Applications and programs made using Java can execute more than one action at a time, allowing for the applications/programs to perform tasks faster.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While there are many other aspects of Java that affect how it works, these major characteristics of Java should have hopefully given you a basic idea of how Java operates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating an Example with Java Syntax&lt;/strong&gt;&lt;br&gt;
When making a Java program, it must have a class name, and the class name must match the name of the file that the program is contained within. For example, a program with a class name of "Greeting" would need to be in a file named "Greeting.java":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Greeting {}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While the "class" keyword in this instance gives the program/class a class name, the "public" key simply makes this class accessible by any other class. In order for the class to do anything, the "main" method must be used inside of the class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Greeting {
  public static void main(String[] args) {}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The "static" keyword allows a method or attribute to be accessed and used without needing to make an object from whatever class said method or attribute is stored within. The "void" keyword is put in front of methods that are expected to not return any values. If method was expected to return something, then you would have just replaced "void" with the data type that you were expecting to be returned. The "main" method works by executing whatever code is within its code block. The parameters for the "main" method contains "String[] args", which to make a long story short, passes in an array of whatever values (which are expected to be strings) were listed after the name of the program in the terminal's command line when the command to run the program was given. Now let's give the "main" method some code to execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class Greeting {
  public static void main(String[] args) {
    System.out.println("Hello " + args[0]);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"System.out.println" is the "println" method stored in the "out" data member, which belongs to the "System" class that's built into Java. This method prints to the console a concatenation of the string "Hello " and whatever the first string that was passed to the main method was.&lt;/p&gt;

&lt;p&gt;After compiling this program by running "javac Greeting.java" in the terminal and then starting the program with the command "java Greeting stranger", you would see the message "Hello stranger" being printed. It may be overly simple and only has one class and two method references, but it should give you the beginnings of an understanding of how programs are made using Java.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
After its creation in 1995, James Gosling's Java went on to be quite a popular programming language to create applications for basically any platform with. Java focuses on the creation and use of classes and objects to perform tasks and completes said tasks through the use of multi-threading. Java is compiled instead of interpreted and, as a result, requires all variables to explicitly declare their data type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/difference-between-java-and-javascript/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/difference-between-java-and-javascript/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/java/java_intro.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/java/java_intro.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.javatpoint.com/history-of-java" rel="noopener noreferrer"&gt;https://www.javatpoint.com/history-of-java&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/comparison-of-java-with-other-programming-languages/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/comparison-of-java-with-other-programming-languages/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/difference-between-compiled-and-interpreted-language/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/difference-between-compiled-and-interpreted-language/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/what-is-a-typed-language/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/what-is-a-typed-language/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/introduction-of-object-oriented-programming/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/introduction-of-object-oriented-programming/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/introduction-to-java/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/introduction-to-java/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/multithreading-in-operating-system/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/multithreading-in-operating-system/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/java/java_ref_keywords.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/java/java_ref_keywords.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://stackoverflow.com/questions/890966/what-is-the-string-args-parameter-in-the-main-method" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/890966/what-is-the-string-args-parameter-in-the-main-method&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://stackoverflow.com/questions/3753869/how-do-i-concatenate-two-strings-in-java" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/3753869/how-do-i-concatenate-two-strings-in-java&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/byte-code-in-java/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/byte-code-in-java/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Link to Image Used for Cover Image&lt;/strong&gt;&lt;br&gt;
-&lt;a href="https://i.pinimg.com/originals/93/42/1e/93421e8db0859ecb02642b9b5f59aa5d.png" rel="noopener noreferrer"&gt;https://i.pinimg.com/originals/93/42/1e/93421e8db0859ecb02642b9b5f59aa5d.png&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>JavaScript Variable Keywords (Var, Let, and Const)</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 18 Nov 2024 01:03:25 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/javascript-variable-keywords-var-let-and-const-204b</link>
      <guid>https://dev.to/peytonstrahan/javascript-variable-keywords-var-let-and-const-204b</guid>
      <description>&lt;p&gt;&lt;strong&gt;Intro:&lt;/strong&gt;&lt;br&gt;
In JavaScript, a variable is something that acts as a container that can hold on to data (or a reference to data in the case of complex data types) that can be accessed by calling the name of the variable that said data is stored within. Variables are created from one of three different keywords: “var”, “let”, and “const”. Placing one of these keywords in front of a word will declare a variable using the word as the name of the variable. This variable name can then be assigned with “=” to any value you wish for the variable to hold or reference. Each keyword has a few specific properties that set them apart from one another. We will start with the “var” keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Var:&lt;/strong&gt;&lt;br&gt;
The “var” keyword is the original variable keyword and has been present since 1995. If a “var” variable is declared within a function, then it is scoped to the inside of said function and the variable cannot be accessed outside of that function. “Var” variables are also hoisted, meaning that when the program runs, the “var” variables’ declarations (but not their value assignments) are invisibly brought to the top of the program and read before everything else. This allows var variables to be used and accessed before the point that they are declared at, though trying to do so will give you a value of undefined, which is the default value given to variables upon declaration. This type of variable can also be redeclared, meaning that having two “var” variables declared with the same name in the same scope will not result in any errors, with lines that declare and assign that variable at the same time simply being treated as just another value assignment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are some code examples of what the “var” keyword can do:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Var variable declared, assigned, reassigned, and accessed/used by console log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var someVariable;
someVariable = "hi";
console.log(someVariable); // logs: "hi"
someVariable = "greetings";
console.log(someVariable); // logs: "greetings"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Var variables can be function scoped:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function someFunction(){
  var someVariable;
  someVariable = "hi";
  console.log(someVariable); // logs: "hi"
};

someFunction();
console.log(someVariable); // logs: "ReferenceError: someVariable is not defined"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Var variables are hoisted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(someVariable); // logs: undefined
var someVariable = 21;
console.log(someVariable); // logs: 21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Var variables are redeclarable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var someVariable = 21;
console.log(someVariable); // logs: 21
var someVariable = 37;
console.log(someVariable); // logs: 37
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now LET us continue on to the “let” keyword (very humorous, I know).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let:&lt;/strong&gt;&lt;br&gt;
The “let” keyword was added to JavaScript in 2015 as a part of ES6. This keyword is not too different from the “var” keyword, but it does have a few key differences. The “let” keyword can be scoped to code blocks ( the “{}” that usually appears after things like “for” loops and conditional statements) in addition to functions. “Let” variables are not hoisted, and thus cannot be accessed or used before they are declared. “Let” variables cannot be redeclared, meaning two “let” variable declarations with the same name and scope create an error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are some code examples for the “let” keyword this time:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let variable declared, assigned, reassigned, and accessed/used by console log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let someVariable;
someVariable = "hi";
console.log(someVariable); // logs: "hi"
someVariable = "greetings";
console.log(someVariable); // logs: "greetings"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let variables can be function scoped or block scoped:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function someFunction(){
  let someVariable;
  someVariable = "hi";
  console.log(someVariable); // logs: "hi"
  if (1 === 1) {
    let someOtherVariable = "hello"
    console.log(someVariable); // logs: "hi"
    console.log(someOtherVariable); // logs: "hello"
  }
  console.log(someOtherVariable); // logs: "ReferenceError: someOtherVariable is not defined"
};

someFunction();
console.log(someVariable); // (doesn't run) would have logged: "ReferenceError: someVariable is not defined"
console.log(someOtherVariable); // (doesn't run) would have logged: "ReferenceError: someOtherVariable is not defined"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let variables are not hoisted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(someVariable); // logs: "ReferenceError: Cannot access 'someVariable' before initialization"
let someVariable = 21;
console.log(someVariable); // (doesn't run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let variables are not redeclarable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let someVariable = 21; // logs: "SyntaxError: Identifier 'someVariable' has already been declared"
console.log(someVariable); // (doesn't run)
let someVariable = 37;
console.log(someVariable); // (doesn't run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final variable keyword to discuss is the “const” keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Const:&lt;/strong&gt;&lt;br&gt;
The “const” keyword was also a part of ES6 when it was added to JavaScript in 2015. This keyword has many of the properties of the “let” keyword (can be function-scoped or block-scoped, are not hoisted, and cannot be redeclared), but it has one big difference. “Const” variables must be assigned on the same line that they are declared on (initialization), and they cannot be reassigned. Trying to reassign a “const” variable will result in an error. Keep in mind that mutations done to complex data type attached to a variable are not reassignments, and thus do not create an error when done to a “const” variable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here are some examples displaying the properties of the “const” variable:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Trying to create Const variable without initialization:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someVariable; // logs: "SyntaxError: Missing initializer in const declaration"
someVariable = "hi";
console.log(someVariable); // (doesn't run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Const variable initialized and accessed/used by console log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someVariable = "hi";
console.log(someVariable); // logs: "hi"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Trying to reassign Const variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someVariable = "hi";
someVariable = "hello"; // logs: "TypeError: Assignment to constant variable."
console.log(someVariable); // (doesn't run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Const variables can be function scoped or block scoped:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function someFunction(){
  const someVariable = "hi";
  console.log(someVariable); // logs: "hi"
  if (1 === 1) {
    const someOtherVariable = "hello"
    console.log(someVariable); // logs: "hi"
    console.log(someOtherVariable); // logs: "hello"
  }
  console.log(someOtherVariable); // logs: "ReferenceError: someOtherVariable is not defined"
};

someFunction();
console.log(someVariable); // (doesn't run) would have logged: "ReferenceError: someVariable is not defined"
console.log(someOtherVariable); // (doesn't run) would have logged: "ReferenceError: someOtherVariable is not defined"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Const variables are not hoisted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(someVariable); // logs: "ReferenceError: Cannot access 'someVariable' before initialization"
const someVariable = 21;
console.log(someVariable); // (doesn't run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Const variables are not redeclarable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someVariable = 21; // logs: "SyntaxError: Identifier 'someVariable' has already been declared"
console.log(someVariable); // (doesn't run)
const someVariable = 37;
console.log(someVariable); // (doesn't run)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Const variables still allow mutations of complex data types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const someVariable = ["My", "car", "is", "blue."];
console.log(someVariable); // logs: ["My", "car", "is", "blue."]
someVariable[3] = "red.";
console.log(someVariable); // logs: ["My", "car", "is", "red."]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to use each variable keyword:&lt;/strong&gt;&lt;br&gt;
Ok, so there are three different ways to declare a variable in order to store and reference data values. What makes one worth using over the other? “Var” variables are best used when working with older code, when you wish to make variables that aren’t affected by block scope or redeclaration errors, or when you simply want to hoist your variable declarations without writing them at the top of your code. Because block scope capability and redeclaration errors can easily be seen as good things that can better organize where variables should be usable in the code and can reveal accidental redeclaration of already-existing variables in the same scope respectively, “var” is usually ignored in favor of using “let” or “const”. The “let” keyword is used with any variable that is expected to be reassigned later on in the code. The “const” keyword is used with any variable that is expected to not be reassigned at all in the code, throwing an error in the case that it does somehow happen. Both the “let” and “const” keywords are used with variables that are desired to be limited to the confines of a code block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to sources used:&lt;/strong&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/js/js_variables.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/js/js_variables.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/javascript-variables/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript-variables/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/JS/js_let.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/JS/js_let.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/javascript-let/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript-let/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/JS/js_const.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/JS/js_const.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const" rel="noopener noreferrer"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/js/js_best_practices.asp" rel="noopener noreferrer"&gt;https://www.w3schools.com/js/js_best_practices.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.freecodecamp.org/news/how-to-use-variables-and-data-types-in-javascript/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/how-to-use-variables-and-data-types-in-javascript/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/" rel="noopener noreferrer"&gt;https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://stackoverflow.com/questions/76010295/when-should-you-use-var-let-or-const-in-javascript-code" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/76010295/when-should-you-use-var-let-or-const-in-javascript-code&lt;/a&gt; (the answer by nixanosize)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cover image's website link:&lt;/strong&gt; &lt;a href="https://knowyourmeme.com/photos/1542692-three-headed-dragon" rel="noopener noreferrer"&gt;https://knowyourmeme.com/photos/1542692-three-headed-dragon&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(All code examples were tested in jsbin)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Async/Await, What's That? (JavaScript)</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 15 Apr 2024 18:56:22 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/asyncawait-whats-that-javascript-325i</link>
      <guid>https://dev.to/peytonstrahan/asyncawait-whats-that-javascript-325i</guid>
      <description>&lt;p&gt;&lt;strong&gt;Async/Await, an Introduction and Origin Story&lt;/strong&gt;&lt;br&gt;
The keywords of “async” and “await” are used in conjunction with promises. A simple understanding of the two keywords can be summed up as “async” forces whatever is returned from a function to be a promise, while “await” forces a function to wait for a resolved promise before it can resume running. The history behind these two keywords is a little muddy, but these keywords most likely appeared first in a 2011 version of C# called “Async CTP”. There’s a bunch of moments in history where async/await was implemented into another programming language, but all you need to know is that async/await is in JavaScript (which is what we’ll be using in this blog) among many other languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Promises&lt;/strong&gt;&lt;br&gt;
Promises are objects that represent data that may not be known at the time of the promise’s creation, allowing the data to be returned from an asynchronous method immediately and then used later on when the data is finished resolving. Promises can be in one of three states: pending (meaning the promise is still waiting to be resolved), fulfilled (meaning that an action was committed successfully, and the desired data was retrieved), or rejected (meaning that an action failed to occur properly). Two important methods used with promises are the .then() method (which takes in a “fulfilled” callback function and an optional “error” callback) and the .catch() method (which takes in a single “error” callback function to call when the promise is rejected). The usual process of making a new promise and then using .then() and .catch() is what async/await aims to build upon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Async&lt;/strong&gt;&lt;br&gt;
The syntax for using “async” goes as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function functionName() {
  return "This is a string";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The function and use of “async” is very simple: place “async” in front of a normal function declaration, and whatever is returned from calling said function becomes a promise. That’s it. Things get a bit more complicated when we go on to the “await” keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Await&lt;/strong&gt;&lt;br&gt;
The “await” keyword can only be used within an “async” function declaration, and it is used to force the function to pause at the location of the “await” keyword until a resolved promise is provided, allowing the rest of the function to run. To be more exact, the “await” keyword is written before some reference to the promise that you are waiting to be resolved so it can be used in that part of the “async” function. This can be used to replace .then() because the “await” keyword actually returns the result of a resolved promise and allows you to do whatever you want with the data given from the promise, simulating the effects of .then(). For the “await” keyword to handle errors, some form of .catch() or .then() must be used. The upcoming examples should hopefully make this more clear.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;br&gt;
&lt;u&gt;An example using the “async” syntax and .then():&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function someFunction() {
  return "This is either a string or a promise";
}

console.log('promise: ' + someFunction());

someFunction().then(
  function(value) {console.log('string: ' + value);},
  function(error) {console.log(error);}
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;An example utilizing async/await to handle a promise that can only be resolved:&lt;/u&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 resolveIn3Sec() {
  return new Promise((resolve) =&amp;gt; {
    setTimeout(() =&amp;gt; {
      resolve('resolved');
    }, 3000);
  });
}

async function asyncCall() {
  console.log('waiting');
  const response = await resolveIn3Sec();
  console.log(response);
  // Expected output: "resolved"
}

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

&lt;/div&gt;



&lt;p&gt;&lt;u&gt;An example utilizing async/await to handle a promise that can be resolved or rejected:&lt;/u&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 resolveIn3Sec(code) {
  return new Promise((resolve, reject) =&amp;gt; {
    setTimeout(() =&amp;gt; {
      if(code !== 811){
        reject('rejected');
      } else {
        resolve('resolved');
      }
    }, 3000);
  });
}

async function asyncCall() {
  console.log('waiting');
  try {
    const response = await resolveIn3Sec(821);
    console.log(response);
  } catch (err) {
    console.log(err);
  }
  // Expected output: "rejected"
};

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ijzb80m77jz72rhp4aj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ijzb80m77jz72rhp4aj.png" alt="Image description" width="800" height="420"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Analogy&lt;/strong&gt;&lt;br&gt;
You can think of async/await as a sort of mail delivery service. The function with the “async” keyword is what is responsible for sending out promises, which is similar to when a shipping company sends out a delivery driver to pick up a package from a seller and then deliver it to the customer. The driver can either successfully pick up the package and send it to the customer (promise fulfilled) or encounter problems when trying to obtain the package from the seller or keeping track of the package when driving to the customer, resulting in the customer getting no package (promise rejected). The “await” keyword waits for a promise to resolve before continuing a function, which is similar to a carpenter waiting on a new hammer to arrive in the mail before he can continue his job.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbiu28lh7vtdtmlkpxmut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbiu28lh7vtdtmlkpxmut.png" alt="Image description" width="638" height="479"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The keywords of “async” and “await” are tools used to create promise-based code in a way that makes it resemble synchronous code. The keyword “async” causes a function to return a promise, while “await” causes an “async” function to wait for a promise to resolve before it continues to run. Async/await can serve as an arguably cleaner alternative to using only .then() and .catch() in certain situations, but both methods have their small ups and downs that can appeal to different people.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Resources Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/Js/js_async.asp"&gt;https://www.w3schools.com/Js/js_async.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://softwareengineering.stackexchange.com/questions/377464/who-did-async-await-first"&gt;https://softwareengineering.stackexchange.com/questions/377464/who-did-async-await-first&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/maxarshinov/a-brief-history-of-asyncawait-264j#:%7E:text=P.S.%20Haskell%20lead%20developer%20Simon%20Marlow%20created%20the,same%20year%20when%20async%2Fawait%20was%20introduced%20in%20C%23"&gt;https://dev.to/maxarshinov/a-brief-history-of-asyncawait-264j#:~:text=P.S.%20Haskell%20lead%20developer%20Simon%20Marlow%20created%20the,same%20year%20when%20async%2Fawait%20was%20introduced%20in%20C%23&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Async/await#:%7E:text=The%20feature%20is%20found%20in%20C%23%2C%20%3A%E2%80%8A10%20C%2B%2B%2C,Dart%2C%20Kotlin%2C%20Rust%2C%20Nim%2C%20JavaScript%2C%20Swift%20and%20Zig"&gt;https://en.wikipedia.org/wiki/Async/await#:~:text=The%20feature%20is%20found%20in%20C%23%2C%20%3A%E2%80%8A10%20C%2B%2B%2C,Dart%2C%20Kotlin%2C%20Rust%2C%20Nim%2C%20JavaScript%2C%20Swift%20and%20Zig&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/jsref/jsref_obj_promise.asp"&gt;https://www.w3schools.com/jsref/jsref_obj_promise.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://thenable.io/handling-async-errors"&gt;https://thenable.io/handling-async-errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://velog.io/@nosenal27/async-await-js"&gt;https://velog.io/@nosenal27/async-await-js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codezero844163712.wordpress.com/2021/01/27/what-is-async-await/"&gt;https://codezero844163712.wordpress.com/2021/01/27/what-is-async-await/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://logisticsbid.com/ph/dhl-courier-service-international-express-delivery/"&gt;https://logisticsbid.com/ph/dhl-courier-service-international-express-delivery/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What is SQL?</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 18 Mar 2024 19:21:25 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/what-is-sql-3el8</link>
      <guid>https://dev.to/peytonstrahan/what-is-sql-3el8</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is SQL and where did it come from?&lt;/strong&gt;&lt;br&gt;
SQL (which is short for “Structured Query Language”) is a querying language that can alter and retrieve data from the archives of a computer database. It was invented in the early 1970’s by two employees at IBM named Raymond Boyce and Donald Chamberlain, who had originally called the computer language “SEQUEL” (Structured English Query Language) before changing it to its current name. It was based off of a relational data model made by Edgar Codd.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Querying Language?&lt;/strong&gt;&lt;br&gt;
SQL is a querying language, which is a kind of programming language; but what is a programming language? A programming language is the language used to communicate and give orders to a computer. A querying language is a type of programming language that specializes in sending requests/queries to a database in order to retrieve, change, or give the database the data specified in said requests (CRUD).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Create using SQL&lt;/strong&gt;&lt;br&gt;
Creating a new table and records in a database using SQL is simple. A table is a representation of a collection of data. A record is an instance of data contained within a table. First up will be the syntax for creating a new table in SQL:&lt;/p&gt;

&lt;p&gt;CREATE TABLE TableName (&lt;br&gt;
    ColumnName datatype,&lt;br&gt;
    ColumnName datatype,&lt;br&gt;
    ColumnName datatype,&lt;br&gt;
    …&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;To create a table, you must type the statement “CREATE TABLE” followed by whatever name you want to call the table. You then put a pair of parentheses after the table’s name. Within these parentheses is where you put a list of all of the columns that you wish to add to the table. Each column consists of what name it has, what kind of data it can hold, and a space separating the two. There are lots of specific syntax used to define what type of data can be put into a column (a list of SQL data types can be found here); but some examples include “varchar”, “int”, and “date”. Here is the syntax for creating and inserting a new record:&lt;/p&gt;

&lt;p&gt;INSERT INTO TableName (ColumnNameX, ColumnNameY, ColumnNameZ, …)&lt;br&gt;
VALUES (valueX, valueY, valueZ, …);&lt;/p&gt;

&lt;p&gt;To insert new records into a table, you must type the statement “INSERT INTO” followed by the name of an existing table. Going to the next line of code now will result in all columns in a table being given a new value based on the order you put the values into the next line of code, but if you want to specify which columns to give values to, then you should put a pair of parentheses after the table’s name. Within these parentheses is where you put the names of all of the columns that you wish to add values to. Go to the next line and type “VALUES” followed by a pair of parentheses that will contain each value you wish to give to each column. When providing values, make sure that the order and quantity of values match the order and quantity of the columns that you previously provided so that each column gets a corresponding new value. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Retrieve using SQL&lt;/strong&gt;&lt;br&gt;
Retrieving data from a table can be done by using the “SELECT” statement:&lt;/p&gt;

&lt;p&gt;SELECT ColumnNameX, ColumnNameY, … FROM TableName;&lt;/p&gt;

&lt;p&gt;To retrieve columns of data from a table, type “SELECT” followed by a list of the columns that you want to retrieve. After this, type “FROM” followed by the name of the table that you wish to pull data from. This command will retrieve entire columns from a table, but different modifications can be made to get different results. Replacing the list of columns with the “*” symbol will result in all columns being returned. Replacing “SELECT” with “SELECT DISTINCT” will result in the retrieved columns leaving out any duplicate info. Adding another line of code stating “ORDER BY ColumnName” will result in the retrieved records (which are the rows made up from the retrieved columns) being sorted from the smallest value to the largest value seen in the specified column. The “WHERE” clause can be used to retrieve certain records (rows) from a table that fulfill an if-statement-like condition:&lt;/p&gt;

&lt;p&gt;SELECT * FROM TableName&lt;br&gt;
WHERE ColumnName=value;&lt;/p&gt;

&lt;p&gt;This statement will return the specified columns from a table, but if a record’s value that is checked by the “WHERE” clause is not equal to the expected value, then all of the values associated with that record will be left out from the result. There are also “AND”, “OR”, and “NO” operators that can be used to change how the “WHERE” clause works, but this section is long enough already. … :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Update using SQL&lt;/strong&gt;&lt;br&gt;
Changing a record’s values in a table can be done by utilizing the “UPDATE” statement:&lt;/p&gt;

&lt;p&gt;UPDATE TableName&lt;br&gt;
SET ColumnNameX = valueX, ColumnNameY = valueY, ...&lt;br&gt;
WHERE insert_condition_here;&lt;/p&gt;

&lt;p&gt;To update a record, Type “UPDATE” followed by the name of your table. On the second line, type “SET” followed by the name of the column that you want to change, an equals sign, and what you want to change the value in that column to. Additional changes/reassignments of column values can be added to this line by separating each change with a comma. On the third line, type “WHERE” followed by a condition that will result in the column changes being made for each record that passes the condition. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Delete using SQL&lt;/strong&gt;&lt;br&gt;
Deleting records in a table can be done by utilizing the “DELETE” statement:&lt;/p&gt;

&lt;p&gt;DELETE FROM TableName WHERE insert_condition_here;&lt;/p&gt;

&lt;p&gt;To delete a record, type “DELETE FROM” followed by the name of the table that you want to delete a record from. After the table name, type “WHERE” followed by a condition that results in true for the records that you want to delete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhayfvxzqkc6xexyaaojv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhayfvxzqkc6xexyaaojv.png" alt="Image description" width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Analogy&lt;/strong&gt;&lt;br&gt;
A perfect example of a real-life data table that is commonly used is a company’s paper timesheet for one of its employees. The company’s printer is like SQL’s “CREATE TABLE” statement because it can be used to create new tables with columns that can have rows of data applied to them. An eraserless pencil is like SQL’s “INSERT INTO” statement because it can be used to insert a new record into a table by writing down a specific value for each column within one row. A company’s timesheet turn-in basket is like SQL’s “SELECT” statement because it is used to retrieve the timesheet table, which will allow whoever fills out the paychecks to retrieve the records needed from the table to complete the paycheck information. A pencil with an eraser is like SQL’s “UPDATE” statement because it can be used to change a record’s data within the timesheet table when the person who filled it out realizes that they had made a mistake. An eraser is like SQL’s “DELETE” statement because it can be used to remove a record from a timesheet table when the person who filled it out realizes that they had in fact not gone to work on Wednesday. Now let’s move on to a more technical example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The following examples will utilize the five main pieces of SQL syntax used to create, retrieve, update, and delete tables and/or table data. Each example will consist of a code snippet and the resulting table. The table in each example will be built/based upon the same table.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 1, creating a table:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;CREATE TABLE CoolTanks (&lt;br&gt;
    TankName varchar(255),&lt;br&gt;
MainGunCaliber varchar(255),&lt;br&gt;
    YearMade varchar(255),&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;SELECT * FROM CoolTanks&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 1’s resulting table:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mkc4dvynmb4olsmt7by.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mkc4dvynmb4olsmt7by.png" alt="Image description" width="800" height="94"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 2, inserting a new record:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;INSERT INTO CoolTanks&lt;br&gt;
VALUES&lt;br&gt;
(‘M1A2 Abrams”, ‘120 mm’, ‘1985’),&lt;br&gt;
(‘Leopard 1’, ‘105 mm’, ‘1965’);&lt;/p&gt;

&lt;p&gt;SELECT * FROM CoolTanks&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 2’s resulting table:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnva30079y1r2ya5huh7y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnva30079y1r2ya5huh7y.png" alt="Image description" width="800" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 3, retrieving a specific record:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;SELECT * FROM CoolTanks&lt;br&gt;
WHERE TankName=’M1A2 Abrams’;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 3’s resulting table:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ezjqu9ihe34isr9o8l5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ezjqu9ihe34isr9o8l5.png" alt="Image description" width="800" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 4, updating a record to fix an error:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;UPDATE CoolTanks&lt;br&gt;
SET YearMade =’1986’&lt;br&gt;
WHERE TankName=’M1A2 Abrams’;&lt;/p&gt;

&lt;p&gt;SELECT * FROM CoolTanks&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 4’s resulting table:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpi9skx74g6jylqme1s6g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpi9skx74g6jylqme1s6g.png" alt="Image description" width="800" height="145"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 5, deleting a record from a table:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;DELETE FROM CoolTanks WHERE TankName=’Leopard 1’;&lt;/p&gt;

&lt;p&gt;SELECT * FROM CoolTanks&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Example 5’s resulting table:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe94j7v77n2rjtg6tvysc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe94j7v77n2rjtg6tvysc.png" alt="Image description" width="800" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjym2c2zn62td49wri95.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqjym2c2zn62td49wri95.png" alt="Image description" width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
SQL is a querying language used to interact with archives in a computer. SQL is capable of creating, retrieving, updating, and deleting tables and their records within a database. SQL’s syntax makes it easy to create code/commands that carry out these functions. Despite being made in the 1970’s, SQL is still one of the top ways to manage and alter data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sites Used&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/what-is-sql/"&gt;https://www.geeksforgeeks.org/what-is-sql/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/sql/default.asp"&gt;https://www.w3schools.com/sql/default.asp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.springboard.com/blog/data-analytics/what-is-sql/"&gt;https://www.springboard.com/blog/data-analytics/what-is-sql/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.infoworld.com/article/3685673/what-is-a-compiler-how-source-code-becomes-machine-code.html"&gt;https://www.infoworld.com/article/3685673/what-is-a-compiler-how-source-code-becomes-machine-code.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.techopedia.com/definition/3948/query-language"&gt;https://www.techopedia.com/definition/3948/query-language&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://informationq.com/computer-language-and-its-types/"&gt;https://informationq.com/computer-language-and-its-types/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/61237229/is-sql-really-a-programming-language-after-all"&gt;https://stackoverflow.com/questions/61237229/is-sql-really-a-programming-language-after-all&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.howtogeek.com/838826/what-is-a-programming-language/"&gt;https://www.howtogeek.com/838826/what-is-a-programming-language/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/advice/3/what-benefits-drawbacks-sql-compared-other-query-941le"&gt;https://www.linkedin.com/advice/3/what-benefits-drawbacks-sql-compared-other-query-941le&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.britannica.com/technology/query-language"&gt;https://www.britannica.com/technology/query-language&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sumologic.com/glossary/crud/"&gt;https://www.sumologic.com/glossary/crud/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/History_of_the_M1_Abrams"&gt;https://en.wikipedia.org/wiki/History_of_the_M1_Abrams&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Leopard_1"&gt;https://en.wikipedia.org/wiki/Leopard_1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sql.ac/blog/is-sql-still-relevant-in-2023-heres-what-the-numbers-say"&gt;https://sql.ac/blog/is-sql-still-relevant-in-2023-heres-what-the-numbers-say&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.educba.com/what-is-sql/"&gt;https://www.educba.com/what-is-sql/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.101planners.com/timesheet-template/"&gt;https://www.101planners.com/timesheet-template/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://moralis.io/structured-query-language-sql-explained-what-is-sql/"&gt;https://moralis.io/structured-query-language-sql-explained-what-is-sql/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What is MVC?</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Mon, 29 Jan 2024 19:46:03 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/what-is-mvc-3hjh</link>
      <guid>https://dev.to/peytonstrahan/what-is-mvc-3hjh</guid>
      <description>&lt;p&gt;&lt;strong&gt;Quick Introduction to MVC and Its Origin&lt;/strong&gt;&lt;br&gt;
MVC (aka, Model View Controller) is simply a way of organizing the code (of an application) into three different sections based on the purpose of each piece of code. Trygve Mikkjel Heyerdahl Reenskaug invented MVC in 1979 as a way to help coders divide their applications into smaller and more manageable pieces. Something worth mentioning is that there are a few JavaScript libraries and frameworks that can help coders to implement proper MVC-style organization into their code. A few of these JavaScript libraries/frameworks include AngularJS, Backbone,js, React, Vue.js, EmberJS, and KnockoutJS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model&lt;/strong&gt;&lt;br&gt;
The purpose of the model is to contain information (data) and components that can be used by other parts of the code. The model is usually used to update the data presented to the user in the view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;br&gt;
The view contains code that interacts with the user in some way, which includes code that determines how data is presented to the user and/or code that defines how an user can interact with certain parts of an application. The view changes the looks and style of an application as-well-as how a user can interacts with the application to give the view data to be submitted to the controller.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Controller&lt;/strong&gt;&lt;br&gt;
The controller is what connects the model and the view together. The controller can take in and process inputs from the user (obtained from the view) in order to commit some sort of action based on said inputs. After obtaining and/or processing data from the view, the controller can either manipulate the view directly or manipulate the model, which will in turn update the view as a result of a change in the model’s data. If you are still unsure of what the model, view, and controller are and how they work; then the upcoming analogy should help you with that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mimkrdxm8odc6vqct9f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mimkrdxm8odc6vqct9f.png" alt="Image description" width="512" height="340"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Analogy&lt;/strong&gt;&lt;br&gt;
Imagine you are an owner of a store. The products that you have in storage and are trying to sell are like the data in the model. The products are presented to customers by placing them on shelfs, putting them on displays, or even by having pictures of them present in an online store. The way you present these products to your customers and allow said customers to put them in their cart (either literally or digitally) is similar to how the view presents data to a user and determines how users can interact with the data or application to send an input to the controller. Speaking of the controller, the cashier and online checkout are similar to the controller. Both the cashier and online checkout process customers’ requests to purchase items, modify the recorded profit amount, and modify the list of total products to account for the sale. This is similar to how a controller receives an input from an interaction between an user and the view, resulting in the controller making modifications to the model based on the data the controller was given. If the cashier has extra time, they may even straighten out or reorganize the products on the displays to make them look nicer. This is similar to how the controller is sometimes capable of directly altering the view. Now let’s move on to a more technical example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(Here is a link to the JS Bin containing the example. The code itself was too large to neatly put into this blog.)&lt;br&gt;
&lt;a href="https://jsbin.com/bocehef/edit?html,js,output"&gt;https://jsbin.com/bocehef/edit?html,js,output&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, I tried my best to simulate a mvc format using HTML and vanilla JavaScript (to some success). I created a “machine” that allows you to add and remove your desired items to and from a list. The HTML acts as the View and houses everything that the user can interact with and can see; including the “decorations” on the “machine”, the “Add” button, and the box you can input the name of your item into. The JavaScript file contains a Model section that holds the items in the list. The Model would usually update the View automatically upon being updated itself, but since this is JavaScript and I’m a novice coder, I had to insert functions into the Model that would update the View whenever it needed to be updated. The JavaScript file also contained a Controller section that received inputs from the View’s interactions with the user, processed the inputs into a more usable form, and sent the inputs to the Model to update the View in return. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
MVC helps programmers to organize their code by splitting the code up into code that interacts with the user and affects the looks of the application (view), code that holds all of the application’s data (model), and the code that holds the application’s functions and links the rest of the code together (controller). While there are a few frameworks that base themselves around MVC-style organization of code (like AngularJS), MVC is just a method of organizing the different parts of an application’s code based upon their function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;br&gt;
-&lt;a href="https://www.codecademy.com/article/mvc"&gt;https://www.codecademy.com/article/mvc&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/MVC"&gt;https://developer.mozilla.org/en-US/docs/Glossary/MVC&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/angular/angular_intro.asp"&gt;https://www.w3schools.com/angular/angular_intro.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.freecodecamp.org/news/mvc-architecture-what-is-a-model-view-controller-framework/#:%7E:text=History%20of%20the%20Model%E2%80%93View%E2%80%93Controller%20Pattern%20The%20MVC%20pattern,first%20used%20in%20the%20programming%20language%20Small%20Talk"&gt;https://www.freecodecamp.org/news/mvc-architecture-what-is-a-model-view-controller-framework/#:~:text=History%20of%20the%20Model%E2%80%93View%E2%80%93Controller%20Pattern%20The%20MVC%20pattern,first%20used%20in%20the%20programming%20language%20Small%20Talk&lt;/a&gt;.&lt;br&gt;
-&lt;a href="https://squashapps.com/blog/javascript-mvc-frameworks/"&gt;https://squashapps.com/blog/javascript-mvc-frameworks/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>An Explanation of Bind, Call, and Apply (Javascript)</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Fri, 08 Dec 2023 19:27:45 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/an-explanation-of-bind-call-and-apply-javascript-1oad</link>
      <guid>https://dev.to/peytonstrahan/an-explanation-of-bind-call-and-apply-javascript-1oad</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
The "bind", "call", and "apply" keywords are all functions that alter the context of the "this" keyword of a function in order to allow said function to reference new data using the "this" keyword. The "this" keyword is a reference that simply points to the object that contains that instance of the "this" keyword within its scope. These three keywords allow you to change what the "this" keyword points to within a function, which can be useful for inserting data from different objects for use in functions not located within said objects. Now let's focus more on the "bind" keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bind&lt;/strong&gt;&lt;br&gt;
The "bind" function can create a duplicate of an existing function and force all instances of "this" within the new function to point to a new object. The syntax of a "bind" function goes as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const nameOfNewFunction = nameOfFunction.bind(objToReference, optionalArguments...);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A new function name is created and assigned to the copy of another function created from the "bind" function. The name of the function that you want to copy is followed by a calling of ".bind". The first argument of ".bind" is the name of the object that you wish to redirect the "this" keyword towards. Any arguments put after the first one are pieces of data that are put into and used within the new copy of the function whenever it is called, making these arguments act like regular arguments in a regular function call. These new arguments are permanently inserted into the function based on what parameter the argument was inserted into, making it no longer possible to change the values associated with that parameter. An example of the "bind" function in use goes as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var mathBox1 = {
  num1: 5,
  add(num2, num3) {
    let answer = this.num1 + num2 + num3;
    console.log(answer);
  }
};

var mathBox2 = {
  num1: 9,
  add(num2, num3) {
    let answer = this.num1 + num2 + num3;
    console.log(answer);
  }
};

mathBox1.add(3, 4);// result: 12 (reference)

var equation1 = mathBox1.add;
equation1(3, 4); // result:NaN...'this' is not manually set to anything, 'this' refers to the global object here. (reference)

var equation2 = mathBox1.add.bind(mathBox2);
equation2(3, 4); // result: 16

var equation3 = mathBox1.add.bind(mathBox2, 7);
equation3(4); // result: 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are two objects that each contain a number variable and an "add" function that uses "this" to add said number variable to two other numbers inputted into the function. The first function call (mathBox1.add(3, 4)) runs the "add" function in mathBox1 normally. The second function call tries to assign a variable to mathBox1.add without setting the "this" object, resulting in NaN. The third function call uses bind to make a copy of the function with the "this" pointing to the number 9 in mathBox2, resulting in the result changing from 12 to 16. The fourth function call uses bind to make a copy of the function with the "this" pointing to the number 9 in mathBox2 and forces num2 to be 7 in the function, resulting in the result changing from 16 to 20. Next up is the "call" function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Call&lt;/strong&gt;&lt;br&gt;
The "call" function is very similar to the "bind" function, but it calls your desired function instead of making a copy of the function that you wish to call. Instead of making an altered copy of the function that you can call later on, the "call" function simply calls that function with the object you wish to set "this" to and the arguments you wish to pass on into the function. Here is the "call" function syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nameOfFunction.call(objToReference, optionalArguments...);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The name of the function that you want to call is followed by a calling of ".call". The first argument of ".call" is the name of the object that you wish to temporarily redirect the function's "this" keyword towards for the function call. Any arguments put after the first one act like regular arguments in a regular function call and are passed into the function. An example of the "call" function in use goes as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var mathBox1 = {
  num1: 5,
  add(num2, num3) {
    let answer = this.num1 + num2 + num3;
    console.log(answer);
  }
};

var mathBox2 = {
  num1: 9,
  add(num2, num3) {
    let answer = this.num1 + num2 + num3;
    console.log(answer);
  }
};

mathBox1.add(3, 4);// result: 12 (reference)

mathBox1.add.call(mathBox2, 3, 4); // result: 16

mathBox1.add.call(mathBox2, 7, 4); // result: 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are two objects that each contain a number variable and an "add" function that uses "this" to add said number variable to two other numbers inputted into the function. The first function call (mathBox1.add(3, 4)) runs the "add" function in mathBox1 normally. The second function call uses .call to call the function with the "this" pointing to the number 9 in mathBox2, resulting in the result changing from 12 to 16. The third function call uses .call to call the function with the "this" pointing to the number 9 in mathBox2 and inputs 7 as num2 instead of 3, resulting in the result changing from 16 to 20. Next up is the "apply" function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply&lt;/strong&gt;&lt;br&gt;
The "apply" function is almost the same as the "call" function, but the "apply" function call now accepts an array of the arguments that you wish to insert into the function you wish to use. Here is some syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nameOfFunction.apply(objToReference, [optionalArgumentArray]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The name of the function that you want to call is followed by a calling of ".apply". The first argument of ".apply" is the name of the object that you wish to temporarily redirect the function's "this" keyword towards for the function call. Any arguments put after the first one has to be put into a single array, but otherwise act like regular arguments in a regular function call and are passed into the function. I wasn't kidding when I said that the "apply" function was almost the same as the "call" function. The only difference between this syntax and the syntax of the "call" function is that you put the arguments you wish to insert into the desired function inside of an array instead of just listing them out after the first argument like in the "call" function call. Now let's look at 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;var mathBox1 = {
  num1: 5,
  add(num2, num3) {
    let answer = this.num1 + num2 + num3;
    console.log(answer);
  }
};

var mathBox2 = {
  num1: 9,
  add(num2, num3) {
    let answer = this.num1 + num2 + num3;
    console.log(answer);
  }
};

mathBox1.add(3, 4);// result: 12 (reference)

mathBox1.add.apply(mathBox2, [3, 4]); // result: 16

mathBox1.add.apply(mathBox2, [7, 4]); // result: 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are two objects that each contain a number variable and an "add" function that uses "this" to add said number variable to two other numbers inputted into the function. The first function call (mathBox1.add(3, 4)) runs the "add" function in mathBox1 normally. The second function call uses .apply to call the function with the "this" pointing to the number 9 in mathBox2 and inserts the two inputs of 3 and 4 as an array, resulting in the result changing from 12 to 16. The third function call uses .apply to call the function with the "this" pointing to the number 9 in mathBox2 and inserts the two inputs of 7 and 4 as an array, resulting in the result changing from 16 to 20. Now on to the conclusion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7VY1SWYc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ka3o435a0sc3e1q4i00u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7VY1SWYc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ka3o435a0sc3e1q4i00u.jpg" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
The three methods/functions of ".bind", ".call", and ".apply" are all tools used to reassign the "this" value/object within a function to point at the "this" value in an object to retrieve data from said object for use in the function. These are useful when you want to use data from several different objects in the same function, which can help with reducing code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;br&gt;
-&lt;a href="https://www.geeksforgeeks.org/explain-call-apply-and-bind-methods-in-javascript/"&gt;https://www.geeksforgeeks.org/explain-call-apply-and-bind-methods-in-javascript/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.freecodecamp.org/news/understand-call-apply-and-bind-in-javascript-with-examples/"&gt;https://www.freecodecamp.org/news/understand-call-apply-and-bind-in-javascript-with-examples/&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/js/js_this.asp"&gt;https://www.w3schools.com/js/js_this.asp&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://stackoverflow.com/questions/2236747/what-is-the-use-of-the-javascript-bind-method"&gt;https://stackoverflow.com/questions/2236747/what-is-the-use-of-the-javascript-bind-method&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Constructors and Prototypes (JavaScript)</title>
      <dc:creator>Peyton Strahan</dc:creator>
      <pubDate>Fri, 17 Nov 2023 18:27:10 +0000</pubDate>
      <link>https://dev.to/peytonstrahan/constructors-and-prototypes-javascript-57oj</link>
      <guid>https://dev.to/peytonstrahan/constructors-and-prototypes-javascript-57oj</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction (Constructors)&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;A constructor or constructor function is essentially just a factory function that utilizes the keyword of "new". These types of functions (constructor functions and factory functions) are functions that utilize the same set of code as a sort of "blueprint" to create multiple objects of similar structure. This makes constructors and factory functions very useful tools for pumping out large amounts of similar objects; which can be in the form of items in a video game, profiles that account for each animal in a zoo, etc. Something that can help constructors to do their job is the prototype.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prototypes&lt;/strong&gt;&lt;br&gt;
While constructor functions create objects by assigning pre-determined keys to either pre-determined values or values given in a function call, repeatedly giving the same exact key-value pair to different objects can take up more space than necessary. This is where prototypes come in. The prototype is an object that while not usually seen, all objects and constructor functions have as a property by default. By altering the prototype property of the constructor function (NameOfConstructor.prototype), we can create a set of key-value pairs to assign to every object made using the constructor without having to make a unique copy of said key-value pairs for each object. The "prototype" keyword is somewhat useful on its own, but it becomes much more useful and flexible when combined with the "this" keyword.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Importance of the "this" Keyword&lt;/strong&gt;&lt;br&gt;
The "this" keyword is used to bind properties to a desired object, allowing you to define the properties of an object from outside of said object. This allows us to not only use the "new" keyword when creating a new instance of an object (which saves a little space by automatically creating an empty object and returning it at the end of your constructor function), but to create methods in the prototype of a constructor function that can carry out processes using referenced properties from whatever objects that were created from said constructor function. This saves space by making it so that the methods are only created once in the code and only take up the same amount of memory as a single instance of those group of methods. Now if all of those words made you confused, maybe a visual example can help you to understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visual Example&lt;/strong&gt;&lt;br&gt;
To better understand constructors and prototypes, let's take a look at one of the examples of constructor uses that I had stated a while back: "items in a video game". I am going to expand upon this example by referencing a game known as "Terraria". Terraria has many different items in it, with a few able to be seen below:&lt;/p&gt;

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

&lt;p&gt;The player in this image is hovering over an item called "Godly Megashark", with the "Godly" prefix coming from a modifier that increases the weapon's damage, critical strike chance, and damage. The Megashark is just one of many weapons in the game, with each one having their own base damage, damage type, critical strike chance, speed, and knockback. On top of this, some weapons can have additional statistics such as special effects (50% chance to not use ammo), a unique quote, a size stat, a mana cost stat, and a few other things depending on the weapon. While these additional statistics are more unique to each weapon, both these additional stats and the regular statistics previously mentioned can realistically be applied to all of the game's weapons through a constructor function. The upcoming code example will show you how.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code Example&lt;/strong&gt;&lt;br&gt;
While it is nowhere as refined, efficient, or feature-packed as the actual code used in Terraria, I was able to create a rudimentary constructor in JS Bin (Link: &lt;a href="https://jsbin.com/zacinut/edit?js,console"&gt;https://jsbin.com/zacinut/edit?js,console&lt;/a&gt;) that can make most weapons from the game (excluding the land-altering tools that can act as simple melee weapons):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Weapon(name, damType, dam, critChance, speed, velocity, knock, manaCost, weaponSizePercent, toolTip){
  this.bName = name;
  this.damType = damType;
  this.bDam = dam;
  this.bCritChance = critChance;
  this.bSpeed = speed;
  this.bVelocity = velocity;
  this.bKnock = knock;
  this.bManaCost = manaCost;
  this.bWeaponSizePercent = weaponSizePercent;
  this.toolTip = toolTip;
  this.dName = name;
  this.dDam = dam;
  this.dCritChance = critChance;
  this.dSpeed = speed;
  this.dVelocity = velocity;
  this.dKnock = knock;
  this.dManaCost = manaCost;
  this.dWeaponSizePercent = weaponSizePercent;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, each weapon in Terraria has a lot of stats that it can have. These aren't even all of the stats that each weapon can have, for I didn't even implement the item price, item rarity, and other miscellaneous systems. I did end up giving each item a "type" property of "Weapon":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Weapon.prototype.itemType = "Weapon"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While this property ended up being unused in my code, Terraria has several tools with different purposes that could potentially benefit from having different item-type labels to organize them. Anyways, I also gave each weapon base stats and display stats. The base stats are referenced when using the modifier function to modify the display stats (aka, the actual stats of that specific instance of that weapon):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Weapon.prototype.modifier = function(prefix, dam, critChance, speed, velocity, knock, manaCost, weaponSizeChange){
  if(prefix){
    this.dName = prefix + " " + this.bName;
  }
  this.dDam = this.bDam + (this.bDam * dam);
  this.dCritChance = this.bCritChance + (100 * critChance);
  this.dSpeed = this.bSpeed + (this.bSpeed * speed);
  if(velocity){
    this.dVelocity = this.bVelocity + (this.bVelocity * velocity);
  }
  this.dKnock = this.bKnock + (this.bKnock * knock);
  if(manaCost){
    this.dManaCost = this.bManaCost + (this.bManaCost * manaCost);
  }
  if(weaponSizeChange){
   this.dWeaponSizePercent = this.bWeaponSizePercent + (this.bWeaponSizePercent * weaponSizeChange); 
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also implemented a display function that would display the weapon's name and visible stats in a neat manner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Weapon.prototype.display = function(){
  if(this.manaCost &amp;amp;&amp;amp; this.toolTip){
    console.log(`${this.dName}\n${this.dDam} ${this.damType} damage\n${this.dCritChance}% critical strike chance\n${this.dSpeed} speed\n${this.dKnock} knockback\nuses ${this.manaCost} mana\n${this.toolTip}`)
  } else if (this.toolTip){
    console.log(`${this.dName}\n${this.dDam} ${this.damType} damage\n${this.dCritChance}% critical strike chance\n${this.dSpeed} speed\n${this.dKnock} knockback\n${this.toolTip}`)
  } else if (this.manaCost){
    console.log(`${this.dName}\n${this.dDam} ${this.damType} damage\n${this.dCritChance}% critical strike chance\n${this.dSpeed} speed\n${this.dKnock} knockback\nuses ${this.manaCost} mana`)
  } else{
    console.log(`${this.dName}\n${this.dDam} ${this.damType} damage\n${this.dCritChance}% critical strike chance\n${this.dSpeed} speed\n${this.dKnock} knockback`)
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All of this I did through the use of a lot of code that uses up a lot of space. Now imagine if you had to replicate all of this code for every weapon you wanted to the game, it would be a flood of code! Using a constructor function and some prototypes allowed me to only need to write out that large amount of code once, allowing me to create new weapons without repeating large amounts of code as seen here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let megaShark = new Weapon("Megashark", "ranged", 25, 4, 7, 10, 1, null, null, "50% chance to save ammo \n'Minishark's older brother'");
megaShark.modifier("Godly", .15, .05, 0, 0, .15, null, null);
megaShark.display();

let terraBlade = new Weapon("Terra Blade", "melee", 85, 4, 18, 12, 6.5, null, 100, null)
terraBlade.modifier("Legendary", .15, .05, .1, 0, .15, null, .1);
terraBlade.display();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each weapon may have its own copy of its base stats and display stats, but each weapon shares the same exact methods offered by the prototype without needing to make copies of the methods in the memory. The ability to reduce large amounts of space-consuming repetition is one of the main advantages that constructors and prototypes offer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Long story short, constructor functions and prototypes are useful tools for creating large amounts of similar objects without creating a lot of repetition or using up a lot of space. Lists of similar items are commonplace in many areas of life and general programming, making these tools useful when creating programs that interact with these areas.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links to Sources Used&lt;/strong&gt;&lt;br&gt;
-&lt;a href="https://stackoverflow.com/questions/18298435/prototype-and-constructor-in-javascript-plain-english#:%7E:text=Constructor%20functions%20create%20objects%20and%20assign%20prototypes%20to,%28f.answer%29%3B%20%2F%2F%20%2242%22%20Foo%20is%20a%20constructor%20function"&gt;https://stackoverflow.com/questions/18298435/prototype-and-constructor-in-javascript-plain-english#:~:text=Constructor%20functions%20create%20objects%20and%20assign%20prototypes%20to,%28f.answer%29%3B%20%2F%2F%20%2242%22%20Foo%20is%20a%20constructor%20function&lt;/a&gt;.&lt;br&gt;
-&lt;a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes"&gt;https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object_prototypes&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://medium.com/@erinlejhimmy/factory-functions-vs-constructor-functions-in-javascript-8bef9510be3c"&gt;https://medium.com/@erinlejhimmy/factory-functions-vs-constructor-functions-in-javascript-8bef9510be3c&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://terraria.fandom.com/wiki/Terra_Blade"&gt;https://terraria.fandom.com/wiki/Terra_Blade&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://terraria.fandom.com/wiki/Megashark"&gt;https://terraria.fandom.com/wiki/Megashark&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://terraria.fandom.com/wiki/Modifiers"&gt;https://terraria.fandom.com/wiki/Modifiers&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.w3schools.com/JS/js_object_constructors.asp"&gt;https://www.w3schools.com/JS/js_object_constructors.asp&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
