• Welcome to Valhalla Legends Archive.
 

Most efficient way of saving settings on a bot?

Started by Tontow, June 04, 2005, 07:50 PM

Previous topic - Next topic

OnlyMeat

Quote from: Dyndrilliac on June 08, 2005, 01:37 AM
I said "Ideally", meaning that this is generally accepted as the prefered way of doing it. Application Data is best used for things like databases or lists used by software. The Registry is for user-specific Value-to-Variable program settings.

I didn't imply anything other than what I have just stated. Anything other than that was purely imagined on your part.

Incorrect again. There is no generally accepted as the prefered way of doing it. It's a choice the software designer makes based on data type/accessibility needs and other factors.

There is no strict policy of where you store data. It's purely a decision for the software developer. Suggesting that there is one prefered way of doing it is complete nonsense.

You should re-evaluate your comments before making false assertions.

hismajesty

I think the most speedy and efficient way would be to upload all your settings to a database on a russian (or equally far away) server, then download them when necessary. :)

NicoQwertyu

I think this is all a matter of preference.  This is your program, store the data it needs where ever you want.  Personally, I like to keep everything stored in the "main folder" , because I don't like being responsible for cleaning up the registry/other areas when the program is deleted.

Dyndrilliac

Quote from: OnlyMeat on June 08, 2005, 02:55 PMIncorrect again. There is no generally accepted as the prefered way of doing it. It's a choice the software designer makes based on data type/accessibility needs and other factors.

There is no strict policy of where you store data. It's purely a decision for the software developer. Suggesting that there is one prefered way of doing it is complete nonsense.

You should re-evaluate your comments before making false assertions.

Look up such topics in any official Win32 programming documentation, the registry is the suggested way of storing simple program settings.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconmanagingapplicationsettings.asp

Quote from: MSDN Documentation LibraryIn Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.

Owned. Stfu, k thx.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

l)ragon

If you take into account that some people like to reformat on a regular basis and are to lazy to resetup the program again, then useing a text based storage system would most likely be your best choice.

The most I would probably use the regestry for is maybe common crap, resolution/color depth, window size, folder locations and such things that wouldent need to be written by the common user.
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

OnlyMeat

Lets take a look at what you said originally shall we. You are implying here that all program settings should be stored in the registry when multiple user accounts exist on a system.

Quote from: Dyndrilliac on June 07, 2005, 05:47 PM
Ideally you want to store user-sepcific program settings in the registry. This allows computers with multiple users to not need a seperate settings file for each user.

My response was that this is a false assertion, and the storage location depends on many factors. As i demonstrated, non of which have anything to do with multiple user accounts.

Clearly you have no idea of what you are talking about.

Quote from: Dyndrilliac on June 07, 2005, 05:47 PM
How is what I said not true? I said that you could use the registry to store user-specific settings, and that for this type of storage they would be the ideal method. Nothing more. I never said it was the only way. Using Application Data storage is ideal for databases, unique file formats and other things of that nature. Simple variable filling is best when used in conjunction with the registry

That's a complete lie. If you can't remember what you said originally, then look above at your previous post.

The data could be stored in either location. As i said it's a matter for the programmer to decide based on factors of data type/accessiblity/portabillity and others. If you consider how much easier it is to transfer application data files across machines, then for such bot data, using application data files would have a significant advantage.

The registry is useful for disposable settings, but important user information should be stored in application data files in my opinion.

Quote from: Dyndrilliac on June 08, 2005, 01:37 AM
The Registry is for user-specific Value-to-Variable program settings.

Another false assertion, the registry can be used for local machine settings (All users) or user specific settings.

Clearly you have no idea of what you are talking about.

Quote from: Dyndrilliac on June 08, 2005, 07:30 PM
Look up such topics in any official Win32 programming documentation, the registry is the suggested way of storing simple program settings.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconmanagingapplicationsettings.asp

Quote from: MSDN Documentation LibraryIn Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.

Apart from the fact that those are guidelines and shouldn't be taken literally. You failed to include the rest of the text that went with that paragraph. Here is the full text, so you can gather the correct context of that statement:-

