<?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: Ciara Cloud</title>
    <description>The latest articles on DEV Community by Ciara Cloud (@ciaracloud).</description>
    <link>https://dev.to/ciaracloud</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%2F804746%2F9d290eb5-849a-41e5-93e3-f22a4a5ba617.jpg</url>
      <title>DEV Community: Ciara Cloud</title>
      <link>https://dev.to/ciaracloud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ciaracloud"/>
    <language>en</language>
    <item>
      <title>CORS and why I don't hate it so much anymore</title>
      <dc:creator>Ciara Cloud</dc:creator>
      <pubDate>Wed, 05 Oct 2022 04:04:30 +0000</pubDate>
      <link>https://dev.to/ciaracloud/cors-and-why-i-dont-hate-it-so-much-anymore-mk9</link>
      <guid>https://dev.to/ciaracloud/cors-and-why-i-dont-hate-it-so-much-anymore-mk9</guid>
      <description>&lt;p&gt;I am sure that every developer has come across at least one annoying CORS error before, and if you are new to coding and haven't experienced it yet, it's coming!&lt;/p&gt;

&lt;p&gt;When I think of CORS, I think of that annoying bug that flies around your face when you are trying to get work done on your computer (maybe that's just because that's been my situation for the past twenty minutes 🙄). The point is, it's easy to want to find a quick fix for it on google in order to move on to more exciting things.&lt;/p&gt;

&lt;p&gt;Something I have learned in the past few weeks is that having a deeper understanding of &lt;em&gt;why&lt;/em&gt; something breaks or isn't going your way is much better than trying to bypass it as quickly as possible, even if the process ends up taking longer. I say this for many reasons. The first reason being that when the same (or similar) problem happens in the future, I will have an indication of where to start solving it - if I don't already know the solution. Another reason is because of the learning process. When I was researching CORS, I was forced to dig deeper into multiple topics that were all connected to CORS in some way, which ultimately helped me understand the bigger picture better. &lt;/p&gt;

&lt;p&gt;Now enough about the benefits of the research process and on to what I learned about CORS:&lt;/p&gt;

&lt;p&gt;CORS stands for Cross Origin Resource Sharing, and to make the definition as obvious as possible, it is a browser-based mechanism that allows services to share resources across different origins. &lt;/p&gt;

&lt;p&gt;The server is able to specify which services are allowed to access its resources via HTTP headers. For example, a browser will send an HTTP request (with its origin) to a server with request headers and the server will reply with HTTP response headers (letting the client know if that origin is allowed). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of CORS response headers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Access-Control-Allow-Origin: Indicate which origins can access its resources (* can be used to allow all)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Access-Control-Allow-Methods: Specify which methods are allowed to be used (ex. GET, POST, PUT, OPTIONS)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Access-Control-Allow-Headers: Indicate which headers can be used&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the request headers follow all of the rules of the response headers, then CORS is enabled properly and the resources can be shared across the different domains. If you are getting a CORS error, take a look at the response headers being provided by the server and make sure that you are allowing the client origin. Sounds easy enough! Of course there's more to CORS than I mentioned here, like preflight requests, API gateways, etc, but I am happy that I can now understand why a console yells about CORS.&lt;/p&gt;

&lt;p&gt;Ultimately, the reason I don't hate CORS anymore is because I have a better understanding of it now. So I will keep that in mind the next time I encounter a bug (not referring to the one that was flying around my face earlier, that one had to go)!&lt;/p&gt;

&lt;p&gt;Resources:&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#:%7E:text=The%20same%2Dorigin%20policy%20is,documents%2C%20reducing%20possible%20attack%20vectors"&gt;https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#:~:text=The%20same%2Dorigin%20policy%20is,documents%2C%20reducing%20possible%20attack%20vectors&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Smoothie Time</title>
      <dc:creator>Ciara Cloud</dc:creator>
      <pubDate>Fri, 15 Apr 2022 14:24:01 +0000</pubDate>
      <link>https://dev.to/ciaracloud/smoothie-time-2o0j</link>
      <guid>https://dev.to/ciaracloud/smoothie-time-2o0j</guid>
      <description>&lt;p&gt;Food cravings can be powerful. For instance, my craving for a refreshing and delicious smoothie inspired the concept behind my web application, "Too Smooth". I thought it would be great to have an app where I could search popular smoothie recipes and save my favorites to reference when I wanted to make a smoothie. &lt;/p&gt;

