<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tong Liu</title>
    <description>The latest articles on DEV Community by Tong Liu (@liutng).</description>
    <link>https://dev.to/liutng</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F921969%2F59cb1116-6cbb-4b08-a461-b13c93b1844b.jpeg</url>
      <title>DEV Community: Tong Liu</title>
      <link>https://dev.to/liutng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/liutng"/>
    <language>en</language>
    <item>
      <title>Reflect: Release 0.4 3/3</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Sun, 11 Dec 2022 19:04:31 +0000</pubDate>
      <link>https://dev.to/liutng/reflect-release-04-33-nk2</link>
      <guid>https://dev.to/liutng/reflect-release-04-33-nk2</guid>
      <description>&lt;p&gt;I finally finished implementing the issue of &lt;a href="https://github.com/CatimaLoyalty/Android/issues/1057"&gt;#1057&lt;/a&gt; I selected for Release 0.4. Here is the Pull Request link for it &lt;a href="https://github.com/CatimaLoyalty/Android/pull/1157"&gt;#1157&lt;/a&gt;. This issue is the biggest issue I have worked on so far on GitHub, the complexity of this issue also suggests the same way. However, when I look back at what I have done throughout this issue, I found out that it is actually not as terrific as I thought it would be in the first place. &lt;/p&gt;

&lt;h2&gt;
  
  
  My Pull Request may not be accepted before this class ends
&lt;/h2&gt;

&lt;p&gt;Although I submitted the Pull Request early enough for my Pull Request to get reviewed, the maintainer will not be able to give me a review at any time soon since the project maintainer has been burnt out by the high level of workload during Hacktoberfest 2022 as well as the backlogs of Pull Requests. However, this does not mean that this issue has never become less significant to me, on the contrary, I have learned lots of knowledge of Android including database, Intent mechanism, Data Object serialization, and so on. I may not be able to get my Pull Request accepted for merge, but even after this course ends, I will keep following up with my Pull Request until it's accepted and merged.&lt;/p&gt;

&lt;h2&gt;
  
  
  What have I achieved in this Issue?
&lt;/h2&gt;

&lt;p&gt;In this issue, I implemented a feature which automatically sets cover images to the card when the user adds a card by scanning a barcode picture in the local gallery. To give the right of selection to users to decide if they want to automatically set the cover images, I also created a dialog to ask if the user wants to set the scanned picture as the cover image. Moreover, if the cover image has already been set by the user, it will not replace the cover image when the user rescans the barcode. To make the app know if the front/back cover image is set by the user, I need to create 2 extra flag variables to the Card Data Entity. Since the Card Data is stored in the database, I also modified the database to save them. However, since the parameters of the data-saving function changed, I have to fix every single line of code that uses it, including the tests which call this function more than 30 times. &lt;br&gt;
Here is the image of the prompting dialog.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g2SoWdhO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7lfmf7d2cro4p8tit5q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g2SoWdhO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7lfmf7d2cro4p8tit5q.png" alt="Prompting Dialog" width="880" height="1907"&gt;&lt;/a&gt;&lt;br&gt;
And once I clicked &lt;code&gt;yes&lt;/code&gt;, the scanned barcode photo will be set as the front or back photo depending on which one has not been set yet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wqifg5TL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w38ew7yaxl6xwa7xygmr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wqifg5TL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w38ew7yaxl6xwa7xygmr.png" alt="Automatically set cover image" width="880" height="1907"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I've learned
&lt;/h2&gt;

&lt;p&gt;I have learned a lot of Android knowledge throughout this Issue. It mainly boils down to two points:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Database: This is the biggest thing I've learned. Now I know to create a database I need to create a class that extends &lt;code&gt;SQLiteOpenHelper&lt;/code&gt; and DB initialization code(e.g. table creating code) should go into the &lt;code&gt;onCreate()&lt;/code&gt; function. To read data from the database, I need to pass a SQL sentence to the function &lt;code&gt;database.query()&lt;/code&gt; and use the returned cursor to get specific data with the column name, for example, when I want to get the card's note I call &lt;code&gt;cursor.getString(LoyaltyCardDbIds.NOTE)&lt;/code&gt;. Another important element of the Android database is "update". To update the database from the old version to the new version, I should override the function &lt;code&gt;onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)&lt;/code&gt; and use the SQL sentence &lt;code&gt;ALTER TABLE&lt;/code&gt; to add or remove columns from a table based on the version range of the user's database.&lt;/li&gt;
&lt;li&gt;Activity Intent: Passing data between Activities can be done by using an Android pre-built mechanism named Activity Intent. Since card editing Activity is shared among the 3 ways of adding cards (adding by scanning with the camera, adding by scanning library photo, and adding by manually inputting). In the adding by scanning library photo mode, I used &lt;code&gt;bundle.putParcelble()&lt;/code&gt; to pass the URL of the scanned photo to the card editing activity to tell the card editing Activity that it needs to do the process to automatically add cover photos. It was quite straightforward, but it did take me some time to figure it out.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  At the end
&lt;/h2&gt;

&lt;p&gt;DPS909 has been the best course I've ever taken at Seneca College. I'm so happy that I could choose this course to allow me an immersive in-depth experience on GitHub open-source projects.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reflect: Release 0.4 2/3</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Sun, 11 Dec 2022 15:03:49 +0000</pubDate>
      <link>https://dev.to/liutng/release-04-reflect-23-3808</link>
      <guid>https://dev.to/liutng/release-04-reflect-23-3808</guid>
      <description>&lt;h2&gt;
  
  
  The project I will be working on