Quote from: MSDN Documentation LibraryIn Microsoft Windows 3.1 and earlier versions of Windows, program settings like window positions, files used, and other items were commonly stored in .ini files. In Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.
Quote

Notice the bold section, those settings are disposable. Whereas important settings like cdkeys, account passwords etc are certainly not.

Do you have any of your own opinions on this subject or do you blindly follow random quotes from sources on the internet?

Quote from: Dyndrilliac on June 08, 2005, 07:30 PM
Owned. Stfu, k thx.

Did you run out of false assertions?
The only thing you have left to say are unintelligent grunts?

Dyndrilliac

I see all your interested in doing is misinterpreting, misconstruing, and taking my posts out of context. Well that's fine, whatever floats your boat. But if that is all you're going to do then my side of the discussion ends here.

The fact is I'm right, and you're right, but your too ignroant to see it. Microsoft directly implies, suggests, and states that the way intended for storing program data which does not require a custom designed file format is to be done in the registry. When it comes down to it you can choose to do it differently; But we have standards for a reason. Imagine the chaos that would ensue if we didn't have the metric system, and all countries had different measuring units.

Oh, and all the arguments about how it's harder to move registry settings from machine to machine are bullshit. All you have to do is copy the *.reg file and double click it, Windows takes care of the rest. Not to mention, The registry is in the same location for all windows versions from 95 on up. Application Data is not.

If an admin or mod could close this so it doesn't result in continuous flames, that would be great.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Eric

I prefer the registry over configuration files which clutter the program's directory.

Networks

I believe it should be based on your program. If you want users to edit the data through your program then the registry is a great choice for this. BitWise based storage methods are great if you have to much to be stored or you find it most efficient opposed to plain-text. And there's always the easy method in which you can use ini files using keys. I suggest plain-text methods if you don't care for users to edit the data directly. There isn't a most efficient method, you have to choose between some and base it upon how your program is going to work. For example Vanquish Bot v2.0's database is getting pretty big and I've been thinking about changing to a BitWise way since it will allow me to customize it a bit more and add new database functions and features. I don't personally like the registry since I like most my programs to be editted directly.

Adron

Quote from: OnlyMeat on June 09, 2005, 01:09 AM
Lets take a look at what you said originally shall we. You are implying here that all program settings should be stored in the registry when multiple user accounts exist on a system.

Quote from: Dyndrilliac on June 07, 2005, 05:47 PM
Ideally you want to store user-sepcific program settings in the registry. This allows computers with multiple users to not need a seperate settings file for each user.

My response was that this is a false assertion, and the storage location depends on many factors. As i demonstrated, non of which have anything to do with multiple user accounts.

Clearly you have no idea of what you are talking about.



Clearly you have no idea of what you are talking about.

Ideally you want to store user-specific program settings in the registry. Ideally. There are a multitude of reasons some settings might not be appropriate to store in the registry. If your settings don't fit (multiple kilobytes of data), or if have data files such as mailboxes, logotypes, signatures, templates, store those in a file in the user's profile directory.

Storing your settings in the registry allows computers with multiple users to not need a separate settings file per user per program. Storing your settings in the registry instead of in a separate file, you will reduce the number of files stored on the user's hard drive.

You are also using the standard Windows way of storing preferences, supported on Windows versions down to Windows 95 and Windows NT 3.5.




Quote from: OnlyMeat on June 09, 2005, 01:09 AM
Quote from: Dyndrilliac on June 08, 2005, 01:37 AM
The Registry is for user-specific Value-to-Variable program settings.

Another false assertion, the registry can be used for local machine settings (All users) or user specific settings.

Clearly you have no idea of what you are talking about.

Clearly you have no idea of what you are talking about.

The registry is for user-specific Value-to-Variable program settings. Among other things. It would obviously have been different if he had said "The registry is only for ..."





Quote from: OnlyMeat on June 09, 2005, 01:09 AM
Quote from: Dyndrilliac on June 08, 2005, 07:30 PM
Look up such topics in any official Win32 programming documentation, the registry is the suggested way of storing simple program settings.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconmanagingapplicationsettings.asp

Quote from: MSDN Documentation LibraryIn Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.

Apart from the fact that those are guidelines and shouldn't be taken literally. You failed to include the rest of the text that went with that paragraph. Here is the full text, so you can gather the correct context of that statement:-

