Burgaud Posted February 5, 2021 Share Posted February 5, 2021 After several modifications to scripts, I end up with several #include that I am not sure still in use. What is the best procedure for removing unused #includes then? a) Delete the #Include and see if script will crash? rinse repeat b) just have them and forget it... Link to comment Share on other sites More sharing options...
Musashi Posted February 5, 2021 Share Posted February 5, 2021 (edited) You could also take a look at the thread organize-includes EDIT : Quote b) just have them and forget it... I would not recommend this, for the sake of clean code . Edited February 5, 2021 by Musashi "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Nine Posted February 5, 2021 Share Posted February 5, 2021 (edited) Check also this nice feature, it is not perfect, but very useful for me. We know pretty much the BIG includes that we need, but those that relates to constants are not always very clear : #AutoIt3Wrapper_Add_Constants=y Edited February 5, 2021 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
RTFC Posted February 5, 2021 Share Posted February 5, 2021 CodeScanner will produce a list of redundant #includes. Earthshine 1 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
JockoDundee Posted February 5, 2021 Share Posted February 5, 2021 1 hour ago, RTFC said: CodeScanner will produce a list of redundant #includes. Yes, but does it produce a list of superfluous #includes? Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Developers Jos Posted February 5, 2021 Developers Share Posted February 5, 2021 Au3stripper will simply strip anything that isn't necessary. Earthshine 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JockoDundee Posted February 5, 2021 Share Posted February 5, 2021 1 hour ago, Jos said: Au3stripper will simply strip anything that isn't necessary. There goes most of my code Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Developers Jos Posted February 5, 2021 Developers Share Posted February 5, 2021 4 minutes ago, JockoDundee said: There goes most of my code +80% in Lines&Characters is quite common yes.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JockoDundee Posted February 5, 2021 Share Posted February 5, 2021 It’s well known that all non-trivial programs are twice as long as they need be and contain at least one bug. Therefore, recursively all programs can be reduced to one line of code - which is a bug. Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Developers Jos Posted February 5, 2021 Developers Share Posted February 5, 2021 The savings mainly come from the #included files which sub include a lot of other files. Earthshine 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
RTFC Posted February 11, 2021 Share Posted February 11, 2021 On 2/5/2021 at 5:33 PM, JockoDundee said: superfluous #includes Maybe look up the definition of "redundant"? Earthshine 1 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
JockoDundee Posted February 11, 2021 Share Posted February 11, 2021 (edited) 6 hours ago, RTFC said: Maybe look up the definition of "redundant"? Ok. I can see your confusion and I sympathize, at the same time and as you can see above, redundant can be used in a way that is not wholly synonymous with superfluous. To wit, redundant applied to the subject at hand could mean #includes that are repeated; as is not an uncommon usage, for example: Redundant, used in that sense, draws a clear, if subtle distinction with superfluous; for instance an #include that is merely extraneous, as opposed to duplicative. Support for this parochial usage of superfluous in this sense is also extant. If we apply our faculties for discernment fully, we would see that the OP is specifically referring to the use case most precisely defined as superfluous, (although, I do not deny that being superfluous always carries an unshakeable taint of redundancy). On 2/5/2021 at 5:33 AM, Burgaud said: After several modifications to scripts, I end up with several #include that I am not sure still in use. Moreover, the usage is not purely pedantic; the logic for a tool designed to root out just duplicative includes instead of extraneous includes could diverge greatly; namely the in the former case one could merely scan #include statements and without further investigation into their contents, be determinative. Penultimately, and by way of an excuse, I would like to note that in my original post, the word superfluous was intentionally emphasized. On 2/5/2021 at 8:33 AM, JockoDundee said: Yes, but does it produce a list of superfluous #includes? And as is evident, the language mirrors your statement in my rejoinder, clearly intending to make the distinction between the two adjectives (to which you very astutely were aware of, at least on some level ) On 2/5/2021 at 7:09 AM, RTFC said: CodeScanner will produce a list of redundant #includes. Finally, and IMHO, when we are presented with such clues, we should do our best to indulge our conversational partner by striving to look for their intended meaning with an earnest effort; and avoid the temptation of issuing a reflexively puerile response. Edited February 11, 2021 by JockoDundee My parenthetical ending above “some level)” caused an emoticon to be inadvertently created, so I added a space before the paren. lee321987 1 Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Earthshine Posted February 12, 2021 Share Posted February 12, 2021 (edited) 🙄 Edited February 12, 2021 by Earthshine RTFC 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Earthshine Posted February 12, 2021 Share Posted February 12, 2021 (edited) https://www.google.com/search?q=redundant&ie=UTF-8&oe=UTF-8&hl=en-us&client=safari Honestly I’m tired of reading your mindless drivel. You know what he meant as did we all but you like to misconstrue stuff in your twisted views that you may think is logic. Please stop adjective not or no longer needed or useful; superfluous. "many of the old skills had become redundant" Edited February 12, 2021 by Earthshine RTFC 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Developers Jos Posted February 12, 2021 Developers Share Posted February 12, 2021 1 hour ago, Earthshine said: Honestly I’m tired of reading your mindless drivel. Just hit the ignore button when you feel he's making stupid remarks! (so guess you don't need to react often ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JockoDundee Posted February 12, 2021 Share Posted February 12, 2021 7 hours ago, Earthshine said: Honestly I’m tired of reading your mindless drivel. Honestly, I believe you, it can’t be fun. For others not aware, here is the most recent “mindless drivel”, (posted yesterday) that Earthshine may have found especially “tiring to read”, in response to him steadfastly insisting that fast boot times are more attributable to faster CPU’s than the use of SSD’s. Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2021 Moderators Share Posted February 12, 2021 JockoDundee & Earthshine, Enough. If you want to continue then do so by PM. Any more posts like those above in open forum and you will both find it hard to post at all for a while. All clear? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JockoDundee Posted February 12, 2021 Share Posted February 12, 2021 5 minutes ago, Melba23 said: All clear? Yes, and I agree 100%. Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now