<?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 Andrew Ly on Medium]]></title>
        <description><![CDATA[Stories by Andrew Ly on Medium]]></description>
        <link>https://medium.com/@andrewly?source=rss-e004ff661762------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FQmO8C1Pvz4lYffWunZJug.jpeg</url>
            <title>Stories by Andrew Ly on Medium</title>
            <link>https://medium.com/@andrewly?source=rss-e004ff661762------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 07:54:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andrewly/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[No Time To Die: An In-Depth Review of Daniel Craig’s Final Bond Film — by Andrew Ly]]></title>
            <link>https://andrewly.medium.com/no-time-to-die-an-in-depth-review-of-daniel-craigs-final-bond-film-by-andrew-ly-ca55ba351b02?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca55ba351b02</guid>
            <category><![CDATA[james-bond]]></category>
            <category><![CDATA[film-reviews]]></category>
            <category><![CDATA[007]]></category>
            <category><![CDATA[movie-review]]></category>
            <category><![CDATA[entertainment]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Sat, 09 Oct 2021 00:00:00 GMT</pubDate>
            <atom:updated>2021-10-15T14:17:03.310Z</atom:updated>
            <content:encoded><![CDATA[<h3>No Time To Die: An In-Depth Review of Daniel Craig’s Final Bond Film — by Andrew Ly</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZR5xVDdYG3_5PhXe" /></figure><p>The final James Bond film in Daniel Craig’s fifteen year era has come to an end, but is it the thrilling conclusion we fans have been hoping for, or is it doomed to fall into obscurity with the rest of the ill-received spy movies in the recent decade?</p><p>Originally, I was extremely hyped for <a href="https://www.fandango.com/no-time-to-die-2021-219381/movie-overview"><em>No Time To Die</em></a>. The trailer promised a star-studded cast, beautiful set pieces, and a return to form in classic Bondian tropes. Toting a 2 hour and 43 minute runtime, this film was poised to end the franchise in a fantastical way.</p><p>After watching the movie, it <em>did</em> notably end the franchise in a completely different way than what you would normally expect…but after a few days of mulling it over I have mixed feelings over the entire thing. On one hand, they attempted to inject new flavor into a 25+ movie franchise, but on the other hand, new experiments tend to yield flawed results. And this film, is decent despite all these flaws. Director <a href="https://www.imdb.com/name/nm1560977/">Cary Fukunaga</a> essentially pulled a <em>The Last Jedi and to a lesser extent </em><a href="https://www.andrewjly.com/blog/2019/12/22/star-wars-the-rise-of-stupidity"><em>The Rise of Skywalker</em></a> on us, but at least the attempt was admirable. And if you don’t already understand where I’m getting at, let me explain.</p><h3>A Slapdash Story</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-4jkXWt9CYst8SAY_gr54A.jpeg" /></figure><p>Just like the other films in Craig’s tenure, this is a direct continuation of the overarching storyline that continues after the events of <em>Spectre</em>. The plot of <em>No Time To Die</em> begins with James Bond ( <a href="https://www.imdb.com/name/nm0185819/?ref_=fn_al_nm_1">Daniel Craig</a>) and Madeleine Swann ( <a href="https://www.imdb.com/name/nm2244205/?ref_=nv_sr_srsg_0">Lea Seydoux</a>) enjoying each other’s company in Italy, but Madeleine is haunted by the memory of Lyutsifer Safin ( <a href="https://www.imdb.com/name/nm1785339/?ref_=fn_al_nm_1">Rami Mailk</a>). This in turn causes Bond to distrust his lover and leave her for the next five years in an attempt to move on from his broken heart and MI6, until he is pulled back by Felix Leiter for one final mission. Familiar faces are trotted out for their final cameos, and the threat of a nanobot virus that targets specific blood types (a very spot on tie-in to the real world pandemic) looms above them.</p><p>A very Bondian premise, but the actual delivery leaves much to be desired.</p><p>They introduce elements of the past that come back as deadly secrets, but to be quite honest, Safin’s revenge came back as awkward and too convenient. This point is echoed over and over again by characters in a vague attempt to add a layer of mystery to Safin’s motives, only for the payoff to falter in the end. I left the theater a bit confused by the central conflict as they said a lot without saying much at all. Safin’s motive to save Madeline as a child was never fully explored, and seemed to be thrown out the window later on. M ( <a href="https://www.imdb.com/name/nm0000146/?ref_=nv_sr_srsg_0">Ralph Fiennes</a>) was secretly working with Spectre on the Heracles Project for some reason to help rid the world of evil. Ernst Blofeld was somehow able to communicate with his underlings and run an empire from a maximum security prison, the list goes on and on.</p><p>The direction of Bond himself was not one I can say I am truly a fan of, if I am to be honest. He undergoes a transformation from suave and debonair, into one akin to Moore’s depiction. He told a bit too many jokes and the confidence he oozed was reined in as an attempt to humanize and create a fatherly figure in Bond that has never been seen before. I get that, and it works near the ending (which I will touch on later). Now the mileage may vary from person to person, but I prefer my Bond to ooze charisma at a constant rate, and this one did not provide it.</p><h3>Ineffective Villain and Side Characters</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CSvQtiLzsou72EOaWpT1Vg.jpeg" /></figure><p>Lyutsifer Safin is a glorious name for a villain, but Rami Malik’s talents were ultimately wasted due to lack of screen time and a terrible vision. Safin has all the trappings to be the ultimate Bond villain, with his distinguishable scars and island lair, but the writing fell too short, rendering him as nothing more than an inept parody of Dr. No. We as an audience are left to wonder what his goals were and why exactly he wanted revenge years down the line.</p><p>Safin eliminates Spectre and targets his sights on the world at large. He kidnaps Madeleine because he feels a kindred spirit inside her, but why now? Why after all these years does he finally reveal his feelings?</p><p>At a later point he captures Mathilde, the love child of Bond and Madeleine and uses her as a bargaining chip. Within ten minutes and out of nowhere, he sets her free because she bit him once. Why would a megalomaniac do such a thing? Why have her held hostage in the first place? It’s questionably action choices like this that keeps the audience from taking it too seriously, and thereby undermining the villain’s overall effectiveness.</p><p>Also, Ernst Blofeld returns. But he is promptly killed by nanobots through contact from Bond, who was used as a vector. Another wasted opportunity, though his lackluster performance in this film as well as the previous one made his death more palpable.</p><p>The new 007 has some snappy remarks and to be a strong, black female lead was an interesting and welcoming addition, but unfortunately <a href="https://www.imdb.com/name/nm2736476/?ref_=nv_sr_srsg_0">Lashana Lynch</a> wasn’t given much to work with as this foil. Every time she was on screen she was regulated as a “helper” to the original, doing grunt work and staying as far out of the limelight as physically possible. To be fair, it is Craig’s last outing, so I understand why her role was diminished, but it was a shame nonetheless.</p><p>The only saving grace was by Paloma who is portrayed by <a href="https://www.imdb.com/name/nm1869101/?ref_=nv_sr_srsg_0">Ana De Armas</a> of <a href="https://www.andrewjly.com/blog/2018/1/4/blade-runner-2049-character-series-why-joi-was-the-best-most-interesting-addition-to-the-franchise">Blade Runner 2049 fame as Joi </a>(a film so good <a href="https://www.andrewjly.com/blog/2017/12/1/blade-runner-2049-the-complete-comprehensive-critical-analysis">I wrote multiple articles</a> on it). Despite not being a woman who was bedded by Bond, she remains one of my favorite Bond girls to date. The action sequences and charm she brought to the silver screen in the short amount of time she had kept me wanting more, and to know that it won’t happen in the future is quite saddening. She was quite underutilized Unless they decide to do a Paloma spin-off, which in that case, sign me up!</p><h3>Subverting Expectations (Why?)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZJ-5tK-WrUboYJIkH3q9Ew.jpeg" /></figure><p>Now this part may be considered controversial to most, but I understood why they did it and in the end it did pay off for me. What I am referring to is Bond’s death. Bond being infected with the nanobots that were contagious to Madeleine and Mathilde was a bit contrived, but effective as it gave us a glimpse of Bond at his most mature in the final stages of his life. There had to be a reason for him to sacrifice himself and at least he did it to save thousands whilst giving us catharsis in knowing that his former lover and child get to live on.</p><p>A death of a Bond has never been seen before in this franchise, as he has always had the right gadget and quip to save his skin, but knowing and seeing a permanent end puts a definitive closure on his narrative and will set up for future Bonds to take the mantle. Obviously, many fans will be enraged to see their idol killed off in such a fashion, but to me it was a necessary decision and one that was not made lightly. The only pointless death was Felix Leiter ( <a href="https://www.imdb.com/name/nm0942482/?ref_=nv_sr_srsg_0">Jeffery Wright</a>), who was brought back out of retirement only to be shoehorned in a faux brotherly relationship with Bond, only to be killed halfway as an attempt to pull on the audience’s heartstrings.</p><h3>Overall Score:</h3><h3>7/10</h3><p>Despite all the missteps, I am impressed that Fukunaga attempted to take a chance on something different. Though the death of Bond was not something that was needed, it was a final love letter that showed that Bond isn’t some immortal being, and an actual person capable of change. He goes from a cold stoic to a loving father figure over the course of five films. I did not enjoy some of the character arcs and sloppy story beats, but the times they did revert to classic Bond, I felt myself salivate for more. Make no mistake, <em>No Time To Die</em> did give us something fresh, and paved the way for the next iteration of Bond films. It succeeded in closing the franchise and is definitely ranks better than <em>Quantum of Solace</em> and <em>Spectre</em>, but does not hold a candle to master classes like <em>Casino Royale</em> or <em>Skyfall</em>. Nonetheless, if you are a diehard fan like I am I still recommend you giving it a watch, just to see Daniel Craig’s Bond in action one last time.</p><p><em>Originally published at </em><a href="https://www.andrewjly.com/blog/2021/10/9/no-time-to-die-an-in-depth-review-of-daniel-craigs-final-bond-film"><em>https://www.andrewjly.com</em></a><em> on October 9, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca55ba351b02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 8 VSCode Extensions Every Developer Should Have Installed For Productivity]]></title>
            <link>https://andrewly.medium.com/top-8-vscode-extensions-every-developer-should-have-installed-for-productivity-795f198f7778?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/795f198f7778</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[vscode-extension]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Sun, 18 Apr 2021 00:00:00 GMT</pubDate>
            <atom:updated>2021-04-19T02:21:35.775Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a9W5RxORlqNkhltg" /></figure><p>I have selected my personal <strong>Top 8 VSCode Extensions</strong> that I believe every developer should have installed for productivity!</p><p>Why use Visual Studio Code (VSCode)? Well essentially, it is one of the most popular code editors out there. It’s free, it has a simple interface, and it has countless extensions which adds productivity and fun to your overall coding experience.</p><p>Remember, these are strictly my own preference, though I do believe these suggestions will also help newbie developers and perhaps some more seasoned veterans. Let’s get started!</p><h3>1. One Dark Pro Theme</h3><p>Themes are useful depending on each individual person. The provide a sense of customizability and are beneficial for readability and those long hours spent behind a monitor so it’s important to select something eye pleasing to yourself! I like this theme in particular, but thankfully the Visual Studio Marketplace has hundreds to choose from, so go nuts! Just promise me you won’t choose a light theme…because that’s just wrong.</p><p><a href="https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme">Extension Here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uWCpN98-5u0r2Q3V" /></figure><h3>2. GitLens</h3><p>GitLens simply helps you <strong>better understand code</strong>. That is it. It can:</p><ul><li>Show who, why, and when a line or code block was changed</li><li>Jump back through history to <strong>gain further insights</strong> as to how and why the code evolved</li><li>Effortlessly explore the history and evolution of a codebase</li><li>And much, much more!</li></ul><p>GitLens is <strong>powerful</strong>, <strong>feature rich</strong>, and highly customizable to meet your needs. Do you find code lens intrusive or the current line blame annotation distracting — no problem, quickly turn them off or change how they behave via the interactive GitLens Settings editor.</p><p><a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens">Extension Here</a></p><h3>3. Prettier</h3><p>It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.</p><p>This is especially useful when coding for periods of time and not having to worry about continuous formatting.</p><p><a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">Extension Here</a></p><h3>4. VSCode Icons</h3><p>Adds icons to your directories and files, making it easy to sift through and find what is what at a glance.</p><p><a href="https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons">Extension Here</a></p><h3>5. Bracket Colorizer 2</h3><p>This extension allows matching brackets to be identified with colors. The user can easily decipher which tokens to match, and which colors to use. This eliminates the guess work when it comes to coding, which then allows to better find pesky problems and fix them.</p><p><a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2">Extension Here</a></p><h3>6. JavaScript ES6 Snippets</h3><p>This is handy for JS developers and adds simple keywords that when combined with a hit of tab, will type out. It supports the following:</p><ul><li>JavaScript (.js)</li><li>TypeScript (.ts)</li><li>JavaScript React (.jsx)</li><li>TypeScript React (.tsx)</li><li>Html (.html)</li><li>Vue (.vue)</li></ul><p><a href="https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets">Extension Here</a></p><h3>7. Auto Complete Tag</h3><p>Another time saver, this extension does exactly what it says: it automatically completes your tag. So for all semantic elements, you’ll just need to type it once and it’ll finish for you. The best part? When you go back and decide to change the first element, it’ll also automatically fix the closing tag too!</p><p><a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-complete-tag">Extension Here</a></p><h3>8. Live Server</h3><p>Normally when coding, you have to refresh the page you’re working on to see changes. This can waste valuable time and become tedious after awhile. Well, not anymore! With Live Sever you can hot reload and test changes in your project in real-time when you save. No refreshing required! Just right-click after installation and try it yourself!</p><p><a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer">Extension Here</a></p><p><em>Originally published at </em><a href="https://www.andrewjly.com/blog/2021/4/18/top-8-vscode-extensions-every-developer-should-have-installed-for-productivity"><em>https://www.andrewjly.com</em></a><em> on April 18, 2021.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=795f198f7778" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Revert or Undo a Git Hard Reset]]></title>
            <link>https://andrewly.medium.com/how-to-revert-or-undo-a-git-hard-reset-29229609d7c1?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/29229609d7c1</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Tue, 27 Oct 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-10-28T22:46:37.871Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e6sVe5qoZhc0cWG7" /></figure><p>Okay, so you made a mistaken commit and you want to go back in time. Fortunately using this code in the terminal has helped:</p><pre>git reset --hard HEAD~1</pre><p>But then you’ve taken you too far and you’ve lost precious commits! All of a sudden you’re back to the very beginning and you have no clue how to get back! Rest assured you can! With this:</p><pre>git reflog</pre><p>Using this will bring up a log of all the previous commits you made in the past then with using:</p><pre>git reset --hard HEAD@{whichever number was next to that commit you want to go back to}</pre><p>And voila! You’re back in business. Hope this article saved ya time and trouble :)</p><p><em>Originally published at </em><a href="https://www.andrewjly.com/blog/2020/10/27/how-to-revert-or-undo-a-git-hard-reset"><em>https://www.andrewjly.com</em></a><em> on October 27, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29229609d7c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 Ways to Test your Web Application]]></title>
            <link>https://andrewly.medium.com/7-ways-to-test-your-web-application-cccd773285d1?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/cccd773285d1</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Wed, 19 Aug 2020 21:28:27 GMT</pubDate>
            <atom:updated>2020-08-27T11:49:07.100Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*lNmGgCizUYGTjazy" /></figure><h3>What is Web Testing and Why should I Test?</h3><p><em>Website testing</em> is checking your web application or website for potential bugs before its made live and is accessible to the general public. Web Testing checks for <em>functionality</em>, <em>usability</em>, <em>security</em>, <em>compatibility</em>, <em>database</em> <em>performance</em>, and <em>interface</em> of the web application or website.</p><p>During this stage issues such as that of web application security, the functioning of the site, its access to handicapped as well as regular users, and its ability to handle traffic is checked. Not only should you test to make sure your application is as viable as possible, but you should also keep in mind that not testing could result in loss of precious data or even affect your company’s standing with the public.</p><p>For software development, follow these 7 web testing requirements.</p><h3>1. Functionality Test</h3><p>Functionality Testing is a process that includes several testing parameters like user interface, APIs, database testing, security testing, client and server testing, and basic website functionalities. Functional testing is very convenient and it allows users to perform both manual and automated testing. It is performed to test the functionalities of each feature on the website.</p><p>Test all links in your webpages and make sure there are no broken links. Links to be tested include: external links, internal links, anchor tags, mailto links, and etc.</p><p>Test Forms are working as expected. This will include:</p><ul><li>Scripting checks on the form are working as expected. For example- if a user does not fill a mandatory field in a form an error message is shown.</li><li>Check default values are being populated.</li><li>Once submitted, the data in the forms is submitted to a live database or is linked to a working email address. These forms are formatted for better readability.</li></ul><p>Test Sessions or that cookies are working as expected. Cookies are small files used by websites to remember active user sessions so you do not need to log in every time you visit a website.</p><p>Cookie Testing will include: testing cookies are deleted either when cache is cleared or when they reach their expiry, and deleting cookies so login credentials are asked for when you next visit the site.</p><p>Test HTML and CSS to ensure that search engines can crawl your site easily. This will include: checking for syntax errors, readable Color Schemas, and standard compliance. Ensure standards such W3C, OASIS, IETF, ISO, ECMA, or WS-I are followed.</p><h3>2. Usability Test</h3><p>Usability Testing has now become a vital part of any web based project. It can be carried out by testers like you or a small focus group similar to the target audience of the web application.</p><p>Test the site navigation by ensuring menus, buttons or Links to different pages on your site should be easily visible and consistent on all webpages.</p><p>Test the web content by making sure content is legible with no spelling or grammatical errors and images, if present, should contain an “alt” text.</p><h3>3. Interface Test</h3><p>Areas to be tested: Application, Web and Database Server.</p><ol><li>Application: Test requests are sent correctly to the Database and output at the client side is displayed correctly. Errors if any must be caught by the application and must be only shown to the administrator and not the end user.</li><li>Web Server: Test Web server is handling all application requests without any service denial.</li><li>Database Server: Make sure queries sent to the database give expected results.</li></ol><h3>4. Database Test</h3><p>Database is one critical component of your web application and stress must be laid to test it thoroughly. Remember to:</p><ul><li>Test if any errors are shown while executing queries</li><li>Data Integrity is maintained while creating, updating or deleting data in database.</li><li>Test data retrieved from your database is shown accurately in your web application</li></ul><h3>5. Compatibility Test</h3><p>Compatibility tests ensures that your web application displays correctly across different devices. This would include a browser compatibility test by testing if your web application is being displayed correctly across browsers, JavaScript, AJAX and authentication is working fine. You may also check for Mobile Responsiveness.</p><p>Rendering of web elements like buttons, text fields etc. are different depending on Operating System. Make sure your website works fine for various combination of OS such as Windows, Linux, Mac. Also test browsers like Chrome, Firefox, Internet Explorer, Safari etc.</p><h3>6. Performance Test</h3><p>This will ensure your site works under all loads. Make sure:</p><ul><li>Website application response times at different connection speeds</li><li>Stress test your web site to determine its break point when pushed beyond normal loads at peak time</li><li>Make sure optimization techniques like file compression, browser/server side cache enabled to reduce load times, and minifying code</li></ul><h3>7. Security Test</h3><p>Security Testing is important for eCommerce websites that store sensitive customer information like credit card numbers, addresses, and etc. Testing the security by making sure:</p><ul><li>Unauthorized access to secure pages should not be permitted</li><li>Restricted files should not be downloadable without role access</li><li>Sessions are automatically killed after prolonged user inactivity</li><li>Site uses SSL certificates and should re-direct to encrypted SSL pages.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cccd773285d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Coding Writer’s Guide: How to Use Fixed Images With the Gatsby Image API]]></title>
            <link>https://medium.com/swlh/a-coding-writers-guide-how-to-use-fixed-images-with-the-gatsby-image-api-427b7f495d96?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/427b7f495d96</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[gatsbyjs]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Tue, 04 Aug 2020 18:58:40 GMT</pubDate>
            <atom:updated>2020-08-05T09:23:45.967Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*6B0SknLcZltCqBId.png" /></figure><h3>Why Use The Gatsby Image API</h3><p>So you’ve built a site using GatsbyJS and you want to implement an image component. It’s not the same as throwing an image tag as you would with a typical HTML and CSS site. But rather, the part that makes GatsbyJS sites so blazing fast is how the framework approaches to handling and optimizing its images. The gatsby-image is a React component designed to work with GatsbyJS&#39; native image processing capabilities, which is powered by GraphQL and gatsby-plugin-sharp to easily and completely optimize image loading for your sites.</p><h3>Setting up Gatsby Image</h3><p>To start working with Gatsby Image, install the gatsby-image package along with necessary plugins gatsby-transformer-sharp and gatsby-plugin-sharp. Reference the packages in your gatsby-config.js file. You can also provide additional options to gatsby-plugin-sharp in your config file.</p><p>A common way to source images is to install and use gatsby-source-filesystem to connect your local files, but other source plugins can be used as well, such as gatsby-source-contentful, gatsby-source-datocms, and gatsby-source-sanity. For this example, we&#39;ll be using the gatsby-source-filesystem.</p><p>First, run the following in the terminal to install:</p><pre>npm install --save gatsby-image gatsby-plugin-sharp gatsby-transformer-sharp</pre><p>Second, make sure your gatsby-config.js file has these plugins:</p><pre>module.exports = {<br>  plugins: [<br>    `gatsby-transformer-sharp`,<br>    `gatsby-plugin-sharp`,<br>    {<br>      resolve: `gatsby-source-filesystem`,<br>      options: {<br>        path: `${__dirname}/src/data/`,<br>      },<br>    },<br>  ],<br>}</pre><h3>Building The Component</h3><p>The next part would to add it to a component where we can starting by importing the gatsby-image. For this example, we&#39;ll be using it in a Bio component designed to be pulled into the bottom of every blog post.</p><p>GatsbyJS has image objects which are generated through GraphQL methods. There are two types of image optimizations available: <strong><em>fixed</em></strong> and <strong><em>fluid</em></strong>, which create multiple image sizes (1x, 1.5x, etc.).</p><p>Below is the typical boilerplate you would use for a component file. In our example we will be focusing on the fixed images. This is where fragments like GatsbyImageSharpFixed come in, as they’ll return all the above items in one line without having to type them all out like so:</p><pre>import { useStaticQuery, graphql } from &quot;gatsby&quot;<br>import Img from &quot;gatsby-image&quot;</pre><pre>export default function Image() {<br>  const data = useStaticQuery(graphql`<br>    query {<br>      file(relativePath: { eq: &quot;images/default.jpg&quot; }) {<br>        childImageSharp {<br>          # Specify a fixed image and fragment.<br>          # The default width is 400 pixels<br>          fixed {<br>            ...GatsbyImageSharpFixed<br>          }<br>        }<br>      }<br>    }<br>  `)<br>  return (<br>    &lt;div&gt;<br>      &lt;h1&gt;Hello There&lt;/h1&gt;<br>      &lt;Img<br>        fixed={data.file.childImageSharp.fixed}<br>        alt=&quot;alt-img-tag&quot;<br>      /&gt;<br>    &lt;/div&gt;<br>  )<br>}</pre><p>Next, is integrating the query and along of the other styling within JSX format to fit your needs. The query parameters differ from fixed and fluid, so make sure to consult the official Gatsby documentation if you want to specific options for your images. In this instance we’ve queried for the width and height at 100.</p><pre>import React from &quot;react&quot;;<br>import { useStaticQuery, graphql } from &quot;gatsby&quot;;<br>import Img from &quot;gatsby-image&quot;;<br>const Bio = () =&gt; {<br>  const data = useStaticQuery(graphql`<br>    query {<br>      file(relativePath: { eq: &quot;images/your-pic-img.jpg&quot; }) {<br>        childImageSharp {<br>          fixed(width: 100, height: 100) {<br>          # Specify a fixed image and fragment.<br>          # The default width is 400 pixels<br>            ...GatsbyImageSharpFixed<br>          }<br>        }<br>      }<br>    }<br>  `);<br>  return (<br>    &lt;div<br>      style={{<br>        display: `inline-flex`,<br>        justifyContent: `center`,<br>        flexWrap: `wrap`,<br>        marginBottom: 10,<br>        alignItems: `center`,<br>      }}<br>    &gt;<br>      &lt;Img<br>        fixed={data.file.childImageSharp.fixed}<br>        alt=&quot;your-pic-alt-img&quot;<br>        style={{<br>          marginTop: 80,<br>          marginBottom: 10,<br>          minWidth: 50,<br>          borderRadius: `100%`,<br>        }}<br>        imgStyle={{<br>          borderRadius: `50%`,<br>        }}<br>      /&gt;<br>      &lt;p<br>        style={{<br>          flex: 1,<br>          marginTop: 80,<br>          padding: 10,<br>        }}<br>      &gt;<br>        Written by &lt;strong&gt;Andrew Ly&lt;/strong&gt;. He is the founder of Neo<br>        Typewriter and lives in Orange County as a writer, entrepreneur, and<br>        full-stack developer. You can follow him on{&quot; &quot;}<br>        &lt;a href=&quot;https://twitter.com/*yourusername*&quot;&gt;Twitter&lt;/a&gt;. His YA novel,{&quot; &quot;}<br>        &lt;a href=&quot;https://www.*yoururl*.com&quot;&gt;<br>          Gods From the Machine<br>        &lt;/a&gt;{&quot; &quot;}<br>        is currently available for purchase.<br>      &lt;/p&gt;<br>    &lt;/div&gt;<br>  );<br>};</pre><pre>export default Bio;</pre><p>The end result is a reusable and customizable component suitable for any blog or portfolio website as shown here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mg9s8co86sQNVtAM.png" /></figure><p>Please contact me if you have any further questions or concerns! Or if you prefer working with me on a project, send an email to <strong>theneotypewriter@gmail.com</strong>, cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=427b7f495d96" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/a-coding-writers-guide-how-to-use-fixed-images-with-the-gatsby-image-api-427b7f495d96">A Coding Writer’s Guide: How to Use Fixed Images With the Gatsby Image API</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[Pros and Cons Between Single Page and Multi-Page Apps]]></title>
            <link>https://andrewly.medium.com/pros-and-cons-between-single-page-and-multi-page-apps-8f4b26acd9c9?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f4b26acd9c9</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[application-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Mon, 03 Aug 2020 22:30:42 GMT</pubDate>
            <atom:updated>2020-08-05T12:27:25.174Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*NSYPjg0Nhsnpy36r.png" /></figure><p>Currently, there are two ways of building websites: as <strong>multi-page applications</strong> (MPAs) or as <strong>single-page applications</strong> (SPAs). SPAs are more modern, but that does <em>not</em> invalidate MPAs. The decision between a single-page and multi-page application depends on business goals and the future architecture.</p><p>Here some of the pros and cons of single-page and multi-page applications.</p><h3>What’s a Single Page Application?</h3><p>A SPA works in the browser and requires no page reloads and no extra time for waiting. The page doesn’t need to be updated since content is downloaded automatically. Facebook, Gmail, Twitter, Google Drive, or even GitHub are excellent examples of single-page apps.</p><p>SPAs use AJAX and HTML5 as the groundwork to build responsive apps. JavaScript frameworks such as Angular, React, and Vue are responsible for handling the client side for a single-page app.</p><p>Now let’s dive a bit deeper into SPAs and consider the pros and cons of this development approach.</p><h3>Advantages of Single-Page Applications</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lYTYWGozG91c5mmu.png" /></figure><h4>Faster and responsive</h4><p>Since single-page applications don’t update the entire page but only the required content, and so they significantly improve a website’s speed. Most resources are only loaded once throughout the lifespan of an application. Only data is transmitted back and forth. This is a great advantage, and according to Google research, if a page takes more than 200 milliseconds to load it can have a potentially high impact on business and sales.</p><h4>Better caching capabilities</h4><p>A single-page app can cache any local data effectively. A SPA sends only one request to a server and then stores all the data it receives. Then it can use this data and work even offline. If a user has poor connectivity, local data can be synchronized with the server when the connection allows.</p><h4>Simple, linear user experience</h4><p>SPAs provide users with a simple linear experience. These web apps contain a clear beginning, middle, and end. With SPAs, scrolling is convenient and uninterrupted; there’s no need to click on endless links. The scrolling nature of SPAs makes them perfectly suited for mobile users.</p><h4>Easy debugging with Chrome</h4><p>It’s easy to debug an SPA with Chrome since such apps are developed on frameworks like AngularJS Batarang and React developer tools. These frameworks have their own Chrome developer tools that make debugging much easier than with MPAs. In addition, SPAs allow you to monitor network operations and investigate page elements and data associated with them.</p><p>But with all their benefits, SPAs also have some disadvantages that you should consider. Let’s take a look at them.</p><h3>Disadvantages of Single-Page Applications</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eUIhEIRdkp3OL0rv.png" /></figure><h4>Poorer SEO optimization</h4><p>Some people are of the opinion that SPAs provide poor SEO optimization. This is because single-page apps operate on JavaScript and download data on request from the client side. The URL doesn’t really change and different pages don’t have their unique URL addresses. It’s hard to optimize these websites for search engines since most pages can’t be scanned by search bots.</p><p>Recently, Google launched a new scheme to increase single-page app SEO optimization. Google now indexes dynamic pages. But for this, developers need to make sure that their JavaScript files can be indexed by Google (because Google runs them in their crawler). They also need to verify that a website uses HTML5 mode in the URL scheme.</p><h3>Lacking browser history</h3><p>An SPA doesn’t save when visitor’s jumps between states. This means that when users click the back button, they won’t go back. A browser only takes users to the previous page, not to the previous state in an app.</p><p>To combat this problem, there’s an HTML5 History API with which developers can equip their SPA frameworks. The History API offers developers access to browser navigation history via JavaScript.</p><h3>More Security issues</h3><p>Single-page apps are more vulnerable to cross-site scripting (XSS) attacks than are multi-page apps. Using XSS, hackers can inject client-side scripts into web applications.</p><p>One security issue is the exposure of sensitive data. If developers aren’t careful about what data is contained in the initial page load, they can easily send data that shouldn’t be exposed to all users. The entirety of an SPA isn’t generally visible in the browser, which can provide a false sense of security.</p><h3>When to use an SPA</h3><p>Single-page web applications fit perfectly for building dynamic platforms with small data volumes. Furthermore, a single-page app is ideal as a base for future mobile app development. The main drawback of this development approach is poor SEO optimization. But this architecture is excellent for SaaS platforms, social networks, and closed communities where search engine optimization doesn’t matter. If a project requires effective SEO, on the other hand, then you should use a multi-page application.</p><h3>What’s a Multi-Page App?</h3><p>Comparatively, a multi-page website is a more complex website that contains multiple different pages like an eCommerce store such as Amazon or eBay.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nlcom7QtclppI9ZX.png" /></figure><p>eBay is a prime example of an online store that consists of several pages with static information such as: text, images, and several links to other pages. Multi-page apps work in a traditional way and are extremely large out of necessity. Due to the amount of content they contain, multi-page apps are generally many levels deep with lots of links and intricate interfaces. An MPA like eBay can consist of many micro-websites and subsections to break down content and allow multiple entry points.</p><p>The main technologies for building multi-page websites are HTML and CSS. To increase speed and reduce the load, many developers use JavaScript and jQuery.</p><p>Before choosing this development approach, let’s look at the key advantages and disadvantages of building multi-page applications.</p><h3>Advantages of Multi-Page Applications</h3><h4>Better SEO</h4><p>SEO is better on MPAs since the architecture is native to search engine crawlers. Such apps provide better control over SEO thanks to multiple pages and changing content. Moreover, developers can add meta tags to every page. An MPA gives a better chance of ranking for different keywords since an app can be optimized for one keyword per page.</p><h4>Unlimited scalability</h4><p>MPAs allow you to create new content and place it on new pages. Multi-page apps can include as much information about products or services as required, with no page limitations. Single-page applications don’t allow a lot of features on one page, which can lead to longer loading times. Therefore, when company needs more features, they decide to use multi-page applications.</p><h4>Better Insights from Analytics</h4><p>MPAs can provide lots of analytics with valuable information on how a website is performing: which features are working and which aren’t. With a single-page app, the only useful information you can collect is who visitors are and for how long they stay on the site.</p><h3>Disadvantages of Multi-Page Applications</h3><p>Along with the advantages there are some considerable disadvantages of building a multi-page app. Let’s consider them.</p><h4>Slower speed and overall performance</h4><p>With multi-page apps, a server needs to reload most resources such as HTML, CSS, and scripts with every interaction. When loading another page, the browser completely reloads page data and downloads all resources again, even components that are repeated throughout all pages such as the header and footer. This negatively affects speed and performance.</p><h4>More time for development</h4><p>Compared to SPAs, MPAs take longer to develop. In most cases, developers have to code the backend from scratch. There are also difficulties in frontend and backend separation since they interact very closely with each other. Developers need to use frameworks for both the frontend or backend. This results in longer app development.</p><h4>Harder maintenance and updates</h4><p>Maintaining and updating multiple pages can be a pain, and things only get worse the bigger a website becomes. In addition, maintaining security may be problematic because developers need to secure each separate page. Single-page apps allow developers to just secure data endpoints.</p><h3>When to use a Multi-Page App</h3><p>A multi-page application is appropriate for large companies with a broad range of products or services that require lots of features and multiple menus. An MPA is more suitable for online stores, business sites, catalogs, and marketplaces. Companies running these sites most likely also have diverse user bases. To put it simply, if you have a lot of content and features to include on your website or if you are selling multiple products and services, an MPA would be the better choice.</p><h3>Million Dollar Question: Which should you use?</h3><p>It really depends on the situation. Each architecture has its pros and cons and is well suited to a particular type of project and specific business goals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f4b26acd9c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ways to apply Google’s AMP to your Website]]></title>
            <link>https://andrewly.medium.com/ways-to-apply-googles-amp-to-your-website-a28f2fef3987?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/a28f2fef3987</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Mon, 03 Aug 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-08-27T04:28:05.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7vcjNohuxRQGVh7M" /></figure><p><a href="https://amp.dev/"><strong>Accelerated Mobile Pages</strong></a> or <strong>AMP</strong> for short, is a framework toted by Google since 2015 and has supported well-known companies such as: Adobe, LinkedIn, Reddit, WordPress, Vimeo, eBay, Pinterest, Washington Post, Wired, Gizmodo, and much more. It’s an open framework built entirely out of existing web technologies, which allows websites to build light-weight webpage. AMP does not simply replace your existing website.</p><p><strong>Essentially it is another site with the same content, but stripped down for mobile users.</strong></p><h3>How AMP Works</h3><p>AMP is made of 2–3 main components:</p><ol><li><strong>AMP HTML.</strong> This is a subset of HTML that you’re allowed to use. It restricts the use of commands and code that doesn’t work, works poorly, or works slowly on mobile devices. You are also limited to a streamlined version of CSS.</li><li><strong>AMP JS.</strong> Where AMP HTML is a subset of HTML designed for fast mobile use, AMP JS is a subset of JavaScript that works the same way. It’s a specific JS library you can use to write your scripts. It requires that content from an external source — like a CDN — be loaded asynchronously.</li><li><strong>AMP CDN (optional)</strong> This is a content delivery network and cache provided by Google. It caches AMP content and makes some automatic performance enhancements. You can put any or all AMP content on it, including the HTML file, any JS files, and all images. It’s also <em>optional</em>. If your web server is fast enough, you probably won’t need to use AMP CDN at all.</li></ol><p>Advertising can still be done on your AMP pages, but you have to use AMP-formatted ads through one of the AMP platforms. A lot of the major ad networks support AMP, to varying degrees, but if you have a custom ad solution, you will need to work with a developer to code it properly within AMP and get it added to the AMP supported list.</p><p><strong>Other benefits of AMP include:</strong></p><ul><li>AMP can improve the load times of your WordPress site. Which in turn helps rankings.</li><li>Better placements in SERPs with carousel possibility for better CTR.</li><li>Forces a lot of best web practices such as prevention of large CSS and JS frameworks.</li><li>Potentially impact your conversions in a positive way.</li><li>Advertising options are now readily available in Google AMP. This means magazines and new publications can retain or even increase their AdSense revenue.</li><li>Automatic image optimization!</li><li>AMP Lite introduces further optimization for slow network connections.</li></ul><p><strong>But as great as it is, there are a few downsides to using AMP:</strong></p><ul><li>You must validate any AMP page before you can use it fully.</li><li>You have to special load custom fonts, declare the dimensions of images, and a few other coding quirks.</li><li>You can’t use forms.</li><li>No opt-ins allowed just yet.</li><li>Currently it does not affect rankings.</li><li>Difficult to implement and test if you’re not a developer.</li><li>Lack of support from some older browsers such as Internet Explorer 11.</li></ul><h3>Switching to AMP</h3><p>Learning AMP is almost like learning an entirely new coding language. If you’re not a developer, you should contact a developer (DM me!). The AMP is complicated enough and restrictive enough that it will benefit you to find someone who is familiar with the system to get you up and running sooner rather than later.</p><h3>AMP For WordPress Users</h3><p>If you use WordPress, the most simple way of implementing AMP is through <a href="https://wordpress.org/plugins/amp/">the official AMP WordPress plugin</a>.</p><p>Once the plugin is installed, you can test to see if your AMP pages work by adding “/amp” to the end of your URLs. Or, if you don’t have permalinks but parameters instead, you can add ?amp=1 to the end to test.</p><p>You’re not quite done. <strong>You still have to validate your AMP pages</strong>, and to do that, you need to use the official validator. You can find the various options — command line, web interface, developer console, etc — <a href="https://www.ampproject.org/docs/guides/validate">here</a>, as well as the documentation for using it and for fixing errors.</p><p>People might be wondering how AMP effects SEO because you now have two copies of the same page or post. You don’t need to worry about duplicate content because the WordPress plugin allows canonical tags with AMP. Canonical tags tell Google that the original content is your desktop version.</p><p>Example of your original page link tag:</p><pre>&lt;link rel=&quot;amphtml&quot; href=&quot;https://domain.com/amp/&quot;&gt;</pre><p>Versus what it appears like on your AMP page:</p><pre>&lt;link rel=&quot;canonical&quot; href=&quot;https://domain.com/&quot;&gt;</pre><h3>AMP For Developers</h3><p>What if you’re not a WordPress user, but you are a developer? In that case, you’ve got your work cut out for you. A good place to start is the <a href="https://amp.dev/documentation/guides-and-tutorials/">basic AMP tutorial</a>, which will help you work your way through making an AMP-ready HTML page. It goes over the specifics of what HTML and CSS you can use, tips for applying images and media, and modifying the basic AMP templates. You will also learn how to use iframes, how to use third party content, and how to configure analytics for AMP pages.</p><p>A boilerplate AMP HTML page appears like so:</p><pre>&lt;!doctype html&gt;<br>&lt;html amp lang=&quot;en&quot;&gt;<br>  &lt;head&gt;<br>    &lt;meta charset=&quot;utf-8&quot;&gt;<br>    &lt;script async src=&quot;https://cdn.ampproject.org/v0.js&quot;&gt;&lt;/script&gt;<br>    &lt;title&gt;Hello, AMPs&lt;/title&gt;<br>    &lt;link rel=&quot;canonical&quot; href=&quot;https://amp.dev/documentation/guides-and-tutorials/start/create/basic_markup/&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,minimum-scale=1,initial-scale=1&quot;&gt;<br>    &lt;script type=&quot;application/ld+json&quot;&gt;<br>      {<br>        &quot;@context&quot;: &quot;http://schema.org&quot;,<br>        &quot;@type&quot;: &quot;NewsArticle&quot;,<br>        &quot;headline&quot;: &quot;Open-source framework for publishing content&quot;,<br>        &quot;datePublished&quot;: &quot;2015-10-07T12:02:41Z&quot;,<br>        &quot;image&quot;: [<br>          &quot;logo.jpg&quot;<br>        ]<br>      }<br>    &lt;/script&gt;<br>    &lt;style amp-boilerplate&gt;body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}&lt;/style&gt;&lt;noscript&gt;&lt;style amp-boilerplate&gt;body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}&lt;/style&gt;&lt;/noscript&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>    &lt;h1&gt;Welcome to the mobile web&lt;/h1&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>For performance and usability reasons, AMP limits some CSS styles and total bytes to 75,000 per page. However, AMP expands responsive design capabilities with features like placeholders &amp; fallbacks, advanced art direction via srcset and the layout attribute for better control over how your elements display.</p><h3>Should You Use AMP?</h3><p>The biggest question at the end of the day is <strong>whether or not you should use AMP.</strong> Google is heavily pushing it, but ultimately it comes to your needs.</p><p>Here are some guidelines to see if it’s something you should invest the time and, potentially, money, into implementing.</p><p>The primary question is whether or not you already have a fast-loading mobile version of your site in place. If you do you probably don’t need to implement AMP. Right now, AMP only benefits the search ranking of a site because it’s a way of speeding up a site and making it mobile ready, both of which are search factors on their own. Whether you do that with AMP or with your own custom code doesn’t matter, so long as mobile users can view it and it loads quickly for all users.</p><p>Next, does your company or personal site require cutting edge tech at all times? If so, then apply AMP to your site. It wouldn’t hurt by any means and it will also prepare you for the day when Google decides AMP should be a ranking factor of its own.</p><p>Last, but most importantly, do you care about mobile? You should, even though there are certainly some sites, like B2B brands and sites thrown up for informational purposes rather than commercial purposes that don’t really care about mobile users. If you don’t and won’t ever care about mobile (you should care about mobile), go ahead and forgo AMP, but do so that the disservice of your company or users.</p><p><em>Originally published at </em><a href="https://www.andrewjly.com/blog/2020/8/3/ways-to-apply-googles-amp-to-your-website"><em>https://www.andrewjly.com</em></a><em> on August 3, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a28f2fef3987" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Code Tip: Arguments versus Parameters]]></title>
            <link>https://andrewly.medium.com/quick-code-tip-arguments-versus-parameters-f86f623c4c73?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/f86f623c4c73</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Tue, 21 Jul 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-07-21T21:12:39.865Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ztCNLlTxZxbHCSXP" /></figure><h3>What’s the difference between Arguments and Parameters?</h3><p>Arguments and parameters are often referred to interchangeably, but they are in fact, different. Not by much but in order to speak the language among coders, and for the purpose of this quick tip tutorial, we will make the distinction.</p><blockquote><strong><em>Parameters </em></strong><em>(or formal parameters) are the variables given </em><strong><em>inside</em></strong><em> the function declaration</em></blockquote><p><strong><em>VERSUS</em></strong></p><blockquote><strong><em>Arguments </em></strong><em>(or actual parameters) are the values </em><strong><em>passed</em></strong><em> to the function.</em></blockquote><p>The distinction is subtle, but parameters are what is initially put into the function definition, whereas the arguments are what you pass in after. Let’s take it one step further with an example function:</p><pre>function foo(param1, param2) { // do something } foo(10, 20);</pre><p>In this function example, param1 and param2 are function parameters, and the values passed to the function ( 10 and 20) are arguments.</p><p>And that’s it! Hope it helps!</p><p><em>Originally published at </em><a href="https://www.andrewjly.com/blog/2020/7/23/quick-code-tip-arguments-versus-parameters"><em>https://www.andrewjly.com</em></a><em> on July 21, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f86f623c4c73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Emmet Configuration for JSX in VSCode]]></title>
            <link>https://medium.com/swlh/emmet-configuration-for-jsx-in-vscode-f1f6e1bc6b66?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1f6e1bc6b66</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[shortcuts]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Fri, 17 Jul 2020 03:54:29 GMT</pubDate>
            <atom:updated>2020-07-17T19:17:36.313Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WSfXVYOyR1P86hy7.jpg" /></figure><p>To enable Emmet depends on the code editor of your preference. In the case of Visual Studio Code (VSCode), if you want to configure it for current work space you’ll just need to follow these easy steps:</p><p>First, get to your <strong>Settings </strong>by:</p><p>This shortcut for PC users: Ctrl + ,</p><p>This shortcut for Mac users: Command + ,</p><p><em>Or</em> if you prefer not to use shortcuts for some reason: <strong>File &gt; Preferences &gt; Settings</strong></p><p>Next, get into the <strong>Workspace </strong>section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VcVUp46Q9xEqnEoM.png" /></figure><p>Then select <strong>Extensions &gt; Emmet</strong>. Scroll down to <strong>Emmet Include: Languages</strong> and select the <strong>Edit in settings.JSON</strong> link directly underneath it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0kzPldhy4ctuWF1P.png" /></figure><p>Now you’re in the settings.JSON file. Finally, copy the following code:</p><pre>{<br>  &quot;emmet.includeLanguages&quot;: {<br>    &quot;javascript&quot;: &quot;javascriptreact&quot;<br>  }<br>}</pre><p>And paste it directly into the settings.JSON file and save the file. Reload VSCode editor and that should do the trick! You can now use Emmet for your React projects!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1f6e1bc6b66" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/emmet-configuration-for-jsx-in-vscode-f1f6e1bc6b66">Emmet Configuration for JSX in VSCode</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[An Easy Guide to use Instagram’s New API in 2020]]></title>
            <link>https://andrewly.medium.com/an-easy-guide-to-use-instagrams-new-api-in-2020-cd353b35c749?source=rss-e004ff661762------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd353b35c749</guid>
            <category><![CDATA[instagram]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Andrew Ly]]></dc:creator>
            <pubDate>Mon, 06 Jul 2020 00:00:00 GMT</pubDate>
            <atom:updated>2020-07-06T19:58:00.146Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gBkhs2KsDrOzwbQ6" /></figure><p>You’re here because Instagram’s Legacy API, or their ‘Basic Permissions’ has been deprecated in June 2020. In order to continue using their services, and to ensure your latest application or website functions the same way, you have to go through with learning how to access their <em>new </em>API.</p><p>The problem? <strong>Facebook’s documentation for Instagram’s API sucks. Hard.</strong></p><p>Now I can go on a several minute tirade about how the examples they provide are unclear and the links send you to random examples that loop you around like a boring rollercoaster, but you already knew that. If not, let me save you the headache and show you exactly how to use Instagram’s new API for your website. Let’s dive in!</p><h3>Step 1. Getting Started</h3><p>Make sure you have all of this ready to go:</p><ol><li><a href="https://developers.facebook.com/">Facebook Developer Account</a></li><li>The <a href="https://www.instagram.com/">Instagram Account</a> that you want to use</li><li>The website you want to display the Instagram content.</li><li>Download <a href="https://www.postman.com/">Postman</a> to write your queries and requests</li></ol><h3>Step 2. Make your Facebook App</h3><ul><li>Go to your <strong>Facebook Developer Account</strong>, select <strong>My Apps</strong>, and make a new app with any name you choose. Use a name that is easy to identify.</li><li>Once you have made the app and are within the<strong> App Dashboard</strong>, go to <strong>Settings</strong> &gt; <strong>Basic</strong>, and scroll the bottom of page, and click <strong>Add Platform</strong>. Like so:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bgt12LUx5eXH4bwhDN4Sfg.png" /></figure><ul><li>Then select <strong>Website</strong>, add your website’s URL, and save your changes.</li></ul><p><strong>Note: It’s important to put the entire url, <em>including the forward slash</em> at the very end.</strong></p><p>Congratulations! Your Instagram account is now eligible to be accessed by your Facebook app while it is in <strong>Development Mode</strong>. We don’t need it to be live or in any other mode for our purposes.</p><h3>Step 3: Set Up Instagram Basic Display</h3><ul><li>Select <strong>Products</strong>, find the <strong>Instagram</strong> product, and select <strong>Set Up</strong> to add it to your app. We are only using Instagram so only choose this product.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEIfVC0APGypNqTJYKUYCQ.png" /></figure><ul><li>Choose <strong>Basic Display</strong>, scroll to the bottom of the page, then select <strong>Create New App</strong>.</li></ul><p>In the form that appears next, complete each section using the guidelines below.</p><h3>Display Name</h3><p>Enter the name of the Facebook app you just created.</p><h3>Valid OAuth Redirect URIs</h3><p>Enter your website’s URL in its completed form.</p><p>For example: <a href="https://thenameofyourwebsite.com/">https://thenameofyourwebsite.com/</a></p><p>After you enter a URL, save your changes and check the URL again. <strong>Make sure it follows exactly! Including the trailing forward slash depending your URL structure</strong>. In fact, you should probably just copy your website link.</p><h3>Deauthorize Callback URL</h3><p>Enter your website’s URL again (Paste the link you just copied).</p><h3>Data Deletion Request Callback URL</h3><p>Enter your website’s URL once again. (Again, past the link you just copied).</p><p>Make sure you save everything.</p><h3>Step 4: Add Instagram Tester</h3><ul><li>Navigate to <strong>Roles</strong> &gt; <strong>Roles</strong> and scroll down to the <strong>Instagram Testers</strong> section. Click <strong>Add Instagram Testers</strong> and enter your Instagram account’s username and send the invitation.</li><li>Open a new, separate web browser and go sign into your Instagram account that you just invited. Then go to <strong>(Profile Icon)</strong> &gt; <strong>Edit Profile</strong> &gt; <strong>Apps and Websites</strong> &gt; <strong>Tester Invites</strong> and accept the invitation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5SAla6krUA9RURJIPVl5Kg.png" /></figure><p>Congratulations! Your Instagram account is now eligible to be accessed by your Facebook app while it is in <strong>Development Mode</strong>. We don’t need it to be live or in any other mode for our purposes.</p><h3>Step 5. Generate Long-Lived Instagram User Access Token</h3><p>Skip the unnecessary window authentication url step and directly to the token generator for a long-lived token. <strong>Long-lived tokens</strong> are <strong>valid for 60 days</strong> and can be refreshed before they expire. Once you have a long-lived access token you can refresh it before it expires through the GET /refresh_access_token endpoint.</p><ul><li>You can access the token generator in the <strong>App Dashboard</strong> &gt; <strong>Products</strong> &gt; <strong>Instagram</strong> &gt; <strong>Basic Display</strong> tab.</li><li>From the<strong> Basic Display</strong> find and select the <strong>Instagram App Secret </strong>to get your token! Easy right?</li></ul><h3>Step 6. Query User’s Media With Access Token</h3><p>In order to grab data on the Instagram’s public profile, we’ll need to send a <strong>GET request</strong></p><ul><li>Take you new <strong>long-lived access token</strong> and write the basic request structure with this endpoint in Postman:</li></ul><p>&#39;https://graph.instagram.com/?fields={fields}&amp;access_token={access-token}&#39;</p><p>Replace {fields} with a comma-separated list of User fields you want returned (<a href="https://developers.facebook.com/docs/instagram-basic-display-api/reference/media#fields">find them in the official documentation right here</a>) and {access-token} with the user’s access token. The GET /me endpoint will determine the user’s ID from the token and redirect the request to the User node.</p><ul><li>The response you should get back should look something like this:</li></ul><pre>{<br>  &quot;id&quot;: &quot;17841405793187218&quot;,<br>  &quot;username&quot;: &quot;andrewly&quot;<br>}</pre><p>For a list of fields you can query <a href="https://developers.facebook.com/docs/instagram-basic-display-api/reference/media#fields">go here</a></p><p>That’s it! Once you pull the information you want to display, add it to your project in which ever way suits your needs!</p><p><em>Originally published at </em><a href="https://www.andrewjly.com/blog/2020/7/6/an-easy-guide-to-use-instagrams-new-api-in-2020"><em>https://www.andrewjly.com</em></a><em> on July 6, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd353b35c749" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>