<?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: Bing Pan</title>
    <description>The latest articles on DEV Community by Bing Pan (@bpan2).</description>
    <link>https://dev.to/bpan2</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%2F471042%2F73840593-b98b-456c-b177-411d22330199.png</url>
      <title>DEV Community: Bing Pan</title>
      <link>https://dev.to/bpan2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bpan2"/>
    <language>en</language>
    <item>
      <title>Setting Up Eclipse With Plugins On Ubuntu</title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Sun, 15 Nov 2020 01:22:41 +0000</pubDate>
      <link>https://dev.to/bpan2/setting-up-eclipse-with-plugins-on-ubuntu-41pl</link>
      <guid>https://dev.to/bpan2/setting-up-eclipse-with-plugins-on-ubuntu-41pl</guid>
      <description>&lt;h3&gt;
  
  
  Vim:
&lt;/h3&gt;

&lt;p&gt;For a first-timer who sets up java development environment on Ubuntu, one should not use Vim as the primary IDE option even though it is a very powerful tool.  &lt;/p&gt;

&lt;p&gt;Initially, after finding a Youtube video titled as Java Programming Using Command Line Tools Only! (vim, curl, and tmux) at &lt;a href="https://www.youtube.com/watch?v=zmnlpf4FtkE"&gt;https://www.youtube.com/watch?v=zmnlpf4FtkE&lt;/a&gt;, I decided to use Vim for Java development on Ubuntu. Since it is recommended to use prettier as my source code formatter, I was very happy to find this Youtube video How to automatically format your code in VIM with Prettier | VIM Tutorial at &lt;a href="https://www.youtube.com/watch?v=ellaT6dK780"&gt;https://www.youtube.com/watch?v=ellaT6dK780&lt;/a&gt;. However, later on, I found out Java is not included in the list that prettier will support in Vim.&lt;/p&gt;