&lt;p&gt;There was definitely more that went into the idea, but due to lack of time, I will have to keep the rest as future goals. I would love to add a "build your own" page where the user can combine multiple ingredients together and add that smoothie to their favorites list.&lt;/p&gt;

&lt;p&gt;I also had the idea to make a smoothie planner where the user can plan out the smoothies that they will make for the week and a grocery list can be generated based on the ingredients that they needed for all of their smoothies. &lt;/p&gt;

&lt;p&gt;The color palette that I chose for the app was inspired by colors of refreshing fruits and vegetables.&lt;/p&gt;

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

&lt;p&gt;Overall, I am happy with my app! I would love to keep building on it in order to make it even more useful for the user. If you would like to see my code for the app, check out my Github repo &lt;a href="https://github.com/ciaracloud/smoothieApp"&gt;here&lt;/a&gt; !&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My Egg-citing Weather App</title>
      <dc:creator>Ciara Cloud</dc:creator>
      <pubDate>Mon, 28 Feb 2022 02:26:17 +0000</pubDate>
      <link>https://dev.to/ciaracloud/my-egg-citing-weather-app-2ipe</link>
      <guid>https://dev.to/ciaracloud/my-egg-citing-weather-app-2ipe</guid>
      <description>&lt;p&gt;When my instructor at DigitalCrafts told my classmates and I that we had to build a weather app using an API, I knew that I had to &lt;strong&gt;hatch a plan&lt;/strong&gt; to make the app functional and entertaining! There was no &lt;strong&gt;yolkin' around&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;The process started with me searching the internet for images that fit &lt;strong&gt;eggs-actly&lt;/strong&gt; what I wanted. I would use a sunny side up egg to represent sunny weather, fried egg for cloudy weather, runny yolk for rainy weather, broken egg for thunderstorm, scrambled egg whites for snowy weather, and regular scrambled eggs for all other weather conditions. &lt;/p&gt;

&lt;p&gt;Once I found the images, I tested the &lt;a href="https://openweathermap.org/api" rel="noopener noreferrer"&gt;Open Weather Map&lt;/a&gt; API. I found the &lt;a href="https://www.postman.com/downloads/" rel="noopener noreferrer"&gt;Postman application&lt;/a&gt; &lt;strong&gt;eggs-tremely&lt;/strong&gt; helpful during this step because it allowed me to test my links by mimicking the front end.  &lt;/p&gt;

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

&lt;p&gt;After I tested the link with my API key, I was able add the url to my code. I wrapped the url in an asynchronous function, in order to fetch data from the url and convert the data to JSON. From there, I could access specific data from the JSON object(s) by using dot notation. Then, I added the data to elements that I created in the DOM (see code snippet below). I repeated this process until I had all information that I needed for the weather app displayed on the screen.&lt;/p&gt;

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

&lt;p&gt;Now that the app is completed, users can look up a city's weather by typing in the zipcode for the city. The daily weather will show up with the egg for the current weather, as well as the weather forecast for the next 8 days and their corresponding egg images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check out the video walk through &lt;a href="https://youtu.be/3X9yLwFWr_w" rel="noopener noreferrer"&gt;here&lt;/a&gt;!&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;If I had more time, I would add CSS for the loading page in between the zipcode search and weather information, but overall I am pretty &lt;strong&gt;eggs-tatic&lt;/strong&gt; about how the weather app turned out! &lt;/p&gt;

&lt;p&gt;If you'd like to see my code, check out my &lt;a href="https://github.com/ciaracloud/weatherApp_SunnySideUp" rel="noopener noreferrer"&gt;github repo&lt;/a&gt; (keep in mind that you will have to add your own api key for Open Weather Map API in order to test it).&lt;/p&gt;

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

</description>
      <category>javascript</category>
      <category>dom</category>
      <category>api</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Cats and APIs</title>
      <dc:creator>Ciara Cloud</dc:creator>
      <pubDate>Fri, 25 Feb 2022 14:56:59 +0000</pubDate>
      <link>https://dev.to/ciaracloud/cats-and-apis-3h8o</link>
      <guid>https://dev.to/ciaracloud/cats-and-apis-3h8o</guid>
      <description>&lt;p&gt;I don't know why, but I feel so cool when I tell people that I used an API to build my project. Maybe because it sounds like AI, but also maybe because I get to explain to them that I am fetching data from another site in real time and using it on my website.&lt;/p&gt;

