Skip to content
AbdulMAbdi edited this page Nov 30, 2020 · 91 revisions

Lab 6

Due Date

Saturday November 7 by Midnight.

Overview

This week we are going to get you started working on Telescope, one of the open source projects you'll be contributing to for the remainder of the term. Telescope is a somewhat complex system that uses many technologies. Getting the development environment set up on your local computer can take some time.

This lab will help you practice the following:

  • setting up the Telescope development environment
  • using the Telescope REST API with your Link Checker project
  • using your Link Checker project in new ways, and hopefully improving the code
  • working with gists

Step 1: Fork, Clone, and Set Up Telescope

Begin by forking and cloning the Telescope repo. Next, read the CONTRIBUTING guide and the Environment Setup guide.

Follow these instructions carefully to get Telescope running on your local computer. Getting everything setup may take some time, but don't give up! You will likely have questions, and can use the #telescope Slack channel to ask for help or discuss the project. Remember, real-world software isn't necessarily easy to develop and deploy, and you need to build some experience not giving up when it seems hard. You can do this! Every line of code in Telescope was written by a former Seneca student.

Step 2: Run the Back-End REST API Server

Once Telescope is properly configured, you can run the back-end server using:

npm start

This will start a number of processes, including an Express.js based web server on http://localhost:3000. You should be able to query the server's REST API for posts at http://localhost:3000/posts, which should give back JSON that looks something like this:

[
  {
    "id": "4bd6cb2046",
    "url": "/posts/4bd6cb2046"
  },
  {
    "id": "fcae3b14c4",
    "url": "/posts/fcae3b14c4"
  },
  {
    "id": "6cf4e49d53",
    "url": "/posts/6cf4e49d53"
  },
  {
    "id": "78e5c53128",
    "url": "/posts/78e5c53128"
  },
  {
    "id": "5711a54f70",
    "url": "/posts/5711a54f70"
  },
  {
    "id": "1c187660b8",
    "url": "/posts/1c187660b8"
  },
  {
    "id": "dd0d8dbf71",
    "url": "/posts/dd0d8dbf71"
  },
  {
    "id": "550ee34314",
    "url": "/posts/550ee34314"
  },
  {
    "id": "228b01591f",
    "url": "/posts/228b01591f"
  },
  {
    "id": "10ee28212c",
    "url": "/posts/10ee28212c"
  }
]

These are the most recent 10 posts that have been indexed by your local Telescope instance. Each post has a unique id and a url, which is made using the id.

You can query for a particular post using its URL. For example, the post with an id of 4bd6cb2046 is available at http://localhost:3000/posts/4bd6cb2046.

When you query for the post, you can request the post data in a number of formats, depending on the value of the Accept header. Telescope will return posts in JSON, HTML, or plain text.

Step 3: Check Links in Telescope Posts

Use your Link Checker project to check the links in the last 10 posts indexed by your local Telescope. You can do this a number of ways:

  • Modify your link checker's core API so it can be included as a library (e.g., your CLI tool and this program can both load the core of your link checker via a set of functions or Objects)
  • Modify your link checker to accept data from stdin and pipe the result of requesting these posts to your link checker
  • Write some code to interact with the local Telescope server and download the 10 posts to files, which you pass to your link checker

Or you can do it another way not listed above. It doesn't have to be pretty, just make it work quickly--this is a proof-of-concept vs. a product. Be creative and come up with a solution that works for you. Ask your friends how they are going to solve this, and collaborate on the best solutions. Whatever way you do it, remember that your goal here is to write some new code that connects your link checker to the local Telescope REST API. You do not need to modify Telescope to do this (i.e., please don't send a PR to add this code to Telescope).

Step 4: Create a Gist of your Code

When you have your program working, create a gist with all the files you had to write. If you needed to modify your link checker, also include a DIFF (git diff). This gist will be a set of technical notes of everything you had to do to make this work.

Step 5: Write a Blog Post

Write a blog post about the entire experience. In your post, talk about the following:

  • setting up Telescope. How did it go? Did you run into any hurdles? How did you overcome them?
  • working with the Telescope REST API. Did you have any issues?
  • modifying/using your link checker with the data from Telescope. What did you have to change to make it work? Was your code in good shape to accomplish this, or did you have to change a lot?

Submission

When you have completed all the requirements above, please add your details to the table below.

