Windows Server 2008/R2/2012/R2/2016
macOS v.13 (Ventura)
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.
NOTE: For macOS users, do not place the SeqIDGen app into the Applications directory.
Ideally a developer would place a copy of the
SeqIDGen.exe file (or
SeqIDGen.app for macOS) 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 (or
SeqIDGen.app for macOS) 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 (or
SeqIDGen.app for macOS). 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, or Cmd+Shift+I for macOS, 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. Windows only: 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 (or Option key for macOS)
8 = Command (for macOS)
|should be 1 to play sound when next sequential ID is generated. 0 not to play any sounds.
|Windows only: 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
SeqIDGen.exe file. Only
.wav sound files are supported.
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
<Fmt> is set to 1. It will be added before a hexadecimal number.
|text suffix to be used when
<Fmt> is set to 1. It will be added after a hexadecimal number.
|should be 1 to capitalize hexadecimal numbers when
<Fmt> is set to 1. Or 0 to keep hex numbers in lower case.
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
Windows only: NOTE that SeqIDGen app does not use Windows system registry to store its data.
Review the following screenshots of the SeqIDGen software:
ManualWindows only: Included 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.
Social MediaSupport our efforts to create better software
macOS v.13 (Ventura)