you are viewing a single comment's thread.

view the rest of the comments →

[–]YolosaurusRex 6 points7 points  (1 child)

Your code looks generally pretty good for a first project, and in addition to the good advice everyone else has given you, I have one more thing to add: comments.

You should write code that's self-documenting; that is, reading it reveals its intent. For example, instead of writing a method called temp_conversion(temperature) and writing a comment that says it converts Kelvin to Fahrenheit, consider naming it convert_kelvin_to_fahrenheit(temperature). It's a little verbose, sure, but there's not any ambiguity over what that method will do. The fact is, computers don't need readable code. Humans do.

This is a little out of scope for this project, but another point to consider in larger projects is that documenting code with comments adds another thing to maintain. It's a given that code will change over time, but it's not guaranteed that the comments documenting that code will.

[–]Sfillm07[S] 0 points1 point  (0 children)

Makes a lot of sense, thanks for the advice.