Name Blog Post (URL) Gist URL
Example Name https://example.com/blog/1 https://gist.github.com/username/f146e96581269a9002cc4b9a52ec3f4b
Chris Pinkney https://dev.to/chrispinkney/project-setup-madness-with-a-dash-of-pythonic-fun-5eeg https://gist.github.com/chrispinkney/4bceb8483c34ad6d4c771201b5defe01
Khoi Nguyen Vu (Tony) https://tonyknvu.medium.com/i-feel-lucky-to-have-already-been-a-telescope-contributor-53fef46e1863 https://gist.github.com/tonyvugithub/76b378d813867d18d7f8508892342b80
Michael Brackett https://dev.to/mljbrackett/lab6-osd600-212d https://gist.github.com/MLJBrackett/93f7351d4778557197c420d80abe10c0
Eunbee Kim https://ekim105.wordpress.com/2020/11/03/docker-gist/ https://gist.github.com/eunbeek/2b94f6b8feb5c705f4613cfbd4c0f8ba
Thomas-Jayrell LeBlanc https://tjstavern24697521.wordpress.com/2020/11/03/lab-6-getting-the-gist-of-telescope/ https://gist.github.com/IcemanEtika/ac253f9588d639da42413a9408b5ec16
Tim Roberts https://dps909tddr.tech.blog/lab-6-setting-up-telescope/ https://gist.github.com/TDDR/a23c4a71c70cc1aca7d4ca93d689b1bf
Roger Yu https://ryudeveloper.wordpress.com/2020/11/04/lab-6-gist/ https://gist.github.com/rogercyyu/f27693b6fb71128adc8001374e4e105b
Junyong Liu https://jliu396.blogspot.com/2020/11/osd-600-lab-6.html https://gist.github.com/tianlangwu/b5bc815ec97d0b979ab417b153bfa0cf
Leon Li https://gonewiththewind1982.blogspot.com/2020/11/prepare-for-telescope-project-in-lab6.html https://gist.github.com/lixiaoqity/512c0170962a3a4750c465c5594c3f93
Plamen Velkov https://plamenvelkovtech.blogspot.com/2020/11/through-looking-glass-of-telescope.html https://gist.github.com/pyvelkov/f00868ae30f5e4d60799f1b530d247ea
Hyunji Lee https://hyunjijanelee.blogspot.com/2020/11/lab6-add-argument-to-check-links-in.html https://gist.github.com/hyunjiLeeTech/89f4f8b97bdd66c1e814b0fb7dc3d9c0
Jie Yang https://jyangblogs.wordpress.com/2020/11/05/telescope-setup-gist/ https://gist.github.com/jossiey/a72111ede8abe3f1d3c7ba84ab1c4935
Nesa Bertanico https://nesabyte.wordpress.com/2020/11/05/the-gist-of-it-all/ https://gist.github.com/NesaByte/2934437fe39ac65a8d25130679f2ec8c
Mintae Kim https://mintaedotblog.wordpress.com/2020/11/05/lab6-set-up-telescope-and-check-links-in-telescope-posts/ https://gist.github.com/sonechca/8d7472a4047d57185500c53c5303e584
Joseph (Joey) Assal https://osd600-joey-assal.blogspot.com/2020/11/osd600-lab-6.html https://gist.github.com/joey2031/b93ea732827f6caaf24cb78e4a9318be
Matthew Stewardson https://matthew-k-stewardson.blogspot.com/2020/11/week-7-lab-6-starting-with-telescope.html https://gist.github.com/MSTEWARDSON/48d262110ee305f4772eabe3fea367b9
Ekaterina Grinberg https://egrinberg.medium.com/lab-6-dps909-11767c605e33 https://gist.github.com/egrinberg/9869b73fb9afdf07c4abb92f0b41769a
Minh Huy Nguyen https://x7z.net/lab06 https://gist.github.com/VietnameZe/67bacebe83c8972fb4b15adda785c7d3
Badal Sarkar https://badalsarkar.ca/blog-opensource/opensource/Working-with-telescope/ https://gist.github.com/badalsarkar/31bdb05c37254a052aed0049538a34e3
Yuan-Hsi Lee https://dev.to/yuanleemidori/start-with-telescope-5d43 https://gist.github.com/yuanLeeMidori/51805f2f95822117bc3adfb04b607358
Raymond Rambo https://dev.to/fluentinstroll/lab-6-after-a-break-5dla https://gist.github.com/fluentinstroll/5d0e4e40f614bae68a9ebff40e01c210
Abdulbasid Guled https://dev.to/hyperthd/dps909-lab-6-no-gifs-just-here-to-post-diffs-2m2k https://gist.github.com/HyperTHD/544b2900e612b5fbcd674931a4266f6a
Abu Zayed Kazi https://www.abuzayed.ca/my-blog/osd600/2020/11/08/lab-6-first-step-in-telescope/ https://gist.github.com/abuZayed15/4fce7cba8f90b37a0279f3e41beffab4 & https://gist.github.com/abuZayed15/8f2991795658f3ef196ad030c29c1241
Zongwei Yang https://dev.to/yzwdroid/hello-telescope-1i5m https://gist.github.com/yzwdroid/26b6cb71f75f3799dfccd5fb0ed9ec79
Wei Huang https://weihuangosd.blogspot.com/2020/11/working-with-telescope-api.html https://gist.github.com/Wei-J-Huang/c61af88878dac98e3a65cfaa8e7ed036
Paul Sin https://osd600.blogspot.com/2020/11/lab-6.html https://gist.github.com/jiyoungsin/90008a6da2cca7260c74b3f2f68ab785
Zong Jin Jiang https://zjjiang2.blogspot.com/2020/11/lab-6-blog.html https://gist.github.com/zjjiang2/b0f74fe04419ac6f0e08bbd97490582c
Bing Pan https://dev.to/bpan2/configuring-telescope-locally-p90 https://gist.github.com/bpan2/686a8e5109f75c1781b5f50441205c5f
Kimin Lee https://dev.to/klee214/update-take-a-api-from-telescope-api-for-findbrokenurl-3h05 https://gist.github.com/klee214/81c3906a0b1fa138902bfdbd0e035efa
Jennifer Croft https://dev.to/strawberries73/osd600-lab-6-setting-up-telescope-and-creating-a-gist-3630 https://gist.github.com/strawberries73/73d0a875ee54506c2309470deb7698e1
Stella Jung https://sostellajung.blogspot.com/2020/11/working-with-telescope.html https://gist.github.com/StellaJung-Student/d9850b90a9453f3eb6293202bf2f68b2
Philip Golovin https://1jz.tech.blog/2020/11/07/working-with-git-diffs/ https://gist.github.com/1jz/2ee981a6f83a006a3a1923a643689a9f
Devansh Shah https://dev.to/zg3d/firelinker-telescope-3aji https://gist.github.com/zg3d/698d5ad9c2de8e2fe52db0f4ae17ef26
Royce Ayroso-Ong https://roycedev.medium.com/working-on-telescope-46c8ad470600 https://gist.github.com/rjayroso/07e9e504d8737afac69212067df83e93
Pedro Fonseca https://medium.com/@pedrofonsecadev/welcome-to-telescope-4190de949b55 https://gist.github.com/PedroFonsecaDEV/84e869355a90d44d2904b25bddfdc101
Jasper Mui https://muioverflow.wordpress.com/2020/11/07/setting-up-telescope-and-modifying-me-check-link/ https://gist.github.com/Jasper-Mui/6060a504b8640c94638ba67c13d50b97
Ruby Anne Bautista https://rabautista.medium.com/telescope-and-json-9239d77d3628 https://gist.github.com/rubyAnneB/9f8255a4ec920de4a3cb7770865d5ac6
Joel Azwar https://joelazwaros.blogspot.com/2020/11/lab-6-link-checking-telescope.html https://gist.github.com/joelazwar/0e14425eb3f6fc6e01e9ea9c8bdb34b3
Mohammed Ahmed (Mo) https://moho472.medium.com/lab-6-telescope-i-had-to-tele-cope-with-docker-4ca59ca6fe06 https://gist.github.com/Metropass/f39c165a0b8d7ddba0c6b114b368c628
Mohammed Niaz Ul Haque https://dev.to/niazulhaque/get-gist-ed-new-target-telescoped-wow-weekends-2b1c https://gist.github.com/Niaz-Ul-Haque/293512c0af69d3a9c4f1d4c9e3c5882f
Sanjida Afrin https://safrin2.medium.com/talking-to-telescope-d40557f54604 https://gist.github.com/sanji11/724bc5b24010ad9597ea9bb42dd27ca0
Palak Chawla https://palak-chawla.blogspot.com/2020/11/lab-6.html https://gist.github.com/chawlapalak/15d026b30c8dd4801e714669f6566183
Xiaolu Liu https://dev.to/isabellaliu77/telescope-1oia https://gist.github.com/isabellaliu77/56e9ddccabecd9250d0428d141ec0210
Muskan Shinh https://muskanshinh.wordpress.com/2020/11/08/lab-6/ https://gist.github.com/Shinh18/34973a38fdb9f23dca4867bf7f6365f6
Nathan Pang https://osdnathanp.wordpress.com/2020/11/08/lab-6/ https://gist.github.com/NathanPang001/f1612d1147a76f81715b8a31b9873d03
Mamadou Diallo https://mamadou--diallo.blogspot.com/2020/11/lab-6-working-with-telescope.html https://gist.github.com/mamadou-diallo/2c9facacea10081406a23302e49dd767
Thanh Tien Phat Nguyen https://dev.to/phast184/check-telescope-posts-availability-3fe6 https://gist.github.com/phast184/7115cabd4c82619c7980148f2d88eb50
Anthony Slater https://dev.to/slaterslater/gustavo-looks-through-a-telescope-27gc https://gist.github.com/slaterslater/1403e375f5591150d349972acb31587d
Matthew Ross https://os-discovery.blogspot.com/2020/11/looking-through-the-telescope.html https://gist.github.com/matt-ross16/668f89bad7ba84cbcdb546a878f56f15
Henry Nguyen https://dev.to/henryzerocool/integrate-my-cli-with-another-project-25pd https://gist.github.com/HenryZerocool/e015248e5d18218e5beaf3e13755afa8
Abdul Abdi https://abdulosd.blogspot.com/2020/11/telescope.html https://gist.github.com/AbdulMAbdi/82e68bae20a969879fb04df89eab6bf3
Clone this wiki locally