Windows Server 2008/R2/2012/R2/2016
SeqIDGen is an app for software developers to generate sequential integers that can be used for logging purposes in their software. For example, traditionally C and C++ developers use the following construct for logging internals errors:
logError("%s, line: %d", __FILE__, __LINE__);
The downside of such logging technique is that the result it produces can become inaccurate if the source code file is modified after error logging takes place.
To address that issue we propose another way of logging errors - by using uniquely generated IDs - such as the ones produced by SeqIDGen app. You can use such unique IDs in the logging function as follows:
12203 is the uniquely generated ID. The general idea behind such IDs is that they never repeat. This way, to locate the line in your source code that produced that specific error, all you need to do is search your entire source code project by that unique ID. In this example, by
12203. Most of those numbers will be unique enough to pinpoint the exact spot in your source code where the logging code is.
Such approach has the following benefits over the use of
- It is more reliable even if you modified your source code after errors were logged.
- By using unique number IDs you're not revealing anything about your source code, such as file & function names and line numbers.
- It takes way less space to store unique IDs, that can be stored in 4 or even 2 byte integers.
- Lastly, it is much easier for the end-users to memorize and deliver such unique ID (basically an integer) to your technical support people, if the need arises.
The SeqIDGen app does not require installation and can run from any location on the disk.
Ideally a developer would place a copy of the
SeqIDGen.exe file into their source code project folder to generate unique IDs for that specific project. That way, the configuration file (used by the SeqIDGen app, that is described below) can be saved, or archived along with the source code files.
Note that no files, other than the
SeqIDGen.exe file are required to run the SeqIDGen app. The configuration file (described below) is automatically generated in the same location where the SeqIDGen app is running from. It is used only to save the current configuration within the SeqIDGen app.
Start the SeqIDGen app by double-clicking the
SeqIDGen.exe file. After that you can minimize it off the screen.
NOTE that only one instance of the SeqIDGen app is allowed per folder.
To generate next sequential ID and copy it to the Clipboard, hit the 'hot key' combination on the keyboard. (It is Ctrl+Shift+I by default.) When next sequential ID is generated, by incrementing the previous value, the app will play a sound, that will notify you of the success.
NOTE that both the hot key and the sound played can be changed.
After that you can paste generated unique ID into your source code. It is also important to note that you don't have to switch keyboard focus away from your source code IDE editor to generate unique IDs. The hot key works no matter what app is currently on the screen.
To change the current hot key that is used to generate unique IDs, first check "Use a hot key" in the main window of the SeqIDGen app, and then type your intended combination of keys into the field below. After that click "Apply" on the right.
NOTE that only one unique hot key combination is allowed per Windows user account. If such hot key is used by some other app, the SeqIDGen app will play an error sound and show an error message displayed in red in the box below. In that case, make sure to specify a new hot key combination.
For the ease of identification, the bottom part of the SeqIDGen app displays the location of its configuration file. To open that file in Windows Explorer, go to File -> "Open in Location" from within the SeqIDGen app.
When you start the SeqIDGen app, it will generate its configuration file, named "
Sequental ID Generator Data.txt", in the same folder where the SeqIDGen app is running from. Later on, the app will be automatically saving any of its settings in that configuration file.
When the SeqIDGen app is closed you can modify its configuration file manually.
The format of the "
Sequental ID Generator Data.txt" file is as follows:
CURRENT_ID: <CurID> HOTKEY_ON: <HKOn> HK_VK: <VK> HK_MD: <VKMod> PLAY_SOUND: <PlaySnd> SOUND_FILE: <SndPath> ID_FORMAT: <Fmt> ID_PREFIX: <Prefx> ID_SUFFIX: <Suffx> ID_CAP: <Cap>
Where the following applies:
||currently saved sequential ID. It must be expressed as an unsigned 64-bit decimal integer only. The SeqIDGen app can generate sequential IDs in the range of a 64-bit unsigned number.|
||should be 1 to enable generation of next sequential ID via a hot key. 0 to disable it.|
||virtual key code for the hot key to generate next sequential ID, expressed as an unsigned decimal integer. For values check Microsoft documentation for Virtual-Key Codes.|
||bitwise modifier for the secondary (or third) key for the "hot key" to generate next sequential ID. Can be 0, or a sum of:
1 = Shift key
2 = Ctrl key
4 = Alt key
||should be 1 to play sound when next sequential ID is generated. 0 not to play any sounds.|
||leave blank to play a default sound, or provide path to the local sound file. It can be either an absolute path, or a path relative to the
For a library of other possible sounds, check "Optional Sounds" folder in the download package.
||format of the generated sequential ID. One of:
0 = for decimal integers
1 = for hexadecimal integers
||text prefix to be used when
||text suffix to be used when
||should be 1 to capitalize hexadecimal numbers when
To remove SeqIDGen app from your computer, first close it. Then delete the following files from the same folder on disk, where you used to run SeqIDGen app from:
Sequental ID Generator Data.txt
NOTE that SeqIDGen app does not use Windows system registry to store its data.
Review the following screenshots of the SeqIDGen software:
ManualIncluded in the download package. Check INFO file. available.
You may use this software for as long as you need it, make as many copies of the downloaded package as required, and distribute it among any people and organizations at no cost.
And last, by downloading and using this software you agree to do so "as is" without any implied or expressed liability from the authors and/or distributors of this software.