Skip to main content

Posts

Showing posts with the label openSource

Finally, release my first open source.

  Starting... This lab is to release my product to install easily. Instead of cloning or downloading and setting it up manually, it provides a lot of convenience for users to install it. I chose NPM since I used nodejs. NPM  is a great site to help develpers to release their git repository in the site.  Progressing... First, I signed up on npmjs.com and logged in the site on the console to release my repository. I had to set up a lot of things like 'npm init', modifying readme and package.json to be ready.  Second, I tried to release my repository by the command, 'npm publish --access public'. Unfortunately, the name, http-parser, was already taken, so I needed to change my name. I chose my name as http-checker and tried to release it again. At this time, I got 403, forbidden error. I spent a lot of time to figure out but it was actually due to not verified account. Once I got the verified email account, finally, I got the release version of my repository. Here is my...

Advanced journey for passport and typescript

  Release 0.4 - Progressing To understand well for oauth2 and passport, I studied and googled it.  It basically provides authentication service using well known sites like google, facebook and github.  Passportjs provides a number of strategies for OAuth2. Here is the  official site . Since passport uses strategy pattern, most of them are very similar and just change some of urls and which information will be used in the strategy. Of course, I spent a lot of time to understand how it worked and actually there were many things I needed to study such as session, cookie and so on. Also, Typescript is very helpful. I cannot added any property as it is ok on Javascript.  When I added githubId in user, it automatically gave me an error and I needed to figure out where I need to add it. It is not really difficult since I studied OOP a lot but I am pretty sure I will be a fan of it. After I spent some time, I added them successfully and made a PR. However, the CI s...

Start new journey for oauth2

  Release 0.4 For the release 4, I decided to contribute the issue that I failed to contribute since the owner changed language. This is my final goal for this course so I don't want to cotribute just one line code or edit a document. Fortunately, there was an issue when I visited the repository again so I added a comment again to get the issue. The issue is about adding more oauth2 feature, which is new for me even I have not been touched oauth2 on my academic projects at all. So, It will be fun and I am looking forward to what I will face from this issue.

Unit test and CI

  Starting... This lab is to help our codes to make sure working well. Instead of manual testing for our functions, there are a lot of automatic test framwork for any languages. Since I used node js for my application, I chose jest since it looked very convenient and easy for me . Progressing... Jest,  link , is great test frame work since it provides more than mocha and I heard it is maintained by facebook... but not sure. To use this, I installed it as a development package and simply put some scripts such as test and test:coverage.  To be honest, for me it was not really easy as what I have heard. I need to understand the mocking function or fake implementation which made me so confused when I met it at first such as jest.fn() and mockImplementation(). To be honest, I am not a fan of test cases yet, I really have no idea for some parts how to test maybe I need more time to be familiar with it. Moreover, I think I should have not implemented the current way like a lot o...

Local Authentication

  Release 0.3.2 I tried to find a test issue to learn how to write test cases but I found another one which was also very interesting to me since it was about authentication set up using JSON web token. When I reviewed telescope, I read a code very carefully so I remembered about passport so I suggested that I would work with passport local and token and the owner agreed with my idea. First, for this I needed to understand passport and how JSON token works. After spending a lot of time, I implemented the part and commit it. The owner was satisfied with work but unfortunately, during the time, about 2 days, he decided to change main language from javascript to typescript due to typeorm. What is typeorm? It will be my next topic. Anyway, he liked my logic so he said he would use it. Ah~, there are many things I need to study. Since my second job was refused and wanted to study or contribute more especially about test case, I started to explore again and finally, I found one. And I le...

Elastic search and more

  Release 0.3.1 Now it is time to learn what is Elastic search since the chosen issue is about adding more fields for our model in telescope.  This is very new for me so I was very scared when I started to work for this but now I think I am more confident. First, Elastic search is such a great supportive database especially for index search. The good thing is that it is not only the index search for whole value but, partial keyword as well. Of course, it may be wrong since I also just started to study it. Anyway, It was very careful when I read codes one line by one. Following the official document ,  I tried to add some fields, but it made some test failed so I needed to fix them. The below content is from the official document: Mapping edit Mapping is the process of defining how a document, and the fields it contains, are stored and indexed. For instance, use mappings to define: which string fields should be treated as full text fields. which fields contain numbers, dat...

