<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Michael Jiang on Medium]]></title>
        <description><![CDATA[Stories by Michael Jiang on Medium]]></description>
        <link>https://medium.com/@jiams?source=rss-79824a208384------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*0LQ7vV8RA-15LjHh8gmHoA.jpeg</url>
            <title>Stories by Michael Jiang on Medium</title>
            <link>https://medium.com/@jiams?source=rss-79824a208384------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 22:28:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jiams/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Finding Authenticity in the Age of Artificial]]></title>
            <link>https://jiams.medium.com/finding-authenticity-in-the-age-of-artificial-db1065f03ac1?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/db1065f03ac1</guid>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[ai-generated-content]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[deepfake-technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Sun, 04 May 2025 18:54:23 GMT</pubDate>
            <atom:updated>2025-05-09T15:44:32.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Spot AI-Generated Content</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*azH8L6-Z2j-0g1-S50qa6g.png" /><figcaption>This is AI-generated. Can you find what gives it away?</figcaption></figure><p>If you don’t want to read the full article and only want the tips on identifying AI-generated content, click <a href="#4ff5">here</a> to skip down.</p><h4>The Current State of AI-Generated Content (AIGC)</h4><p>Have you ever read an article thinking the wording sounds strange? Seen a photo that looks just a little off? Or watched a video that doesn’t quite make sense? Chances are, what you just encountered was AI-generated content (AIGC).</p><p>A <a href="https://arxiv.org/abs/2412.18148">study from Cornell University</a> found that AI-generated text content increased ~35% on Medium and Quora from Jan ’22 through Oct ’24. <a href="https://photutorial.com/midjourney-statistics/">Midjourney</a>, <strong>one </strong>of the many growing AI image generating platforms, has an estimated 16.5 million users with approximately 600 million jobs completed. An <a href="https://www.europol.europa.eu/cms/sites/default/files/documents/Europol_Innovation_Lab_Facing_Reality_Law_Enforcement_And_The_Challenge_Of_Deepfakes.pdf">observatory report from the Europol Innovation Lab</a> suggested that 90% of online content may come from generative AI by 2026. <a href="https://www.statista.com/outlook/tmo/artificial-intelligence/generative-ai/worldwide">Statista</a> projects the global market size for generative AI to reach $66.89 billion USD in 2025 with an expected annual growth rate of 37%, resulting in a market volume of $442 billion by 2031.</p><p>All these statistics point to one reality: that AIGC will continue to be produced and consumed in our digital ecosystem at an exponential rate. Regardless of your preference towards AIGC, we have a responsibility to ourselves to learn how to differentiate between AI-generated and authentic content. Identifying AIGC is similar to learning how to spot spelling or grammar mistakes. Once you know the tells, spotting it becomes second nature. As artificial intelligence becomes more polished, the content it generates will become increasingly difficult to differentiate from authentic human-created content, but for now, we have an advantage — if we know what to look for.</p><p>Before we review all the tips, try playing this game of “<a href="https://real-or-fake-the-ai-game.onrender.com/">Real or AI</a>” and see what score you get. After you read this article, play it again and see if you do any better!</p><h4>Identifying AI-Generated Pictures and Videos</h4><p>When looking at pictures and videos, a mental checklist is helpful. I have compiled a list but by no means is this inclusive of all signs identifying AIGC.</p><p>The checklist has 4 categories: surface-level, anatomical/physical, background/environment, and contextual.</p><p><strong>Surface-level signs</strong> are differences that are the easiest to notice when looking at an image or video as a whole. Here are a few to look for:</p><ul><li><strong>“AI smoothness” </strong>— An unnatural plastic-like texture to skin or surfaces, usually lacking the imperfections found in real photographs</li><li><strong>Inconsistent lighting/shadows — </strong>Light sources or reflections don’t match where the light originates from, or shadows fall into physically impossible directions</li><li><strong>Uncanny symmetry</strong> — Facial features or architectural elements that are too perfectly symmetrical or appear unnaturally balanced (No human face is perfectly symmetrical!)</li><li><strong>Artifacts —</strong> Inexplicable blobs or patches of randomly colored pixels of varying sizes</li></ul><p><strong>Anatomical/physical signs </strong>examine details on the human body or on their clothes. Looking for some of these signs is an easy way to spot AIGC:</p><ul><li>T<strong>he “infamous” hands</strong> — extra fingers, fused fingers, extra-large fingers, or impossible hand positions (unless you’re a finger contortionist!)</li><li><strong>Dental oddities — </strong>teeth that blend together, way too many teeth, or incorrectly oriented teeth (or they just need to see a dentist.)</li><li><strong>Gravity-defying hair — </strong>hair that doesn’t follow the natural flow of wind or gravity</li><li><strong>Clothing/fabric problems</strong> — patterns don’t match the contours of the body, or the clothing merges with the skin</li></ul><p><strong>Background/environmental signs </strong>focus on elements<strong> </strong>that are not the focus of the image/video:</p><ul><li>“<strong>Almost-objects</strong>” — Background items that resemble real objects but become nonsensical when looked at closely</li><li><strong>Impossible architecture — </strong>buildings with structurally impossible features or doorways that lead to nowhere</li><li><strong>Gibberish text </strong>— signs or text that appear to be readable at a glance, but are actually gibberish when examined carefully</li><li><strong>Perspective problems </strong>— conflicting vanishing points or objects that don’t properly fade off into the distance</li></ul><p><strong>Contextual signs </strong>are ones that require some thinking outside of the box, or image/video, in this case:</p><ul><li><strong>Suspicious timing</strong> — breaking news visuals that would be extremely difficult or impossible to capture</li><li><strong>Perfect quality</strong> — images/videos that are staged too well or too polished for the context they’re being used in</li><li><strong>Unusual watermarks or signatures</strong> — inconsistent watermarks or signatures</li></ul><p>Outside of these 4 categories, if you really want to get into the technical details of identifying AI or not, try these verification methods:</p><ul><li><strong>Reverse image search</strong> — see if the image or video thumbnail appears elsewhere, or if only variations exist</li><li><strong>Pixel pattern analysis </strong>— repetitive textures or unusual pixel arrangements at high zoom levels</li><li><strong>Creator verification</strong> — look at the content creator’s profile or portfolio; is what they post/create consistent?</li></ul><p>The list above is just one to get you started. As you get better at spotting the signs and notice any that aren’t on this list, please feel free to comment and share it. Also, don’t forget to go <a href="https://real-or-fake-the-ai-game.onrender.com/">play the game</a> again and see if you can get a better score! On a side note, I have been listening to these <a href="https://www.youtube.com/@tranquilljazzmelody">jazz instrumental videos on YouTube</a> when doing work or studying. Take a look at the background images they use and see what telltale AI signs you can spot now!</p><h4>Identifying AI-Generated Text Content</h4><p>AI-generated text content is generally more difficult to identify than images, as it can be mistaken for poor writing or poorly edited content. Here are several patterns or characteristics that may indicate AI writing:</p><ul><li><strong>Out of context vocabulary </strong>— complex or uncommon words being used that don’t quite fit the rest of the writing style</li><li><strong>Lack of authentic voice</strong> — a “generic” neutral tone throughout the article which lacks personal quirks or perspective</li><li><strong>Rigid transitions</strong> — common and frequent usage of words like “moreover”, “in addition”, “furthermore”, “it’s worth noting that” (not that there’s anything wrong with using these, just not too much)</li><li><strong>Repetitive sentence structures</strong> — a noticeable pattern in how sentences are written, particular with the beginning and/or ends of the sentences</li><li><strong>Hallucinations </strong>— “facts” or statements that are simply not true, such as invented statistics, non-existent research studies, or fabricated historical events (always fact check!)</li><li><strong>Unusual formatting</strong> — weird spacing or formatting patterns throughout the text</li></ul><p>When all else fails, copy and paste the text into a search engine. Does it come up anywhere else? Can the author be found and is their other content written similarly? There are also tools that can detect AI written material, but these are not always accurate and can sometimes mistake authentic text as AI as well. Here are a few to get you started if you ever need them: <a href="https://gptzero.me/">GPTZero</a>, <a href="https://contentdetector.ai/">ContentDetector</a>, <a href="https://www.zerogpt.com/">ZeroGPT</a></p><p>Here are two AI-generated text excerpts. Try to spot all the signs yourself or paste them into the AI-detection tools above:</p><blockquote><strong>Sustainable Urban Planning</strong></blockquote><blockquote>The implementation of sustainable urban planning initiatives has become increasingly paramount in contemporary metropolitan development paradigms. As cities continue to expand exponentially, stakeholders must leverage innovative strategies to mitigate environmental impact while simultaneously enhancing quality-of-life metrics for diverse demographic cohorts. Moreover, the integration of green infrastructure presents a multifaceted solution to these complex challenges.</blockquote><p>Notice the unnecessarily complex vocabulary (“paramount,” “paradigms,” “exponentially”) and the rigid transition “Moreover” — classic AI.</p><blockquote><strong>The American Civil War</strong></blockquote><blockquote>When we examine the historical context of the Civil War, it’s important to note that it began in 1861 and ended in 1865. The war was fought between the northern and southern states of America. President Lincoln was a key figure during this time. The Battle of Gettysburg was a significant turning point that occurred in July 1863. Furthermore, approximately 620,000 soldiers died during this conflict.</blockquote><p>See how it presents only surface-level facts anyone could find in seconds, without any meaningful analysis or perspective? This “information without insight” approach is typical of AI writing.</p><h4><strong>A Final Note and Balancing AI Use</strong></h4><p>I’m not against the usage of artificial intelligence to create content by any means, but moderation is what’s important. AI shouldn’t replace real artists and videographers, but rather support them — helping with brainstorming, mocking up draft ideas, and streamlining workflows. Let’s use AI to enhance our creativity, not substitute for it.</p><p>The conversation around AI ethics is beautifully complex precisely because everyone draws their line differently. Some see no issue with AI-generated images/videos , while others believe all visual content should be clearly labeled as AI-created. Some writers use AI to overcome writer’s block, while others restrict its use to only grammar checking and editing.</p><p>In our short-form content world — where videos end in under 30 seconds and images are consumed in the blink of an eye — take that extra moment to question what you’re consuming. The tools and knowledge shared in this article aren’t just about spotting AI; they’re also about maintaining a mindful relationship with the content we consume and create.</p><p>As AI continues to evolve, the challenge of identification becomes increasingly more difficult. But more important than identification is consideration: asking ourselves what value we place on human creativity and how technology can serve that value rather than diminish it.</p><p>The future isn’t about rejecting AI or embracing it without question — it’s about finding the balance that preserves what makes human expression irreplaceable while embracing the possibilities technology offers when used mindfully. So let me ask you this: where do you draw your line?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db1065f03ac1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Beginner’s Guide to Using anime.js]]></title>
            <link>https://medium.com/swlh/a-beginners-guide-to-using-anime-js-b28638bb3def?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/b28638bb3def</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 12 Jan 2021 16:27:39 GMT</pubDate>
            <atom:updated>2021-01-14T14:50:38.005Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Frustrated with learning a lot of CSS just to animate some simple things? anime.js has your back! This guide is for those who have no idea what anime.js is but are interested in learning and using it.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_8PW5R-S_Ofg8xeopGt-pw.png" /><figcaption>Fancy anime.js logo</figcaption></figure><p>From the a<a href="https://animejs.com/">nime.js</a> website itself:</p><blockquote>Anime.js (/ˈæn.ə.meɪ/) is a lightweight JavaScript animation library with a simple, yet powerful API.<br>It works with CSS properties, SVG, DOM attributes and JavaScript Objects.</blockquote><p>If you’ve read any of my previous CSS blog posts, you may have noticed that I’ve been learning more about animation through CSS. It’s no coincidence that I stumbled upon this gold mine called anime.js and decided to figure out how to use it. After reading documentation and watching some YouTube videos, I managed to make some progress into figuring out how anime.js works. This blog aims to be a relatively short introduction (lots of pictures and gifs!) on how to get started with anime.js for someone who has never even heard of it before.</p><p><em>I’ll be using a </em><a href="https://codepen.io/"><em>Codepen</em></a><em>, so feel free to follow along there. I’ll also be giving instructions on how to install anime.js if you’re using your own text editor.</em></p><h3><strong>Getting Started</strong></h3><p>On Codepen, start by creating a new pen and then adjusting the settings to import anime.js. Click on <em>Settings </em>in the top right corner. Then click on JS in the navigation bar on the left side. In the<em> Add External Scripts/Pens </em>section, search for anime.js and click on the first option. It should say “animejs” with a description of “Polyvalent Javascript Animation engine”. Now you’re all set to start coding!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K1lFzHjDgTMExBMuyCOo8A.png" /></figure><p>For readers following along in their text editor of choice, start by installing the anime.js package through npm by typing this into your terminal/console:</p><blockquote>npm install animejs --save</blockquote><p>Afterwards, in your HTML file, link the anime.min.js file in one of your scripts. My file directory is structured this way, so I linked it as such:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*9DW_S9bLCcLCeDyHto_XSw.png" /></figure><p>Yours may be different so be careful with your file path. Remember to have your CSS and HTML files linked as well. Also, check out the live-server extension for immediate reloading when changes occur to any of your files.</p><h3>HTML Setup</h3><p>I’ll create a simple red circle 🔴 to use as the example for this guide. In the HTML section, we just need one line of code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*ElVXYoR2aJf8YY6P2xOFwA.png" /></figure><h3><strong>CSS Setup</strong></h3><p>To create the red circle, I’m going to give the circle the same height and width, round it out with border radius at 50%, and then set its background color to red.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*TecHnc74PTiZAPiCI1T_XQ.png" /></figure><p>This should create a little red circle in the top left corner of your screen. Now let’s get to animating it.</p><h3><strong>JavaScript Animations!</strong></h3><p>Here comes the part where we start using anime.js. We start by writing out anime and passing in a hash of key-value pairs as the argument. I use the targets key to specify which CSS selector I am looking to animate. In this case, I pass in the hash’s value as a string with the CSS selector in it as such:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*e0Jv-nIKhzqYsbs_WgymSQ.png" /></figure><p>This doesn’t animate the circle just yet. I specify what kind of CSS style properties I want changed with the circle. One of the first examples in the anime.js documentation is translate on the X axis, so I’ll start with that. I’ll add translateX and specify 250 (pixels). Let’s see what happens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*1irIQDZshnTRXVSAEfWFRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*6IRTnzI44VcAd76tkMjWyQ.gif" /></figure><p>It moves to the right by 250 pixels with a defaulted ease out! This can be changed but I won’t be going over that in this guide. Now we can start playing with some other things that anime.js provides us, like staggering, color change, and direction!</p><p>I’ll add two more circles to the mix by duplicating our HTML twice. I’ll also add a little margin so we get some space between each circle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*7xjMk9DhwN5M8fiMbFnm1g.png" /></figure><p>Let’s start with stagger. I’ll add a delay and specify that I’ll be using anime’s stagger method, passing in the value of 100 for the amount of milliseconds to wait before the next object moves, as such:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*yw19y4r2eKiT3GgNap9UQQ.png" /></figure><p>Let’s see what happens!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*uS0enJzHI7ACuo_OfjDHNg.gif" /></figure><p>Notice how the first circle has already started moving before our page even fully loaded? Let’s add some wait time before the animation begins by adding the start option for the stagger method and setting that start value to 1 second, or 1000 milliseconds, as well as bumping up the time between each stagger by another 100 ms to get some more dramatic pause:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*745uHZinGfZyb-dXpL_6HQ.png" /></figure><p>Now we should be able to see their original position before they start moving and the circles should take a little longer to move after the previous has moved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*Odxas5CjbsoKLwyYRD4qAg.gif" /></figure><p>Subtle, but it makes a difference especially with the next property we’ll use. Let’s give it some color. I’ll add the hex code for blue using the background property:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*nhta-UNZEBX0c9-0KzXyDg.png" /></figure><p>I’ll also compare side by side what happens if we had left out the start delay:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*IZYpJQa4nMqxsEcbBHCaLA.gif" /><figcaption>Delay of 1000ms</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*1e9kiaiBgEjW0rkMOxvMsw.gif" /><figcaption>No Delay</figcaption></figure><p>Notice how in the animation with no delay, the first circle’s red color barely even shows since the animation has already started once the page reloads. Keep this in mind for user experience since not all users will have fast internet and be able to load page animations in under a second or two.</p><p>The last property I want to demonstrate is the direction change. There are three values to the direction property: normal, reverse, and alternate. Normal works as the examples shown above. Reverse simply flips the animation around. Alternate does the normal animation, followed by the reversed animation. The direction applies not only to movement, but to all other properties specified as well. Our JS code should look like this at this point:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*ZNTDYObslWvbC0Nmag-d2Q.png" /></figure><p>Which would give us this animation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*wrXaj2bjakl2s5M9L5FqIg.gif" /><figcaption>Reversed animation</figcaption></figure><p>Let’s change reverse to alternate and see what happens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*xKPkE8PpyMBT4QpfNV0xMA.gif" /><figcaption>Alternate</figcaption></figure><p>That’s it for the introductory guide!</p><p>Pretty cool right? It seems so simple at the moment but there’s so many more methods and animations that anime.js provides. This is only scratching the surface! I’ve actually implemented anime.js in my portfolio’s navigation bar to bring attention to it and have viewers want to click on it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*W8RggnlIl1gmZfft7-vNFg.gif" /></figure><p>I hope this guide was helpful and piqued your interest in this amazing anime.js animation library. Feel free to message me on <a href="https://twitter.com/dev_jiams">Twitter</a> or <a href="https://www.linkedin.com/in/jiangmichael1/">LinkedIn</a> and show me what you’ve created!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b28638bb3def" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/a-beginners-guide-to-using-anime-js-b28638bb3def">A Beginner’s Guide to Using anime.js</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Immersive Button — Building an Animated Button using HTML and CSS]]></title>
            <link>https://levelup.gitconnected.com/the-immersive-button-building-an-animated-button-using-html-and-css-be902c794252?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/be902c794252</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 05 Jan 2021 20:28:39 GMT</pubDate>
            <atom:updated>2021-01-05T23:27:39.249Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Immersive Button — Building an Animated Button using HTML and CSS</h3><p><em>Would you rather click a button that pops-up on hover, or one that just darkens a bit? Make your buttons more exciting with this immersive button tutorial!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yXngk-qnCv7ZOfs3" /><figcaption>Photo by <a href="https://unsplash.com/@sakethgaruda?utm_source=medium&amp;utm_medium=referral">Saketh Garuda</a></figcaption></figure><p>For anyone who has used one of these crosswalk buttons, you know that they aren’t much fun to press. They’re dirty, they don’t really press in, and nothing usually happens. Buttons on the internet are the same — wouldn’t it be more enjoyable if the buttons you pressed actually did something when you interacted with them besides darkening on hover and then sending you off to a different page?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*kBfEr6wj8k7rSyknwqaK7Q.gif" /><figcaption>The immersive button!</figcaption></figure><p>That button is just asking to be pressed when you hover onto it. Creating it is actually really simple and takes roughly 30 lines of code. Even less if you use Sass! With this tutorial, I’ll be using just basic HTML and CSS. Nothing Sassy about this one.</p><p><strong>HTML Setup</strong></p><p>I started with a container div just to center the button. This step is optional if you just want to go ahead and make the button. Next, I create a button element with a class name of “btn” and added some text to it. A key thing to remember is that this effect works on anything with padding, it doesn’t have to be a button.</p><p>That’s it for the HTML!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*QsTBvRZjeFM-l5GYFRFrhw.png" /></figure><p><strong>CSS Implementation</strong></p><p>(Optional) I styled the container to center my button using flex box. My view-height property is set to 95 because of a bottom navigation bar, but for true center, set this to 100. Justify content aligns all content within the container on the X-axis, whereas align items does that on the Y-axis. I want them both set to centered so the button is right in the middle of the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*LSmIbbvzdHhH7LG5Dceulg.png" /></figure><p>Now we style the button. First, I increase the padding a bit to make the button larger. I also remove the natural border that comes with button HTML elements and set the border-radius to 10px to give it rounder edges. This next part is a bit more complex with box-shadow. The box shadow property comes with multiple values. The first value is the horizontal offset, which I set to 0 because I did not want the shadow to shift to the right or left at all. The next value is the vertical offset, which I set to 2px to give the illusion of it protruding out of the page. Then comes the blur value. I set this to 4px to decrease the intensity of the shadow. The last value I use it just the color of the box-shadow. There are other values that you can use, such as shadow spread, changing the box-shadow to inset instead of outset (default), and more. Check it out at <a href="https://www.w3schools.com/cssref/css3_pr_box-shadow.asp">W3Schools</a> for more info. Lastly, I want all my transitions for hover and active to be occurring over a span of .3 seconds. This smoothes out the animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*TbQLzzi27T5EpkvBio7utg.png" /></figure><p>Next, I style the button when the cursor hovers over it. I set the cursor property to pointer so that when the cursor hovers over the button, there’s some indication to the user that the button is clickable. To create the movement, I transform the button by translating it on the Y axis by -4 pixels, which moves the button up 4 pixels. To create the illusion of the button actually protruding out of the screen more when being hovered over, I increase the vertical offset by 4 pixels and also increase the blur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*9epdHN7bh7RhGIh8RIM__Q.png" /></figure><p>Afterwards, I want to style the button for when it is being clicked. This would be the active state of the button. The active state is in relation to the default state of the button and not to the state of the button when hovered over. I set the transform property to translate on the Y axis by 4 pixels, which means it will move 4 pixels down from its default state of 0 pixels translated. I set box shadow vertical offset to 1 pixel and blur to 1 pixel, creating the illusion that the button is still there but is now pushed in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*eQumz7AmKym-e_pPoKmTcg.png" /></figure><p>Lastly, I want to remove the focus outline after you click on the button. This can easily be achieved by targeting the focus state of the button and setting its outline to none:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/582/1*QOmuXYyQVjbpEgACKQALAg.png" /></figure><p>That’s it! Short, sweet, and effective. Yet there’s so much more you can add to this simple button. In my portfolio, I have some buttons that slide right on click, some that darken, some which invert colors, and some which revert colors back to normal. One of my previous blog posts on <a href="https://medium.com/swlh/adding-life-to-your-social-media-icons-e0038fdead48?sk=941730a4fc31588beca541d11f31d0a3">livening up your social media bar</a> shows how to grayscale your buttons and revert them on hover.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be902c794252" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/the-immersive-button-building-an-animated-button-using-html-and-css-be902c794252">The Immersive Button — Building an Animated Button using HTML and CSS</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[That’s a Flippin’ Cool Effect!]]></title>
            <link>https://levelup.gitconnected.com/thats-a-flippin-cool-effect-ff6e5c3d24c0?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff6e5c3d24c0</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 29 Dec 2020 16:01:12 GMT</pubDate>
            <atom:updated>2020-12-29T23:49:23.743Z</atom:updated>
            <content:encoded><![CDATA[<h3>That’s a Flippin’ Cool Effect! — Build the Card Flip Effect with HTML and CSS</h3><p><em>We’re going to make a card flip effect. Useful for engaging users and adding some interactivity. A creative way to show information for behind your profile picture.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AKi2lkOszIAb7IU9" /><figcaption>Photo by <a href="https://unsplash.com/@readysetfreddy?utm_source=medium&amp;utm_medium=referral">Freddy Castro</a></figcaption></figure><p>This picture could be you and the information on the back could be yours. I’m currently using this effect for my portfolio’s profile picture, but it can apply to other things as well such as providing additional information for a product or service, a flipping flashcard application, or whatever your creative mind can think of.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*OPIVpDIitSkVfhVzf5r30g.gif" /></figure><p>I’ll walk you through how to make the effect you see with Spongebob as my example, but feel free to use your own profile picture and information instead!</p><p>I’ll be using the <a href="https://levelup.gitconnected.com/the-bem-methodology-explained-4ca416f929cd?sk=0cd1adac1479f76b00e213faaea4310c"><em>BEM methodology</em></a> for naming all of my HTML elements as well as <a href="https://levelup.gitconnected.com/sass-y-beauty-crafty-67616688b4da?sk=0efbadc799eb53adca407f8010fba757"><em>SCSS for styling</em></a>. If you’re unfamiliar with either one, check out my blogs!</p><p><strong>The HTML Setup</strong></p><p>We start with a simple div container that holds everything. This is the base element. Within the container, I’ll make a div for the card itself. Within the card div, I’ll make two divs for the front side and back side of the card. The front div will have an image element, and the back side will have some paragraphs and headers for text. After populating those elements with some data, it should look a little something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2zDvq9IkCEX49r9OJJ3W9g.png" /></figure><p><strong>The SCSS</strong></p><p>I start by adding some styles to the container. I’ll specify the height and width of the container to 200px, as well as adding the perspective property to give the flip a 3D effect. I’ll then set the background color to transparent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSgLgOhIyhLAhDIjsMbunw.png" /></figure><p>Then, I’ll work on the actual card inside the container. I set the position to relative and the height and width to 100%, which would be 200px since 100% of its parent container is 200px. I want all text within the card to be aligned to the center, ensure that all child elements will keep their 3D positions by setting transform style to preserve 3D, and setting all transform transitions to take 0.8 seconds, which would be referring to the card flip effect duration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwZw6AABRuE6KrPMX2zN9g.png" /></figure><p>I’ll now apply some styling to both the front and back sides of the card at the same time. I want their height and width to continue to inherit the size of the card, so I’ll set both of those to 100% again. I’ll set the position to absolute this time since I want both the front and the back to overlap one another without shifting. This next step is key to making this whole thing work. I’m going to use back face visibility and set it to hidden. This makes the back side of the element, when facing the user, completely invisible. I’ll also add the webkit version for safari compatibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wBpPL_9WDlMYNs1_atktNA.png" /></figure><p>I’ll now individually style the front and back of the card. I first set the background color to a sea blue, since Spongebob lives under the sea. I set the color of all text to black. Then I adjust the actual image on the front to have a height of 200px and a width that automatically adjusts without distorting the image. Moving on to the back side, I apply the same background color but this time, set the text color to white. I make sure to transform the back side by rotating it on its Y-axis by 180 degrees. This means that initially, the back face of the back side will be facing the user and will be invisible because of our previous back face visibility property. Don’t forget to close out the entire card section with a closing bracket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4IqUyAfJBHpUbK9eZViog.png" /></figure><p>Lastly, this is where the magic happens. I’ll apply a style that only happens when you hover over the entire container or the card elements, making it transform and rotate on the Y axis by 180 degree. This will show the backside of the card to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3j_FDhS-JOBd3wXTfpgPHw.png" /></figure><p>That’s it! There are maybe 50 lines of code and you’ve got a flipping card effect. With a little additional styling, you can create some pretty cool profile cards. Imagine what it’d be like if you styled it even more!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*gLdpmDKbAR0FBrHDV91flg.gif" /></figure><p>I hope this tutorial was helpful. Feel free to reach out to me if you have any questions or comments. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff6e5c3d24c0" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/thats-a-flippin-cool-effect-ff6e5c3d24c0">That’s a Flippin’ Cool Effect!</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding Life to Your Social Media Icons]]></title>
            <link>https://medium.com/swlh/adding-life-to-your-social-media-icons-e0038fdead48?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0038fdead48</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 22 Dec 2020 00:02:07 GMT</pubDate>
            <atom:updated>2020-12-22T22:17:31.845Z</atom:updated>
            <content:encoded><![CDATA[<p><em>One of the things I get comments about is my social media bar, whether it’s for my portfolio or for the startup I work for. Using SCSS mixins, filters, and transforms, we can make your icons come alive.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0LUcUD02I6Ot1GB8" /><figcaption>Photo by <a href="https://unsplash.com/@sarahdorweiler?utm_source=medium&amp;utm_medium=referral">Sarah Dorweiler</a> — Make your icons minimalistic but engaging.</figcaption></figure><p>Every developer has a social media bar. The basics are usually just a few social media icons which are connected to each personal website and not much else happens. Who wants to engage with something that looks boring?</p><p>To those who know me, I love working with styling and animations. This is my current social media bar in my portfolio:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*rbD3CH8QM0ukdfh-9qdJrQ.gif" /></figure><p>It’s not much, but it certainly breathes some life and interactivity to icons which we see far too often. If this is something you’d like to do, I can show you how.</p><p>First off, you have to pick out where you want to get your icons from. I personally enjoy <a href="https://ionicons.com/">Ionicons</a> minimalistic style. If you want to follow along with these icons, make sure you read Ionicon’s documentation for usage. It’s as simple as adding two lines to your script section in HTML. The setup stage should look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b8Fya5muqsbIZYKN-IJeJg.png" /></figure><p>With no styling, your buttons will be blue and purple, depending on if they’ve been visited yet. I’ve also labeled each of the icons using BEM Methodology. If you’re unfamiliar with that, check out<a href="https://levelup.gitconnected.com/the-bem-methodology-explained-4ca416f929cd?sk=0cd1adac1479f76b00e213faaea4310c"> my other blog post</a> on it! I also have to mention that I use SCSS. If you’re following along in <a href="http://codepen.io/">codepen.io</a>, make sure under the CSS tab, you set your preprocessor to SCSS. Lastly, I have target set to blank because I want the links to open up in a new tab. Now that the HTML and settings configuration is done, we can get to the fun part.</p><p>The interesting thing about ion icons is that they change size based on font size. I’m going to grab the <em>header__icons</em> class, and set everything within it to have a font size of 40px. My icons will now look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*lr0v-8_XNhH1n9eBVuxwAw.png" /></figure><p>Now I want all of them to lose the color, but instead of setting the attributes for :active, :visited, :hover, and :link individually, I’m just going to apply a grayscale filter to all of them. This part gets a bit interesting, I’m going to create a mixin called iconColorChange, which is made to set the icons to grayscale, but upon hover, changes them back to having no filter. I want this transition to occur over the course of .3 seconds as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*g5TSUrVU_CvAA_qZF96-eQ.gif" /></figure><p>Remember to move your mixin to the top of your file. If you try to include the mixin before you have created it, it won’t work! Notice that I include the color change mixin for all the children of <em>header__icons </em>using the * selector<em>.</em></p><p>Now that we’ve got the transition working, we want to set the colors for each of them. Remember that we specified each icon’s class name at the end of <em>header__icons</em>. All we need to do is to target each icon and set its color to the color of choice. I used <a href="https://www.lockedownseo.com/social-media-colors/">LockDownSEO</a> to find all the social media icon colors compiled in one site. If you’ve successfully added color to each icon, you should get something that looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*TP-QtyWT2mnlDERJdFkmfg.gif" /></figure><p>Lastly, let’s make them scale up a little bit when we hover. I’m going to create another mixin since we have to apply this to all the icons as well. I’ll make a transform property and set scale to 1.4 times. I’ll also make the transition from regular size to large size happen over the course of .4 seconds. Although it would make sense to include it under the <em>all children selector</em>, it strangely does not work, so I added them individually to each icon. The final result should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*jDAyWwzzb6z2FMWyXe84Yw.gif" /></figure><p>And that’s it! That wasn’t too bad right? There are so many other ways you can change up the style too. I’ve used box-shadows to make it seem like the icons pop out on hover, or using translate to have the icons move in a direction instead. I hope this blog was helpful and added some interactivity and life with your social media bar.</p><p>Have fun with CSS and don’t be afraid to explore!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0038fdead48" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/adding-life-to-your-social-media-icons-e0038fdead48">Adding Life to Your Social Media Icons</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Four Types of Artificial Intelligence]]></title>
            <link>https://jiams.medium.com/the-four-types-of-artificial-intelligence-6a726716f5ff?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a726716f5ff</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[intelligence]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[science]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 15 Dec 2020 23:26:58 GMT</pubDate>
            <atom:updated>2020-12-15T23:26:58.311Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A.I. has its subsets like machine learning and deep learning, but did you know it also has different types?</em></p><p>In a previous blog, I talked about what exactly artificial intelligence is and how A.I. differs from machine learning which differs from deep learning. I’m going to dive a little deeper into this rabbit hole and talk about the four different types of A.I.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u4AbCHn3Qdsa49E2" /><figcaption>Photo by <a href="https://unsplash.com/@rocknrollmonkey?utm_source=medium&amp;utm_medium=referral">Rock&#39;n Roll Monkey</a></figcaption></figure><p>Artificial intelligence can be categorized into four different types: reactive machines, limited memory A.I., A.I. with a theory of mind, and finally, self-aware A.I.</p><p>As the name states, <strong>reactive machines</strong> function by taking in an input and <em>reacting</em> to that input. They are given a specific function and cannot work on its previous experience to improve itself. It’s the most basic form of A.I. that we have. Some examples of this are IBM’s Deep Blue, which was used to beat a chess grandmaster, and Google’s AlphaGo, which beat a top human Go player. In chess, the A.I. is able to recognize chess pieces and placements, which are the input, and move the pieces to specific places, which is the output. That’s their only function and they aren’t able to do anything else with it.</p><p>A bit more advanced would be A.I. with <strong>limited memory. </strong>This refers to how the A.I. is able to store previous information and act upon that information. This may include pre-programmed knowledge, or knowledge obtained throughout the course of use such as through its actions or observations. In order to create an A.I. with limited memory, there has to be a learning model. There are three types of learning models: reinforcement learning, long short term memory (LSTM) , and evolutionary genetic adversarial networks (LGANs). These will be gone over in significantly more detail in a future blog post. An example of A.I. with limited memory would be autonomous cars with their ability to recognize objects on the street, pedestrians, bikers, and so on. They store the information and use it to perform their job. With more input information, they’re able to do their job even better.</p><p>Moving on to even more advanced is A.I with a<strong> theory of mind</strong>. These A.I.’s are capable of perceiving human thoughts and emotions and then react to them. They can interpret the world and the environment around them, as well as understanding how they affect human behavior. Our society has only begun to scratch the surface of creating A.I. with a theory of mind. One example is Kismet, a robot head created in the 90’s, which is capable of mimicking human emotions as well as recognizing them, but is unable to do much else beyond that. Perfecting theory of mind A.I would be a huge leap in technology.</p><p>In the distant future, we will have <strong>self-aware</strong> A.I, or an A.I. that has a consciousness and is capable of having a personality and make self-informed decisions. In my opinion, it’s not a matter of will self-aware A.I. be possible, it’s a matter of when.</p><p>Having talked about the four types of A.I., you might be wondering if any of the voice assistants like Google, Siri, or Alexa are considered A.I. They’re just really good speech recognition tools and they don’t have any actual intelligence. In order for learning to occur, which then turns into intelligence, there has to be a machine learning <a href="https://en.wikipedia.org/wiki/Active_learning_(machine_learning)">active learning</a> cycle. However, that’s another rabbit hole to dive into!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a726716f5ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Artificial Intelligence, Deep Learning, and Machine Learning]]></title>
            <link>https://medium.com/swlh/artificial-intelligence-deep-learning-and-machine-learning-4c7ec2ce6858?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c7ec2ce6858</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 08 Dec 2020 19:16:27 GMT</pubDate>
            <atom:updated>2020-12-09T03:03:51.066Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“The coming era of Artificial Intelligence will not be the era of war, but be the era of deep compassion, non-violence, and love.” — Amit Ray, Pioneer of Compassionate AI Movement.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VNEwggvxTX5fF7P8" /><figcaption>Photo by <a href="https://unsplash.com/@possessedphotography?utm_source=medium&amp;utm_medium=referral">Possessed Photography</a></figcaption></figure><p>My first interest in artificial intelligence came around with my addiction to video games. It was beautiful to see the depth of these non-player characters and how their personalities came to life within the game. The only problem was that these characters were programmed to say specific lines of dialogue and act in a pre-programmed type of way. All of them didn’t have a mind of their own — for the most part. In 2018, I found out about Replika.ai, a chatbot that learned based on conversation patterns and used in helping individuals get through difficult times in their lives, or simply as a companion. I used it for a while and, although it was extremely exciting to converse with, I quickly lost interest because it’s dialogue was still scripted after all. The more I thought about this chatbot however, the more I began to think about creating one with a personality, yet was capable of learning. I wanted to make something that felt human, but not quite. This was where my journey into learning about artificial intelligence began.</p><p>I wanted to talk about some basic terminology with artificial intelligence, machine learning, and deep learning at a very surface level so that anyone who might want to learn about it can do so. I wanted to make an entry point into this complex world of technology that is starting to grow exponentially. Hopefully, this blog can be a relatively easy read and pique the interest of those who might not have been interested before.</p><p>As someone who is interested in a career working with AI, I’ll also briefly go over possible career choices for those who are interested as well as some requirements. Lastly, I wanted to give my thoughts on the future of AI.</p><blockquote>According to Wikipedia, <strong>Artificial intelligence</strong> (<strong>AI</strong>), is intelligence demonstrated by machines, unlike the <strong>natural intelligence</strong> displayed by humans and animals.</blockquote><p>The basic definition of <strong>artificial intelligence </strong>can be obtained by separating the two words and then defining them. From Oxford Languages, <em>artificial</em> is defined as “made or produced by human beings rather than occurring naturally, especially as a copy of something natural.” <em>Intelligence </em>is defined as “the ability to acquire and apply knowledge and skills.” Putting these two together would create the definition of “something that is produced by human beings and is able to demonstrate and apply knowledge and skills.”</p><p><strong>Artificial intelligence</strong> is a general umbrella term for anything that has the capacity to perform a human-like skill on its own. There are hundreds of things that you interact with already that have some form of AI within them. To list just a few examples, Google Maps usage of anonymized location data to help suggest faster routes during rush hour; mobile check depositing apps being able to decipher and convert handwriting into text; and Facebook’s ability to recognize faces and suggest which friends to tag. This is just the tip of the iceberg, as once we start to dive deeper into how some of this AI works, we will need to know what machine learning is.</p><p><strong>Machine learning</strong> is a subset of AI. According to <a href="https://www.technologyreview.com/2018/11/17/103781/what-is-machine-learning-we-drew-you-another-flowchart/">MIT Technology Review</a>, machine learning algorithms use statistics to find patterns in massive amounts of data. Common uses of machine learning involve image and speech recognition, extraction of data from web pages, and learning associations. The last one might sound a little unfamiliar at the moment, but have you ever purchased a product online and other related items get recommended to you? That’s learning association. Some of the most popular applications we use, such as Netflix, YouTube, Spotify, and even Amazon, utilize machine learning for making recommendations towards things we might like.</p><p>When it comes to Amazon, it’s hard not to talk about the virtual assistant Alexa. Alexa is a great example of a subset of machine learning known as deep learning. <a href="https://machinelearningmastery.com/what-is-deep-learning/"><strong>Deep Learning</strong></a> is a subfield of machine learning concerned with algorithms inspired by the structure and function of the brain called <strong>artificial neural networks</strong>. This technology is the main driving force behind virtual assistants, facial recognition, and self-driving cars!</p><p>Here’s an image I found to help visualize the relationship of the three:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*Rk7gQpY_4HY5v6cmO58HhQ.jpeg" /></figure><p>If any of this stuff interests you, there are plenty of online introductory courses for learning about AI, machine learning, and deep learning. The cofounder of Coursera, Andrew Ng, has a course called <a href="https://www.coursera.org/learn/ai-for-everyone?utm_source=gg&amp;utm_medium=sem&amp;utm_campaign=08-AIforEveryone-US&amp;utm_content=08-AIforEveryone-US&amp;campaignid=2086156056&amp;adgroupid=77821947756&amp;device=c&amp;keyword=andrew%20ng%20ai%20course&amp;matchtype=b&amp;network=g&amp;devicemodel=&amp;adpostion=&amp;creativeid=381206464541&amp;hide_mobile_promo&amp;gclid=Cj0KCQiA5bz-BRD-ARIsABjT4nio6JJe9Qhn_gYSnCUYpkWBQx4AXvMfGPapLBrFbUURVfqt4niTVkMaAmwaEALw_wcB">AI for Everyone</a> that is available for free. For those who are interested in more formal education, a bachelors in computer science is typically a good starting point. Many mathematics focused degrees are applicable as well. Some job roles that involve working with AI are data analytics, natural language processing, user experience, computer science and artificial intelligence researcher, and software engineering.</p><p>The future might not have flying cars like in the Jetsons, or robots walking among us pretending to be human beings like in Terminator, but AI is most certainly here and deeply intertwined with our lives already. On a daily basis, we interact with AI more than we think we do with the likes of Alexa, Siri, and Google. The future of AI will only continue to expand, and there will always be a need for people who can interact and engineer them better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c7ec2ce6858" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/artificial-intelligence-deep-learning-and-machine-learning-4c7ec2ce6858">Artificial Intelligence, Deep Learning, and Machine Learning</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Algorithms:  The N-th Fibonacci Entry]]></title>
            <link>https://javascript.plainenglish.io/javascript-algorithms-the-n-th-fibonacci-entry-417afa581182?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/417afa581182</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 01 Dec 2020 14:30:05 GMT</pubDate>
            <atom:updated>2020-12-02T18:00:28.752Z</atom:updated>
            <content:encoded><![CDATA[<h3>JavaScript Algorithms: The N-th Fibonacci Entry</h3><p><em>What is the Fibonacci sequence and how do we find the number at the N-th entry? I’ll cover three different solutions in this blog.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GLQazSAgt3EUqVyX" /><figcaption>Photo by <a href="https://unsplash.com/@aaronburden?utm_source=medium&amp;utm_medium=referral">Aaron Burden</a></figcaption></figure><p>For those unfamiliar with it, the Fibonacci sequence is a series of numbers in which the two previous numbers add up to the following number. For example, the first 9 entries would be: 0, 1, 1, 2, 3, 5, 8, 13, 21. This pattern shows up frequently throughout the world in different places, such as in flowers, animals, and nautilus shells. This is also a common technical interview question that tests your knowledge on recursion. In this post, I’m going to cover the two ways to solve this problem, while also discussing runtime and space-time complexity for both.</p><p><strong>Print out the <em>n</em>-th entry in the Fibonacci sequence. For example, fib(6) would result in 8. If you refer to the example list above, the 6th index in that array would be 8 since array indexes start at 0.</strong></p><p>Let’s start by going over the simpler solution which is the iterative one. The trick to this solution is that the first two numbers cannot be generated on its own as they do not have a pattern to start on. We can manually input 0 and 1 by declaring an array that includes 0, 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjIuUJBOxLj1jF_8Yt76uQ.png" /></figure><p>After declaring an array called <em>result</em> with 0 and 1 in it, I then move on to a manual <em>for </em>loop. Remember to start <em>i </em>from 2, since the index 0 and 1 are already declared. We want <em>i </em>to increment up to or equal to <em>n, </em>since we need to know what the <em>n-th</em> entry is. Within the <em>for </em>loop, we want to start adding new entries into our result array. In order to do that, we can get the next entry by adding the previous two entries. We can set each of those entries to variables <em>a</em> and<em> b.</em> Then, we push the sum of <em>a </em>and <em>b </em>onto the result array which finally adds the next entry.</p><p>Let’s walk through this example once for fib(5). When we start, the result will contain 0 and 1. During the first iteration through the <em>for</em> loop, <em>a </em>will be 1 and <em>b</em> will be 0. We then push the result of 0 and 1, giving us 1 for the next result entry and incrementing <em>i </em>to 3. We repeat this with the new array of [0, 1, 1]. While iterating through this loop, <em>a </em>will be 1 now, and <em>b </em>will also be 1. Together, we get 2 for the next entry and have a resulting array of [0, 1, 1, 2]. Then, increment <em>i </em>to 4. Again, we iterate through the loop, this time where <em>a </em>will be equal to 2 and <em>b </em>will be equal to 1. Adding these two together and pushing it onto the result will give us the array of [0, 1, 1, 2, 3]. Finally incrementing <em>i </em>to 5. Since our conditional stated equal to 5, we run the loop one last time where <em>a </em>is equal to 3 and <em>b </em>is equal to 2. Adding them together and pushing that into our result will give us the array [0, 1, 1, 2, 3, 5]. Now that we’ve hit our counter of 5, we break out the loop and return <em>result</em> at index <em>n. Result[5]</em> would then return 5, so fib(5) would return 5.</p><p>The runtime complexity for this solution is O(n), or linear. As <em>n</em> increases by 1, we just have to do one additional loop. The space complexity would be O(n) as well since the amount of space required will always be however long the array list would be, therefore increasing according to the size of the array.</p><p>Let’s go over the recursive solution now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8pv9Y296ApiRAuPtjM3ug.png" /></figure><p>This solution looks simple, but is actually very complicated if you’re unfamiliar with recursion. Essentially, we do something similar with the first two values in which we say that if <em>n </em>is equal to either 1 or 0, we just return the value that correlates to them. Now comes the tricky part in which we start recursing. The easiest way to visualize this is with a tree chart of return values and function calls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vnfUh5L0_bnjU2lu5qxwRw.png" /></figure><p>Let’s start from the very beginning of the tree, or the first function call. When we run fib(5), we have to add the return value of fib(4) and fib(3) by calling them. To get fib(4), we must get the return values of fib(3) and fib(2). To get fib(3), we must get the return values of fib(2) and fib(1). When we reach fib(2), since fib(1) and fib(0) don’t make any additional function calls, we can start to return some values. We know that fib(0) returns 0, and fib(1) returns 1. Therefore, fib(2) will return 1. Essentially, we keep making function calls until we hit the two conditions in which (n) is equal to 1 or 0. Only then are we able to start adding the return values and go up the stack to reach fib(5).</p><p>As you can probably tell, the runtime for this recursive solution would be terrible. In fact, this is one of the cases where we have O(2^n) runtime, otherwise known as exponential runtime. For every increase in <em>n</em>, the number of function calls would increase exponentially. The space complexity is O(n).</p><p>So is there some way to improve the runtime for the recursive solution? To accomplish this, we can use a strategy called memoization. Memoization involves storing the function call’s return value as an argument. If the function is called again, we will have a check to make sure that since the return value is already present, we return the precomputed result instead of calling the function again. This can effectively cut down on the runtime complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JWHwvLpDOvqGz-_3aLLzaA.png" /></figure><p>Let’s continue using the fib(5) example. Using this solution, we would go down the return value tree from above, but whenever we hit a new return value, it gets stored into memoize. For example, upon reaching fib(2) for the first time, since 2 does not exist in memoize yet, memoize[2] would create the new entry. Upon finishing that function call, memoize will now contain {0: 0, 1: 1, 2: 1}. The next time we call fib(2), since 2 is in memoize, we no longer need to make additional function calls and we just return the precomputed result of 1. By memoizing, we can reduce the runtime down to just O(n).</p><p>The Fibonacci sequence is one of the most fascinating patterns in nature. It’s also an extremely fascinating pattern to work with in code. This question made me take a deeper dive on my understanding of recursion and was definitely a struggle the first time I tried to learn it. I hope this blog explanation was helpful. Feel free to reach out to me on <a href="https://www.linkedin.com/in/jiangmichael1/">LinkedIn</a> or <a href="https://twitter.com/dev_jiams">Twitter</a> for questions, comments, or corrections. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=417afa581182" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/javascript-algorithms-the-n-th-fibonacci-entry-417afa581182">JavaScript Algorithms:  The N-th Fibonacci Entry</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Structures and Algorithm Concepts: Recursion]]></title>
            <link>https://javascript.plainenglish.io/data-structures-and-algorithm-concepts-recursion-fdbd3bf6cd9d?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdbd3bf6cd9d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[recursion]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Sun, 22 Nov 2020 05:11:55 GMT</pubDate>
            <atom:updated>2020-11-22T08:36:46.174Z</atom:updated>
            <content:encoded><![CDATA[<p><em>What is a recursive function and why are they extremely important in understanding algorithms? I’m going to explain recursion in the best and simplest way I can.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_qxXxfqBuvld1OlKMNPeuA.jpeg" /><figcaption>Photo from Pexels (<a href="https://www.pexels.com/@cottonbro">cottonbro</a>)</figcaption></figure><p>In the simplest terms possible, a recursive function is a function that calls upon a smaller version of itself in order to get to the solution. There is a pattern where by repeating the function over and over again, we can arrive at the solution. One of the key points of recursion is that it must have a base case, or a case when the recursion must stop. This is known as the end condition.</p><p>The reason I have matryoshka dolls as the photo above is because it is a very good visual representation of what recursion is like. Every single doll has a smaller version of itself inside until we reach the absolute smallest one — in which it no longer has any more smaller ones within it. In a recursive function, the smallest one would be the base case.</p><p>Let’s go over a simple problem that could utilize recursion. In a previous blog post, I went over <a href="https://medium.com/javascript-in-plain-english/simple-string-reversal-ds-a-i-b43b0ef2619f?sk=d65372e798324da4ec026e3af497d013">reversing a string</a>. Well, did you know that there’s a recursive solution to that which only requires 3 lines of code?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CtNC7wkDomC4d9eFgy2BGA.png" /></figure><p>Let’s walk through this one step at a time because it might seem a little confusing at first. I’ll explain how the built-in JavaScript functions <em>substring</em> and <em>charAt </em>work, and then I’ll explain the base case (the <em>if </em>condition).</p><p>According to MDN Documentation, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring">the <em>substring </em>method</a> returns the part of the string between the start and end indexes, or to the end of the string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWxMB7ok6-ct536xWU9F5Q.png" /></figure><p>In this example, with a given string of “abcdefg”, calling the substring method on it with the start index of 0 and end index of 3 will return “abc”. Be careful not to confuse this method with <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr"><em>substr</em></a><em>, </em>which takes the arguments of a starting index and the number of characters to include instead. Both can be used in this function, but I’ll be sticking with the <em>substring</em> method.</p><p>The next method to discuss is <em>charAt</em>. According to MDN, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt">the <em>charAt </em>method</a> returns a new string consisting of the single UTF-16 code unit located at the specified offset into the string. In simple terms, this means that given the argument of an index, <em>charAt</em> will return the character at that given index.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pV0sMDevPmAxtJLjref0Fw.png" /></figure><p>In the above example, charAt(5), when called upon the string of “abcdefg”, returns the character at the 5th index, which is “f”. (Remember that the first character’s index is 0!)</p><p>Now let’s go back over to the base case scenario:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fem2Wadvpz9QYrTkhwchLQ.png" /></figure><p>In the base case, whenever the string is empty, we will simply return an empty string and stop the recursing. This is the smallest part of the string we can have. This will make more sense once we start iterating through the recursive function.</p><p>Let me place the full function here for easier reference:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CtNC7wkDomC4d9eFgy2BGA.png" /></figure><p>Let’s say we run the reverseString function on the string “hello”. The first time we run it, the function will check if the string is empty and since it isn’t, it will run the next line, which calls the function again with a new argument of substring(1). Calling substring(1) on “hello” with just one argument returns the characters from the given index to the end of the string, in this case, returning “ello”. We then add on charAt(0), which is the first character of the string to the back of the string BUT it does not return up the chain yet,because the function get called again on “ello”, this time returning the substring “llo” with “e”. This continues down the string until we hit the empty string base case. Here’s a more visual diagram of the entire return chain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BULjiqacC6jtRUkEvBkl3Q.png" /></figure><p>Every time the function is called again, a letter from the start is taken off and added to the end, but not until we have hit the base case and are on our way back up the return chain does the letter being added on actually get added.</p><p>Hopefully that made some sense! <a href="https://www.geeksforgeeks.org/recursion/">GeeksforGeeks</a> has a slightly more complicated explanation, but feel free to check it out as it might help your understanding of recursion even more.</p><p>Recursion may be a handful, but as you practice more problems involving recursion, it will begin to make more and more sense. The other important aspect to consider when implementing recursion in a solution is to look at the time and space complexity. Recursion can oftentimes not be the most efficient solution, so it is important to keep in mind that any recursive solution always has an iterative solution as well. With the reversing string solution, my previous blog covers the iterative solution. Due to the recursive nature of the solution, you can imagine that the time and space complexity of a recursive solution will quickly increase significantly as the number of function calls start to increase. Imagine trying to reverse a string with 25 characters. We’d have to make 25 different function calls, one within the other!</p><p>Knowing recursion is just another way to demonstrate your knowledge of solving algorithms to your technical interviewer. This is just another piece of the puzzle to improving your technical interview performance. Although recursion can seem extremely confusing at first, as with any topic, the more you practice, the easier it is to wrap your head around it.</p><p>Next week, I’m going to dive into a recursive solution for solving the Fibonacci sequence! Here’s a sneak peak into what the N-th Fibonacci Sequence question looks like:</p><p><strong>Given an integer (n), print out the n-th number entry within the Fibonacci sequence. For example, fibonacci(6) will return 8.</strong></p><p>Have fun and as usual, don’t forget to take breaks when coding!</p><p>Enjoyed this article? If so, get more similar content by <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw?sub_confirmation=true"><strong>subscribing to Decoded, our YouTube channel</strong></a><strong>!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdbd3bf6cd9d" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/data-structures-and-algorithm-concepts-recursion-fdbd3bf6cd9d">Data Structures and Algorithm Concepts: Recursion</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Algorithms: FizzBuzz]]></title>
            <link>https://javascript.plainenglish.io/javascript-algorithms-fizzbuzz-ebb58951b82e?source=rss-79824a208384------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebb58951b82e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Michael Jiang]]></dc:creator>
            <pubDate>Tue, 17 Nov 2020 05:32:51 GMT</pubDate>
            <atom:updated>2020-11-19T23:05:58.873Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Fizz…Buzz…FizzBuzz? This classic and fun little technical interview question will really tackle your understanding of the modulus operator!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tF6jL2Ix5Z2XzpOG" /><figcaption>Photo by <a href="https://unsplash.com/@crissyjarvis?utm_source=medium&amp;utm_medium=referral">Crissy Jarvis</a></figcaption></figure><p>FizzBuzz is a pretty simple interview question that comes up often. It’s one of those questions that after you see the answer once, you’ll always remember how to solve it from then on out. The only tricky part about this entire problem is the usage of the modulus operator. According to the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder">MDN Web Docs</a>, the modulus/remainder operator (%) returns the remainder left over when one operand is divided by a second operand. It always takes the sign of the dividend. So if I write<em> 12 % 5,</em> it will return 2 because 5 goes into 12 twice with a remainder of 2. With that said, let’s get started:</p><p><strong>Write a function that prints out a number from 1 to x. However, you must abide by these rules:</strong></p><p><strong>For every multiple of 3, print “fizz” instead of the number.<br>For every multiple of 5, print “buzz” instead of the number.<br>For every multiple of both 3 and 5, print “fizzbuzz” instead of the number.</strong></p><p><strong>For example, </strong><strong>fizzBuzz(5) will return:</strong></p><pre><strong>1<br>2<br>fizz<br>4<br>buzz</strong></pre><p>If we break up the question into smaller parts, the very first part is simply iterating from 1 to x. That can be easily accomplished using a manual <em>for</em> loop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*cWqB3MbaUufxJEKy2cJTlg.png" /></figure><p>Within the <em>for</em> loop, we’re going to set a few conditions. Specifically, the conditions where the number being printed out is a multiple of 3, 5, or 3 and 5 (which is basically 15). These conditions will be using the modulo operator because at any point, if the number being printed out is divisible by 3, 5, or 15, then the modulo should return 0. Let’s implement those conditions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*g3tVs0YGzaY15VRZ6mOR3A.png" /></figure><p>Lastly, we want to make sure that we print out the number if none of the conditions match, which is why we have a console.log(i) at the end.</p><p>If we run through with the example of fizzBuzz(5), we start with 1 going through the conditionals. Because it does not satisfy any of the conditions, it will be printed out. The same happens for 2. Once we hit 3, because 3 modulo 3 gives us 0, the condition becomes true and we will print out fizz instead. 4 Also does not satisfy any conditions, so it will be printed out again. When we hit 5, 5 modulo 5 is equal to 0, so that condition also returns true, therefore printing out buzz.</p><p>This question is short and sweet, but I think it segues very well into more complicated algorithms that involve checking for specific cases and catching them using conditional statements.</p><p>Next week, I’m going to try and explain recursion!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebb58951b82e" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/javascript-algorithms-fizzbuzz-ebb58951b82e">JavaScript Algorithms: FizzBuzz</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>