&lt;/h2&gt;

&lt;p&gt;I finally decided the project that I want to make a contribution to for Release 0.4 is &lt;a href="https://github.com/CatimaLoyalty/Android/pull/1157"&gt;Catima&lt;/a&gt;. For more information about it, Catima is a card management app running on Android, it allows users to save their physical card to their phones by manually inputting, and scanning. As for now, it has 147 contributors working on this project.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the issue about?
&lt;/h2&gt;

&lt;p&gt;The reason why I chose this project is this because I'm already pretty familiar with the structure of this Android App since I've made 2 contributions to this repository during Hacktoberfest 2022, &lt;br&gt;
 which means that I don't need to spend extra time focusing on reading the code to figure out where should I start. The issue I chose is &lt;a href="https://github.com/CatimaLoyalty/Android/issues/1057"&gt;#1057&lt;/a&gt;, in this issue, a new feature that automatically adds cover images to the current card should be added to the existing logic of "adding card from image" function and once the user imports a card from a picture that contains a barcode, a dialog should be shown to the user to ask if they want to set the imported picture as the cover of the current generated card, if the user selected yes, the cover image should be set, otherwise, no cover image will be set. What's more to this is that I should add extra variables to track if the cover images (both front and back) were added manually or automatically and if the user rescans the card the new cover image should only be automatically set when the cover images were set automatically, otherwise, they should remain still. &lt;/p&gt;

&lt;h2&gt;
  
  
  My analysis of how to implement this issue
&lt;/h2&gt;

&lt;p&gt;To implement this feature, I need to understand how the data are stored in the database and add a couple of columns to trace if the cover images are added manually. Also, I need to consider how to implement the database upgrade SQL sentence to upgrade the database from the old version to the new version because users' data still need to be kept, we can't just simply drop all tables and create new ones, but we need to alter and upgrade the schema of tables so that the data of those cards that already exist will be untouched.&lt;br&gt;
Also, I can foresee that I need to also upgrade the testing code to make the tests cover the database logic I added. &lt;br&gt;
Also, since "adding card from camera scanning", "adding card manually", and "adding card from image" all share the same Activity, I may need to add an extra bundle to the Intent of the activity to distinguish which entry started the card editing activity and I should add this new future to the scenario where the card editing activity is started by "adding card from image".&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reflect: Release 0.4 1/3</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Wed, 30 Nov 2022 20:17:13 +0000</pubDate>
      <link>https://dev.to/liutng/plan-for-release-04-51ph</link>
      <guid>https://dev.to/liutng/plan-for-release-04-51ph</guid>
      <description>&lt;p&gt;Release 0.4 is the last assignment we have for DPS909. In this assignment we are going to be working on a project that has bigger scale, more complexity than other open-source project we have contributed to throughout this course. &lt;br&gt;
To make this very last assignment meaningful, I would like to work on a project that has more than 100 contributors and I will choose an issue that requires me to add a feature instead of fixing a bug.&lt;br&gt;
The repositories that I would like to choose from are these:&lt;/p&gt;

&lt;h2&gt;
  
  
  Repository List
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/AntennaPod/AntennaPod"&gt;https://github.com/AntennaPod/AntennaPod&lt;/a&gt;&lt;br&gt;
This is a podcast Android app project that I have worked with previously for release 0.3. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/CatimaLoyalty/Android"&gt;https://github.com/CatimaLoyalty/Android&lt;/a&gt;&lt;br&gt;
This is a gift card managing app on Android. I have made 2 contributions to this project during Hacktoberfest 2022, the repository owner of this project is very nice and has a high standard on code quality. This is the project that I want to work with the most. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/nextcloud"&gt;https://github.com/nextcloud&lt;/a&gt;&lt;br&gt;
NextCloud is an Android app that helps users to view and manage their phones on the cloud. Up until now, this project has more than one thousand opened issues for me to work on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/nextcloud/server"&gt;https://github.com/nextcloud/server&lt;/a&gt;&lt;br&gt;
This is the server side of NextCloud I mentioned earlier. This project is implemented in JavaScript with Node.js, to make more the variety of the project I contribute to, I might choose to work on this as well.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/Seneca-CDOT/telescope"&gt;https://github.com/Seneca-CDOT/telescope&lt;/a&gt;&lt;br&gt;
Telescope as the project of the project that's collectively created by Seneca students, I feel that I'm very much obligated to make as much contribution as I could to it. In addition to this, since I spent a lot of time on this project during Release 0.3, I've already gotten more experience with this project, which means that I might find it easier to work on this project than start working on a new project from ground zero.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Lab10 Reflect</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Sat, 26 Nov 2022 01:10:40 +0000</pubDate>
      <link>https://dev.to/liutng/lab10-reflect-388n</link>
      <guid>https://dev.to/liutng/lab10-reflect-388n</guid>
      <description>&lt;p&gt;In this week, I uploaded my &lt;a href="https://github.com/liutng/SSGifier"&gt;SSGifier&lt;/a&gt; to a C++ package manager named &lt;code&gt;conan&lt;/code&gt;. It was quite a lot of learning I had this week in trying to understand how does conan work, how do I integrate it into my project, and how do I encapsulate and upload a package of my project to remote server for other users to use. However, conan only provides packages as libraries for other projects to use, it is not like pip in python where we can install packages and use it standalone. That is being said, we need to createa conan project to use the package. To make sure that my instruction is easy to read and covers all needed requirements, I asked Piotr to install it with the only instruction from my README.md, and he later found out he has no difficulty installing my package. &lt;/p&gt;

