<?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 Jane Cho on Medium]]></title>
        <description><![CDATA[Stories by Jane Cho on Medium]]></description>
        <link>https://medium.com/@janechodance?source=rss-a9c2426f02ab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UGJV31JBXXvyX7cBt7udyA.jpeg</url>
            <title>Stories by Jane Cho on Medium</title>
            <link>https://medium.com/@janechodance?source=rss-a9c2426f02ab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 10:27:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@janechodance/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[Clean code, a way to spread joy!]]></title>
            <link>https://medium.com/@janechodance/clean-code-a-way-to-spread-joy-ed7cf6a7b373?source=rss-a9c2426f02ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed7cf6a7b373</guid>
            <category><![CDATA[entry-level]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Jane Cho]]></dc:creator>
            <pubDate>Fri, 17 Dec 2021 02:21:18 GMT</pubDate>
            <atom:updated>2021-12-17T02:21:18.433Z</atom:updated>
            <content:encoded><![CDATA[<p>Since I started my journey in flatiron school, the phrase “clean code” has been popping up everywhere. From the reading materials to the lectures from the instructors, everyone emphasizes about the importance of writing clean code. At first, I wasn’t able to fully understand the importance of clean code. However, as the complexity of the projects that I am working on gets higher, I started to truly experience the importance of clean code. I wanted to share a few tips from the book “Clean Code” by Robert Cecil Martin that I found helpful to keep in mind when writing code to keep the smell away!</p><p>First, keep your code “DRY”. This principle has been reference by many authors of software engineer books. It stands for “don’t repeat yourself”. There are different levels of repeating code. The most obvious one is the duplication of identical code. Having the same code repeats not only increase the length of the code but also create more chance for you to make errors. Another scenario of repeating code is having the same if/else or switch/case statement in multiple different modules. The least noticeable way of duplications is similar algorithms in different modules but the code was not written in the similar fashion. If you are noticing duplication, there are usually ways to make your code dry. For example, if you need to use the same algorithms over and over again. Maybe declare a variable for the algorithm so you can use it without writing out the whole function each and every time.</p><p>Second, “too much information”. Generally speaking, the longer the code is the longer it takes to run. In addition, a longer code usually means it has more information. However, more often than not you don’t need all the information. When you have too many functions and each depends on each other to pass along data, it creates more opportunity for the code to break. It is important to plan ahead regarding what is the responsibility of each module and keep each module as small as possible. If you realize one of your module is doing everything, it may be an indicator to separate them into smaller modules.</p><p>Third, “dead code”. Writing code is a never ending trial and error process. You will always encounter the code that is no longer applicable. It may be a small line here and there. You may be able to identify the none applicable code when you just started the project. However, the longer you leave the code there, the more stinky it gets. Soon it will take you a long time to figure out what your code is doing let along if you are working as a group. Therefore, it is best practice to delete the dead code as soon as you found it!</p><p>“Clean code” sounds like a very self explanatory concept. However, there are endless ways to make your code cleaner. The book “Clean code” is very easy to read and provide a lot of very useful guidelines when you write your code. As an entry level software engineer, it is a good read to cultivate good habits. Remember, it is always less work to keep the code clean as you are writing them than come back after a whole project to clean up the dirty code!</p><p>Reference:</p><p>Martin, R. C. (2009). <strong>Clean code</strong>: A handbook of agile software craftsmanship. Upper Saddle River, NJ: Prentice Hall.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed7cf6a7b373" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What am I? A class or an instance?]]></title>
            <link>https://medium.com/@janechodance/what-am-i-a-class-or-an-instance-cae88669ab34?source=rss-a9c2426f02ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/cae88669ab34</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Jane Cho]]></dc:creator>
            <pubDate>Thu, 18 Nov 2021 17:19:02 GMT</pubDate>
            <atom:updated>2021-11-18T17:19:02.485Z</atom:updated>
            <content:encoded><![CDATA[<p>In ruby language, there are two very important concepts: Class and instance. A class is like a factory that produce a specific kind of product. Inside the class, you use methods to shape what kinds of product that this class factory is producing. An instance is the product that the class factory produces, therefore an instance belongs to the class factory.</p><p>For example, you create a dog class. In this class, you define methods so all the dogs that are produced in this dog class factory will have the same features.</p><pre>class Dog</pre><pre>def sit<br>  puts &quot;Sit&quot;<br>end</pre><pre>def down<br>  puts &quot;Lay down&quot;<br>end</pre><pre>end</pre><p>When you create a new Dog instance goofy using “goofy = Dog.new”, this goofy knows what to do when you call sit and down. You can create another Dog instance fluffy and fluffy will know what to do when you call sit and down as well. Even though goofy and fluffy knows the same things and almost looks the same, they are different dog products(instances) from the same dog factory(class) with their own unique serial number. In other words, the dog factory(Dog class) has a collection of dogs(instances) such as goofy and fluffy.</p><p>Class variables vs Instance variables</p><p>Class variables are declared in the class using”@@”, which have the same value across all class instances. Instance variables are declared using “@”, which are only accessible within the instance that you declare.</p><pre>class Dog<br>#class variable<br>@@legs = 4</pre><pre>#instance method<br>def dog_age=(age)<br>    #instance variable<br>    @dog_age = age<br>end <br>#class method<br>def self.legs<br>    @@legs<br>end<br>end<br><br>Dog.legs <br><strong>=&gt;</strong>4<br>goofy.dog_age=(9)<br>=&gt; 9<br>goofy.legs<br>=&gt; NoMethodError: undefined method `legs&#39;<br>Dog.dog_age=(9)<br>=&gt; NoMethodError: undefined method `dog_age=&#39;</pre><p>Class methods vs Instance methods</p><p>After understanding the relationship between class and instance, you will be able to differentiate class methods and instance methods. Class methods take care of things that related to class which involves all the instances under the class and instance methods take care of things related to internal instances. There is a significant syntax difference between class methods and instance methods, you put self. in the beginning of a class method. As the example above, “self.legs” is a class method inside dog class, therefore you will need to call the method on the dog class for it to work. On the other hand, “dog_age=(age)” is an instance method, therefore if you call the method on the dog class, it returns NoMethodError.</p><p>When writing the methods, an easy way to know if you should be using class or instance methods is if the thing that you want to accomplish involves more than one instance. For example, if you want to look for the oldest dog, you will have to look inside the dog class which contains all the dog instances. Or else, whichever dog instance you look into that dog will be the oldest.</p><p>Now you understand whether you should use class methods or instance methods when creating methods. You will need to learn how to test out your methods the right way. When testing your methods in the pry console, first, you will need to ask yourself if you are testing the class methods or instance methods. By asking yourself this question, you will be able to call the methods on the corresponding object. For example, to test an instance method in Dog class, you can use Dog.first.instance_method. To test a class method in Dog class you can use Dog.class_method.</p><p>As you gain experience in making class and instance methods, you will feel that the concepts mentioned above come naturally. In the end, Ruby is created to make your life easier! However, when in doubt, take a second to think about whether you are dealing with one single instance or a collection of instances at the same time. This should help you understand what you are! A class or an instance?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cae88669ab34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Game Plan for simple React app]]></title>
            <link>https://medium.com/@janechodance/game-plan-for-simple-react-app-7ca12985441a?source=rss-a9c2426f02ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ca12985441a</guid>
            <category><![CDATA[react-jsx]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-app]]></category>
            <dc:creator><![CDATA[Jane Cho]]></dc:creator>
            <pubDate>Wed, 27 Oct 2021 03:05:14 GMT</pubDate>
            <atom:updated>2021-10-27T03:05:14.992Z</atom:updated>
            <content:encoded><![CDATA[<p>Since I’ve started learning react I’ve begun to get a good sense of how applications are put together. There are a few basic concepts that a react developer needs to understand to develop a full application. Even though the applications that we are going to make most likely will be more complex than the basic application discussed here, I believe it will be helpful to familiarize yourself with these basic moves to help you think like “React”!</p><p>The following are some basic moves I concluded from my brief experience with React:</p><blockquote>First thing first!</blockquote><blockquote>Render data:</blockquote><p>Most apps need to import data, whether the data is from outside API or internal file. For outside API, you will need to use a fetch request to get the data. For internal file, you will need to import the data file on the component that needs the information. This can be a fairly easy part. However, the key for the code to run efficiently is where to import your data. From my experience, if there is only one component that needs to access the data, you would import inside that component. However, if you have more than one component that are parallel to each other will need access to this piece of data, you would want to import the data in a parent component that is just above these parallel components. It would be best to not to import the data at the very top of the component tree to avoid having to pass down the data too many times and often times comes with errors and your code will be not so “dry”!</p><blockquote>Data manipulation that will persist in the data base</blockquote><blockquote>Add data</blockquote><p>Your application will mostly likely allow user to add things into your database. In order to do that, you will need to create a form for the user to fill out with what they would like to add. You will need to use State to capture the information from the form upon submit and store them somewhere. The next step will be adding this new piece of data to the existing data base using the POST request. Here is a tip that I learned, usually, it makes sense to do the POST request in the same component that you did the GET request. The reason behind this is most likely you will want to render that new piece of data with your existing database. One of the common ways to do so is to use spread operator to add this new data you received from your POST request to the existing data and update this combined data using state. After doing so, your user will be able to see the new things that they added on the app as well!</p><blockquote>Delete data</blockquote><p>Similar to adding data, the user should be able to delete anything that they don’t want to see on the page. As you may already guess, you will need the DELETE request. In order to delete the specific piece of data, I usually pass down the “id” of the data as one of the keys when rendering the data. This will help you identify which data is being delete easily. However, not all the database have “id” so you can use other keys as you wish. When the user click the delete button, you can use a callback function to send this id up to the component where you the GET request is. After deleting the piece of data from your database using the DELETE request. Don’t forget to delete it using “.filter” to filter it out from your application page!</p><blockquote>Data manipulation that changes what the user sees</blockquote><blockquote>Filter data</blockquote><p>Some of the applications allow the user to see only a certain type of the data using the filtering function. There are two main questions you have to ask yourself before adding a filter function. First, where does the filtering button/drop down menu locate? Second, where does the data you want to filter locate? Depending on the hierarchy of these two component, you will decide if you are passing a prop down or passing a callback function to capture the value back up. As long as you can find out which two components you are targeting, you should be able to easily filter the data using “.filter” function with the value from the user’s action to present the data on your page!</p><blockquote>Search data</blockquote><p>To allow the user to search for certain pieces of data, the process is similar to filtering data. You will need to ask yourself the two important questions again. Where does the search bar locate and where is the data that you want to search? After identify the relationship between the two components. You will be able to pass the “search word” to the right place. For search function, you will use “.includes” pair with “.toLowerCase()/.toUpperCase” to get the data that user want!</p><p>Of course, there are so many other functionality you can include in your React application. The sky is the limit! However, being familiar with these basics move will help you to choreograph a whole dance piece! Understanding the relationship between the components to “React” faster!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ca12985441a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to speak fluent code language as a non-native English speaker?]]></title>
            <link>https://medium.com/@janechodance/how-to-speak-fluent-code-language-as-a-non-native-english-speaker-c47e96daaa9f?source=rss-a9c2426f02ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/c47e96daaa9f</guid>
            <category><![CDATA[language]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[non-native-speaker]]></category>
            <dc:creator><![CDATA[Jane Cho]]></dc:creator>
            <pubDate>Wed, 06 Oct 2021 02:24:51 GMT</pubDate>
            <atom:updated>2021-10-06T02:24:51.182Z</atom:updated>
            <content:encoded><![CDATA[<p>A little background about me, I am born and raised in Taiwan and my native tongue is Mandarin Chinese. I started to learn English at a very young age and have been living in the US for 5 years. It is safe to say that I am pretty fluent in English!</p><p>However, when learning javascript, I run into some issues articulating what I am trying to do in a fluent and efficient way. As my journey in learning javascript continues, I realized the importance of communicating in precise language. This not only facilitates the communication with other engineers but also helps me understand the use of code in a more complete way. That being said, I would like to share some of the steps I took to learn “code language” so far.</p><p>First thing first, get the punctuation marks right!</p><p>“()” are called parentheses not the “moon thingy”. You can also separate them into “(“ open parenthesis and “)” close parenthesis if you want to be more precise.</p><p>“{}” are called curly braces not the “wavy thingy”. It is often used to store an object.</p><p>“[]” are called square brackets not the “square thingy”. It is used to store an array.</p><p>“:” is called colon not “ dot dot”. It is often used as a delimiter between key/value pair in an object data type.</p><p>Once you get the punctuation marks right, let’s try to dictate over a piece of code!</p><blockquote>function addNumbers(a, b) {</blockquote><blockquote>return ` The sum is ${a + b}`</blockquote><blockquote>}</blockquote><p>Dictation: Function add Numbers open parenthesis a comma b close parenthesis open curly brace, next line, return backtick the sum is dollar sign curly brace a plus b curly brace backtick and next line, closing curly brace.</p><p>Being able to dictate the code precisely is very helpful when you are trying to debug a peer’s code. You can let them know exactly what they are missing instead of using some ambiguous made up words. However, mastering dictation is just getting you one step closer to speaking fluent code.</p><p>The next step is to narrate the code as it is intended. Using the previous code example,</p><blockquote>function addNumbers(a, b) {</blockquote><blockquote>return ` The sum is ${a + b}`</blockquote><blockquote>}</blockquote><p>Narration: Declare a function called addNumbers. This function accepts two arguments( a, b). This function returns the sum of a+b as a string. In order to create this function, you have to put in two parameters in the parentheses after addNumbers. When you call this function, you will need to pass in two arguments.</p><p>These are some steps that help me to speak code more fluently. As many have compared learning to code like learning a second language. If you already learned English, you will know that practice is the ultimate key to fluency! Don’t be afraid to speak code like a real engineer because you already are!</p><p>References:</p><ul><li><a href="https://edward-huang.com/ideas/life-lesson/2021/02/23/everyone-can-learn-programming-easily-if-they-know-english/">Everyone Can Learn Programming Easily - If they Know English</a></li><li><a href="https://medium.com/@jesusaugustoescalona/my-path-of-learning-programming-as-a-non-native-english-speaker-415ac3fe0e25">My Path of Learning Programming as a Non-Native English Speaker</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c47e96daaa9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>