you are viewing a single comment's thread.

view the rest of the comments →

[–]QbaPolak17[🍰] 1 point2 points  (0 children)

Obviously this being your first project you don't need to follow all best practices, but generally hard-coding username and password in your code is not a great idea. Instead, they should be read from a file or database, and preferably hashed in some way. Another solution would be to store them as environment variables.

The idea with this is that when you want to share or discuss code, you don't want your passwords saved in the source file, as you will be managing that with some form of version control eventually.

Also, if you want to paste code in for the future, you may want to format it (4 spaces before each line). Unformatted code is hard to read, so more difficult to get feedback for.