Quote from: MSDN Documentation LibraryIn Microsoft Windows 3.1 and earlier versions of Windows, program settings like window positions, files used, and other items were commonly stored in .ini files. In Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.
Quote

Notice the bold section, those settings are disposable. Whereas important settings like cdkeys, account passwords etc are certainly not.

Notice how it says "and other items", where other items can includes settings such as cdkeys. Note that Windows stores its product ID in the registry, and that account passwords are stored in the registry (SAM).

Notice also that Dyndrilliac said "storing simple program settings", which excludes those settings that should be stored in files.

Notice also that guidelines are meant to be followed unless there is a specific reason not to follow them. You have not shown specific reasons for not following these guidelines.



OnlyMeat

Quote from: Dyndrilliac on June 09, 2005, 03:08 AM
I see all your interested in doing is misinterpreting, misconstruing, and taking my posts out of context.

As far as i can see you are the one backtracking and clearly lieing about what you have said previously to lessen the impact of false assertions made.

As i already demonstrated, i'm not the one taking quotes out of context. Want me to remind you?

Quote from: MSDN Documentation LibraryIn Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.

Quote from: OnlyMeat on June 09, 2005, 01:09 AM
Quote from: MSDN Documentation LibraryIn Microsoft Windows 3.1 and earlier versions of Windows, program settings like window positions, files used, and other items were commonly stored in .ini files. In Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.

Quote from: Dyndrilliac on June 09, 2005, 03:08 AM
The fact is I'm right.

I have shown that to be incorrect in more than one of your posts. I suggest you review what you said again.

Quote from: Dyndrilliac on June 09, 2005, 03:08 AM
But we have standards for a reason. Imagine the chaos that would ensue if we didn't have the metric system, and all countries had different measuring units.

You just shot yourself in the foot there. Metric is an explicit standard, there is no room for discussion on it. Unlike software guidelines offered by microsoft, which i might add describe disposable settings, not important user information.

Quote from: Dyndrilliac on June 09, 2005, 03:08 AM
If an admin or mod could close this so it doesn't result in continuous flames, that would be great.

I'm the one flaming? Lets see :-

Quote from: Dyndrilliac on June 08, 2005, 07:30 PM
Owned. Stfu, k thx.

Quote from: LoRd[nK] on June 09, 2005, 03:17 AM
I prefer the registry over configuration files which clutter the program's directory.

You can store data files in the application directory, but like you said it creates clutter. Additionally with user permissions setup, the Programs directory may not be writeable.

A solution to this is to use the specific locations designated for application data in windows. The shell provides an interface to determine these directories at runtime.

You can see the entire post earlier in this thread for more information about it.

R.a.B.B.i.T

Let's all be quiet now?  A good debate is different from a fight, so how about we knock it off?

Dyndrilliac

I never once throughout this thread lied, or taken a quote out of context.

I would also like to point out that you did not respond to Adron's post.

I had to keep making my posts more specific because you kept being more critical as the arguement went on, misconstruing what I had said. You went so far as to imply that I had said the registry was the only way to store user-specific data.

Quote from: OnlyMeat
Quote from: DyndrilliacIdeally you want to store user-sepcific program settings in the registry. This allows computers with multiple users to not need a seperate settings file for each user.

You are implying that you have to use the registry to store data when a system has multiple user accounts. This is simply not true, you can store user specific application data files or data files for all users, in exactly the same way the registry allows you to do this.

Let's see. Storing in the registry DOES allow multi-user machines to store seperate settings without the need of a seperate file for each users settings. Nowhere did I imply that it was the only way to store user-personal settings. You are the one lieing, and taking things out of context.

QuoteIn Microsoft Windows 3.1 and earlier versions of Windows, program settings like window positions, files used, and other items[/i] were commonly stored in .ini files. In Windows NT, Windows 95, and later versions of Windows these program settings are stored in the system registry.

"program settings like window positions, files used, and other items[/i]". Interesting. I wonder what "other items" includes? Let's ask Adron.

Quote from: AdronNotice how it says "and other items", where other items can includes settings such as cdkeys. Note that Windows stores its product ID in the registry, and that account passwords are stored in the registry (SAM).

