Just finished. Will add more later, but was a fun project to complete.
Hi @orichh congratulations for completing the project(Exploring hacker news posts).i have gone through your projects and have got few suggestions.
- your project is missing a data history background .For example, it would be better if you reveal to the reader about the dataset you are using.
- you have not stated the aim/goal of the project and the conclusion as well is missing, which to me is very important when working on any project.
- You should also add more weight while giving your observation/explanation on the outputs.
Otherwise ,to me, everything looks good including the comments, and am wishing you happy learning.
Congratulations on completing the project! Your lines of code look good!
Here are a few comments for the room for improvement:
It is generally a good practice to add narration to your projects, such as introduction, goals, explanations for the lines of code, analysis and conclusion. It is good training for us to communicate our project with others (technical and non-technical audience), and we can use it in our portfolio for job application purpose.
Some comments are not really necessary. For example,
# Import libraries needed.
It is not necessary to use
For determining the average number of comments for
show_posts, the lines of code are good. To make it even nicer and shorter, you can make a function and assign the
post typeas a parameter into the function and call the function for
Well done for your good job! Happy coding!
thanks for the feedback!
I have a question - why wouldn’t we close the file? The courses state that we should always close the file after opening. thanks
I was not clear in my earlier message. It is a good practice to close a file after using it, although Python automatically closes a handle that drops out of scope, in case the programmer forgot. You can find a more detailed explanation here.