Coding Standard

  Starting... This lab is to help our codes to standardize automatically. As you have experienced a lot, group coding is very difficult to be unified in one specific style. In this lab, we will explore how to make one style code with very efficient or effective libraries, prettier and lint for node js . Progressing... Prettier,  link , is great for matching our coding style especially indent with tab or space, how many line and so on. The first step I took is to install prettier and put simple scripts in package.json,   "prettier-fix": "prettier --write \"./**/*.{md,js,json}\"",  "prettier": "prettier --check \"./**/*.{md,js,json}\"". I just run the script and I realized that there were a lot of prettier issues like indent, different ending style, tab, space and so on. Luckily, these scripts were very helpful since it provided auto editing features as well so I did not have to modify following the rules manually.   Eslint,  li...

Working with telescope

   Starting... This lab is to help students to communicate with a big project, telescope, and understanding how to handle with the set it up. There were a lot of trouble since many of technologies are new for me such as docker, docker-compose, elastic search ladis, pino, and so on. Let's jump in the big project . Progressing... The first step I took is to install wsl 2. It is not very difficult since microsoft provides good instruction, link . Although the telescope provides very good instruction,   here , It was not really easy for me to get a concept and set it up successfully. Therefore, I needed to ask a lot of questions on slack, telescope channel. Some helped me a lot and explained so much and finally I got it work successfully.  After my server was working locally, I didn't have any issue to get the response from the url, http://localhost:3000/posts.  To communicate with the local server, actually I needed to change my code a lot since I wanted to sp...

Getting more difficult?

  Release 0.2.4 Now I am at almost the end of release 0.2 and I chose the telescope as the final contribution. To be honest, this is huge, well organized and great project and it is first time to take a look. Unlike my previous assignment during the previous terms, there are tons of what I have never seen. First, docker compose is great and the document for contribution is very clear. Of course, I had no idea when read it first, but every time as my professor mentioned, there was a great guy, helper?, helping me a lot to set up the project. Although I had no idea about Elastic-search and Redis-cache server, I was happy to take a time to look though the codes and to understand. Again, trying to understand an issue is always hard for me and sometimes I am really not happy when somebody does not understand my question. This happened again. The reason why I attached the picture is that I am still confused about the whole process of this project especially about why frontend didn't get ...

Don't worry about commit message

  Starting... This lab is to practice about the advanced skills on git such as rebase, squashing, and amend. What I had done before I learned this way to handle my incorrect committed message was like that, just doing reset and doing it again. I can say that I really love this skill especially about rebase and interactive amend mode. Progressing... Actually, This task is very simple and I understand the main purpose is not refactoring my code, but using the advanced git skills for my future journal in the code world. With the instruction of osd600, I made 3 commit messages to try to rebase for squashing three messages. pick   b77bdc5  applied three refactoring like used function, getting rid of global variables and removing duplicated regex and rename the methods squash   28059dd  got rid of global variables squash   66e551b  removed dupli...

How to communicate with other people

  Starting... This lab is to help students to communicate with the owner in open source world to solve the conflicts of merging their branch to remote origin. So, following the instruction, I forked one repository that I chose and create an issue to add new feature of ignoring url patterns from a file. git clone https://github.com/StellaJung-Student/project-checkurl.git Progressing... Actually, The main of my task is not about the implementation above. It is just helping another classmate to help his or her task complete. Of course I also have had the part from another student so I added his repository as another remote one. My issue on my repository is issue-11 so I typed following command. git checkout -b issue-11 pedro/issue-11 He did great for the task but I realized that he didn't modify readme for the feature of ignoring urls so I created issue-11-fix. git pull pedro issue-11 git checkout -b issue-11-fix pedro/issue-11 Git is actually so great since it automatically prov...

Setting a coding standard for Javascript world

  Release 0.2.2 ~ 3... Now I am in the middle of release 0.2 and it is very exciting and I am pretty sure I am enjoying it now. Today, I have learned how to set up the husky which is about when I try to commit codes, it automatically checks if there is an issue or unmatched rules to standard based on eslint and prettier. Firstly, I added comment to get the responsibility of the eslint and prettier set up issue. After I added the comment, I tried to get some advice to complete this issue and he made a comment about his favorite way of setting up husky. Here is the  link  which is very helpful since there are very specific format to set up and actually, it was almost the same except the main language.  During the following the process, I realized another issue that he also created is very related my current issue so I also added a comment to take the issue and he gave a kind of agreement emoticon. This was the eslint that I created after understanding of eslint. Pretti...

How to handle the conflicts of git

  Starting... This lab is to help students to solve the conflicts of merging their branch to master. So, following the instruction, I created two issues which are about  Create a filter for status code  and  Use color flag to use color output . Both of issues came from same commit position from master. Progressing... The first step I took is I added the new feature and commit and merge to master branch. From this OSD600 course, I have learned new library, Yargs, from the lecture video, and a lot of classmates already used it. Hm, I am a slow-starter LOL. Anyway, after applying the library and little bit of code change, I merged to master branch and there was no problems. By the way, following my professor's instruction, I tried to use  providing code to blogger, gist  to avoid using just image. And this is my first merge result. Next, I moved the issue-8, which is about color option from Node environment. To make the test easier, I used dotenv library. How...