OnlyMeat: Clearly you have no idea what you are talking about.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

OnlyMeat

Quote from: Adron on June 09, 2005, 10:32 AM
Storing your settings in the registry allows computers with multiple users to not need a separate settings file per user . Storing your settings in the registry instead of in a separate file, you will reduce the number of files stored on the user's hard drive.

I expected more from you adron. Obviously you aren't paying attention to this thread, because if you had you would have seen that i already established what you just said as incorrect. Want me to remind you?

Quote from: OnlyMeat on June 07, 2005, 07:21 PM
If you specify CSIDL_APPDATA, it will return the current user's Application Data directory. Alternatively you can use the directory for all users with CSIDL_COMMON_APPDATA.

Clearly you haven't heard of the "C:\Documents and Settings\All Users\Application Data" directory specifically designated in windows for settings that apply to all local machine users.

Note the part below was your own addition onto the original statement by Dyndrilliac, which i excluded because you were changing the original context of my reply.

Quote from: Adron on June 09, 2005, 10:32 AM
per program

Quote from: Adron on June 09, 2005, 10:32 AM
Clearly you have no idea of what you are talking about.

Want to re-evaulate that comment?

Quote from: Adron on June 09, 2005, 10:32 AM
The registry is for user-specific Value-to-Variable program settings. Among other things. It would obviously have been different if he had said "The registry is only for ..."

I think you need to read the reply to the specific comment more carefully.

Quote from: OnlyMeat on June 09, 2005, 01:09 AM
Quote from: Dyndrilliac on June 08, 2005, 01:37 AM
The Registry is for user-specific Value-to-Variable program settings.

Another false assertion, the registry can be used for local machine settings (All users) or user specific settings.

Clearly by itself that statement is saying the purpose of the registry is for user specific settings. I reply by stating the registry can be used for All User settings and user specific settings.

Do you understand now?


Quote from: Adron on June 09, 2005, 10:32 AM
Notice how it says "and other items", where other items can includes settings such as cdkeys. Note that Windows stores its product ID in the registry, and that account passwords are stored in the registry (SAM).

Yes, like i said on many occasions in this thread, the developer decides where to store this information based on many factors. It could be stored in the registry this is true. But i personally believe in only storing disposable settings in  the registry. Windows can do what it likes, with it's own data.

Quote from: Adron on June 09, 2005, 10:32 AM
Notice also that Dyndrilliac said "storing simple program settings", which excludes those settings that should be stored in files.

If you didn't notice, that was his second post which backtracked on his first, which originally stated:-

Quote from: Dyndrilliac on June 07, 2005, 05:47 PM
Ideally you want to store user-sepcific program settings in the registry. This allows computers with multiple users to not need a seperate settings file for each user.

He makes no mention of simple program settings, or anything relating to the type of data.

I suggest you read the entire thread before making assumptions about what was said.

Quote from: Adron on June 09, 2005, 10:32 AM
Notice also that guidelines are meant to be followed unless there is a specific reason not to follow them. You have not shown specific reasons for not following these guidelines.

As i posted, those guidlelines only suggest disposable settings. Window sizes, file links etc. All things that can simply be reconstructed at runtime.

Guidelines are to help people make decisions about what course of action to take. I'll repeat, there are many factors involved. They shouldn't be taken as an explicit standard.

Now, is any of that not clear or would you like me to draw you a picture?

Adron

Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Quote from: Adron on June 09, 2005, 10:32 AM
Storing your settings in the registry allows computers with multiple users to not need a separate settings file per user . Storing your settings in the registry instead of in a separate file, you will reduce the number of files stored on the user's hard drive.

I expected more from you adron. Obviously you aren't paying attention to this thread, because if you had you would have seen that i already established what you just said as incorrect. Want me to remind you?

I would appreciate if you made your best attempt to establish that what I just was incorrect.


Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Quote from: OnlyMeat on June 07, 2005, 07:21 PM
If you specify CSIDL_APPDATA, it will return the current user's Application Data directory. Alternatively you can use the directory for all users with CSIDL_COMMON_APPDATA.

Clearly you haven't heard of the "C:\Documents and Settings\All Users\Application Data" directory specifically designated in windows for settings that apply to all local machine users.