&lt;h2&gt;
  
  
  How did I set up conan?
&lt;/h2&gt;

&lt;p&gt;To set up conan, there are few steps need to be followed: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install python first because conan relies on python to run its script. &lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;pip install conan&lt;/code&gt; to install conan.&lt;/li&gt;
&lt;li&gt;In the SSGifier project folder, create a folder named &lt;code&gt;package&lt;/code&gt;and create a folder &lt;code&gt;src&lt;/code&gt; inside &lt;code&gt;package&lt;/code&gt; and put all source files of SSGifier to the &lt;code&gt;package/src&lt;/code&gt; folder.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;package&lt;/code&gt; folder, use &lt;code&gt;$ conan new mypackage/1.0 -t&lt;/code&gt; to generate a package template for us to use. &lt;/li&gt;
&lt;li&gt;Edit the generated &lt;code&gt;conanfile.py&lt;/code&gt; and add the source files that to be packed into the package into the function &lt;code&gt;def package(self)&lt;/code&gt;. For example, &lt;code&gt;self.copy("*.h", dst="src", src="src")&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;After finished setting up the &lt;code&gt;conanfile.py&lt;/code&gt;, we need to register an account &lt;a href="https://jfrog.com/start-free/"&gt;here&lt;/a&gt; to host our packages.&lt;/li&gt;
&lt;li&gt;Follow the instruction to add the remote package source to conan.&lt;/li&gt;
&lt;li&gt;In the &lt;code&gt;package&lt;/code&gt; folder, use &lt;code&gt;conan upload . -r put-your-remote-name-here --all&lt;/code&gt; to upload the package to remote. Now the package is uploaded to the remote server. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How to use the package?
&lt;/h2&gt;

&lt;p&gt;You can also use SSGifier in your projectas as a library. To use it you need to do following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Downlaod &amp;amp; install &lt;code&gt;Conan&lt;/code&gt; from &lt;a href="https://conan.io/downloads.html"&gt;here&lt;/a&gt; and &lt;code&gt;clang&lt;/code&gt; from &lt;a href="https://releases.llvm.org/download.html"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Create a &lt;code&gt;conanfile.txt&lt;/code&gt; inside your project and add &lt;code&gt;SSGifier/1.0.0&lt;/code&gt; in the category of &lt;code&gt;[requires]&lt;/code&gt; to &lt;code&gt;conanfile.txt&lt;/code&gt;. Click to see &lt;a href="https://docs.conan.io/en/latest/using_packages/conanfile_txt.html"&gt;official documents&lt;/a&gt;. You can use this template:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[requires]
SSGifier/1.0.0

[generators]
cmake
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt; Edit &lt;code&gt;conan.conf&lt;/code&gt; file in the location &lt;code&gt;C:\Users\&amp;lt;your user name&amp;gt;\.conan&lt;/code&gt; and add &lt;code&gt;revisions_enabled = 1&lt;/code&gt; to &lt;code&gt;[general]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add this remote repository to conan by using this command &lt;code&gt;conan remote add tommy-conan-local https://tommyliu.jfrog.io/artifactory/api/conan/tommy-conan-local&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add credential information to this repository by using this command &lt;code&gt;conan user -p AKCp8nHPJwRCr2my24TiMaikQgQUW4e3xRbqsiGw45j9nPfPdLWEREYigcMLLW4pQtqg18n8b -r tommy-conan-local lt19930320@gmail.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Go to the directory of you project which you created in step 2(make sure conaninfo.txt), install SSGifier by using &lt;code&gt;conan install . -r tommy-conan-local&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;C:\Users\&amp;lt;your user name&amp;gt;\.conan\data\SSGifier\1.0.0\_\_\package\3fb49604f9c2f729b85ba3115852006824e72cab\src&lt;/code&gt; to find the source file.&lt;/li&gt;
&lt;li&gt;Compile these code. For gcc, use &lt;code&gt;g++ -std=c++17 main.cpp Utils.cpp ArgumentQueue.cpp FileProcessor.cpp MessagePrinter.cpp&lt;/code&gt;, for clang, use &lt;code&gt;clang++ -std=c++17 main.cpp Utils.cpp ArgumentQueue.cpp FileProcessor.cpp MessagePrinter.cpp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;After compilation, a binrary executatable of SSGifier will be generated with the name of &lt;code&gt;a.exe&lt;/code&gt;. &lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Reflect on Pull Request code review</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Fri, 18 Nov 2022 14:12:26 +0000</pubDate>
      <link>https://dev.to/liutng/reflect-on-pull-request-code-review-l84</link>
      <guid>https://dev.to/liutng/reflect-on-pull-request-code-review-l84</guid>
      <description>&lt;p&gt;This is my first-time reviewing code on Github. It was actually quite fun to read others' code because I was scrutinizing the code suspiciously while I was reading others' code, and through this inspection of code, I realized that it is not easy to do code reviews than writing code because doing code review requires us to not only know how the functions should be implemented but we also need to reading others' code and trying to understand them. On top of that, we also need to know the best practice for the code we review, which requires us to have somewhat experience in this field. However, since we can't think about every aspect of our code when we are writing them, we might make mistakes or not perform the best practice, this is the scenario where code review becomes very important for keeping a good standard in the code we submit. &lt;/p&gt;