Hactoberfest is very competitive

Release 0.2.1... To be honest, this, looking for a task in the open source about Hacktoberfest, is very very competitive and it turns out so stressful.... Is it only for me? First day of October, I tried to research bug by the way that I learned from OSD600 course, with below command. As you can see, it seems very popular. More than 14,000 issues are wait for you~ but actually there are so many developers working on the open source world, which means that by 30minutes issues come out, most of them make comments. Although, you have been commented by the first, it doesn't mean you will take the job. PR is actually a real competition.  Language also very important. Javascript is the most popular language in this Hacktoberfest and Python follows as the second one. As my professor mentions that the first issue doesn't need to be difficult or code issue since there is a lot document or css issues but it is actually more competitive. To avoid this terrible competition, I tried to comm...

Exploring to open source world

  Starting... Today, I have learned how I can search to access and take a task from open source world. I have appreciated to github to provide a lot of opportunities. I was very busy today to create Twitter and following my professor, hacktoberfest  and so on. First experience is not really good. What I learned from the first stop to contribution is actually kind of a competition. Even thought I made a comment, somebody just came up and with a short comment and it is just closed with PR from the person. It is very different from this open source course's previous labs.  Therefore, I should try to find out a new issue that I can contribute.

Experience about a contribution to fix a bug or issue

  Starting... I have been very exciting to review other classmates' repository before I will jump into a real open source project. From this lab, I have learned how to do forking and cloning other projects and create a new branch for a new issue or a new feature. It is very hard to wait for the owner's answer but it also can be a special experience  Reading... In my experience, finding an issue and improvement is not easy especially for other's task and really careful to touch it since it should be very sensitive. For this reason, my first step for this lab, I tried to create an issue with a nice comment. During the time for waiting for reply, I did forking and cloning the repository and started to review a code to find out what I can contribute. Finally, I figured out some part I can improve so I added comment for it,  Issue 5 I suggested three things. First of all, the number of counter is always the last number so I wanted to fix it. Second, I wanted to add an another ...

Tried to contribute issues

Starting... I had no idea how I could contribute, create, and fix an issue.  I was afraid of messing up other's  repository.  Anyway, I have to try in order to follow the curriculum.  I forked and cloned one of my classmates' repository.  It was my first time to test codes implemented by someone else. Reading... I went through the codes and tried to find any issue, were not easy at all.  Anyway, the first  issue I found is a very tiny thing:  'let' keyword although that never changed. It would be better to use 'const' keyword I think. Another issue is that the person did not use .gitignore . Although, I think it is not a big issue in here, It would be also better to node_modules in .gitignore to prevent accidently upload huge setting file to git. Lastly, It seems to have similar issues that I had already in my source code. It was about the wrong way like using async or promise functions as sync functions. The call of each urls tried to request a c...

Http-Parser: my first open source project

Starting...   Over the past 2weeks,   I have been trying to implement command-line tool for finding and reporting dead links (e.g., broken URLs) in a file. A lthough I had a bit of struggle at the beginning, I was able to get in track by checking Slack communication and asking professor. What I have learned from this  release 0.1, is how I can start open source project. I was not comfortable since there is no strict instruction, also, it was open choice which language I like to work on.  I just started to implement the http parser with node.js. After 1st push...     After I implemented the application, I realized the performance seems really slow.  Thus, I post question on slack and the professor suggested solution via git. It was actually first time for me that anyone was looking at my git, fix, and pull request.  It was great experience that I could see all changes were applied to my master once I clicked the button. Ex) First code look lik...

My First Blog Posting

About Me: My name is Stella Jung and I am studying Computer Programming and Analysis at Seneca College. I was born in South Korea and travelled from place to place in various countries to study, work, and gain various experiences. Finally, I am kind of settled down in Toronto since 2016.  I think I used to have a sense of using my computer well when I was little. Thus, I turned my major and career into Programming!. Ever since I started studying at Seneca, I was really curious about Open Source, Specially CDOT. I still don't know why.... and I am not sure yet what Open Source exact means...  I took summer off and staying mostly at home because of COVID-19. Though, I am kind of enjoying not going out.  🤣    My expectation from OSD600: From the start of the course, most of the styles are new to me. Blog, Wiki, RSS feed and so on.  I guess, they are all important stuff to get used to if I want to work as developer.  I am hop...