<?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 Avery Lin on Medium]]></title>
        <description><![CDATA[Stories by Avery Lin on Medium]]></description>
        <link>https://medium.com/@tclin100?source=rss-979574db73b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*IbJM5GAGMjORWTMzz3QvRQ.jpeg</url>
            <title>Stories by Avery Lin on Medium</title>
            <link>https://medium.com/@tclin100?source=rss-979574db73b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:57:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tclin100/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[Get started with Jekyll]]></title>
            <link>https://medium.com/@tclin100/get-started-with-jekyll-101dfdf1dc42?source=rss-979574db73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/101dfdf1dc42</guid>
            <dc:creator><![CDATA[Avery Lin]]></dc:creator>
            <pubDate>Tue, 07 Dec 2021 20:09:22 GMT</pubDate>
            <atom:updated>2021-12-07T20:10:31.488Z</atom:updated>
            <content:encoded><![CDATA[<ol><li><strong>Install the following:</strong></li></ol><pre>- Ruby version 2.5.0 or higher (check your Ruby version using &quot;ruby -v&quot; in your terminal)<br>- RubyGems (check your Gems version using gem -v)<br>- GCC and Make (check versions using gcc -v,g++ -v, and make -v)</pre><p>2. <strong>Install Jekyll</strong></p><pre>gem install jekyll bundler</pre><p><strong>3. Create a site</strong></p><pre>jekyll new nameOfYourSite//By entering the line above on your terminal, Jekyll creates basic files to set up your blog</pre><p><strong>4. View your site at:</strong></p><pre>bundle exec jekyll serve//Run code above AFTER you cd into the new jekyll file created at step 3</pre><p>You will see below the basic website Jekyll created:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*0_pno5QLf0RP4xYd" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*RpsPf0wExQQ8dI_P.png" /></figure><p>How to create a blog:</p><ul><li>Create a new file in posts folder and name it in this format: <em>yyyy-mm-dd-name-of -the-post.markdown (</em>you should only use hyphen in the file name so it recognize it as space when it’s shown on the website)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*B-OwQOKHBYAYT61h" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/0*pDMJ3bUOs1-Tcj5h.png" /></figure><ul><li>Add the front in between the three hyphens</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*k6LfBt8YFwpewHb3" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/0*craIkGr_l4mMJLdx.png" /></figure><ul><li>Write and edit your content</li><li>Not ready to post? Create a draft! Draft will not be posted on the website and there is no need to follow the naming rules when you create the post.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*a1IOnOpsVOIYc-lD" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/0*XtuBowjzxXagPyBx.png" /></figure><p>How to create a page:</p><ul><li>Create a markdown file right under the blog folder</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*anXx90-BnRFOf6-x" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/0*e58Zksm0AVsJg1ab.png" /></figure><ul><li>Add front matter with layout type as “page” and title as “Contact Me (or however you want to name the page”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*NK6MS0WvLHqFFbiR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/0*57KBjB7KhrNflP-B.png" /></figure><ul><li>The page will show on the top right corner of the web page and the URL will be: localhost:4000/ContactMe</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*8xSFT-V0DoWuyGzL" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/0*qBmHxEThlExcBapk.png" /></figure><p><strong>5. Host your blog site with GibHub with no hosting cost</strong></p><ul><li>Install git in your computer</li><li>Create a GitHub Account</li><li>Create a new GitHub Repository (without initialize README file)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*bt4ghp08nLwMYSsG" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/0*WLydap8qg4MMAn46.png" /></figure><ul><li><strong>!!IMPORTANT — open your blog files in VS Code and update the baseurl in the “_config.yml” file to “nameOfYourGitHubRepository”. For example, if you named your new repository on the step above as “my_blog”, then you should put “my_blog” in the baseurl line.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/38/0*AS4s8u4vIRgjneeA" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/0*t2p5oNQn59J1QEBv.png" /></figure><ul><li>In your terminal and under the blog folder</li></ul><pre>git init<br>git commit -m &quot;initial commit&quot;<br>git remote add origin <a href="https://github.com/YourGibHubUsername/YourRepositoryname.git">https://github.com/YourGibHubUsername/YourRepositoryname.git</a><br>git push origin main</pre><ul><li>Your site is published!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=101dfdf1dc42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to seed with Faker gem (Rails)]]></title>
            <link>https://medium.com/@tclin100/how-to-seed-with-faker-gem-rails-8aae732fed8d?source=rss-979574db73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8aae732fed8d</guid>
            <dc:creator><![CDATA[Avery Lin]]></dc:creator>
            <pubDate>Tue, 07 Dec 2021 20:00:09 GMT</pubDate>
            <atom:updated>2021-12-09T04:03:49.869Z</atom:updated>
            <content:encoded><![CDATA[<p>Faker library helps populate large database with real-looking test data in just seconds!</p><ol><li>Install Faker gem</li></ol><pre>gem install faker</pre><p>2. At the beginning of your “seeds.rb” file, put</p><pre>require &#39;faker&#39;</pre><p>3. Now you can start creating data with faker gem! Example below shows how to create users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*tz329PbMElXh-c2PAq7QjQ.png" /></figure><p>4. You can do so much more with available categories listed here: <a href="https://github.com/faker-ruby/faker">https://github.com/faker-ruby/faker</a>. Below are samples of categories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*BhMeNeoZBep_S7_SeOwKjw.png" /></figure><p>5. Under each category, there are many sub-category to choose from based on your need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*CO895KciQoio7Wg7C5rTxg.png" /></figure><p><strong>Helpful Notes: </strong>below tips are not necessary while using faker gem but</p><ol><li>Code below is useful to add prior to create your seeds. So that if you need to re-seed your file, it will erase data from previous seeding.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*385ocnEvAFCm9RmiJR3SYg.png" /></figure><p>2. The terminal will only tell you if there are issues with seeding, not if it’s completed successfully. Print a string at the end of your seeding code. So that you know it’s done!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*YVpA7AEdMBvn8LZAOUAjbw.png" /></figure><p>3. If you want unique data, add the word “unique” in between the category and sub-category. For example, if I want to generate unique emails throughout my database; I would rewrite my code from step 3 to generate email as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*W1LsFqFZyNfCuXJgllL-XA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8aae732fed8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Buy Me A Coffee Button]]></title>
            <link>https://medium.com/@tclin100/draft-93926fa9f7fc?source=rss-979574db73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/93926fa9f7fc</guid>
            <dc:creator><![CDATA[Avery Lin]]></dc:creator>
            <pubDate>Wed, 24 Nov 2021 21:23:53 GMT</pubDate>
            <atom:updated>2021-11-24T22:00:32.209Z</atom:updated>
            <content:encoded><![CDATA[<p>You can receive support from others for your work through Buymeacoffee.com. This artile will demostrate ways to do that with your own domain and on Medium.com — a blogging platform.</p><p>1. Sign up for an account on <a href="https://www.buymeacoffee.com/">https://www.buymeacoffee.com/.</a> During the sign up process, you will be redirected to a payment processing platform such as Stripe.com. An account with the payment processing platform is also needed so you can received your payment.</p><p>2. Log in to your Buymeacoffee account</p><p>3. Go to Dashboard and click on “Website buttons”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*k4lPkRo23k-7CTMPXVP-pQ.png" /></figure><p>4. Personalize the widget</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*66wEnV53ozKDLaHpkQVXwA.png" /></figure><p>5. Click on “Generate button,” you will receive a HTML code looks like this:</p><pre>&lt;script type=”text/javascript” src=”https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js&quot; data-name=”bmc-button” data-slug=”avery567&quot; data-color=”#FFDD00&quot; data-emoji=”” data-font=”Cookie” data-text=”Buy me a coffee” data-outline-color=”#000000&quot; data-font-color=”#000000&quot; data-coffee-color=”#ffffff” &gt;&lt;/script&gt;</pre><p>6. Copy the HTML code above and paste it on the HTML file of your site.</p><figure><a href="http://buymeacoffee.com/avery567"><img alt="" src="https://cdn-images-1.medium.com/max/966/1*VJdus0nKuy1uNoByh5BN3w.png" /></a></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*UAo8t_f-ILlFVgscJSSWug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*wBvhv6Ad_H_DiTcNtjc1ng.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93926fa9f7fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript — Array Iteration Methods and Basic Use]]></title>
            <link>https://medium.com/@tclin100/est-ecfd1515f29d?source=rss-979574db73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecfd1515f29d</guid>
            <dc:creator><![CDATA[Avery Lin]]></dc:creator>
            <pubDate>Tue, 02 Nov 2021 21:18:41 GMT</pubDate>
            <atom:updated>2021-11-05T03:26:42.439Z</atom:updated>
            <content:encoded><![CDATA[<p>Array is a list of elements that has the same data type; separated by commas and surrounded by square brackets ([]). If any of the elements have value of zero, it constitutes a <strong>Sparse Array</strong>. There are various iteration methods to loop through arrays.</p><p><em>Example provided for each method below are with arrow function expressions.</em></p><p><strong>1.forEach()</strong>: For each <strong>calls a function</strong> on <strong>each element</strong> of an array.</p><pre>const array = [&#39;a&#39;, &#39;b&#39;, &#39;c&#39;];<br>array.forEach(element =&gt; console.log (element.toUpperCase()));</pre><pre>// expected output:<br>&quot;A&quot;<br>&quot;B&quot;<br>&quot;C&quot;</pre><pre>//comment: In this example, <em>forEach() </em>calls a function for each of the element in the array and turned them to upper case letter.</pre><p><strong>2.find():</strong> Find returns the <strong>first element </strong>of an array that satisfies a specified function.</p><pre>const array = [2, 4, 6];<br>const findElement = array.find(letter =&gt; letter &gt; 3);<br>console.log(findElement);</pre><pre>// expected output: 4<br>// comment: as soon as <em>find()</em> found the first element in the array that is larger than 3, it stopped testing for the rest of the array. Even though the last element &quot;6&quot; is also larger than 3, it would not be in the return value.</pre><p><strong>3.map():</strong> Map creates a new array. <strong>Each element</strong> of this array is the output of a function that takes each element of an array as an input.</p><pre>const array = [2, 4, 6]<br>const newArray = array.map(x =&gt; x * 4);<br>console.log(newArray);</pre><pre>// expected output: [8, 16, 24]</pre><p><strong>4.filter()</strong>: Filter creates a new array which contains <strong>every element </strong>of an array that matches a specified criteria.</p><pre>const array = [2, 4, 6]<br>const newArray = array.filter(element =&gt; element &gt;3 );<br>console.log(newArray);</pre><pre>// expected output: [4, 6]</pre><p><strong>5.reduce():</strong></p><blockquote>The <strong>reduce()</strong> method executes a user-supplied “reducer” callback function on each element of the array, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.</blockquote><pre>const array = [2, 4, 6];<br>const sumOfElement = array.reduce((a,b) =&gt; {return a + b;});<br>console.log(sumOfElement);</pre><pre>// expected output: 12</pre><p>Reference:</p><p>“Array”: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecfd1515f29d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Collaborating on GitHub — Basics]]></title>
            <link>https://medium.com/@tclin100/testing-9b8814a10f35?source=rss-979574db73b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b8814a10f35</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Avery Lin]]></dc:creator>
            <pubDate>Wed, 22 Sep 2021 13:43:08 GMT</pubDate>
            <atom:updated>2021-12-08T19:34:51.160Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Git vs. GitHub</strong></p><p>While <em>Git </em>and <em>GibHub</em> sounds related, they are different. Git is a version control system for developers to track changes in source code. And GitHub is is a cloud-based hosting service for you to manage Git repositories.</p><p><strong><em>Collaborating on GitHub</em></strong></p><ol><li><a href="https://docs.github.com/en/get-started/quickstart/create-a-repo">Create a new repository on GitHub.</a></li><li><a href="https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization">Invite collaborator(s) on GitHub.</a></li><li><a href="https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop">Each collaborator should <strong>clone</strong> the repository to there local machine. </a>Note that <strong>the repo should be cloned NOT forked</strong>.</li><li><a href="https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule">Set up branch protection rule</a>. The best practice is to assign one person to review and test code before it’s merged to main branch. This is to ensure cleanness of main branch and no code gets pushed up by accident.</li><li>Set up branch for each feature for each collaborator to work on their own feature on the local machine</li></ol><pre>git checkout -b branchname</pre><pre>//once you run the code above, you will be on the new branch you created and you can start working on it immediately</pre><p>6. Save your work and push it to the new branch you created on step 5.</p><pre>git add.<br>git commit -m &quot;words to describe feature completed&quot;<br>git push origin thenameofthenewbranchyoucreated</pre><p>7. Create a pull request. Go to the repository you are working on and find your recent push as shown in below image. Click on “Compare &amp; pull request,” then edit subject and comment section as needed. Finally, click “Create pull request.” The request will be sent to your designated project reviewer/manager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r18FyDiYFrS_OULb1ATxAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V_EZosVdZEqNTe9i0Hq-bg.png" /></figure><p>8. Project reviewer to check conflict, review changes and merge. There are three different merge option to choose from (show below). Review can select based on the need of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AkV_dFax7Y_7wJPghdGPdg.png" /></figure><p>8. If you do encounter conflict while merging! Click on “Resolve conflict” and follow instruction here to solve the conflict on Github: <a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github">https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github</a></p><p><strong>P.S. Every time before your start working on the project:</strong></p><ul><li>Make sure you are on the right branch</li></ul><pre>git status</pre><pre>//run above code in the terminal, it will display the branch you are currently on.</pre><ul><li>Pull and merge recent commits from master</li></ul><p>Branching can be really complicated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8c3LEBuyqS168l2hgAiXbQ.png" /></figure><p><strong><em>Git Commands</em></strong></p><p>There are hundreds of git commands and they are divided into two categories: <strong>Porcelain</strong> (High-level) commands and <strong>Plumbing</strong> (Low-Level) commands. Porcelain commands are more user-friendly while plumbing commands are less commonly used and aren’t used on the command line manually. However, plumbing commands provides inner workings of Git.</p><p>View a complete list of git commands <a href="https://git-scm.com/docs/git#_git_commands">here</a>.</p><p><strong>Reference:</strong></p><ol><li>“Git Doc”: <a href="https://git-scm.com/doc">https://git-scm.com/doc</a></li><li>“10.1 Git Internals — Plumbing and Porcelain”: <a href="https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain">https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain</a></li><li>“Git Cheat Sheet”:<a href="https://education.github.com/git-cheat-sheet-education.pdf">https://education.github.com/git-cheat-sheet-education.pdf</a></li><li>“Difference Between Git and GitHub”: <a href="https://www.geeksforgeeks.org/difference-between-git-and-github/">https://www.geeksforgeeks.org/difference-between-git-and-github/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b8814a10f35" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>