&lt;h2&gt;
  
  
  What did I review?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Telescope &lt;br&gt;
Link: &lt;a href="https://github.com/Seneca-CDOT/telescope/pull/3762/files/87742e87eac0b136f6f53b0c38c2679f03317abd"&gt;https://github.com/Seneca-CDOT/telescope/pull/3762/files/87742e87eac0b136f6f53b0c38c2679f03317abd&lt;/a&gt;&lt;br&gt;
This is a PR made by Piotr to modify the documentation to provide a solution for data not showing up after the project is set up. This problem was found by me and Piotr while we are trying to work on the issue &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3639"&gt;3639&lt;/a&gt;. In this code review, Piotr updated the documentation for specific detailed steps we need to do after initializing the project in our local environment. I found at the end of the document he modified, a generalization of the problem and solutions is mentioned, however, the fact that the parser needs to be restarted after &lt;code&gt;db:init&lt;/code&gt; was not mentioned, so I made a code review on this trying to amend it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MyPhotoHub&lt;br&gt;
Link: &lt;a href="https://github.com/humphd/my-photohub/pull/9/files/f65ac86f3321207953d66b02c9b9fff1942828f1"&gt;https://github.com/humphd/my-photohub/pull/9/files/f65ac86f3321207953d66b02c9b9fff1942828f1&lt;/a&gt;&lt;br&gt;
This PR was made to make an initial implementation for this project. In this project, I found that the Regular Repression that matches a parameter was hard-coded and has occurred more than once. I think this might not be a good practice to hard code it on every occurrence since it's not future-proof when the regular expression needs to be changed. If this Regular Expression could be referenced from a variable or configuration file, it would make the future changes on it way less headache.  &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Reflect: PR2 of Release 0.3</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Thu, 17 Nov 2022 05:29:26 +0000</pubDate>
      <link>https://dev.to/liutng/reflect-to-pr2-of-release-03-4j9c</link>
      <guid>https://dev.to/liutng/reflect-to-pr2-of-release-03-4j9c</guid>
      <description>&lt;h2&gt;
  
  
  The issue that I was not able to fix...
&lt;/h2&gt;

&lt;p&gt;This week I made a contribution to Telescope, and this is my first-time creating a Pull Request for Telescope which means I had zero knowledge of this project regarding its system structure design and it actually caused me to under-estimate my first attempt on issue &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3639"&gt;#3639&lt;/a&gt; which is later to be proven infeasible both for me and my co-contributor Piotr with our limited knowledge on this project. When we were first assigned this issue, we thought changing it would be as straightforward as we thought it would be if we had designed it. After a few reverse engineering from the HTTP requests of the frontend, we located the code that we need to change in the backend, however, it is not easy to change any of the data structure since the fact that this project uses many layers of data, which requires us to not only change the data field of &lt;code&gt;posts&lt;/code&gt; in Radis but we also need to add a column to the database. After a few poking around, we remeasured the workload of this issue and soon found out that we might not be able to create a Pull Request to fix this issue before the due of Release 0.3 which is Nov.18th, and both of us switched to another issue. &lt;/p&gt;

&lt;h2&gt;
  
  
  The second issue I chose and how I fixed it
&lt;/h2&gt;

&lt;p&gt;The second issue I chose was &lt;a href="https://github.com/Seneca-CDOT/telescope/issues/3615"&gt;#3615&lt;/a&gt;. Since my previous involvement with this project, I realized the part that I need to modify was posts.js in the Posts Service, here is how I made modified the code.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;As per the suggested solution made by David, I added a query param &lt;code&gt;expand&lt;/code&gt; to the request &lt;code&gt;/post/&lt;/code&gt; to use this extra query param to control if the returned data should contain detailed information(which are author, title, and publishDate) about the feed.&lt;/li&gt;
&lt;li&gt;I used an if-else statement to check if the &lt;code&gt;expand&lt;/code&gt; equals 1, and if it equals 1, I will call &lt;code&gt;Post.byId(id)&lt;/code&gt; on each post in the post array to query their extra information from Radis, otherwise, it will return the original data as before. The thing that I was struggling with in this step was &lt;code&gt;Post.byId(id)&lt;/code&gt; is executed asynchronously, so I need to use an asynchronous function to call it. After a few google searches, I realized I could use &lt;code&gt;await Promise.all(async()=&amp;gt;{})&lt;/code&gt; to execute this asynchronous function synchronously. &lt;/li&gt;
&lt;li&gt;Return the data that is created inside the if-else statement. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Post-fixing jobs
&lt;/h2&gt;

&lt;p&gt;After finishing coding, I updated the document for the posts and also I wrote some tests to test my code, however, for the scenario when the request query param has &lt;code&gt;expand=1&lt;/code&gt;, although this API works pretty well in actuality, the test still fails. This issue is still confusing me up until now when this reflect is written but I will find out the culprit that causes this test failure. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I have already found the cause of this problem and fixed it. The problem appeared to be in the data of feed in each post. If I were writing feed content directly to post, it will fail since the feed object will not be recognized by &lt;code&gt;post::ensureFeed()&lt;/code&gt;, the feed object will become null so the whole test will fail. To fix it, I simply replace the post's feed object with the feed id, so that &lt;code&gt;post::ensureFeed()&lt;/code&gt; will always fetch the correspondent feed from  Radis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanks for our fellow developers
&lt;/h2&gt;

