Skip to main content

Posts

Last Journey for OSD600

   Release 0.4 - After all To achieve my task, I need to google about it a lot and I realized even the best friend was open source especially the git community. There are a lot of similar projects on the git and luckily, I could refer any other codes and some of owners answered well when I asked something that made me very confused although some never answered to me.  More than 10k have used Passportjs and I could find all of them I need and I tried to apply it well. However, looking at code to understand was completely different from writing it. Also the test code made me more confusing because on local it was fine. Only the CI environment not accepted my code. For this reason, I need to ask a lot of questions to the owner and finally I got it. Concluding... My journey on OSD600 is very valuable since I have learned a lot and actually, to be honest it was the best course before jumping into the real code world regardless of open source or closed one. I may need to review...
Recent posts

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...