Originally posted by Pichu
This is just an example of something simple. There is good practice in everything but you need to look at the situation at hand. If one was to ultimately handle user information that allowed for registration, the best method would be to handle it all on a server where the information is stored, that way that information is kept from the users.
Putting things in a resource file, example, minecraft; where the password is stored is one thing. The problem with that is that if a user wanted access to that file and the contents, they would easily be able to reflect your program and access the data of that file by reversing your encryption or just following how you decrypt it within the program.
Code being easier to read, if you code in user login details within an application; it's not hard to make it neat. If anything, you can create a list that has a corresponding list
It's all about the situation though, please understand that.
If I was truly going to create a program that required login, I'd still just create an output file using SQL.
The reason why I am saying the above is because these are the arguments you will hear. One thing is not always best; it's all based upon the situation.
When you program something, you want to use the best method possible. I understand this is simple, but it has a familiar concept.
When you program, even simple things, it's better to use good practice (it sticks this way).
I didn't mean put it in a resource file for security reasons. People can just as easily penetrate a resource file.
I disagree with you saying that it matters about the situation on hand. Just because you have a simple situation, doesn't mean you should teach people bad practice. Even if you're writing 10 lines of code, you want to make those 10 lines the best and neatest you can possibly make them