&lt;p&gt;In the end, I want to shout out to Tue who helped us to solve the issue in which the posts don't show even though the database is already well-set. We won't be able to make the whole service run if there wasn't your help. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reflect of Lab09</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Tue, 15 Nov 2022 01:57:43 +0000</pubDate>
      <link>https://dev.to/liutng/reflect-of-lab09-2p4f</link>
      <guid>https://dev.to/liutng/reflect-of-lab09-2p4f</guid>
      <description>&lt;p&gt;In Lab09, we are going to implement GitHub Actions which is a C/I tool to automate tests of our project. This technology is widely used by most repositories on GitHub because it could save the repository maintainer a lot of times on finding the potential bugs and checking the submitted code that don't conform with the suggested code style. &lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;My successful GitHub Actions run: &lt;a href="https://github.com/liutng/SSGifier/actions/runs/3464401840"&gt;3464401840&lt;/a&gt;&lt;br&gt;
Testing PR to Another Repo: &lt;a href="https://github.com/P-DR0ZD/pdrozd-ssg/actions/runs/3466622227"&gt;3466622227&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;To set up the GitHub Actions, we first need to create 2 folders, a &lt;code&gt;.github&lt;/code&gt; in the root directory of the repository, and a &lt;code&gt;workflows&lt;/code&gt; folder inside &lt;code&gt;.github&lt;/code&gt; folder we just created. In the &lt;code&gt;workflows&lt;/code&gt; folder, we create a &lt;code&gt;YAML&lt;/code&gt; file to save the GitHub Actions configuration. &lt;br&gt;
I programmed my project in C++ with &lt;a href="https://github.com/catchorg/Catch2"&gt;Catch 2&lt;/a&gt; for the testing framework， my GitHub Actions should be set up with C++ software stacks. The process of how I set up my YAML is as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To make the GitHub Actions workflows run, I first set up the actions and branches that I want the GitHub Actions workflow to execute on. In my repository, it should be the &lt;code&gt;push&lt;/code&gt; action and &lt;code&gt;pull_request&lt;/code&gt; action on the main branch. &lt;/li&gt;
&lt;li&gt;I need to install the C++ compiler for the testing environment to compile my tests, in this case, I used &lt;code&gt;apt-get install -y clang&lt;/code&gt; to install clang++.&lt;/li&gt;
&lt;li&gt;Before running the test cases, I need to add the code to compile the test. I used &lt;code&gt;clang++ $CXXFLAGS $CXX -o $OUTPUTFILE&lt;/code&gt; to compile my tests, CXXFLAGS, OUTPUTFILE, and CXX are the variables I define in the &lt;code&gt;env:&lt;/code&gt; because I want to segregate my actual compile command with parameters that are passed to it.

&lt;ol&gt;
&lt;li&gt;Now that my tests are compiled, I can run them now. To run them, I defined a new step in GitHub Actions. In this step, I just used ./test.o to run the compile binary tests.&lt;/li&gt;
&lt;li&gt;Last is to delete the compiled test file. I think this step is omittable since every time we run GitHub Actions, there will always be a new environment created to run the workflows, and once the workflows are done, the environment will be deleted, so files that are generated during the tests will remain in the test GitHub Actions environment and it should not pollute my repository.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  GitHub Actions differences
&lt;/h2&gt;

