What is this? This project is for my teaching curriculum for my students to follow. Hacker News is a news website a lot like Reddit, containing links to content about the latest news in the technology space. It contains a voting system and a comments system for each link posted.
The great thing about Hacker News is that, due to its simplistic nature, its very easy to create a project that links with it's API to create readers for it.
This isn't a fully fledged reader, it doesn't have login, registration, voting or commenting abilities. It also only supports root level comments (meaning that any replies to comments are left out). This is due to time constraints on the course, as the real goal with this project is to get you accustumed to what real world uses of programming looks like.
The project itself uses the following libraries:
- React
- React Router
- Material UI
- Axios
- Moment JS
This project, as mentioned earlier, is perfect for teaching beginners how APIs intergrate with frontends. In this project, you will learn the following:
- Creating a tablet like interface using the Material UI library
- Taking advantage of routes using the React Router library
- Learn how to make infinite scrolling lists that retrieve new data from APIs
- How to maintain a clean project file structure
- How to intregrate your projects with APIs (backends)
- Using the fantastic HTTP library Axios
- Real world uses of promises and catching errors
- How to parse timestamps into human readable formats using Moment JS
I'd typically expect students to be able to finish this project in 2 weeks. However, everyone is different and it's completely fine to get stuck. Everyone has their different strenghts, and I will work alongside you to support you through anything you get stuck on.
Please only use my code as a reference, do not copy it (as in copy and paste, obviously it will be a useful reference!). Feel free to change it up a little bit, be inspired by my code and make some changes! Thats what programming is about and its also how you learn. Learn from my code, don't copy it. Chances are, you can probably do better than me in a lot of areas!
I also suggest that my students don't work any longer than 30 minutes at a time to begin with, take 10 minute breaks after half an hour and continue. I intend my students to work with what is called the Pomodoro Technique if its at all possible for them to follow. This is because programming is a very cognitively intense task, and the pomodoro technique will help keep your brain fresh, prevent burnout and allow for more time to consider your aproaches.