&lt;p&gt;Combining APIs with DOM manipulation is a game changer! Your website goes from being a pretty page, to something that can actually be used in the real world. Not knocking pretty pages at all by the way, I love them all the same. &lt;/p&gt;

&lt;p&gt;This week at DigitalCrafts, we had four days to create our first front end API project. For my project I wanted to incorporate something with color and branding, so I decided to make a brand kit generator. &lt;/p&gt;

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

&lt;p&gt;The user can type in their main color, product, brand name, and choose their favorite font combination from the ones provided and a brand kit will be generated for them. The brand kit includes a color palette, their brand name in the color and font they chose, and images of the product they want to offer. Did I mention that as you're doing this a cat named "Brandy" will be cheering you along?! Which brings me to the name of the website, Brandy. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Check out my video walk through &lt;a href="https://youtu.be/mTRFO0Wi55k"&gt;here&lt;/a&gt;!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;Take a look at the images below to see how the process looks:&lt;/p&gt;

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

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

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

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

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

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

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

&lt;p&gt;If you'd like to see my code, check out my &lt;a href="https://github.com/ciaracloud/apiProject_Brandy"&gt;github repo&lt;/a&gt; (keep in mind that you will have to add your own api key for Unsplash Images API in order to test out the website).&lt;/p&gt;

&lt;p&gt;P.S. I drew Brandy the cat on the digital illustration app Procreate. She was inspired by my own cat, Kiwi. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>api</category>
      <category>htmlcss</category>
    </item>
    <item>
      <title>Easy Way to Make a Div in HTML (using VS Code)</title>
      <dc:creator>Ciara Cloud</dc:creator>
      <pubDate>Sun, 13 Feb 2022 21:07:49 +0000</pubDate>
      <link>https://dev.to/ciaracloud/easy-way-to-make-a-div-in-html-using-vs-code-3574</link>
      <guid>https://dev.to/ciaracloud/easy-way-to-make-a-div-in-html-using-vs-code-3574</guid>
      <description>&lt;p&gt;Although I am new to web development, I can 100% appreciate a shortcut for writing code.&lt;/p&gt;

&lt;p&gt;While I was watching a tutorial video, I saw someone use this shortcut for making a div with a class name or id name in VS code. It blew my mind and I just had to share!&lt;/p&gt;

&lt;p&gt;Instead of writing out the complete div tag plus the class or id name, write the class name with a period in front of it, or the id name with a pound symbol in front of it. Press enter and you're done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To make a div with a class name:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;press enter&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;To make a div with an id name:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;press enter&lt;/em&gt; &lt;/p&gt;

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

&lt;p&gt;P.S. I hate to admit it, but I feel 10x cooler when I make my divs this way!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>div</category>
    </item>
    <item>
      <title>I Made a Working Calculator Using Javascript</title>
      <dc:creator>Ciara Cloud</dc:creator>
      <pubDate>Thu, 10 Feb 2022 03:08:47 +0000</pubDate>
      <link>https://dev.to/ciaracloud/i-made-a-working-calculator-in-javascript-1pil</link>
      <guid>https://dev.to/ciaracloud/i-made-a-working-calculator-in-javascript-1pil</guid>
      <description>&lt;p&gt;Today my classmates and I (at DigitalCrafts) were given the assignment to create a basic calculator in Javascript. Sounds simple enough, right? Well, my classmates and I were joking around about how we had just been introduced to what a DOM (Document Object Model) was earlier in the day and now we were creating a whole mini project in Javascript, manipulating the DOM based on what the user clicks. &lt;/p&gt;

&lt;p&gt;With that being said, learning Javascript is challenging and exciting! With the few days of exposure that I've had to it, I can see how powerful and complex it is. &lt;/p&gt;