I am quite familiar with that area. You may want to note that the name is "Application Data", not "Application Settings". You could also dive in there, and look at what you see. You may find an address book, icons for your Quick Launch Bar, cache files for MSN Messenger, or perhaps your own wordlist for Office's spellcheck. What you will not find are such bot-like settings as the proxy you have configured IE to use, the security settings for web sites, the cd key / product ID for Windows or any other plain settings.




Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Note the part below was your own addition onto the original statement by Dyndrilliac, which i excluded because you were changing the original context of my reply.

Quote from: Adron on June 09, 2005, 10:32 AM
per program

Ah, yes, I used that to clarify a bit. You do not get an extra file per user per program to handle settings for them. The registry is already actually stored in a special file per user, but that file will exist whether you put your settings there or not. You may as well go ahead and put them there, and that way you'll not have to create a settings file per user.



Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Quote from: Adron on June 09, 2005, 10:32 AM
Clearly you have no idea of what you are talking about.

Want to re-evaulate that comment?

It would seem to be quite accurate still.



Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Quote from: Adron on June 09, 2005, 10:32 AM
The registry is for user-specific Value-to-Variable program settings. Among other things. It would obviously have been different if he had said "The registry is only for ..."

I think you need to read the reply to the specific comment more carefully.

Quote from: OnlyMeat on June 09, 2005, 01:09 AM
Quote from: Dyndrilliac on June 08, 2005, 01:37 AM
The Registry is for user-specific Value-to-Variable program settings.

Another false assertion, the registry can be used for local machine settings (All users) or user specific settings.

Clearly by itself that statement is saying the purpose of the registry is for user specific settings. I reply by stating the registry can be used for All User settings and user specific settings.

Do you understand now?

I understood your comment fine. What I pointed out was that there's "if" and "iif" - "if" vs "if and only if". The registry is for user specific settings. It's also for machine specific settings. It's for all kinds of settings. That doesn't mean it's not for user specific settings.



Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Quote from: Adron on June 09, 2005, 10:32 AM
Notice how it says "and other items", where other items can includes settings such as cdkeys. Note that Windows stores its product ID in the registry, and that account passwords are stored in the registry (SAM).

Yes, like i said on many occasions in this thread, the developer decides where to store this information based on many factors. It could be stored in the registry this is true. But i personally believe in only storing disposable settings in  the registry. Windows can do what it likes, with it's own data.

You may go on and hold your personal beliefs about storing settings in files, and there's nothing I can say about your holding them, but you should make it clear that you are not following the guidelines for writing Windows programs when you bring up your opinions.




Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Quote from: Adron on June 09, 2005, 10:32 AM
Notice also that Dyndrilliac said "storing simple program settings", which excludes those settings that should be stored in files.

If you didn't notice, that was his second post which backtracked on his first, which originally stated:-

Quote from: Dyndrilliac on June 07, 2005, 05:47 PM
Ideally you want to store user-sepcific program settings in the registry. This allows computers with multiple users to not need a seperate settings file for each user.

He makes no mention of simple program settings, or anything relating to the type of data.

I suggest you read the entire thread before making assumptions about what was said.

I have read the entire thread. There are special cases and exclusions from all rules. The general rule still is to store your user-specific program settings in the registry. Ideally you want to do that. Not everything works in an ideal way, among other things you shouldn't store huge blobs of data in the registry because of limitations in its design. We don't live in an ideal world.




Quote from: OnlyMeat on June 09, 2005, 03:11 PM
Quote from: Adron on June 09, 2005, 10:32 AM
Notice also that guidelines are meant to be followed unless there is a specific reason not to follow them. You have not shown specific reasons for not following these guidelines.

As i posted, those guidlelines only suggest disposable settings. Window sizes, file links etc. All things that can simply be reconstructed at runtime.

Guidelines are to help people make decisions about what course of action to take. I'll repeat, there are many factors involved. They shouldn't be taken as an explicit standard.

Now, is any of that not clear or would you like me to draw you a picture?

You have made it quite clear that you are of the opinion that people should use non-standard ways to store user settings. Actually that you recommend against following guidelines. I have noted your opinion.

|