&lt;p&gt;Then, check out the documentation at prettier.io, and followed the instructions on vim-prettier at &lt;a href="https://github.com/prettier/vim-prettier"&gt;https://github.com/prettier/vim-prettier&lt;/a&gt;. Unfortunately, my installation failed at the beginning of the instruction, which states:&lt;br&gt;
    To install with vim 8+ plugins, simply clone to your ~/.vim/pack/plugins/start directory, and add packloadall to your .vimrc (if you haven't already).&lt;br&gt;
mkdir -p ~/.vim/pack/plugins/start&lt;br&gt;
git clone &lt;a href="https://github.com/prettier/vim-prettier"&gt;https://github.com/prettier/vim-prettier&lt;/a&gt; ~/.vim/pack/plugins/start/vim-prettier&lt;/p&gt;

&lt;p&gt;.vimrc: packloadall&lt;/p&gt;

&lt;p&gt;When Vim option failed miserably, I decided to give another try on SpaceVim at &lt;a href="https://spacevim.org/quick-start-guide/"&gt;https://spacevim.org/quick-start-guide/&lt;/a&gt;. The installation went through very smoothly and I could use it to work on my java project. But the final straw for me to give up on SpaceVim was the failure to configure its layer to java. &lt;/p&gt;

&lt;p&gt;After all the time and energy spent, I finally realized Vim is not a feasible option for my time frame. I abandoned Vim.&lt;/p&gt;

&lt;h3&gt;
  
  
  Eclipse
&lt;/h3&gt;

&lt;p&gt;At the very beginning, I was reluctant to a non-linux ide such as Eclipse. As the deadline of my lab is approaching, Eclipse seems the only option I can resort to.&lt;/p&gt;

&lt;p&gt;It is a breeze to use install Eclipse on Ubuntu. Integrating Eclipse with a source code formatter and a linter is also very easy. By using Google Java Format as the Formatter.xml file, I set Save Actions options to format all lines of source code via Eclipse's preference for editor. In addition, through Eclipse MarketPlace, I installed Spotbugs plugin as the linter.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Configuring Telescope on PC</title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Sat, 07 Nov 2020 20:33:45 +0000</pubDate>
      <link>https://dev.to/bpan2/configuring-telescope-locally-p90</link>
      <guid>https://dev.to/bpan2/configuring-telescope-locally-p90</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Background:&lt;br&gt;
My laptop has AMD Ryzen 7 4800H CPU, 2x8 G DDR4 memory,  and NVIDIA GTX 1660 Ti graphic card. The version of my Windows 10 is 1909 (OS Build 18363.1139).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Initial Excitement:&lt;br&gt;
Prior to jumping right into the installations and configurations of Seneca’s Telescope, I went over the instruction for the environment setup(&lt;a href="https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md"&gt;https://github.com/Seneca-CDOT/telescope/blob/master/docs/environment-setup.md&lt;/a&gt;) and was very glad to see that I could accomplish the task by using Windows Subsystem Linux (WSL2). It is a widely known fact that the virtualisation feature of Windows 10 should be turned in order to install Ubuntu. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Pain:&lt;br&gt;
I religiously followed the instructions until I got stuck at downloading Ubuntu for WSL. It took me some time to enable the previously disable Windows Store app on my laptop. &lt;br&gt;
2.1 Reinstall MS Store:&lt;br&gt;
Press Windows key + X&lt;br&gt;
Click Windows PowerShell (Admin)&lt;br&gt;
At the command prompt, type the following then hit Enter:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Get-AppXPackage *WindowsStore* -AllUsers | Foreach {Add-AppxPackage -   DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pain started when I was trying to download Ubuntu and Ubuntu 20.04LTS within Windows Store. Microsoft requires me to register in order to finish and install the above software. Begrudgingly I finished the registration. The downloading processes of the two software either move at the speed of 8k per second and periodically hang up. I had to repeatedly use WSReset.exe to reset Windows Store and clean its cache. After multiple days’ attempt, my journey reached the point the OS keeps telling me that &lt;/p&gt;

&lt;p&gt;“WslRegisterDistribution failed with error: 0x80370102&lt;br&gt;
Error: 0x80370102 The virtual machine could not be started               because a required feature is not installed.”   &lt;/p&gt;

&lt;p&gt;After another day of Google search solutions, I came to realization that using WSL2 to install Telescope was not a viable solution especially there existed even more technical issues to solve. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Alternative Solution:
Having to give up all the work I have done, I utilized VirtualBox to run Ubuntu. This method is a much stress-free option. There is only one confusion that caused half-day delay.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the instructions, that titled as “After installing the prerequisites:”, the instruction reads&lt;br&gt;
“In the root directory, run cp env.example .env on Linux/Mac or copy env.example .env.”&lt;br&gt;
I went to the root of Ubuntu and made a .env file there. After hours of attempt, I realized the instruction means the top level directory of Telescope rather than the root of Ubuntu. After solving the issue, everything is run as told.  &lt;/p&gt;

&lt;p&gt;The following is issues I came across and how to solve them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Failed to check elasticsearch
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl http://localhost:9200
curl: (7) Failed to connect to localhost port 9200: Connection refused
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    sudo systemctl restart elasticsearch
    curl http://localhost:9200

{
"name" : "bpan2-VirtualBox",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "ZFKMgmlMT_Sg5poO5IwHiw",
"version" : {
         "number" : "7.6.2",
         "build_flavor" : "default",
         "build_type" : "deb",
         "build_hash" : f48eb35cf30adf4db14086e8aabd07ef6fb113f",
         "build_date" : "2020-03-26T06:34:37.794943Z",
         "build_snapshot" : false,
         "lucene_version" : "8.4.0",
         "minimum_wire_compatibility_version" : "6.8.0",
         "minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl http://localhost:9200/_cluster/health?pretty
{
  "cluster_name" : "elasticsearch",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 3,
  "active_shards" : 3,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;issues when running npm start:&lt;br&gt;
2.1. Error: Cannot find module 'dotenv'&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install dotenv
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2.2. Error: Cannot find module 'pino'&lt;/p&gt;

&lt;p&gt;npm install pino&lt;/p&gt;

&lt;p&gt;2.3. Error: Cannot find module 'express-pino-logger'&lt;br&gt;
npm i express-pino-logger --save&lt;/p&gt;

&lt;p&gt;2.4. Error: Missing &lt;code&gt;pino-pretty&lt;/code&gt; module: &lt;code&gt;pino-pretty&lt;/code&gt; must be installed separately&lt;br&gt;
npm install -g pino-pretty&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;issues when running npm run develop:&lt;br&gt;
3.1. gatsby: not found&lt;br&gt;
    npm install&lt;/p&gt;

&lt;p&gt;3.2. install Passport:&lt;br&gt;
npm install passport&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>How a good-for-first programming issue becomes a design issue</title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Sat, 31 Oct 2020 21:18:10 +0000</pubDate>
      <link>https://dev.to/bpan2/how-a-good-for-first-programming-issue-becomes-a-design-issue-1b2c</link>
      <guid>https://dev.to/bpan2/how-a-good-for-first-programming-issue-becomes-a-design-issue-1b2c</guid>
      <description>&lt;p&gt;When searching for a good-for-first issue through Shopify's repository, I came across one under shopify_transporter (&lt;a href="https://github.com/Shopify/shopify_transporter"&gt;https://github.com/Shopify/shopify_transporter&lt;/a&gt;). &lt;br&gt;
According to its README file, Shopify Transporter "is a command-line tool that offers capabilities to extract &lt;br&gt;
and convert data from third-party platforms into a Shopify-friendly format."&lt;/p&gt;

&lt;p&gt;To my surprise, there exists a good-for-first issue (Issue 11) &lt;br&gt;
which states "Orders: grand_total is unused and can be removed from TopLevelAttributes" (&lt;a href="https://github.com/Shopify/shopify_transporter/issues/11"&gt;https://github.com/Shopify/shopify_transporter/issues/11&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Since the project is written in ruby on rails, I jumped right into learning about the language of ruby, and installations and usages of rails and RSpec. Please refer to the notes section for all the links and notes.&lt;/p&gt;

&lt;p&gt;However, I soon ran into some issues while trying to test and run the project based on the instructions provided by the project's Contributing page.(&lt;a href="https://github.com/Shopify/shopify_transporter/wiki/Contributing"&gt;https://github.com/Shopify/shopify_transporter/wiki/Contributing&lt;/a&gt;) At this time, I realized I bit more than I could chew. &lt;/p&gt;

&lt;p&gt;After putting it away for a couple of days, I re-visited the issue. I came to the conclusion that the issue is not a programming issue, nor a good-for-first timer issue.&lt;br&gt;
In fact, it is a design issue that involves some degree of refactoring. &lt;/p&gt;

&lt;p&gt;Based on my programming study, the grand_total of an order should normally be considered as a calculated field, which means the value of the grand_total is calculated based on other data. When it comes to store it inside a relational database,&lt;br&gt;
it doesn't have to be stored in the table. &lt;/p&gt;

&lt;p&gt;At TopLevelAttributes of the project, the grand_total data field is used by the following function:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def total_price(hash)
        hash['grand_total'].to_i
    end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then total_price() function is, in turn, used by&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def paid?(hash)
        total_price(hash) == total_paid(hash) &amp;amp;&amp;amp; total_paid(hash) &amp;gt; 0 &amp;amp;&amp;amp; total_refunded(hash) == 0
    end


def partially_paid?(hash)
        total_paid(hash) &amp;gt; 0 &amp;amp;&amp;amp; total_paid(hash) &amp;lt; total_price(hash) &amp;amp;&amp;amp; total_refunded(hash) == 0
    end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Thus, I finally realized the issue can not be solved &lt;br&gt;
simply by removing from the definition of TopLevelAttributes class&lt;br&gt;
as suggested by the comment on the issue. &lt;/p&gt;

&lt;p&gt;The grand_total can be calculated or be passed around. Since the definition of the class retrieved the value of grand_total from its data source, it might be a good idea just not to remove the field for now till the moment that everyone thinks the field is redundant and decides to remove it during the next version of implementation. &lt;/p&gt;

&lt;p&gt;//============================================&lt;br&gt;
Notes &lt;br&gt;
//============================================&lt;br&gt;
&lt;a href="https://www.tutorialspoint.com/ruby-on-rails/rails-installation.htm"&gt;https://www.tutorialspoint.com/ruby-on-rails/rails-installation.htm&lt;/a&gt;&lt;br&gt;
Ruby on Rails - Installation&lt;/p&gt;

&lt;p&gt;//============================================&lt;br&gt;
&lt;a href="https://www.ruby-lang.org/en/documentation/quickstart/"&gt;https://www.ruby-lang.org/en/documentation/quickstart/&lt;/a&gt;&lt;br&gt;
Ruby in Twenty Minutes&lt;/p&gt;

&lt;p&gt;//============================================&lt;br&gt;
&lt;a href="https://rubyinstaller.org/downloads/"&gt;https://rubyinstaller.org/downloads/&lt;/a&gt;&lt;br&gt;
Ruby+Devkit 2.7.X (x64) installer.&lt;/p&gt;

&lt;p&gt;//============================================&lt;br&gt;
&lt;a href="https://www.tutorialspoint.com/rspec/rspec_introduction.htm"&gt;https://www.tutorialspoint.com/rspec/rspec_introduction.htm&lt;/a&gt;&lt;br&gt;
RSpec - Introduction # for testing&lt;/p&gt;

&lt;p&gt;//============================================&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=8wZ2ZD--VTk"&gt;https://www.youtube.com/watch?v=8wZ2ZD--VTk&lt;/a&gt;&lt;br&gt;
Ruby Programming | In One Video&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git Rebase</title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Fri, 23 Oct 2020 06:36:42 +0000</pubDate>
      <link>https://dev.to/bpan2/git-rebase-4806</link>
      <guid>https://dev.to/bpan2/git-rebase-4806</guid>
      <description>&lt;p&gt;I primarily focused on removing redundant codes and functions because initially when I first designed and implemented my tool, I separated the command line parsing from URL parsing by using two objects, ArgParser and LinkValidator, to handle those functionalities. There is only one static variable “MAXNUMPATHS” in my tool, which is defined in the class LinkChecker in which the main() function is located. It is used by other classes via static imports. &lt;/p&gt;

&lt;p&gt;I believe in making atomic commits to make my development process to be easier to perform. After watching the professor’s video instruction on how to perform an interactive rebase, my actual practice is quite smooth. Of course, I did find some bugs while I was modifying my code. Since all of them happened at the level of local methods, all are easy to be fixed. However, I did run into instances previously that I had to modify multiple locations across 3 to 4 classes in order to accommodate the data type change of a method’s parameter.     &lt;/p&gt;

&lt;p&gt;Since I am using Windows Subsystem for Linux (WSL) version 2 for Windows 10, the change of my project history without running into too much trouble. Of course, I primarily relied on using Vim rather than Eclipse. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Eclipse, WSL 2, &amp; Git </title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Fri, 09 Oct 2020 22:08:31 +0000</pubDate>
      <link>https://dev.to/bpan2/eclipse-wsl-2-git-37lf</link>
      <guid>https://dev.to/bpan2/eclipse-wsl-2-git-37lf</guid>
      <description>&lt;h2&gt;
  
  
  I. Working on parallel branches, merging them, pushing to Github
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On my local machine, create a folder to contain for the entire project. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the newly created folder, on the command line, issue:&lt;br&gt;
 git init&lt;br&gt;
then, pull the remote master repository from Github.com by:&lt;br&gt;
 git clone &lt;a href="https://github.com/bpan2/httplinkchecker"&gt;https://github.com/bpan2/httplinkchecker&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once cloning is done, at the current folder, create two new branches to implement two features for json and all/good/bad flags by issuing:&lt;br&gt;
 git checkout -b issue-json master&lt;br&gt;
 git checkout -b issue-flags master&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Import the master branch into Eclipse with the option of "Select nested projects".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement the above two features in their corresponding local branch.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;During the entire implementation process, I staged and committed changes via Linux command line. &lt;/p&gt;

&lt;p&gt;For each commit, I tried to make the content as atomic as possible. By this way, it could make reversing the modification easier. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Once the implementation is completed, I ran into some issues when trying to push my local branches to the remote repository.&lt;br&gt;
I named my remote branch with different names from my local branches. Even though I tried&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  git push origin issue-json:issue-4
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I kept getting the error message which states:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Updates were rejected because a pushed branch tip is  
  behind its remote counterpart
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After multiple times of failed attempts to solve the issues, I resorted to the most primitive method:&lt;br&gt;
     1. deleted the corresponding remote branches for the two &lt;br&gt;
     features&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 2. within each local branch for the two features, change the  
 name of the branch by issuing:
      git branch -m issue-4
      git branch -m issue-5

 3. at the command line, issue:
      git push -u origin issue-4
      git push -u origin issue-5 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The resulting remote branches can be found via:&lt;br&gt;
     &lt;a href="https://github.com/bpan2/httplinkchecker/tree/issue-4"&gt;https://github.com/bpan2/httplinkchecker/tree/issue-4&lt;/a&gt;&lt;br&gt;
     &lt;a href="https://github.com/bpan2/httplinkchecker/tree/issue-5"&gt;https://github.com/bpan2/httplinkchecker/tree/issue-5&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Merging issue-4 and issue-5 branches with the master branch&lt;/p&gt;

&lt;p&gt;The merging of issue-4 branch with the master branch goes without any issue. However, multiple conflicts occurred when merging issue-5 branch with the master branch.&lt;/p&gt;

&lt;p&gt;The conflicts involved tow java classes. By examining the conflicts, no real conflicts exist in terms of the implementation codes. Once finishing removing the signs generated by git, the issue-5 branch is merged with the master branch without any issue after the changes were committed.&lt;/p&gt;

&lt;p&gt;After completing the above two merges, I retrieved those two merge commits by issuing:&lt;br&gt;
    git log --merges&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Filing issue-4 and issue-5 and closing them with the following two links: &lt;br&gt;
&lt;a href="https://github.com/bpan2/httplinkchecker/issues/1"&gt;https://github.com/bpan2/httplinkchecker/issues/1&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/badalsarkar/Blink/issues/5"&gt;https://github.com/badalsarkar/Blink/issues/5&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  II. Useful Details
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Using Windows Subsystem for Linux version 2(WSL) on Windows 10:&lt;br&gt;
 To use WSL, issue "bash" at the Powershell command line. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to import local repo into Eclipse:&lt;br&gt;
 While importing a local Git repository with multiple branches, don't forget to tick the checkbox for "Select nested projects". Otherwise, you might not be able to switch among branches within Eclipse. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to switch branches using Eclipse by using Team:&lt;br&gt;
 Right click on my project, &lt;br&gt;
 select Team -&amp;gt; Branch -&amp;gt; switch between existing branches&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating a new remote branch and push a local branch to it: &lt;br&gt;
      git push -u origin issue-4&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Filtering the git log to display/not to display merge commits:&lt;br&gt;
 1 to display: git log --merges&lt;br&gt;
 2 not to display: git log --no-merges&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>Learning from working on other's project</title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Fri, 02 Oct 2020 23:32:05 +0000</pubDate>
      <link>https://dev.to/bpan2/learning-from-working-on-other-s-project-1o8h</link>
      <guid>https://dev.to/bpan2/learning-from-working-on-other-s-project-1o8h</guid>
      <description>&lt;p&gt;It is a unique learning experience for me to build a new feature on anther person's project repository.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Development environment:&lt;br&gt;
Even though I expected that Java’s development environment could be complicated, I spent much more time on setting up Eclipse than I expected. The project I choose to work on uses Maven to handle dependencies for Apache Common CLI and IO while I use them via importing corresponding JAR files of those libraries by setting the Classpath under Eclipse’s Java Build Path.&lt;/p&gt;

&lt;p&gt;Another known issue is the version conflict of jdk. The latest free jdk download through Oracle’s official website is the 15th version. However, as of September 2020, the latest version of jdk Eclipse uses is the 14th. I have to adjust the environment variable for the System path on my Windows 10 machine even after I downloaded and installed the corresponding old version. The situation gets worse when Oracle requires a user to register in order to download any of the older versions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learning something new:&lt;br&gt;
It is quite pleasantly surprised to find an existing library Apache Common CLI my colleague uses to parse and process the user input via the command line, especially after I programmed everything from the ground up all by myself in Java. His usage of Apache Common CLI makes his project better organized than mine. I should do more research next time when I work on any new project. I am not intended to become lazy. Just that I don’t have to re-invent the wheel when there exists a library created by some collective professional efforts. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Eclipse is not well integrated with Git as VS Code:&lt;br&gt;
To be honest, I spent almost 15 percent of my time on setting up my colleague’s project locally via Eclipse. According to my professor’s video instruction on how to use Git, any file or directory created via Git is displayed immediately by VS Code, which reflects what has happened on the system the computer is operating on. When in Eclipse I can pick which branch I am going to work on, I cannot see new files and directory on Windows system. This fact complicates my work processes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The importance of modular programming:&lt;br&gt;
While working on my colleague’s project, I can get a sense that a good programming project should be modularized by creating standardized interface via an object’s public methods. In other words, via encapsulation, one can provide coherent public interface without exposing the inner complexity of implementation and private states. When I added a recursively searching all sub-directory feature, my colleague’s existing method makes it simple and clean for me to implement mine.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>httplinkchecker</title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Fri, 18 Sep 2020 20:10:59 +0000</pubDate>
      <link>https://dev.to/bpan2/httplinkchecker-eoa</link>
      <guid>https://dev.to/bpan2/httplinkchecker-eoa</guid>
      <description>&lt;p&gt;The use case to check an HTTP link is broken or not sounds quite simple to implement on the surface. But the implementation soon gets messy when the number of tasks, such as searching for HTTP Strings in multiple files, sending HTTP requests, receiving HTTP responses, and displaying those responses to the console, grows drastically enough to consume too much resources of a computer and eventually freezes the machine.&lt;/p&gt;

&lt;p&gt;I am using Java to program the httplinkchecker. Multi threading is my first consideration to reduce the performance bottleneck, of course, at the cost of making the code complicated.&lt;/p&gt;

&lt;p&gt;During my initial research, I found HashMap was mostly frequently used to store links found in a file. I use ArrayList instead because of simplicity. However, when trying to retrieve and store links from all the files of a sub-directory, I force myself into using ArrayList of ArrayList, which gives me unease feeling about this data structure without knowing the exact reason.&lt;/p&gt;

&lt;p&gt;After reviewing my colleagues who program the same tool in Java, I find it quite amusing on the way a C/C++ programmer programs in Java. It IS really hard to learn a new language well, let alone thinking in its idioms. Since Java claims to be an Object Oriented programming language, you can usually hear a new programming learner complains that the language forces one to construct everything in objects. Well, at least one solution exists: to throw everything into one giant class.    &lt;/p&gt;

&lt;p&gt;The following are links to my interactions with our colleagues:&lt;br&gt;
     1. &lt;a href="https://github.com/jossiey/LinkChecker-CmdLC/issues/3"&gt;https://github.com/jossiey/LinkChecker-CmdLC/issues/3&lt;/a&gt;&lt;br&gt;
     2. &lt;a href="https://github.com/pyvelkov/DeadLinkage/issues/8"&gt;https://github.com/pyvelkov/DeadLinkage/issues/8&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>opensource</category>
      <category>programming</category>
      <category>java</category>
    </item>
    <item>
      <title>Hello World !</title>
      <dc:creator>Bing Pan</dc:creator>
      <pubDate>Fri, 18 Sep 2020 03:36:12 +0000</pubDate>
      <link>https://dev.to/bpan2/hello-world-1g6g</link>
      <guid>https://dev.to/bpan2/hello-world-1g6g</guid>
      <description>&lt;p&gt;I have read many blogs by others. But I never created one myself.&lt;br&gt;
So for my future self, here comes my first blog.  &lt;/p&gt;

&lt;p&gt;I am learning programming at college. &lt;br&gt;
Right now, I am taking a course titled as "Topics in Open Source Development" to gain some real world experience on large programming projects.&lt;/p&gt;

&lt;p&gt;I like to work on open source projects on Android due to its market share in the world's smartphone sector. Affordable Android smartphones are bringing the Internet to the fingertips of more people in the world. I would love to make their experience more smooth and enjoyable.    &lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
  </channel>
</rss>