&lt;p&gt;Something new that I learned today was the addEventListener() method. Here's a snippet of my code to show how I used the method to make part of  the calculator work (I'll explain a little below):&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;clear&lt;/code&gt; is the variable that I created for my clear button in Javascript, which is an object.&lt;/li&gt;
&lt;li&gt;The event that I am waiting for is a &lt;code&gt;"click"&lt;/code&gt;. To be more specific, a &lt;code&gt;"click"&lt;/code&gt; on the object that the method is attached to  (in this case, the clear button).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;() =&amp;gt; {}&lt;/code&gt; is another to write a function. It is the same as writing &lt;code&gt;function () {}&lt;/code&gt;. Functions that do not have names are called &lt;em&gt;anonymous&lt;/em&gt; &lt;em&gt;functions&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Once the event happens (the &lt;code&gt;"click"&lt;/code&gt; on &lt;code&gt;clear&lt;/code&gt;), the anonymous function (&lt;code&gt;() =&amp;gt; {}&lt;/code&gt;) will run. In this case, I wanted to make the equation array and input value empty.&lt;/li&gt;
&lt;li&gt;The anonymous function in the method only runs once the event happens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I first saw this method, it seemed daunting, but the more I broke it down, the easier it was for me to understand. &lt;/p&gt;

&lt;p&gt;Overall, I am satisfied with the simple calculator that I built today, but I would love to revisit it when I have the time to make it more complex!&lt;/p&gt;

&lt;p&gt;If you'd like to see the code for my calculator, &lt;a href="https://github.com/ciaracloud/calculator"&gt;click here&lt;/a&gt; to visit my github repository!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>calculator</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I Made My First RPG in Python</title>
      <dc:creator>Ciara Cloud</dc:creator>
      <pubDate>Fri, 28 Jan 2022 03:06:20 +0000</pubDate>
      <link>https://dev.to/ciaracloud/i-made-my-first-rpg-in-python-2dhj</link>
      <guid>https://dev.to/ciaracloud/i-made-my-first-rpg-in-python-2dhj</guid>
      <description>&lt;p&gt;To start, I don't know if playing an RPG in the terminal on your computer will fulfill the full RPG experience. However, building this game in python allowed me to dissect the process of how more complex RPG games are constructed. &lt;/p&gt;

&lt;p&gt;The overall goal of my game is to win a battle against the enemy, Vivian, so that the user can make it to their interior design interview and get the job! The user can choose which character they would like to be during their battle against Vivian. I created a class to make each character and give them their own attributes, such as their own name, starting health level, strength level, and attack options. All characters and their attributes are displayed by invoking a function that I created to print the character menu. From there, the user can input which character they would like to be and the game will continue with that character. Once the user is in the battle with Vivian, they can choose which attack option(s) to use against her and the game will continue until a winner is chosen. I made this possible by creating a game loop that allows the user to attack Vivian and for Vivian to attack back until either one of their health levels reach 0 or below.&lt;/p&gt;

&lt;p&gt;If the user does not put in the correct information, the game will not continue until they have provided a choice from the options that are given. This is where I had the most trouble in my code. At one point I thought I was finished creating my game until I did a few test runs and noticed that when I put in the wrong information, the game would not continue as I wanted it to. Having to go back into my code and fix these errors ultimately led to me finding a more efficient way to write my code. For example, initially, I had a lot of repeated code, so when an error would happen, I would have to go back to each repeated line of code and change it in order to find the issue. I quickly realized how inefficient this was and found a way to eliminate the repeated lines by taking some code out of loops and making some information dynamic. Ultimately, I removed approximately 200 lines of code from my file and the game worked even better than it did originally (after I fixed the errors, of course)!&lt;/p&gt;

&lt;p&gt;Overall, I had a lot of fun making this RPG! My favorite part of creating the game was that the whole process felt as if I was playing a coding game in Python. I would be coding along and then &lt;strong&gt;BAM&lt;/strong&gt;, I was battling a while loop or else statement that wasn't executing properly. Each time I solved an issue in my code and got it working the way I wanted it to, I would do a mini dance to celebrate my victory (for my cat's eyes only)! &lt;/p&gt;

&lt;p&gt;If given more time, I would expand this game into an interior design game that gives the users a certain amount of money and the ability to shop/design for different characters. But, that's for another day!&lt;/p&gt;

&lt;p&gt;If you'd like to test my game, here's the link to my &lt;a href="https://github.com/ciaracloud/python1"&gt;github repository&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>rpg</category>
      <category>python</category>
      <category>digitalcrafts</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
