<?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 Bo Louie on Medium]]></title>
        <description><![CDATA[Stories by Bo Louie on Medium]]></description>
        <link>https://medium.com/@bolouie?source=rss-70a7b791902e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vYLtYSdEgLipZSh9TVYwDw.jpeg</url>
            <title>Stories by Bo Louie on Medium</title>
            <link>https://medium.com/@bolouie?source=rss-70a7b791902e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 11:49:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bolouie/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[Seeing the Bigger Picture]]></title>
            <link>https://bolouie.medium.com/seeing-the-bigger-picture-4b3b1c213bb7?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b3b1c213bb7</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Fri, 21 Jul 2023 21:26:07 GMT</pubDate>
            <atom:updated>2023-07-22T03:06:59.671Z</atom:updated>
            <content:encoded><![CDATA[<h4>Elevate Your Coding Journey</h4><h4>Enhance Your Learning Experience with ChatGPT</h4><figure><img alt="OpenAI’s website page showing company logo and introduction to ChatGPT Plus in bright green neon text on purple background." src="https://cdn-images-1.medium.com/max/1024/1*fSBqiZ3Hpp0db8CppY9c1A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jupp?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jonathan Kemper</a> on <a href="https://unsplash.com/photos/N8AYH8R2rWQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Are you an avid follower of free coding tutorials like the ones on FreeCodeCamp’s YouTube channel? They’re an invaluable resource, packed with expert insights from skilled web developers. But let’s face it: sometimes they can leave us feeling a bit overwhelmed.</p><p>A treasure trove of tutorials is great, but what happens when you’re knee-deep in the complex concepts and terminology of coding? You start off fully engaged and ready to tackle new challenges, but then you hit a roadblock. Suddenly, you’re adrift in a sea of unfamiliar terms and complex explanations. You crave a visual, something to guide you through the labyrinth of new information.</p><p>Here’s where I faced my own roadblock. I was eagerly following John Smilga’s Node.js/Express Course on building four interesting projects. Fresh off Tony’s Node.js Udemy course, I was keen to apply my skills to real-world challenges. The course kicked off on a high note, with John giving a sneak peek into the first project—the Task Manager—and introducing the GitHub repository.</p><p>All was smooth sailing until we ventured into the technicalities. John discussed setting up and connecting to a cloud database, performing CRUD operations, and more. He even clarified that the focus would be solely on the back end, as the front-end app was already prepared. But as he explored these concepts in more depth, I found it challenging to follow along at the same pace.</p><p>Despite John’s detailed walkthrough, I was left with a hazy picture. A visual representation—a diagram showing the interaction between the back end, front end, and API with the cloud—would have made it clearer.</p><p>And it’s not just me. This lack of visual representation is a common pain point in many tutorials. A whirlwind of talk and screen clicking doesn’t always cut it; we need context and a bigger picture.</p><p>This is why creators like <a href="https://www.youtube.com/@WebDevCody">@WebDevCody</a> on YouTube are a breath of fresh air. His frequent use of diagrams in his content adds tons of value to the learning experience.</p><p>But what can we do when diagrams are missing? Here’s where OpenAI’s ChatGPT comes in.</p><p>Imagine having a handy tool that can convert complex project descriptions into clear, visual diagrams. Now it’s possible! ChatGPT Plus users now have access to the “Eraser” plugin.</p><p>How does it work? Let’s say you pick a YouTube tutorial featuring a complex project. Make sure you’ve installed the free Chrome extension known as <a href="https://chrome.google.com/webstore/detail/youtube-article-summary-p/nmmicjeknamkfloonkhhcjmomieiodli">YouTube &amp; Article Summary powered by ChatGPT</a>.</p><h4>Here’s how you can make the most of it:</h4><p>1. Proceed with the tutorial, and whenever you come across a convoluted explanation or concept, turn to the Transcript and Summary extension powered by ChatGPT.</p><p>2. The tool transcribes the YouTube video and provides a summary with timestamps in a drop-down menu.</p><p>3. Select and copy any parts of the transcript that seem complex or hard to visualize.</p><p>4. Open a new chat window with ChatGPT, activate the “Eraser” plug-in, and paste the copied transcript.</p><p>5. You might need to clean up the text a bit, removing timestamps and redundant phrases, but it’s worth it for the clarity you gain.</p><figure><img alt="Screenshot of the ChatGPT plugin store showing an installed “Eraser” plugin that generates diagrams from code or natural language" src="https://cdn-images-1.medium.com/max/982/1*4eOcorC8VR14aVrBkQh52g.png" /><figcaption>ChatGPT “Eraser” Plugin</figcaption></figure><p>To generate a diagram, just type in “Show me a diagram for the following description of the web application:” and paste your cleaned-up transcript. I did this, and voilà, ChatGPT delivered a sequence diagram. The complex workflows and concepts of Node.js and Express suddenly became a lot clearer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z9IE-x93dzwB6tNJiWABzg.png" /><figcaption>Sequence Diagram of a Task Manager application</figcaption></figure><p>Happy coding, and thanks for stopping by!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b3b1c213bb7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robots vs. Writer’s Block: How AI can help you find your words again]]></title>
            <link>https://bolouie.medium.com/robots-vs-writers-block-how-ai-can-help-you-find-your-words-again-b02ae092fd38?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b02ae092fd38</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[writing]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 23:03:44 GMT</pubDate>
            <atom:updated>2023-01-24T23:26:34.428Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kzilK-BPYr1Dcm1GIBZ0tA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@lukealrich?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Luke Richardson</a> on <a href="https://unsplash.com/photos/ZCv488Xg2ME?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>A frustrating and all-too-common experience for writers is writer&#39;s block. Your mind goes blank, and the words just won&#39;t come out. It&#39;s like running into a wall. But, thanks to artificial intelligence (AI), writers now have a powerful tool to help them get back to their 💛 creative flow.</p><p>AI can help writers break through writer’s block in a few different ways. For those who struggle with &quot;blank page syndrome,&quot; it can, for example, generate ideas and topics. AI can also use natural language processing to analyze existing works, suggesting ways to improve them. Additionally, AI-based tools can generate content from scratch, saving time and energy.</p><p>All in all, AI provides some relief for writers struggling with writer’s block. AI gives writers a better chance to find the words and write more efficiently by generating ideas, creating content, and providing feedback. So, whether you’re a seasoned author or a budding writer, harness the power of AI and break through your writer’s block.</p><p>I used ChatGPT, and it returned with the following responses during one of our conversations:</p><p><strong>Bo</strong>: What is your autobiography?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQD7UWXn3UmWcdhpQe0Syw.png" /><figcaption>ChatGPT is a trained computer program</figcaption></figure><p><strong>Bo:</strong> Can you help me rewrite my letter so that it is clearer, more interesting, uses the active voice, is concise, and has better adjectives, as if telling a brilliant story?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wcimXNyHit5IjlR6GlDpdw.png" /><figcaption>ChatGPT rewrites</figcaption></figure><p><strong>Bo:</strong> I’m currently experiencing writer’s block, so your help is a huge relief.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2_iOL4i_LhMc_dzW7xufw.png" /><figcaption>ChatGPT advises</figcaption></figure><p><strong>Bo:</strong> Do you experience writer&#39;s block?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1S4xJPWG8jGrGBWsWxm4A.png" /><figcaption>Insentience of ChatGPT</figcaption></figure><p><strong>Bo</strong>: If you ever run into writer’s block, then you’re only human?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7WfdqK6dmaZ1cPUGfotYw.png" /><figcaption>Self-promotion of ChatGPT</figcaption></figure><p><strong>Bo</strong>: Do you self-promote?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lftqc78mRv7HbYFh6JAH0Q.png" /><figcaption>Goal of ChatGPT</figcaption></figure><p><strong>Bo</strong>: So, you do have a main goal?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lRqzpbpIzicy8gQm6jcThg.png" /><figcaption>Utility of ChatGPT</figcaption></figure><p><strong>Bo</strong>: What’s your human opinion on using artificial intelligence to overcome writer’s block?</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b02ae092fd38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Role of Data Visualization in Communicating Information]]></title>
            <link>https://bolouie.medium.com/the-role-of-data-visualization-in-communicating-information-ed8ffbf09e4a?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed8ffbf09e4a</guid>
            <category><![CDATA[future]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Fri, 30 Dec 2022 19:25:31 GMT</pubDate>
            <atom:updated>2023-01-03T17:16:16.605Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Future Outlook</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2EbnEETxMQeaLU8W_otjQ.jpeg" /><figcaption>Margaret Weir and Clay Banks on Unsplash</figcaption></figure><p>Data visualization and infographics are important tools for effectively communicating information to viewers. According to Alberto Cairo, these disciplines involve shaping data in a way that engages the human eye and stimulates the brain’s primary visual cortex. Data itself is a symbolic representation of the properties of objects, events, and their environment, and vision is a critical aspect of our ability to interpret and understand this information.</p><p>Through our eyes we retain extra information, sense emotional spectrums, train our subconscious mind, and adapt to new experiences. Your visual capacity is an evolutionary advantage and a sight privilege. Cairo thinks:</p><blockquote>We are visual species. We are also a symbolic species.</blockquote><p>In the modified Data Information Knowledge Wisdom Hierarchy, data is synthesized and structured in a way that allows viewers to gain knowledge and understanding. By presenting data in a structured manner, viewers can decode and encode information and create languages and hierarchies. This structured data plays a functional role in enabling deeper insights and acting as a key communication bridge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvlHadNlKh2ToEFtGNlzUQ.png" /><figcaption>Modified Data Information Knowledge Wisdom Hierarchy (Adapted from Cairo, 2012, p. 16)</figcaption></figure><p>Data visualization professionals serve as special communicators, translating abstract data into knowledge and potentially influencing behaviour change through their designs. Examples of notable data visualization and infographic projects include <a href="https://informationisbeautiful.net/">Information is Beautiful</a> by David McCandless and <a href="https://www.visualcinnamon.com/">Visual Cinnamon</a> by Nadieh Bremer, as well as media collectives like <a href="https://www.vox.com/">Vox</a> and <a href="https://pudding.cool/">The Pudding</a>, which strive to keep viewers informed about global events and trends.</p><p>Data structures are designed to improve the user experience by allowing for easier interpretation and ideation using intentional shapes and symbols. The purpose of data visualization and information architecture is to create effective designs that produce tangible results and help with foresight, rather than simply presenting raw data sets.</p><p>According to Cairo, the goal of any data visualization or infographic is to be both understandable and beautiful, creating a sense of “<strong><em>exquisite functionality</em></strong><em>.”</em></p><h3>Summary</h3><p>Structured data visualizations and infographics are effective because they engage our senses and cognitive processing abilities, allowing us to better understand and analyze information. By presenting data in a structured way, these tools can help to simplify complex information and uncover related pieces of data, leading to improved solutions and strategies.</p><h3>Outlook</h3><p>Advancing artificial intelligence and expansion of digital information both emphasize the critical role that data visualization plays in making sense of all this data. It is necessary to assess how data dissemination methods affect diversity and inclusion because there are still ethical issues in this area. The intent behind shaping data in the engineering process must not be overlooked. Data visualization, in my opinion, should aim to lead us towards a reality of truth and transformation in the future.</p><p>Thanks for reading!</p><p>References:</p><p>Cairo, A. (2012). The Functional Art. An introduction to information graphics and visualization. United States: New Riders.</p><p>Liew, A. (2013). DIKIW: Data, Information, Knowledge, Intelligence, Wisdom and their Interrelationships. Business Management Dynamics, 2(10), 49–62.</p><p>Murray, J. (2017). Big Data, the Internet of Things, and the Revised Knowledge Pyramid. ACM SIGMIS Database: the DATABASE for Advances in Information Systems, 48, 69–79.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed8ffbf09e4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Capture screenshots on Udemy]]></title>
            <link>https://bolouie.medium.com/capture-screenshots-on-udemy-8d67b2647d84?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d67b2647d84</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[udemy]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[perspective]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Mon, 26 Dec 2022 18:01:50 GMT</pubDate>
            <atom:updated>2022-12-27T14:57:10.349Z</atom:updated>
            <content:encoded><![CDATA[<h4>Perspective for the lifelong learning community</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fSTYvfDswDVBnt21boPNTA.png" /><figcaption>blank screenshot</figcaption></figure><p>All macOS users have a couple of ways to take screenshots using a few keyboard shortcuts. Apple support has outlined them <a href="https://support.apple.com/en-ca/HT201361">here</a>.</p><p>My preference is the shift⇧ + command⌘ + 4 method that gives me the crosshair to select a specific area of the screen to capture.</p><p>I wanted to capture a lesson on functions from my JavaScript course on Udemy, but my preferred method resulted in a blank screenshot (above). I kept getting the same blank result using Firefox and Chrome browsers. I even logged into another Udemy account and tried to capture a screenshot of a different course. Nothing worked. I wasn’t able to capture a screenshot of any Udemy lesson using my macOS keyboard shortcuts.</p><p>This has been a common complaint among the learning community on Udemy! Google it.</p><p>Neo Liu highlighted a few issues and offered <a href="https://neowei.medium.com/4-ways-to-bypass-udemys-black-screenshot-note-taking-b4183a4482e8">4 Ways to Bypass Udemy’s Black Screenshot Note Taking</a>. Neo suggested navigating developer tools but this resulted in taking screenshots limited to an entire viewport or full screen sizes only. Navigating also involved multiple steps using the mouse and oversized image files. But still, Neo got me thinking about the crux of the matter.</p><h3><strong>Videos get rendered on the Udemy platform within any browser but users are not permitted to capture screenshots using their OS keyboard settings.</strong></h3><h3>Why not?</h3><p>Udemy, like many other online learning platforms, has policies in place to protect the intellectual property of the content creators who use their platform to sell their courses. These policies typically include provisions against unauthorized reproduction or distribution of the course materials, including the video lessons.</p><p>It’s generally acceptable to take notes or make copies of materials for your own personal, non-commercial use, such as for study or research purposes. This is known as the “fair use” doctrine in copyright law that allows for the limited use of copyrighted material without requiring permission from the copyright holder. However, it’s important to keep in mind that <em>fair use</em> is a complex and nuanced area of law, and the specific circumstances of each case will determine whether a particular use is fair.</p><p>If a student is simply learning for personal reasons and not distributing Udemy course material in any manner that violates intellectual property, then taking a screenshot of any purchased course <strong>should be allowed.</strong></p><p>My <em>fair use</em> led me to search for screenshot methods and extensions compatible with specific browsers. I discovered <strong>two simple solutions </strong>that enable you to capture screenshots of any size on the Udemy platform.</p><h3>Solution 1</h3><p>Chrome browser — Awesome Screenshot and Screen Recorder is a popular <a href="https://chrome.google.com/webstore/detail/awesome-screenshot-and-sc/nlipoenfbbikpbjkfpfillcgkoblgpmj">extension</a> that makes it easy to capture screenshots by clicking a toolbar icon, like below. It’s free too!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/1*U-O-76a39LjLLrE1kq9byw.jpeg" /><figcaption>Awesome Screenshot and Screen Recorder Icon</figcaption></figure><h3>Solution 2</h3><p>Firefox browser — Mozilla Support has <a href="https://support.mozilla.org/en-US/kb/take-screenshots-firefox">instructions</a> for capturing screenshots using a keyboard shortcut: shift⇧ + command⌘ + s. It’s my new preferred method on macOS with positive results, like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LbiQm7QpOT3LRV0gk8gcxg.png" /><figcaption>screenshot of functions from my JavaScript course on Udemy</figcaption></figure><p>If you’re using Windows or Linux, I suspect you’ll have similar issues trying to take a screenshot using the native keyboard. Try to find a browser-specific method or extension for taking screenshots instead. That’s all.</p><p>Thanks for reading and enjoy fair-minded Udemy learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d67b2647d84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A comparison of ‘this’ in JavaScript and that ‘self’ in Python]]></title>
            <link>https://bolouie.medium.com/a-comparison-of-this-in-javascript-and-that-self-in-python-ec19f58ca418?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec19f58ca418</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Mon, 19 Dec 2022 02:06:05 GMT</pubDate>
            <atom:updated>2022-12-24T19:56:36.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tvOwoulU8MoxKDR79iXK3A.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/photo/two-white-ceramic-cups-filling-with-coffee-1233537/">Di Bella Coffee</a></figcaption></figure><p>In object-oriented programming, this and self are both used to refer to the current instance of the object that a method is being called on.</p><p>An object is a data structure that contains data fields and methods. An object represents a specific instance of a class, which is a template or blueprint for creating objects.</p><p>A method is a function that is associated with an object and is used to perform some action or computation on the object. Methods are defined in a class definition and can be called on an object to perform a specific task.</p><p>In JavaScript, the this keyword refers to the current object that is executing the current function. It is a way to access the properties and methods of an object from within the object itself. The value of this is determined by how a function is called.</p><p>Here is an example of how this is used in JavaScript:</p><pre>const person = {<br>  name: &#39;John&#39;,<br>  sayHi: function() {<br>    console.log(`Hi, my name is ${this.name}`);<br>  }<br>}<br><br>person.sayHi(); // Output: &quot;Hi, my name is John&quot;</pre><p>In most object-oriented programming languages, when you define a class, you can define methods that can be called on instances of that class. When you call a method on an instance of a class, the instance is passed to the method as an implicit parameter.</p><p>In Python, the self parameter is used to refer to the instance of a class. It is equivalent to this in other object-oriented languages. The self parameter is used to access the attributes and methods of a class from within the class itself.</p><p>And here is an example of how self is used in Python:</p><pre>class Person:<br>  def __init__(self, name):<br>    self.name = name<br>  <br>  def say_hi(self):<br>    print(f&quot;Hi, my name is {self.name}&quot;)<br><br>person = Person(&quot;John&quot;)<br>person.say_hi() # Output: &quot;Hi, my name is John&quot;</pre><h3><strong>Debugging Python</strong></h3><p>One common bug that can occur when using the self parameter in Python is forgetting to include it as the first parameter in a method definition. This can cause a TypeError to be raised when the method is called, because the method is expecting the self parameter to be passed in.</p><p>Here is an example of this type of bug:</p><pre>class Person:<br>  def __init__(self, name):<br>    self.name = name<br>  <br>  def say_hi(): // missing self parameter<br>    print(f&quot;Hi, my name is {self.name}&quot;) <br><br>person = Person(&quot;John&quot;)<br>person.say_hi()</pre><p>In this example, we have defined a Person class with a say_hi method that is supposed to print a greeting using the name attribute of the Person instance. However, we have forgotten to include the self parameter in the method definition, so when we try to call the say_hi method on the person instance, a TypeError is raised.</p><p>To fix this bug, we need to include the self parameter in the method definition like this:</p><pre>def say_hi(self):<br>    print(f&quot;Hi, my name is {self.name}&quot;)</pre><p>Now the say_hi method will work as expected and will print the greeting using the name attribute of the Person instance.</p><h3>Debugging JavaScript</h3><p>One common bug that can occur when using the this keyword in JavaScript is using this inside a function that is not bound to an object. In this case, the value of this will be set to the global object, which can lead to unexpected behavior.</p><p>Here is an example of this type of bug:</p><pre>const person = {<br>  name: &#39;John&#39;,<br>  sayHi: function() {<br>    console.log(`Hi, my name is ${this.name}`);<br>  }<br>}<br><br>const greet = person.sayHi;<br>greet(); // Output: &quot;Hi, my name is undefined&quot;</pre><p>In this example, we have an object person with a sayHi method that logs a greeting using the name property of the object. We then create a new variable greet and assign it the value of the sayHi method.</p><p>When we call the greet function, the value of this inside the function is set to the global object, which does not have a name property. As a result, the greeting logs undefined instead of the expected value.</p><p>To fix this bug, we can either bind the value of this to the person object when creating the greet variable, or we can use an arrow function for the sayHi method, which does not have its own this value and uses the this value of the surrounding context.</p><p>Here is how we could fix the example using the bind method:</p><pre>const person = {<br>  name: &#39;John&#39;,<br>  sayHi: function() {<br>    console.log(`Hi, my name is ${this.name}`);<br>  }<br>}<br><br>const greet = person.sayHi.bind(person);<br>greet(); // Output: &quot;Hi, my name is John&quot;</pre><p>And here is how we could fix the example using an arrow function:</p><pre>const person = {<br>  name: &#39;John&#39;,<br>  sayHi: () =&gt; {<br>    console.log(`Hi, my name is ${this.name}`);<br>  }<br>}<br><br>const greet = person.sayHi;<br>greet(); // Output: &quot;Hi, my name is John&quot;</pre><p>It is important to understand the this variable in JavaScript and the self parameter in Python because they are essential for working with objects and classes in these languages.</p><p>In JavaScript, the this keyword is used to access the properties and methods of an object from within the object itself. Understanding how the value of this is determined and how to use it correctly is essential for working with objects in JavaScript.</p><p>In Python, the self parameter is used to refer to the instance of a class and access its attributes and methods. Understanding how to use the self parameter correctly is essential for working with classes and object-oriented programming in Python.</p><p>Without a proper understanding of this in JavaScript and self in Python, it is difficult to write correct and maintainable code that uses objects and classes.</p><p>Read my other post ‘<a href="https://bolouie.medium.com/a-few-things-about-javascript-and-python-at-the-same-time-e68910bece29"><strong>A few things about JavaScript and Python</strong></a><strong>’</strong> for more similarities and differences between the two programming languages.</p><p>Disclaimer: This article was created with the help of AI.</p><p>Thanks for reading and hopefully you found this helpful. I’m open to feedback and if you find an error, please kindly let me know about it.</p><p><strong>References:</strong></p><p>Amos, D. et al. (2021). <em>Python Basics: A practical introduction to python 3. Fourth Edition.</em></p><p>Anthony Alicea’s Udemy Course: JavaScript Understanding the Weird Parts</p><p><a href="https://openai.com/blog/chatgpt/">https://openai.com/blog/chatgpt/</a></p><p>Haverbeke, M. (2018). Eloquent JavaScript 3rd Ed.: A modern introduction to programming. No Starch Press.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec19f58ca418" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A few things about JavaScript and Python]]></title>
            <link>https://bolouie.medium.com/a-few-things-about-javascript-and-python-at-the-same-time-e68910bece29?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e68910bece29</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Sun, 18 Dec 2022 20:43:56 GMT</pubDate>
            <atom:updated>2022-12-24T19:45:49.116Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWcF6d1u0qCa9g_aVvJqHQ.png" /><figcaption>apple and orange contributed by <a href="https://www.pngitem.com/userpic/4823/">Chloe Zhang</a> at www.pngitem.com</figcaption></figure><p>JavaScript and Python are two very different programming languages, but they do have some similarities as well.</p><p>One similarity between the two languages is that they are both dynamically typed, which means that variables do not have a fixed type and can hold values of different types at different times. In a dynamically typed language, the type of a variable is determined at runtime, based on the value that is assigned to it. This means that you can assign a value of any type to a variable, and the variable will automatically adjust to the correct type.</p><p>Here is an example of how this works in Python:</p><pre>x = 10<br>print(type(x)) # Output: &lt;class &#39;int&#39;&gt;<br><br>x = &quot;hello&quot;<br>print(type(x)) # Output: &lt;class &#39;str&#39;&gt;<br><br>x = [1, 2, 3]<br>print(type(x)) # Output: &lt;class &#39;list&#39;&gt;</pre><p>In this example, we assign an integer value, a string value, and a list value to the variable x in turn. The type of the variable is determined at runtime based on the value that is assigned to it, so the type of x changes from an integer to a string to a list.</p><p>JavaScript works in a similar way, with variables being able to hold values of any type at different times:</p><pre>let x = 10;<br>console.log(typeof x); // Output: &quot;number&quot;<br><br>x = &quot;hello&quot;;<br>console.log(typeof x); // Output: &quot;string&quot;<br><br>x = [1, 2, 3];<br>console.log(typeof x); // Output: &quot;object&quot;</pre><p>In both Python and JavaScript, dynamically typed variables can be very useful because they allow you to write flexible and adaptable code that can handle different types of data. However, they can also make it more difficult to catch type-related errors, since the type of a variable is not checked at compile time.</p><p>Python and JavaScript both support object-oriented programming and have similar syntax for defining and using classes, for example:</p><p>In Python:</p><pre>class Person:<br>  def __init__(self, name, age):<br>    self.name = name<br>    self.age = age<br>  <br>  def say_hi(self):<br>    print(f&quot;Hi, my name is {self.name} and I am {self.age} years old.&quot;)<br><br>person = Person(&quot;John&quot;, 30)<br>person.say_hi() # Output: &quot;Hi, my name is John and I am 30 years old.&quot;</pre><p>In JavaScript:</p><pre>class Person {<br>  constructor(name, age) {<br>    this.name = name;<br>    this.age = age;<br>  }<br>  <br>  sayHi() {<br>    console.log(`Hi, my name is ${this.name} and I am ${this.age} years old.`);<br>  }<br>}<br><br>const person = new Person(&quot;John&quot;, 30);<br>person.sayHi(); // Output: &quot;Hi, my name is John and I am 30 years old.&quot;</pre><p>As you can see, both Python and JavaScript use the class keyword to define a class and the constructor or __init__ method to define the initializer for the class. They also both use the self or this keyword to refer to the current instance of the class and access its attributes and methods; read my <a href="https://bolouie.medium.com/a-comparison-of-this-in-javascript-and-that-self-in-python-ec19f58ca418"><strong>comparison</strong></a> post about keywords and common bugs.</p><p>Both programming languages also use the . operator to access attributes and methods of an object. In Python, we use the . operator to access attributes and methods of an object, and in JavaScript, we use it to call methods on an object.</p><p>Overall, the syntax for defining and using classes in Python and JavaScript is quite similar, with only slight differences in the specific keywords and syntax used.</p><p>Another similarity is that they both have support for first-class functions, which means that functions can be treated as values and passed as arguments to other functions or stored in variables.</p><p>Here is an example in JavaScript:</p><pre>function greet(name) {<br>  console.log(`Hello, ${name}!`);<br>}<br><br>function sayHello(greetingFunc, name) {<br>  greetingFunc(name);<br>}<br><br>sayHello(greet, &#39;John&#39;); // Output: &quot;Hello, John!&quot;</pre><p>In this example, the greet function is passed as an argument to the sayHello function and is invoked within the sayHello function.</p><p>Here is an equivalent example in Python:</p><pre>def greet(name):<br>  print(f&#39;Hello, {name}!&#39;)<br><br>def say_hello(greeting_func, name):<br>  greeting_func(name)<br><br>say_hello(greet, &#39;John&#39;)  # Output: &quot;Hello, John!&quot;</pre><p>In both examples, the function greet is passed as an argument to the sayHello/say_hello function and is invoked within the sayHello/say_hello function.</p><p>In addition to passing functions as arguments, you can also return functions from other functions in both JavaScript and Python. Here is an example in JavaScript:</p><pre>function createGreeting(greeting) {<br>  return function(name) {<br>    console.log(`${greeting}, ${name}!`);<br>  }<br>}<br><br>const sayHi = createGreeting(&#39;Hi&#39;);<br>sayHi(&#39;John&#39;);  // Output: &quot;Hi, John!&quot;</pre><p>And here is an equivalent example in Python:</p><pre>def create_greeting(greeting):<br>  def greeting_func(name):<br>    print(f&#39;{greeting}, {name}!&#39;)<br>  return greeting_func<br><br>say_hi = create_greeting(&#39;Hi&#39;)<br>say_hi(&#39;John&#39;)  # Output: &quot;Hi, John!&quot;</pre><p>In both examples, the createGreeting/create_greeting function returns a new function that can be used to greet someone with a specific greeting.</p><p>Despite these similarities, there are also many differences between the two languages. For example, Python is a general-purpose programming language that is widely used in a variety of fields, such as web development, data science, and scientific computing. JavaScript, on the other hand, is primarily used for building web applications and is often used in conjunction with HTML and CSS.</p><p>Additionally, Python uses indentation to denote code blocks, whereas JavaScript uses curly braces. Python also has a larger standard library and a more readable syntax, while JavaScript has a wider range of use cases and is often used for building interactive user interfaces.</p><p>Overall, it is important to understand both the similarities and differences between Python and JavaScript in order to effectively use these languages for different tasks.</p><p>It is generally a good idea to focus on learning one programming language at a time, especially when you are just starting out. Trying to learn multiple programming languages simultaneously can be overwhelming and may make it more difficult to fully understand the concepts and principles of each language.</p><p>However, once you have a good foundation in one programming language, it can be helpful to learn additional languages in order to broaden your skill set and increase your versatility as a programmer.</p><p>In the case of Python and JavaScript, learning both languages can be especially beneficial because they are both widely used in the field of web development. Python is often used for server-side programming, while JavaScript is used for client-side programming and building interactive user interfaces. Having knowledge of both languages can open up a wider range of career opportunities and allow you to build more comprehensive web applications.</p><p>If you decide to learn both Python and JavaScript at the same time, it can be helpful to focus on one language at a time and then switch to the other once you feel comfortable with the concepts and syntax. It is also important to practice regularly and work on projects in order to solidify your understanding of the languages.</p><p>Disclaimer: This article was created with the help of AI.</p><p>Thanks for reading and hopefully you found this helpful. I’m open to feedback and if you find an error, please kindly let me know about it.</p><p><strong>References:</strong></p><p>Anthony Alicea’s Udemy Course: JavaScript Understanding the Weird Parts</p><p><a href="https://openai.com/blog/chatgpt/">https://openai.com/blog/chatgpt/</a></p><p>Haverbeke, M. (2018). Eloquent JavaScript 3rd Ed.: A modern introduction to programming. No Starch Press.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e68910bece29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speed up your mac dock experience]]></title>
            <link>https://bolouie.medium.com/speed-up-your-mac-dock-experience-a7cb09ce2b95?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7cb09ce2b95</guid>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[ux]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Mon, 19 Oct 2020 16:40:53 GMT</pubDate>
            <atom:updated>2020-11-23T01:34:45.437Z</atom:updated>
            <content:encoded><![CDATA[<h3>Improve MacBook’s dock experience</h3><h4>A nice hack using simple terminal commands</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Su_uqZVJh8_DufNEo8wVTA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@glenncarstenspeters?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Glenn Carstens-Peters</a> on <a href="https://unsplash.com/s/photos/computer?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Any time you purchase a new mac computer or perform a factory reset on your current device(s), you’ll end up with default dock settings that can feel slow.</p><p>I’ve needed to change these default dock settings on both my MacBook Pro and iMac several times. So I think a quick reference like this will help out in the future.</p><p>If you want a fast working dock that lets you navigate applications without annoying delays, then follow these simple steps.</p><h4><strong>First open your Terminal</strong></h4><ol><li>Press F4 at the top of your keyboard</li></ol><p>2. Type ‘terminal’ to search for the app</p><p>3. Press enter to open the app</p><h4>Run this simple command in your terminal window (copy + paste)</h4><pre>defaults write com.apple.dock autohide -bool true &amp;&amp; defaults write com.apple.dock autohide-delay -float 0 &amp;&amp; defaults write com.apple.dock autohide-time-modifier -float 0 &amp;&amp; killall Dock</pre><p>Nice! You just removed autohide delay and disabled animation of applications upon initial opening. Use your mouse to hover over the dock — notice the speedy automated hide and show.</p><p>You can also check  system preferences for current dock settings. Notice the box is unchecked for “Animate opening applications” as below. Try opening any app on your dock by clicking an icon — take note of how it opened immediately without bouncing. Wink*</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4DUWiX7huzpUuN5uUR2Bzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ga3_bdbQ6WAX9z7W_YIPvw.png" /></figure><h4>Returning your dock back to default settings is easy too</h4><p>Repeat the steps above but run the command below instead. Copy and paste this snippet of code into a new terminal session.</p><pre>defaults delete com.apple.dock autohide &amp;&amp; defaults delete com.apple.dock autohide-delay &amp;&amp; defaults delete com.apple.dock autohide-time-modifier &amp;&amp; killall Dock</pre><p>Nice!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7cb09ce2b95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git and GitHub]]></title>
            <link>https://bolouie.medium.com/git-and-github-ffd786813c9f?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffd786813c9f</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Wed, 14 Oct 2020 21:01:22 GMT</pubDate>
            <atom:updated>2020-10-14T21:01:22.755Z</atom:updated>
            <content:encoded><![CDATA[<h4>Simple definitions</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9pUh1vFwtAq0JxjG4XlmQ.jpeg" /></figure><p>Both <a href="https://git-scm.com/">git </a>and <a href="https://github.com/microsoft">github </a>are free tools for building open source version control systems for all types of developers that code software applications and web-based user interfaces.</p><p>If you were to do a quick google search, then you’ll find plenty of content!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lweZmQyo7b2EeWayCkQxUw.png" /></figure><p>But I’m here to differentiate these ‘git’ terms upfront. Not just for learning pleasure but to help out with my very own simple definitions.</p><h3>Git</h3><h4>is the workflow method or tool used to make and track changes to a project’s source code.</h4><h3>GitHub</h3><h4>is a platform or community that enables programmers to share code and collaborate on projects.</h4><h4><em>Got it?</em></h4><blockquote><em>Git it?</em></blockquote><h4><em>Good!</em></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffd786813c9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mindfulness for Mother Nature]]></title>
            <link>https://bolouie.medium.com/mother-nature-warns-us-and-this-time-we-should-listen-b1bc3f9d4c45?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1bc3f9d4c45</guid>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Wed, 08 Apr 2020 03:12:08 GMT</pubDate>
            <atom:updated>2020-05-09T23:28:48.793Z</atom:updated>
            <content:encoded><![CDATA[<h4>Flattening The Curve During a Pandemic</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXbaRB668RZ8LYY17dKM-w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@eddyvanduijn?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Ed van duijn</a> on <a href="https://unsplash.com/s/photos/forest?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Lungs of the planet</h3><p>The Amazon rainforest burned at an unprecedented rate last year. In fact, the <a href="https://www.bbc.com/news/world-latin-america-49415973">worst fires</a> since <em>2010.</em></p><p>A s<a href="https://www.theverge.com/2019/8/28/20836891/amazon-fires-brazil-bolsonaro-rainforest-deforestation-analysis-effects">harp rise</a> in Brazil’s deforestation reached a peak by late 2019.</p><p>Coronavirus (COVID) is mainly a <a href="https://www.who.int/health-topics/coronavirus#tab=tab_1">respiratory disease</a> that aggressively targets human lungs. In fact, COVID is the <a href="https://www.nih.gov/news-events/news-releases/new-coronavirus-stable-hours-surfaces">most contagious</a> virus compared to Severe Acute Respiratory Syndrome (SARS) since 2002.</p><p>A <a href="https://ourworldindata.org/grapher/total-daily-covid-deaths">sharp rise</a> in World deaths due to COVID reaches a new peak by late week. The worst is yet to come in 2020.</p><p>Dr. Bruce Aylward is the World Health Organization’s leading doctor on COVID-19 and recommends that we do more than just ‘<a href="https://www.ctvnews.ca/health/coronavirus/who-expert-s-advice-for-canada-don-t-just-flatten-the-curve-curtail-it-1.4873136">flatten the curve</a>’.</p><blockquote>It’s going to need to be more than flattening the curve — it’s flatten and curtail, or cut that curve as much as possible.</blockquote><p>Malcolm Gladwell’s book ‘<a href="https://www.amazon.ca/gp/product/0316346624/ref=as_li_qf_asin_il_tl?ie=UTF8&amp;tag=mixdhabit-20&amp;creative=330641&amp;linkCode=as2&amp;creativeASIN=0316346624&amp;linkId=c5a8d3e281e47d0cbb732ae62997b7ab">Tipping Point: How Little Things Can Make a Big Difference.</a>’ sheds more light on current times of worldwide quarantine.</p><blockquote>The name given to that one dramatic moment in an epidemic when everything can change all at once is the Tipping Point.</blockquote><p>A tipping point permanently changes an ecosystem. But creating sustainable change requires collective tenacity. Our future depends on each of us playing a role to benefit an entire Universe.</p><p>Making the best of it — just to survive — doesn’t cut it.</p><p>If we want to thrive, then we need to pay closer attention to Mother Nature during this pandemic. Social distancing is a social responsibility and mindfulness is crucial, more than ever before.</p><h4><strong>Thanks for reading!</strong></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1bc3f9d4c45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Foresight]]></title>
            <link>https://bolouie.medium.com/foresight-4f1784f10df3?source=rss-70a7b791902e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f1784f10df3</guid>
            <dc:creator><![CDATA[Bo Louie]]></dc:creator>
            <pubDate>Mon, 10 Sep 2018 01:49:25 GMT</pubDate>
            <atom:updated>2018-09-10T01:49:25.482Z</atom:updated>
            <content:encoded><![CDATA[<p>A vision for my community in the future.</p><p>In 2048, my community of transgender people can immediately access quality health care services and key resources that enable them to live in a world that fully respects their health, safety, and dignity. Our transcendence is valued and we freely flourish because humanity is not divided by gender nor dictated by fear.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f1784f10df3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>