&lt;p&gt;The partner I have this time is Piotr Drozd (here's his &lt;a href="https://github.com/P-DR0ZD/pdrozd-ssg"&gt;repo link&lt;/a&gt;). As I compared his GitHub Actions script with mine, I found differences as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Since our repositories are built with different languages, the dependency and build tools we use for GitHub Actions are also different. &lt;/li&gt;
&lt;li&gt;The way how we pass parameters to the testing framework is different.  he directly passes parameters to the command, and I use variables to pass parameters.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Thoughts on CI.
&lt;/h2&gt;

&lt;p&gt;After this lab, my thought on CI has been dramatically shifted, because initially, I thought setting CI would be pretty difficult to do, however, when I actually get into it, I found out that not only the syntax for GitHub Actions is pretty straightforward, but there's also tons of templates for us to use. Also, I realized that using GitHub Actions can drastically decrease the possibility of my contributors making dumb mistakes because GitHub Actions will automatically check their submitted code and prompt them whenever violations happen.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reflect for PR1 in Release 0.3</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Mon, 14 Nov 2022 15:32:02 +0000</pubDate>
      <link>https://dev.to/liutng/reflect-for-pr1-in-release-03-47m0</link>
      <guid>https://dev.to/liutng/reflect-for-pr1-in-release-03-47m0</guid>
      <description>&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Issue link&lt;/strong&gt;: &lt;a href="https://github.com/AntennaPod/AntennaPod/issues/6152"&gt;#6152&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Pull Request link&lt;/strong&gt;: &lt;a href="https://github.com/AntennaPod/AntennaPod/pull/6186"&gt;#6186&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Repository and Issue I was working on?
&lt;/h2&gt;

&lt;p&gt;Although Hacktoberfest has already officially been over, our contribution to GitHub will still be going on. In Release 0.3, we are going to make 2 pull requests, and 2 code reviews. For the first pull request I made, it is an open-source podcast app on Android which has 4.5K stars. The issue I was working on is a new feature adding. &lt;/p&gt;

&lt;p&gt;In this issue, the issue reporter suggests adding a mechanism to remember the user’s decision to let the "remove all from inbox" confirmation dialog never show again. Since this was the last repository I was working on for Hacktoberfest 2022, I still remember the structure of this project, I don't need to spend a lot of time getting familiar with the code base, so I decided to work on this one.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did I fix it?
&lt;/h2&gt;

&lt;p&gt;To make the app remember the users’ decisions on Remove all from inbox dialog, the first solution I came up with was to add the popup dialog with a “never ask again” check box which users can click to check to inform the app that they do not want to see this confirmation again. To make this data persistent, I used the mechanism named “SharedPreference” which is provided by the Android system for developers to save the basic typed data into the app. &lt;/p&gt;

&lt;p&gt;I also considered the situation where users may want to withdraw this decision since once the users have checked the “never ask again” check box, they will no longer be able to see this dialog to withdraw their decision. My solution is to add an extra option to the Setting Activity so that the users can toggle on or off the “never show remove all from inbox dialog again”, from which users can withdraw their previous selection.&lt;/p&gt;

&lt;p&gt;After a few twitches here and there, this flow finally runs well. This is what this dialog now looks like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KyihF6Yk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ai92bydk6bg351wt4aef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KyihF6Yk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ai92bydk6bg351wt4aef.png" alt="Updated remove all from inbox" width="592" height="1291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson learned
&lt;/h2&gt;

&lt;p&gt;Right before I made a PR, I sent a comment to the issue page to ask what the maintainer thinks about it. However, the maintainer did prefer the already-bloated setting page, since it will give more of a headache in finding the settings they want. He thought it is not necessary to give users a selection for them to withdraw this decision. Hence, I had to remove all the code related to settings. &lt;br&gt;
From this experience, I learned that always make everything clear before starting coding, because I don't want to expect surprise and make the code that I have already written futile.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>A reflect for Lab 8</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Thu, 10 Nov 2022 20:39:35 +0000</pubDate>
      <link>https://dev.to/liutng/a-reflect-for-lab-8-163p</link>
      <guid>https://dev.to/liutng/a-reflect-for-lab-8-163p</guid>
      <description>&lt;p&gt;As a programmer who usually makes mistakes (sometimes dumb mistakes) I found the content of this week is pretty relevant and useful to me. Since programmers are humans and humans make mistakes, writing unit tests to dig out the potential issues in our code is as important as implementing features. &lt;/p&gt;

&lt;h2&gt;
  
  
  Which Unit testing framework did I use? and why?
&lt;/h2&gt;

&lt;p&gt;To implement Unit Tests for my project, I dug through the google search result and GitHub and I found that it's quite opposite to the notorious fame of C++ that C++ is a very old-fashioned and anti-developers language, there are actually quite a few unit testing frameworks for C++. The one that I chose is &lt;code&gt;Catch&lt;/code&gt;. Just like its name suggests, Catch is a unit testing framework for C++ to catch potential bugs in the code by writing unit tests. Not like other testing frameworks, catch only requires writing very few amounts of code to set up a unit test, this means I could be focusing on my actual test logic rather than being drawn away by the unit testing framework itself. &lt;br&gt;
It's pretty easy to set it up, as the documentation shows, I only downloaded a header file &lt;code&gt;catch_amalgamated.hpp&lt;/code&gt; and an implementation file &lt;code&gt;catch_amalgamated.cpp&lt;/code&gt; to add Catch to my project. For setting up the Unit Tests, I read &lt;a href="https://github.com/catchorg/Catch2/blob/devel/docs/tutorial.md#top"&gt;Catch's document&lt;/a&gt; and found out the process for me to set up Catch should look like follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a &lt;code&gt;.cpp&lt;/code&gt; file to save unit test code and include Catch's header file in it.&lt;/li&gt;
&lt;li&gt;Use TEST_CASE() to specify a test case and SECTION() to segregate the test case with different types of wrong arguments that get passed into the target function, although this is not required, it's still recommended for a more readable report file.&lt;/li&gt;
&lt;li&gt;Inside each SECTION(), use REQUIRE() to assert the value against the expected value. If the tested code did not return the expected value, it will be counted as a failed test.&lt;/li&gt;
&lt;li&gt;The result will be printed to the console and a report file named &lt;code&gt;test_result.xml&lt;/code&gt; will be generated.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The problems I found through the Unit Tests
&lt;/h2&gt;

&lt;p&gt;Just like I mentioned at the beginning of this post, I tend to make dumb mistakes by coding inconsiderately. One of the bugs I made in my code was a very typical empty-checking issue. There is a function that takes in a string of the path of the txt file to be read, and the function will open up a file stream to read the txt file to convert it as an HTML string and return it to the caller. Everything will work fine if I pass the txt file following the rule that the txt file is neither empty nor null pointer. However, if I pass in an empty string to represent the path of the file, everything will crash. This is because I forgot to add a condition to check if the parameter file path string is empty or not since I checked it on the caller side, although I know it's empty checked somewhere in my code, I still want my function to be able to resist empty values because I cannot just assume the callers have made sure that the passed string is not empty. &lt;br&gt;
In the end, I was pretty excited about setting up this test framework because I knew I was going to make mistakes in the coding process, and I believe this is what makes it more worthwhile for me to set up this unit testing framework. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>A very late-coming reflect for Hacktober 2022 event</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Thu, 10 Nov 2022 02:29:57 +0000</pubDate>
      <link>https://dev.to/liutng/a-very-late-coming-reflect-for-hacktober-2022-event-4680</link>
      <guid>https://dev.to/liutng/a-very-late-coming-reflect-for-hacktober-2022-event-4680</guid>
      <description>&lt;p&gt;Time flies, Hacktoberfest 2022 has now already been over within a blink of an eye. However, being short in time does not make it less significant to me, on the contrary, it has helped me to gain a new perspective about how I should collaborate with people who I don’t know from all over the world, and also it helped me to overcome the world-wide difficulty, which is being involved. On top of that, as a former Android developer who has 4 years of work experience working, I have used many open-source projects on GitHub, which saved my life countless times, but never had I once done something in return. Luckily, I had Hacktoberfest pushing me out of my comfort zone, I am proud of myself that I can finally pay back to the GitHub community. &lt;/p&gt;

&lt;h2&gt;
  
  
  What I have done in Hacktoberfest 2022 and what have I learned?
&lt;/h2&gt;

&lt;p&gt;During Hacktoberfest 2022, I made 5 PRs in total, although having 4 PRs was required for marking it as finished, I still wanted to do one extra because the last issue was connected to my previous issue and I wanted to make my fix complete. The Pull Requests that I love the most were the ones I created for &lt;a href="%5Bhttps://github.com/CatimaLoyalty/Android%5D(https://github.com/CatimaLoyalty/Android)"&gt;Catima&lt;/a&gt;, because during these 2 PRs, I  had my back-and-forth interactions which I really enjoyed with the repository owner, what is more important is that through this interaction, we both shared and learned lots of knowledge about Android Development, and this was the scenario I pictured in my mind about how the interaction on GitHub would be, I’m so glad this could really happen to me.&lt;br&gt;
Let alone those wonderful interactions I had with repository maintainers, I now also learned that when I create an issue, I should always follow a certain format to make clear every aspect of the issue I want to submit, this includes the description of the issue, the replication method of the proposed bug, also don't forget to attach the log of when the bug happens. From the repository maintenance perspective, I also learned how it would actually be to maintain a repository that has actual users. Now I know I should always thoroughly test my code to cover as many corner cases as possible and when I finished coding, I should always run the unit test, integrate test and linter to check and fix the potential issues in my code. Although the steps may vary from repository to repository, always reading contributing.md is very important for knowing what tests the repository maintainers do expect before submitting Pull Request when finished coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  At the end
&lt;/h2&gt;

&lt;p&gt;Hacktoberfest for 2022 has indeed come to an end, but my contribution to GitHub will not stop there. I will try to make more contributions along the way to not only put my expertise into practice but also make it grow even bigger. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Formatter and Linter for C++ - Lab7</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Tue, 01 Nov 2022 18:59:37 +0000</pubDate>
      <link>https://dev.to/liutng/formatter-and-linter-for-c-lab7-3iea</link>
      <guid>https://dev.to/liutng/formatter-and-linter-for-c-lab7-3iea</guid>
      <description>&lt;p&gt;In this lab, we are going to add a formatter and a linter to our project to regulate our contributors on their submissions. I think this lab is very interesting since I've always been seeing my submitted code on the repositories that I contributed for Hacktoberfest was checked by a component called Linter and it really helped me to find some stupid mistakes I made (for example, unused variables, misspell). Before this lab, I had already been considering implementing a Linter in my repository. Luckily, we have lab7.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tools I used
&lt;/h2&gt;

&lt;p&gt;The tools I used are clang-formatter and clang-tidy. As their names suggest, clang-formatter is for code-formatting and clang-tidy is for code-tidying(linting). These tools are pre-built with LLVM(Clang) which means it doesn't require any extra software, and also, this is the reason why I chose them. &lt;br&gt;
Clang-tidy has helped me find many unsafe usages in my code, for example, strcpy() is the string copying function that I used throughout SSGifier, however, this function does not check the boundary of the string it copies, which could potentially cause memory buffer overwritten issue which can be used as a means to exploit our code. Instead, I changed it to strncpy() which copies string with respect to the boundary of the string. &lt;/p&gt;

&lt;h3&gt;
  
  
  Documents
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://clang.llvm.org/docs/ClangFormat.html"&gt;clang-formatter&lt;/a&gt;&lt;br&gt;
&lt;a href="https://clang.llvm.org/extra/clang-tidy/"&gt;clang-tidy&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Clang-formatter&lt;/strong&gt;&lt;br&gt;
To set up clang-formatter the only thing we need to do is create a config file named &lt;code&gt;.clang-formatter&lt;/code&gt;. For more convenience, we can use this command &lt;code&gt;clang-format -style=llvm -dump-config &amp;gt; .clang-format&lt;/code&gt; to generate one and customize it based on preferences.&lt;br&gt;
&lt;strong&gt;Clang-tidy&lt;/strong&gt;&lt;br&gt;
Similar to clang-formatter, a config file named &lt;code&gt;.clang-tidy&lt;/code&gt; is also needed for clang-tidy. We can use &lt;code&gt;clang-tidy --dump-config&lt;/code&gt; to generate one, however, I don't recommend using this command to generate because the generated config file has many redundant properties, I would suggest using &lt;a href="https://gist.github.com/fbaeuerlein/2895f889e451a817d7b2b36fd60e2873"&gt;this config&lt;/a&gt; instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run
&lt;/h3&gt;

&lt;p&gt;To run &lt;strong&gt;clang-formatter&lt;/strong&gt;, we should use the command &lt;code&gt;clang-formatter -i -style=file *.cpp *.h&lt;/code&gt;. For the attributes we pass to clang-formatter, &lt;code&gt;-style=file&lt;/code&gt; means we want to load the default config file for formatter to load, &lt;code&gt;-i&lt;/code&gt; means we want to write the formatted lines back to the original files instead of printing it on the terminal. And also, we can pass the files to be checked into clang-formatter, and we can use &lt;code&gt;*.cpp&lt;/code&gt; and &lt;code&gt;*.h&lt;/code&gt; to check all cpp files and header files.&lt;br&gt;
To run &lt;strong&gt;clang-tidy&lt;/strong&gt;, we can use the command &lt;code&gt;clang-tidy --extra-arg="--std=c++17" *.cpp *.h&lt;/code&gt; to check all cpp files and header files. This command will load and apply the config file &lt;code&gt;.clang-tidy&lt;/code&gt; by default. Be careful &lt;code&gt;--extra-arg="--std=c++17"&lt;/code&gt; is very important if you have used any function in C++17, such as &lt;code&gt;std::filesystem&lt;/code&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Visual Studio Code Integration
&lt;/h2&gt;

&lt;p&gt;Clang-tidy and Clang-format are bundled with a C++ extension plugin on Visual Studio Code. To use them, we need to follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clang-format&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install &lt;strong&gt;C++ extension plugin&lt;/strong&gt; from &lt;code&gt;Extensions&lt;/code&gt; tab in Visual Studio Code.&lt;/li&gt;
&lt;li&gt;Format document with VS Code's default formatter(&lt;code&gt;Ctrl + Alt + L&lt;/code&gt; by default) and .clang-format will be used as the guideline of the formatter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Clang-tidy&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install &lt;strong&gt;C++ extension plugin&lt;/strong&gt; from &lt;code&gt;Extensions&lt;/code&gt; tab in Visual Studio Code .&lt;/li&gt;
&lt;li&gt;Open action search by pressing &lt;code&gt;Ctrl+Shift+P&lt;/code&gt; and type &lt;code&gt;Run Code Analysis&lt;/code&gt; to search the action of &lt;code&gt;clang-tidy&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;C/C++:Run Code Analysis on All Files&lt;/code&gt; and wait for the checking process to be done.&lt;/li&gt;
&lt;li&gt;select &lt;strong&gt;PROBLEMS&lt;/strong&gt; tab on the bottom panel to check the suggested problem by clang-tidy.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Reflect for PR 4</title>
      <dc:creator>Tong Liu</dc:creator>
      <pubDate>Mon, 31 Oct 2022 00:52:02 +0000</pubDate>
      <link>https://dev.to/liutng/reflect-for-pr-4-5do0</link>
      <guid>https://dev.to/liutng/reflect-for-pr-4-5do0</guid>
      <description>&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/AntennaPod/AntennaPod/pull/6168"&gt;Pull Request&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/AntennaPod/AntennaPod/issues/6167"&gt;issue&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was such a blast to be participating in Hacktoberfest. After I signed off this event with my last Pull Request, my effort and dedication towards Hacktoberfest have finally paid off. Hacktoberfest has not only helped me to finally get involved with the open-source community breaking me free from my comfort zone, but it also helped me to overcome my fear of being involved.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did I do for the last PR
&lt;/h2&gt;

&lt;p&gt;For my last PR, I decided to try something even bigger, so I chose an Android project named &lt;strong&gt;AntennaPod&lt;/strong&gt; which has 4.5K stars with 1.2K forks. This is because I want to see how a bigger project is managed on GitHub and also how a bigger project's code framework is designed. &lt;br&gt;
When I was looking for an issue to work on, I found an issue which reported a bug that when users set the default page of the app as Inbox Page, which shows all of the recently updated podcasts of the subscribed channels, the Index page will not actually show up when the app is opened. Since it was my first time contributing to this project, I have not gotten familiar with the code of this project, thus, I need a starter issue for me to get familiar with everything. This issue worked for the best because I only need to fix a bug and did not need to add new features to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How did I find a fix for it and how did I fix it?
&lt;/h2&gt;

&lt;p&gt;After having browsed through the UI on how the settings are saved, I noticed they use an Android pre-built mechanism to save them, named &lt;code&gt;PreferenceScreen&lt;/code&gt;. From the Android official document of &lt;a href="https://developer.android.com/develop/ui/views/components/settings"&gt;Settings&lt;/a&gt;, I learned that all the values of those settings are saved in XML files, usually in attrs.xml. Soon I found there is a layout named &lt;code&gt;preferences_user_interface.xml&lt;/code&gt; uses this file and also this layout file is referenced by &lt;code&gt;UserInterfacePreferencesFragment&lt;/code&gt; which calls another function &lt;code&gt;UserPreferences::setDefaultPage()&lt;/code&gt; to save this setting and next to it there was another function named getDefaultPage(). Now that I knew how the value is saved and read, I can check if it is the problem with the reading function or the saving function. After adding breakpoints here and there and having traced some relevant values, I noticed that the matching TAG of this setting is different between the read and save functions, which means, no matter how this setting is saved, the reading function will always not be able to find it since they are using different TAGs. Since now everything is clear, I could just either change the tag of the reading function or the saving function to get the issue solved. I chose the first and created this PR to request to merge it into the original repository. However, after the maintainer reviewed my code, they prefer to change the saving function instead of the reading function because changing the reading function breaks the naming consistency of other variables. After I reworked my fix and changed my fix on the saving function and pushed my code, my last PR was finally accepted which brought my hacktoberfest of 2022 to a successful end.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
