Git Product home page Git Product logo

jj.framework's Introduction

Hi there 👋, I'm JJ

Former software professional with autism.
Now doing things as a hobby.

Projects

  • 🔵 Circular Language Spec 🔶
    • Have been walking around for a while with an idea for a visual programming language made from shapes and lines. Web Site | GitHub
  • 📲 JJ's Software Architecture 🧑🏽‍💻
    • About software development techniques. Used as a base in several home projects. A variation of this was also used at a former employer of mine. Web Site | GitHub
  • 🎶 Piano Playing 🎹
    • Rediscovering my piano hobby. Sharing what I can about it. Web Site | GitHub
  • 🔩 JJ.Framework 🎁
    • Extensions for the .NET Framework. Some of these things you might expect in the .NET Framework, but were missing there, so I programmed my own. NuGet | GitHub | Pre-Release
  • 💾 SaveText
    • Prototype app for software architecture & design patterns 🏛

Piano Playing

Articles

Languages & Tools

I worked quite a bit on Software Architecture and Back-End.
Did Front-End a little bit too.

csharp dotnet mssql git

Build Status

jj.framework's People

Contributors

jjvanzon avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jj.framework's Issues

JJ.Framework.PlatformCompatibility full code coverage

2021-06-21

Retroactively adding missing automated tests aiming for full code coverage.

  • Structuring:
    • No distinction between PlatformHelper and PlatformExtensions.
    • Structuring the test method names.
    • PlatformHelper seems to have just about all the functionality, to which the rest might redirect.
    • Difficult to decide whether putting everything in one PlatformHelper is better than splitting it up. > Decided to leave it in one class.
  • Tested MemberTypes-related things.
  • Unit tests for obsolete members.
  • Testing CultureInfo_PlatformSafe
  • Testing Encoding_PlatformSafe
  • Testing GetInterface_PlatformSafe
  • Testing Save_PlatformSafe (XDocument / XElement)
  • Testing GetValue_PlatformSafe (PropertyInfo)
    • Test variations with static property, instance property.
    • Test variations with indexer.
  • Perhaps also test whether .NET's behavior is the same as that of JJ.Framework.
  • MemberType NestedType does not appear to be tested.
  • It seems to be missing AreEqual checks after splitting tests up into "PlatformSafe" and "FromDotNet" variations.
    • Sometimes it may be trivial, and evident that the two tests prove that PlatformSafe equals FromDotNet.
    • But in other cases it seems to lead to quite some repeated code having a separate test for FromDotNet and PlatformSafe.
    • Perhaps try turning longer test methods for FromDotNet and PlatformSafe into one, it seems it renders less readable code that is not much shorter.

File dedup utility debugging

2020-09-27

  • Debugging Scan
  • Debugging Cancel while scanning
  • Debugging Copy List of Duplicates
  • Debugging Cancel while deleting files
  • Bug: Title bar text did not seem to be replaced with custom text.
  • Bug: IsRunning seems false of both Form and ViewModel after the process was started.
  • Progress percentage:
    • I would like to experience the progress counter with many items.
    • I would still like to debug how many times it updates progress. > It seems to neatly do it upon each 0.1 percent.
    • Percentage seems to not go high enough. It seems to barely reach 50%.
    • Maybe IsDuplicate check + continue messes it up.
    • Trying adding half the item count when an already processed duplicate is encountered.
    • Maybe the change of already evaluated duplicates at the end would be high.
    • Maybe I would switch to using the first of the nested loops as a counter, for more reliability?
    • Might be a data issue. The second half seems a backup of the first.
    • Perhaps try another set.

CommonResources refactoring

+/- 2020-09-30

  • Refactoring CommonResources code.
  • I may go for just picking the system's current culture.
  • And perhaps a setting for fixing the culture for testing more easily if things work.
  • Might extract a helper from CommonResourceFormatter so culture fallbacks might be used for other resource files too.
    • I think I am ok with the structure I introduced, but the name CommonResourceFormatterBase might not be consistent with what the world might expect. ResourceFormatterHelper would not be consistent with some of the pattern choices I made a few years ago, basically based on pattern choices of a boss I once had.
    • I think not using a static class at all would have made sense so using inheritance were possible, but that would break some patterns and some code.
    • If static inheritance were a thing in C# I may have gone for that.

StringExtensions full code coverage

Retroactively adding missing automated tests aiming for full code coverage.

  • Structuring:
    • A test class for each method of StringExtensions.
    • More inlining so methods may prefer using Substring over deeper delegating call structures.
  • #4
  • Left
  • RemoveExcessiveWhiteSpace
  • Repeat
  • #5
  • Right
  • TakeEnd
  • #6
  • TakeLeft (obsolete)
  • TakeRight (obsolete)
  • TakeStart
  • TrimEnd
  • TrimStart
  • TrimFirst
  • TrimLast
  • #8
  • TrimStartUntil

A build / solution just for code coverage?

  • Might also require separate csproj's (for test projects to not reference 'higher' csproj's.)
  • Possibly too much hassle.
  • This might help with incrementally releasing components one by one, starting at the deepest JJ.Framework library going up the hierarchy gradually as things are better covered by unit tests.

File dedup framework / back-end

2020-09-22

  • I think i might program code for a file deduplication utility in JJ.Framework.
  • Reusable methods might go in JJ.Framework.IO.
  • I feel I want to build up a list of tuples recursively over a folder.
  • I feel I might first compare the sizes of files.
  • I think I would go through it like "for i = 0 to count - 1; for j = i + 1 to count - 1".
  • Only if sizes match, I might load the contents and do a full binary compare.
  • I would like to first produce a list of results, before actually deleting anything.
  • I may then delete the files under a separate function.
  • I would like progress to be visible / reported.
  • I may want to say in the UI how things are processed and e.g. the assumption that the files won't change while processing.
  • Extensive file locking for transaction might be obtrusive, so maybe not do that.
  • For processing I might only need a list of the duplicates, but for overview I might want to see the first occurrence related to the duplicates.
  • I am reluctant about the choices for 'failing gracefully'. Any file operation might fail. Do I then wish to fail the whole process or have some sort of retry-skip-stop option? Adding luxury might propagate result handling or callbacks a lot. Am I supposed to program for errors so much? I just don't know yet. I think I will leave out the error handling. It is 'only a utility'. If a file is in use or something, a basic showing of the exception message may do. A user might press analyse again and run the deletion procedure again. I still just don't know.
  • I am not entirely sure about the file pair thing. Maybe I would like to return groupings. However, pairs may make it possible to rearrange more easily before you actually delete the files. I think it may be a more flexible, but still elegant format, the pairs.
  • Cancellation callback might be welcome.

FromTill full code coverage

Retroactively adding missing automated tests for the FromTill method for JJ.Framework.Text aiming for full code coverage.

Some remarks:

  • There were odd edge cases that should result in error, but succeeded because under water they result in "length 0".
  • Making those fail instead, may break code.
  • But that might be code that would have been buggy to begin with.
  • Customized the exception messages, though a bit lengthy and perhaps a little less performant.

File dedup utility project structure / planning docs

2020-09-22

  • I am bothered a little by not having used feature branches in the JJ.Framework repository.
  • I wonder where to put notes around doing a file deduplication utility.
  • I might put my notes for In the "Software Architecture" planning docs, perhaps.
  • I felt the Planning Docs folder subdivision had unclarities.
  • Merged together "Future" projects sub-folders "Interesting Now" And "Postponed"
  • Saw GitExt seems to indicate my commit message would be too long.
  • Considering migrating GitExt settings from JJs-Server to JJs-Laptop.
  • Might make GitExt same version on both machines first.
  • Renamed "Software Architecture" planning docs to "Software Architecture, Framework & Research".
  • Formatting the planning doc "Software Architecture, Framework & Research".
  • Signing in to Microsoft Office.
  • I feel I might be taking a step backwards switching from this MarkDown document to a docx.
  • Would I apply the option to convert to docx? The document looked structured as such, I feel, that things, like reading off the status of work, may not rely on formatting that much.
  • There seem to be only a few colors used for status marking. The rest might do ok even when formatting changes, as long as the headings stay headings I guess.
  • I had a conversion tool voor docx to markdown, I mean I tried a few only I think I remember not liking the result and concluding I may as well convert manually. I might want to check my notes on this, because I have doubts what option to pick. > Online Aspose tool https://products.aspose.app/words/conversion/word-to-md
  • Modifying formatting of "not done" things, by trying to symbolize not only with brown color, but also surrounding with [x] ~~ ~~
  • Modifying formatting of "postponed" things, by trying to symbolize not only with orange color, but also heading it with [ ] >..
  • I encountered one table. I suspect converting tables is not so important.
  • MarkDown doc has spelling mistakes.
  • And strike out does not appear within ~~~~ markings.
  • I might have wanted the following branches in the JJ.Framework repository:
    • TfsToDevOpsWorkItemMigration
    • JJ.Framework.VectorGraphics code comments
    • And now would like a branch for file deduplication utility.
  • Could I creatively make a branch off of a point in history?
  • I think I would merge the changes from develop to master now.
    • Merging JJ.Framework develop => master.
  • Merging dependent projects (have csproj references)
    • JJ develop to master (for Synthesizer app)
    • Merging JJ.MedsUseInfographic develop into master.

ThrowsException_OrInnerException in AssertHelper

+/- 2021-06-08

  • For members that throw exceptions, when they are accessed through an accessor / reflection.
  • Seems TargetInvocationException shadows an exception if something is accessed through reflection.
  • Perhaps make a reusable ThrowsException_OrInnerException or something.
  • Adding actual (inner) exceptions to the assert failure message.

File dedup utility setup using "WiX" ("Windows Installer XML Toolset")

2020-10-10

  • Visual Studio Installer Project though limited but simple does not seem supported really well on Azure DevOps to the point that I think I will decide to try a different setup technology: Windows Installer XML Toolset or 'Wix'.
  • I might first calmly read documentation about it. I might see that as a separate planning item on its own.
  • More reading
  • Looking up about no files installed.
    • Should I configure something about the Feature, that it might be installed by default or something?
  • Random orientation
  • Trying install with a log:
    cd "D:\Source\JJs Software\JJ.Framework\Utilities\FileDeduplication.Setup.Wix\bin\Debug"
    d:
    msiexec /i JJ.Utilities.FileDeduplication.Setup.Wix.msi /l* JJ.Utilities.FileDeduplication.Setup.Wix.log
    
  • It shows "C:\Program Files (x86)\JJ van Zon" in the log, so x86. Might search how to switch it to x64. The build configuration also said x86 as the only option. Maybe that could be changed.
  • I do see an icon on the desktop now.
  • The start menu icon seems there and looks ok. Starts the program, be it with an error message.
  • Uninstall from Control Panel seems to work, but the bigger shortcut in the start menu does not (automatically created?). The regular start menu entry was removed, though. > Might not solve.
  • Trying to install with a verbose log:
    msiexec /i JJ.Utilities.FileDeduplication.Setup.Wix.msi /l*v JJ.Utilities.FileDeduplication.Setup.Wix.log
    
  • Might inspect later. Seems to have a lot of variable info and what it checks and environment information.
  • The leaf sub-folder unfortunately is "JJ van Zon", not "JJ Utilities - File Deduplication"
  • Trying a JJ van Zon folder in the start menu might be an idea, since I might group more tools together there.
  • Trying to run the installed program unfortunately gives an error that indicates JJ.Framework.Resources is missing.
  • The Installed Programs in Windows 7 Control Panel has the program in it, but seems to show a standard icon.
  • Might make Program Files folder a variable, like an example used, that showed how to use the x64 Program Files instead of x86, for perhaps cleaner fitness to build for other processor platforms. > Cannot seem to find page with explanation anymore.
  • Learning about dialogs.
  • The WiX code for the standard UI's may be here: "D:\Source\wixtoolset\wix3\src\ext\UIExtension\wixlib"
  • Would like to exclude the license agreement step.
  • Banner bitmaps:
    • Would like to remove the banner bitmaps.
    • Maybe opacity 0 bitmaps would work.
    • Used png instead of bmp to try to make transparency work / make for a 'neutral' 'medium gray' instead of white.
  • Might make a welcome screen banner after all, because of the empty space / less pretty alignment it created.
    • I tried, but png seems not possible.
    • I web searched, but could not find if png was supported.
    • I might search web specifically for reference material on WixUIBannerBmp or WixUIDialogBmp for instance. > Search results did not seem relevant.
    • Alternative: Web searching using transparency for e.g. WixUIBannerBmp or WixUIDialogBmp. > Search results did not seem relevant.
    • Alternative: Using a background color.
    • Alternative: Not using banner, but still using a welcome screen image.

JJ.Framework.Text full code coverage

Retroactively adding missing automated tests for JJ.Framework.Text aiming for full code coverage.

  • EncodingHelper full code coverage
  • #2
  • #3
  • #11
  • #12
  • Split method full code coverage
  • StringHelper full code coverage
  • Testing Replace method overloads with string oldValue and char newValue.
  • Testing SubstringOrLess method.

ConfigurationHelper full code coverage

Retroactively adding missing automated tests aiming for full code coverage.

  • Brushing away test failures.
  • Testing different kinds of empty strings resolving in generated section name.
  • Debugging the tests one by one.
  • Testing SetSection null section throws exception.
  • Complex example: I did not test adding several different sections with different names. Perhaps a more complex example might be welcome.
  • Testing differing auto-generated names for different config section class assemblies.
  • White space names
    • Would I like white space to be treated the same as no name specified?
    • Or trim the name by default?
    • What might be the behavior of .NET's ConfigurationManager?
    • > The white space would not be valid in the XML.
    • > White space upon GetSection seems to return null.
    • What might be the behavior of CustomConfigurationManager?
    • > Section not found when surrounded by white space.
    • Perhaps not so good to have white space tolerance, since that may differ more from ConfigurationManager and CustomConfigurationManager's behavior.
    • But more is accepted by ConfigurationHelper than ConfigurationManager and CustomConfigurationManager: you might set and get sections with names that might be invalid in XML.
    • Still, I think it might be overkill to try and handle this. ConfigurationHelper may be just meant as a way out for when System.Configuration is unavailable.
  • Assembly paramaters:
    • Did I change the interface so it does not match CustomConfigurationManager's Assembly parameters anymore?
    • No. I seem to have added a name parameter. An Assembly parameter wa snot in there before.
    • ConfigurationManager does not seem to have an Assembly parameter.
    • CustomConfigurationManager has an Assembly parameter. Not sure why anymore.
    • Might not be advantageous to add the Assembly parameters to ConfigurationHelper.
  • AssertHelper.AreNotEqual: Program this? > NotEqual already there? Might I want a NotSame equivalent. It seems the reason I did not find it in the member list.

EmbeddedResourceReader full code coverage

+/- 2021-06-08

Retroactively adding missing automated tests aiming for full code coverage.

  • FileName string is null or empty check + tests?
  • Made them succeed.
  • I have more difficult reading / less focused.
  • Perhaps simpler names might help.
  • Rename files to ...Reader after refactoring.
  • Changing order of tests, so the pattern is less jittery.
  • Debugging individually.
  • Should I test with a different assembly parameter value at least once?

File path features in FilePathControl and SimpleProcessControl

+/- 2020-09-22

  • File path feature optional?
    • I would like for BrowseMode = None to disable the browse feature.
    • I would maybe need a default to be not FileBrowseMode.None.
    • I might also want the SimpleFileProcessUserControl to have the file path feature to be optional, so that it might be used for other purposes too. That could make it renamable to SimpleProcessUserControl or something. The text box might still be shown even when not intended as a file path, because sometimes you may enter a number or something. That might make it appropriate to make it show the caption too that was otherwise to say "Path: ".
  • Might channel properties of FilePathControl to the outside of SimpleFileProcessControl and SimpleFileProcessForm.
    • Still may need to add the new members of SimpleFileProcessControl to SimpleFileProcessForm.
  • Made member order uniform across FilePathControl, SimpleFileProcessControl and SimpleFileProcessForm.
  • Making FilePathControl right-to-left hack optional.

CommonResources unit tests

+/- 2020-09-30

  • Unit test for CommonResourceFormatter.
  • What would happen when a resource would not exist in one of the files? Hopefully not a crash.
  • Would I want to check that all resources have fallback? Perhaps a unit test that checks all the members for certain languages,
  • Then throwing an exception if no text?
  • I would like to avoid errors not ignore them, but avoid them before a release preferably.
  • For fallback culture test I might wait until I have the word Scan in it or something.
  • Might extract a helper for unit testing the derived ResourceFormatter too.

AssertHelper refactorings

+/- 2020-09-30

  • Added optional name arguments.
  • IsOfType: "// TODO: Beating around the bush in code seems evidence of abstraction failure."
  • Other refactorings

Considering incremental releases

  • Related: #9

Background

The 15 public NuGet packages have not be completely unit tested. Currently the plan might be to unit test all 15 public NuGet packages before releasing all 15 at the same time. The idea behind releasing them all at the same time, might be that it might be hard to guarantee stability between an older higher dependency and a deeper newer dependency.

But is taking quite some to get to that point, also due to diminished capacity to do things.
It is like running up a high hill, instead of incremental releases. It may contribute to how heavy this feels.

Idea

Releasing incrementally, one component at a time, might have some advantages.

Might there be a way to do stable intermediate releases of newer JJ.Framework components without releasing all the packages at once?

Maybe JJ.Framework.Common (a deeper dependency) could be released. Perhaps by testing it with older other components (upward the dependency). With the newer unit tests?

Perhaps a branch with a solution that uses unit tests as csproj, but referencing NuGet packages from nuget.org except the newer code of the component I would like to release. I might never merge that branch, with this specific specialized solution.

Would it even need an never-to-merge branch? Could it just be a different solution for this release. Hmmm... perhaps also with different unit test csproj, which may look messy and more difficult to maintain.

It could be a set of solution and project files specifically for incrementally testing and releasing the components.

It remains to be seen how this might work out in practice.

File dedup utility exception handling

+/- 2020-09-27

  • Related: #41
  • Debugging throwing an exception.
  • In a presenter.
  • In a separate processing thread.
  • In a UI thread.
  • The recycle bin that would fail.
  • The view models being quite stateful, does seem to take away from some presentation-level transactionality. I think I will choose to ignore that.
  • In case of a recycle bin error, process message would be 'stuck', showing "Deleting files 0.0% - IETS1.WAV". Maybe it could show the exception message instead.
  • ExecuteAction seems convoluted. Responsibility seems spread.
  • Also the progress bar did not show the exception message even if I tried.
  • Maybe move some more to the presenter.
  • I might then burden the view model with message box information. Maybe do it like Synthesizer. Taking a peek at it perhaps.
  • Without the message box also looks ok I think, with the progress bar message.
  • I tried cleaning up the code, removing certain exception handling.
  • But now I see that I also removed setting the progress bar to show the exception message.

Browse for folder in FilePathControl and SimpleProcessControl

+/- 2020-09-22

  • Browse button?
    • I might want to program a browse button into SimpleFileProcessUserControl. There seems to be a reusable FilePathControl I made once. So that should be convenient.
  • Would like to extend FilePathControl's browse modes with selecting folder.
    • I would like the option for to browse for a folder, rather than a file. .NET seems to have a different dialog for that: FolderBrowserDialog. That would make the common base type CommonDialog that may not have all the properties desired to use, rather than FileDialog (from which OpenFileDialog and SaveFileDialog derive), so that may leave a desire for some elegant solution.
    • Perhaps call it FileBrowseMode to be more specific?
    • What options were there to treat non-compatible types as though they had a common type? Extension methods with type switch? I think there were more... wrappers. Anything else? I think I like the extension method idea so I think I will go with that.

UnhandledExceptionMessageBoxShower halts application

+/- 2020-09-27

  • This is done for the purpose of the JJ.Utilities.FileDeduplication utility.
  • Hard crash when file not found by recycle bin function?
  • It seems the message is shown, but the application still halts.
  • Maybe in other apps I used to have yet another exception handler preventing the application from halting. It seems to make sense, because UnhandledExceptionMessageBoxShower might be 'just a message box shower'. Its name does not promise to stop the application from halting.
  • Added some explanations to the class summary of UnhandledExceptionMessageBoxShower.
  • I wonder where to put the exception handler. Around running the form in Program.cs is the tip I saw on the internet.
  • Does not seem to help.
  • Trying it in the Form.
  • Did not seem to work either.
  • I think it might be on another thead.
  • I think I might try making it more robust by surrounding each action's code in the form with something.
  • Now the message box will not show at all.
  • I am questioning the use of the UnhandledExceptionMessageBoxShower. It seems to do what it says, but then the application still shuts down.
  • Not sure if I should do anything about it. I think I might show the exceptions another way.
  • I am afraid of crashes. I just do not want the program to crash upon an exception. Right now I feel there are too many opportunities that it will.
  • How did I do it in the Synthesizer project?
    • I looked at the code (though in DevOps not in Visual Studio) and I think in Synthesizer just UnhandledExceptionMessageBoxShower + a catch in MidiInputProcessor + a catch in AudioOutputProcessor.
  • Yet my FileDeduplication program just crashes upon exception. Why?
  • When I do a 'random' throw in the clipboard copy method (on the UI thread?) the exception does not seem to cause the application to halt.
  • On a back ground thread, is it different? That it does halt the application if it has an exception on a back ground thread?
  • I did a test and it sort of seems so. I really thought exceptions from other threads were also handled OK before by the UnhandledExceptionMessageBoxShower.
  • Someone with the same problem: https://stackoverflow.com/questions/22289598/prevent-winform-to-crash-on-unhandled-exception
  • With some of what seems beating around the bush, someone refers to another post: https://stackoverflow.com/questions/5049063/unhandled-exception-in-winforms-application?rq=1
  • I don't like how people are talking there throwing mud at each other and I don't like how I talk in response either.
  • But I think I will try the first answer of the second post there. It basically seems to say to put this in the config:
    <runtime>
    <!-- the following setting prevents the host from closing when an unhandled exception is thrown -->
        <legacyUnhandledExceptionPolicy enabled="1" />
    </runtime>
  • It seemed to help.
  • I added to the class summary of the UnhandledExceptionMessageBoxShower the suggestion to put that in the app.config.

File dedup utility mixed rework

2020-10-02

  • I might still rename SimpleFileProcess(Control/Form) to SimpleProcess(Control/Forms).
  • Merging to master?
  • I see a unified diff for my merge on GitHub. I would like to inspect it. > Information overload.
  • Would like to inspect any build errors.
  • Tried to fix for JJ.Framework renames in the JJ code base (4 solutions).
  • Would still merge JJ develop to master after the build runs.

2020-10-08

  • Testing against another dedup tool (e.g. Total Commander) to double check the process.
  • Language files seem missing from the installation.
  • When running an installer in another language, it appears the shortcuts in the previous language are not replaced. Hyp: The ID's of some things change with language, while they might be made language independent. Obs: Programs and Features also lists the app twice. Hyp: I might want to go for a fixed Product Id and Package Id again. It appears to me the info I read about 'best practices' around those ID's may as well have been untrue. Repro: Rebuild, run setup, see 2 entries in Programs and Features.
  • The explanation text at the top of the app still uses the word "recursive", which I had agreed might better be replaced by the simpler "and sub-folders".
  • A friendly warning that some duplicate files might be needed for your computer to function, so this tool might be used carefully.
  • I think I like sentence casing without period might be better for the "Also scan subfolders" check box.
  • I might want the Dutch app name to be different. "Bestand ontdubbeling" sounds a bit formal to me. May be "Bestanden ontdubbelen" or "Dubbele bestanden verwijderen" or "Dubbele bestanden opsporen".
  • Renaming JJ.Utilities.FileDeduplication to JJ.Utilities.FileDeduplication.WinForms?
  • Validation: Folder path being empty seems handled with an exception rather than a localized message for the user input Validation e.g. empty file path.

JJs-Pre-Release-Package-Feed with all JJ.Framework components

Quite a lot of steps involved.

2021-05-06 Done Private Feed with All JJ.Framework Components

  • Private feed with all JJ.Framework components
    • Nuspec files
    • Adding to build task group.
    • Publishing to Private feed.
    • Not testing yet
  • Changing misc JJ.Framework releases: renaming stages
  • Limit set of publicly published components:
    • Brainstorm:
      • Can I distinguish between ones that should be public and ones all the others?
      • I might be selective in the JJ.Framework Full Release pipeline > Public stage
    • Experiment:
      • Original Public release NuGet search path:
        • $(System.DefaultWorkingDirectory)/_Artifact//*.nupkg;!$(System.DefaultWorkingDirectory)/_Artifact//*.symbols.nupkg
      • Temporary Public release NuGet search path:
        • $(System.DefaultWorkingDirectory)/_Artifact/**/JJ.Framework.Data.nupkg
        • $(System.DefaultWorkingDirectory)/_Artifact/**/JJ.Framework.Data.*.nupkg
      • nupkg file name example:
        • JJ.Framework.Data.1.7.7797.29802.nupkg
    • Include specific NuGet components.
      • Edited
      • Testing
        • Obs: Icon seemed to fail for JJ.Framework.Text and JJ.Framework.PlatformCompatibility.
          • Exp: Not reproducible. Seems a glitch.
        • Obs: JJ.Framework.Xml.Linq seemed included by accident
          • Hyp: Probably because of this filter:
          • Obs: $(System.DefaultWorkingDirectory)/_Artifact/**/JJ.Framework.Xml.*.nupkg
          • Exp: Trying exclusion filter:
          • Exp: ;!$(System.DefaultWorkingDirectory)/_Artifact/**/JJ.Framework.Xml.Linq.*.nupkg
      • Testing again

2021-05-10 Done Brainstorm Private NuGet Feed

I may be overshooting my target. May aim is to isolate prod versions of the projects in the JJ repository, to keep relative stability, as I migrate them, to use my private NuGet feed.

I did that for the QuestionAndAnswer app. But relative stability meant testing. And test results confused me. Then I may have slithered into improving it, rather than isolating as-is.

I have similar aims with the Synthesizer app and the SaveText app.

Synthesizer may be next.

2021-05-20 Done SaveText to use Pre-Release Package Feed

  • Testing if things work.
    • AppService
    • Mvc
    • WinForms.Offline
    • WinForms.OfflineWithSync
    • WinForms.Online
    • WinForms.CustomSoapClient
    • WinForms.OnlineOfflineSwitched
  • README

2021-05-20 Done Pre-Release Feed with All JJ.Framework Components

  • JJ repository with the projects:
    • Removed "JJ.sln" (for more independence between projects)
    • Making releases, before changing this?
  • Problem: Public projects might not use the private package feed? > Making feed public.
  • Brainstorm: Perhaps have two solution files?
    • One that uses JJ.Framework csproj's and the other that might use the JJs-Private-Package-Feed?
    • And then perhaps describe that in the repository README.
    • Actually, that might require csproj's to be different depending on referencing csproj or private feed.
    • This all seems not very practical.
    • Googling making the private feed public leads me to more to read and learn and do.
  • Brainstorm:
    • Projects that might not use the private feed in a practical way, would they need to convert to .NET 5 if JJ.Framework does?
    • That would mean JJ.SaveText and JJ.MedsUseInfographic.
    • This seem to be getting out of hand.
    • I think I wanted to prevent instability by doing those releases, so I have more space to move to .NET 5.
    • Maybe a JJs-Internal-Package-Feed that is public might do the trick, even with the previously mentioned 'bumps in the road'.
    • Do I want to rename the project JJs Software so the space becomes a dash, for a nicer URL, since I am going public? Perhaps not, maybe the feed URL is unaffected.
  • I get an error when a release pipeline tries to 'retain indefinitely current release'.
    • Trying again
    • Seems there is a "JJs Software Build Service" user that pops up under the JJ.Framework Full Release, press ..., click Security.
    • I think it might have to do with making the project public and using a public package Feed too.
    • It did not seem to have the manage releases permission.
    • I tried this which seems about the specific problem: http://blog.majcica.com/2018/02/12/automate-settings-retain-indefinitely-flag-on-your-releases/
    • Looked around in Organization settings and Project settings' Security to the user "Project Collection Build Service". Couldn't find the "Manage releases" permission nor that 'new' user "JJs Software Build Service".
    • That user also does not seem to appear in "Security" of releases other than "JJ.Framework Full Release".
    • Hyp: It seems a bit of a hacked-in user, that might pop up when using a public feed?
    • Exp: Giving "JJs Software Build Service" permission "Manage releases" for release pipeline "JJ.Framework Full Release"
    • Trying that for another JJ.Framework.* release too.
    • Doing that for all the release pipelines.
    • Testing that for all the JJ.Framework.* release pipelines.
    • ~~Not testing it for "JJ.MusicThumper Release", "JJ.Utilities.FileNameExclusion Release" or "JJ.Utilities.FileNameFilter Release".
  • NuGet restore in Builds might need to use JJs-Internal-Package-Feed too.
  • Might name it the pre-release feed instead of internal. JJs-Pre-Release-Package-Feed.

2021-05-20 Done JJs-Pre-Release-Package-Feed rework: JJ.Framework.Resources

  • Satellite (localized) assemblies seem not included.
  • Example snippets for nuspec file:
  • <file src="lib\**" target="lib" />
  • <file src="bin\Debug\en\MyAssembly.resource.dll" target="lib\net40\en\MyAssembly.resource.dll" />
  • Obs: Seems to keep a yellow warning triangle near the reference name.
  • Obs: Reinstalling, a reference does not seem to appear.
  • Exp: Diffing nuspec with other nuspec.
  • Obs~ No special observations.
  • Googling the problem
  • Hack: Manually adding reference. 🤷‍♂️

2021-05-20 Done JJs-Pre-Release-Package-Feed Rework

  • Some packages might be restored for the first time.
  • PowerShell nuget pack: Might not work on my local workstation.
  • JJ.Framework.Resources rework
  • JJ.Framework.Testing.Data rework (did not seem to be published)
  • JJ.Framework.JavaScript rework
  • JJ.Framework.HtmlToXml rework:
    • Using SgmlReaderOld
    • Archive SgmlReader in JJ.Framework repository.
    • Waiting if the build succeeds.
    • Using in QuestionAndAnswer.
    • Waiting if build succeeds. > Lack of build minutes.

2021-05-23 Done JJs-Pre-Release-Package-Feed rework: JJ.Framework.JavaScript

  • Does not appear to put the files in the Script folder.
  • https://docs.microsoft.com/en-us/nuget/reference/nuspec#including-content-files
  • Obs: jQuery 3.3.1 seems to install it in my Scripts folder (not Content\Scripts) or anything.
  • Exp: Look at its nupkg as an example.
  • Obs: jquery.3.3.1.nupkg also seems to have PowerShell scripts for install and uninstall (in its Tools directory).
  • Obs: js files seem to be found in the "Content\Scripts" folder.
  • Obs: nuspec file has perhaps remarkably little detail.
  • Exp: I might place things in the "Content\Scripts" folder muself and see.
  • Obs~ I think I read about 2 ways: the <file> tag or another kind of tag to do with content files.
  • Exp: I don't understand the <contentFiles> documentation well, so I might just use the <file> tag?
  • Obs: It still seems to install my js files in the project root instead of Scripts.
  • Hyp: It is the PowerShell scripts in the jquery.3.3.1.nupkg that move things to a different folder.
  • Exp: Try reading the PowerShell scripts.
  • Comment: I have difficulty understanding its complexity.
  • Comment: I wish to admit my limited abilities. Just seeing what happens to my health as I try.
  • I might accept the behavior JJ.Framework.JavaScript and only carefully suggest a copy action in a build event to move it to another place. > Not that relevant
  • Hyp: Depending on where I copy it in the nuspec it may depend whether it may be copied to the bin or not? > Not that relevant
  • Exp: Might test bin copying behavior of both versions of JJ.Framework.JavaScript.
  • Comment: I have difficulty grasping the relevance of this bin copy behavior: It is worth the trouble checking? Perhaps not.
  • Info: Here a different way to deploy JavaScript using NuGet, that seems to use a "NuGet Package Explorer" program: https://www.dotnetcurry.com/visualstudio/781/package-javascript-library-nuget
  • ~ Some sources seem to imply it really should "just do it": Use the Scripts folder.
  • Exp: Trying <contentFiles> tag in nuspec.
  • Obs: It did put them in the Scripts folder, but not automatically included them in the project.
  • Comment: That seems improvement.
  • Exp: Can I change my README accordingly?
  • Postponing also trying to get them included in the project.

2021-05-24 Done QuestionAndAnswer to use Pre-Release Package Feed

  • Configs:
    • Making formatting similar.
    • Adding assembly redirects
    • Web site
    • Import tool
  • Testing if things work.
    • Unit tests succeeded.
    • Using TEST config / database?
      • Web site
      • Import tool
    • Import tool working?
    • Resource localized?
    • Scroll position remembered?
      • > No.
      • > Downgraded jQuery to 2.0.3 for compatibility with JJ.Framework.JavaScript.

2021-05-24 Done Synthesizer to use JJs-Pre-Release-Package-Feed

  • Code copies
    • Name clash between code copies from JJ.Framework(.Collections) and the referenced NuGet package.
    • Perhaps because the dependencies of dependencies are now also directly referenced.
    • The automatic copying of code from JJ.Framework might not entirely be a good plan anymore.
    • I forgot how code copies might be used for the run-time compilation. > Embedded resources.
    • Are code copies that needed anymore? The performance boost would only be for the run-time compilation, is it not, and that's managed separately from that.
    • O wait, OperatorCalculator classes still exist. Some things weren't ported to the faster calculation method.
    • But might I keep this optimization method for those slower calculator classes? I think it might not be worth keeping.
    • Mind the bat files that make the copies of the code files.
    • For the embedded resources I might still use the code copying technique, which may not affect compilation.
  • Configs
  • Testing
    • Unit tests
    • Run-time compilation
    • Calculator classes

2021-05-24 Done Branches to use JJs-Pre-Release-Package-Feed:

  • JJ.MusicThumper
  • JJ.MedsUseInfographic
  • Synth branches:
    • JJ.Framework branches:
      • master
      • synth-doc-based-storage
    • May pre-release JJ.Framework components from synth-doc-based-storage branch.
      • JJ.Framework.Data
      • JJ.Framework.Data.JsonBlobZip
    • Only involve Synthesizer.sln
    • JJ repo branches:
      • synth-doc-based-storage
        • Removing JJ.Framework project references.
        • Installing JJ.Framework NuGet packages.
        • Changed code copying behavior.
        • Corrected minor framework differences.
        • Configs
        • Unit tests
        • Testing run-time compiled
        • Testing calculator classes
      • Other branches do not even use the separate JJ.Framework repository.
        • generalize-interpolators-and-followers
        • synth-reduce-presentation-boilerplating

2021-05-24 Done JJs-Pre-Release-Package-Feed with all JJ.Framework components

  • Projects to use pre-release package feed:
    • JJ.MedsUseInfographic
    • SaveText
    • QuestionAndAnswer
    • Synthesizer
    • JJ.Demos.sln
    • README.MD
    • JJ.SaveText Public
    • JJ.MusicThumper
  • Removing JJ.Framework git cloning from builds.
  • I am beginning to not like the release trigger: many redundant releases, that might never be released. May work when you might want to release all master merges, but... some project do not seem to work that way for me.
  • Merging jjs-pre-release-package-feed-rework

2021-05-25 Done JJ.MusicThumper to use JJs-Pre-Release-Package-Feed

  • Did it for a branch accidentally.
  • Might do all branches.
    • try-refactor-note-collection
    • remove-some-on-off-properties
    • develop
    • master

2021-05-26 Done Rework JJs-Pre-Release-Package-Feed Version Number More Consistent

  • Pre-releasing JJ.Framework for consistent version numbers.
    • > Perhaps do not do that again. Seems impractical and laborious.
  • Pre-releasing JJ.Framework components from synth-doc-based-storage branch:
    • JJ.Framework.Data
    • JJ.Framework.Data.JsonBlobZip
  • Changing releases' agent pools from Hosted VS2017 to Azure Pipelines with agent specification windows-2019.
  • Updating packages of solutions:
    • JJ.MedsUseInfographic
    • JJ.SaveText
    • JJ.QuestionAndAnswer
    • JJ.Demos.sln
    • JJ.Synthesizer master branch
    • JJ.Synthesizer synth-doc-based-storage
    • JJ.MusicThumper
    • JJ.SaveText Public

Using recycle bin with BulkFileDeleter

+/- 2020-09-22

  • Using recycle bin.
  • Probably easy with Microsoft.VisualBasic.
  • But I wonder about compatibility, which I seem to value in the JJ.Framework.
  • I tried web searches on it, but my mind went on tilt.
  • I might add JJ.Framework.Microsoft.VisualBasic to 'solve' compatibility concerns.
  • But then I would maybe make a derived FileDeduplicatorWithRecycleBin?
  • How would I make the file deletion option variable in the FileDeduplicator? With a delegate? I think I applied a pattern like that before (in JJ.Framework.Soap I believe) and I think I remember finding it quite confusing.
  • I may also split off the deletion from the deduplicator, so it would become a separate action. That may make things more flexible as to which function to use to delete the files.

SimpleProcessControl designer crash

+/- 2020-09-22

  • WinForms designer crash
  • I seem to be getting an error from the designer from SimpleFileProcessControl: "userControl.ParentForm is null.", which I cannot quite explain yet.
  • The error message does not help much with giving me clues. The call stack did not either.
  • A web search did not seem to help me.
  • Tried making obsolete members hidden from the designer.
  • That seemed to make it worse I think, by crashing Visual Studio when the WinForms designer is opened.
  • I think I tried playing around with suspicious constructs I used, that may have confused WinForms.
  • To no avail. Decided after a bit of frustration to stop for now.
  • Now the next day, my suspicion is still that something that seemed benign to me, is a construction WinForms cannot/is not supposed to handle.
  • I have an idea that it may be solved with a clean, clearing NuGet cache, clearing ReSharper cache, removal of obj, and bin and removal of .vs. I could try that.
  • Observation: Visual Studio does not seem to crash anymore upon opening the SimpleFileProcessControl designer.
  • Another idea is removed the file path control instance and place another.
  • But if that will not work, stabbing in the dark may not lead to a solution.
  • Then my game plan is to make a branch, commit this faulty(?) code.
  • Then go back to a previous commit and see if the error is there.
  • Then gradually introducing code changes, each time checking whether the error is back.
  • That should narrow the scope of the problem. I might pin point exactly what thing makes WinForms trip over itself, if that is a fair assessment.
  • I think I must remember to rebuild every time in between gradual introduction of code changes.
  • What might I still do with the obsolete members, that are now outcommented? Remove them. They are not on NuGet yet and there do not seem many interests in what's on GitHub, so backward compatibility may nbt be that important.

StringBuilderWithIndentation full code coverage

  • Tests seem to repeat code quite regularly. Replacing with a single test for multiple things might be ok. Or perhaps tests might be made more to the point somehow. > Simplified them slightly.
  • Debugging tests.
  • Perhaps shorten the test names a bit.

Accessor to accept specific parameter types

+/- 2021-06-08

Before this change, Accessor.InvokeMethod might only have worked with parameters with concrete types, not abstract types.

  • May need an Accessor.InvokeMethod that can get methods with abstractly typed arguments.
  • Or maybe supplying type arguments.
  • And perhaps an overload that takes Type[].
  • Maybe matching based on calling method's signature.
  • Getting parameter values from LambdaExpression.

Making StaticReflectionCache obsolete

  • ReflectionCache seems preferred, but StaticReflectionCache still exists.
  • I would like to refactor, so StaticReflectionCache might become obsolete.
  • I am thinking to myself: don't let anything stop you.
  • But I also feel, I am not up to it.

Converting planning notes to GitHub issues

  • Labeling structure.
  • ... Converting notes in repo JJs-Planning-Docs to GitHub issues.
  • From doc 2016-08 Software Architecture, Framework, Research Notes.md
  • ... From planning doc "4. 2013-09 Question and Answer Project TODO.doc"
    • Related: #74
    • Related: #75
    • Related: #76
    • .. Related: #77
      • ... Reformulating
  • From planning doc "5. 2013-09 Question and Answer Project Done.doc"?
  • From planning docs "2015-03 Synthesizer"?
  • Are there notes about SaveText that might contain notes about JJ.Framework?

2021-08-30 Brainstorm Older Notes

Trying to decide what to do with older notes.

I am wondering if this retro-active planning is worth it. I think others may say it is not, and they may be right. It may be my own tendency to perfection and difficulty throwing things away, that may be in the way of my own progress.

But I also feel that my notes may have quite some things that may indeed be open issues for this JJ.Framework project.

I am also worrying a bit about the tone and writing style of the notes. It would seem quite some work to change that. Copy-pasting it may have been more efficient. Perhaps be more satisfied with the way the notes were.

Also, notes seem to sometimes cover multiple issues.
Perhaps pulling it apart in pieces is good practice for keeping things overviewable.
This is rather difficult though, given my situation,

I think it might be a matter of organizing information without getting lost in the details. Which might be a pitfall for me. Could I even escape from this pitfall?

I used to be able to find some sort of balance, eventually...

2021-09-06 Brainstorm Rewording Text

Rewording texts seems quite difficult for me now. Seems to demand quite a bit from me.
So what might be an alternative? Scanning for statements that might be too direct?
Even reading it, trying to understand, seems quite a bit to process.

Language limitations seem to be getting the better of me.
Motoric skill problem with typing seems to hinder me.
Follow the rule: "Insert wiggle words robotically"?
Might that make things easier?

File dedup UI / front-end

+/- 2020-09-22

  • A UI may go in JJ.Utilities.FileDeduplication.
  • WinForms in the front?
    • Since I am used to that?
    • If I were to use VectorGraphics for UI, it seems the project quickly gets out of hand in my head from unavailable framework features.
    • Scrolling views, getting used to my own API again, 'mixed mode' vector graphics + WinForms controls, drawing out a (result) grid, positioners.
    • All cool features, but it seems I would be spending more time extending the Vector Graphics framework rather than programming the utility itself.
    • And that might not be what I want right now.
  • I would like to build a UI with some (of my favorite) patterns.
  • Reusing what UI elements already exist and using what I am used to seems more practical.
  • Finishing touches?
    • "Are you sure question" is not variable so possibly neither flexibly localized.
    • Spacing is constant. Would it be cool to make it variable?
    • I might make PositionControls more responsible for all positioning. Some of it now seems to rely on some of the positioning in the designer. > It already works, so I may skip this.
    • Made filePathControl.Enabled work.
      • It seems to be used by SimpleFileProcessControl.
      • I checked with FilePathControlTestForm and it did not seem to work.
    • I suspect threading issues
      • With commands other than ones triggered by the base class SimpleFileProcessControl.
    • Update displayed list of duplicates while it is busy analyzing? Hmm... that seems to require back-end framework code that I might find odd.
  • Using front-end patterns?
    • Hmm, automatically I seem to have started programming it view model free... is that a pity or am I OK with it?
    • I do feel isolating the presentation logic from the view build-up logic might be a nice plan.
    • I tried to build up a view and a presenter by just looking at the things you can do with the app, not so much the code behind it.
    • I feel that some actions might be more easily left up to the form rather than presenter, like browsing for a folder. This is what you would do in a web app, for comparison.
    • I think in the past I aimed to separate usage of specific tech from the presentation logic.
    • The data access I would abstract mostly through the repository pattern.
    • Dependency on a (platform-)specific API I think I abstracted that by instantiating using the config.
    • Those seem all nice patterns, but might it be overkill for me for now? Is it even doable in my current state of health?
    • I may respect using more patterns in a bigger app, but I wonder whether it is worth it for a smaller app like this.
    • I wonder if I would make the view models stateful or stateless.
      • I think I my Synthesizer program I already made such a decision. I could take a look at it. I am not sure if I would want to hold up those decisions in a smaller program like this.
      • I took a look at a Synthesizer Presenter and I think I saw the following: the action methods seem to uphold the pattern view mode in - view model out, but I think I noticed sometimes the view model is not recreated. I think I might try doing the same for FileDeduplication.
      • I am also looking at the MonitoringBarPresenter of Synthesizer, where I think I remember questions about signaling and performance. I think whenever some tech on the front-end, midi for instance, had signalled something, I called an action method in the presenter to apply things to the view model.
      • Would I be able to use such a thing for the FileDeduplication? The signaling is for instance canceling and progress messages. I think I like that.
      • My intuition says that I would need some signalling from the presenter to the view, because of progress updates for instance.
      • I could also see this like an exercise, re-learning about patterns I once chose.
      • It might make sense to always call ViewModelChanged, because it seems now there are two ways introduced to do the same thing.
    • I might do it in stages. I might first see if I can move some logic to the presenter to relieve the view and see where it takes me.
    • I would like to try to make dependency on services to be a bit more loosely coupled.
  • Might use UnhandledExceptionMessageBoxShower.
  • Showing duplicates:
    • Message box might to show the duplicates might not be that handy. Text box maybe.
    • I would like to scroll through it.
    • I would like to make it possible to copy.
    • But I would not like to suggest it is any use editing it if it isn't.
    • If I have a copy to clipboard button, I might be OK with a label not being scrollable.
    • Still wish to refactor out the 'Show List of Duplicates' button?

Upgrade to .NET 5

Dependent on #13, because one last publish for .NET Framework might be desired, so dependent projects may not need to port yet to use the latest code.

Accessor to use out parameters

2021-05-31

  • O, PrivateObject and PrivateType have this out parameter/arg array item trick. (https://instance-factory.com/?p=738)
  • But does that extend to just MethodInfo.Invoke? Seems so: https://stackoverflow.com/questions/569249/methodinfo-invoke-with-out-parameter
  • Might add helpers to Accessor to make out parameters simpler?
  • Hmm... cartesian product of ref-ness: 3 parameters means 8 variations.
  • Well... that's alright perhaps. Up until a few out parameters the overloads might be doable.
  • But what about the type cast? The parameter would be object.
  • Generics?
  • I think I am trying to defend Accessor's existence over PrivateObject and PrivateType.
  • Oh, can I overload by ref-ness? Maybe yes.
  • Might infer object argument types with TypesFromObjects while specifying out parameter type explicitly. > When null, argument might not be inferrable either way.
  • I seem to have added all the boiler-plating. But now the method is not found and I don't get it.
  • Unit StaticReflectionCache for this situation?
  • It seems the out parameter that makes the difference.
  • Are the other parameters of influence? > Does not seem so.
  • Is it binding flags that should be different? > No it was Type.MakeByRefType.
  • Is there a bug in the layers between my code and the eventual call to System.Reflection? > Does not seem so.
  • I googled it, so it should be possible. I must be doing something wrong. > What I googled was code examples that started with the assumption that you have a MethodInfo already.
  • I found this: typeof(string).MakeByRefType(). Should I call MakeByRefType? (source: https://social.msdn.microsoft.com/Forums/vstudio/en-US/9efb78ba-9eeb-431a-807d-531c51f54e02/methodinfo-returns-null-when-getmethod-is-called-with-reference-type-parameters)
  • Structurally test Accessor out parameters.
    • Method finding might be influenced by name correspondence or lack thereof, ref-ness of different kinds, parameter types. Perhaps a bit much to test.
    • Maybe making sure I cover all the execution flow branches may be good enough.
    • But perhaps change test cases a bit, so that the code might be challenged a bit more?
    • Varying parameter types? A sort of fail-safe for accidentally switching around parameters.
    • Perhaps look at some list of simple types and rotate through them.
    • Having some reference types too might make sense.
    • Perhaps some method name variation (perhaps Method_WithOneParameter, Method_WithTwoParameter, Method_WithThreeParameters)
    • Varying return values and out parameter values might also be beneficial.
    • Perhaps generalize code by assigning default always at the beginning, assigning args from parameters array always at the end. Then perhaps only the parameter types differs. > Does not seem to clean up very much.
    • Does arg.GetType() return a ref type? Hard to disambiguate in case it is null? > Discarding this idea.
    • All the methods are static. Testing for instance methods too.
    • Trying to find a naming scheme.
    • A distinction in tests UsingStrings and UsingExpressions
      • Other tests seem to have it.
      • May do it for out parameter-related Accessor methods too.
      • May not be an option for ref's, because expression trees might not support out/ref parameters.
    • It seems overloads for return value void are missing?
      • By using TRet object and then the Method might be resolved based on the parameters.
    • Why are the methods to 'Access' not private in the tests?
  • Overloads might not be able to differ between ref and out. Might I make the solution more complete so that it works for both ref and out?
    • Perhaps ref and out might be handled similarly on the Reflection-level.
    • Is it a matter of making the Accessor parameters ref instead of out? Would that work for both ref and out?
    • Vary between ref and out in the tests. Just rotate between those two?
    • Assign other than default to ref parameters in tests, and assert input in helper class?
      • Running and checking tests.
      • Changing the static method tests too.
    • Making all the bools true, otherwise the error to overwrite default might not be caught.

TrimEndUntil full code coverage

Retroactively adding missing automated tests aiming for full code coverage.

  • Listing tests
  • Implementing
  • Debugging
  • Testing when multiple occurrences are in the string.
  • Making delimiter show up more than once in the input.

JJ.Framework.Common full code coverage

+/- 2021-06-08

Retroactively adding missing automated tests aiming for full code coverage.

  • Tests seem to make holes appear in JJ.Framework.Testing.
  • KeyValuePairHelper_Obsolete full code coverage
  • Int32Helper_Obsolete full code coverage
  • #25
  • CultureHelperTests full code coverage
  • DoubleHelperTests full code coverage
  • #26
  • EmbeddedResourceReader_Obsolete full code coverage
  • EnumHelper full code coverage
  • EventArgsOfT full code coverage
  • KeyHelper full code coverage
  • EnumHelper_Obsolete full code coverage
    • Needed #19
    • Needed #27
    • Needed #28
    • May need Accessor.InvokeMethod that can get methods with type arguments.
  • IClipboardUtilizer_Tests (to demo the use of this interface).

File dedup utility finishing touches

2020-09-27

  • Debugging Delete Files
  • When I press start, I think I would like to be asked first to run Scan if I forgot. That seems less confusing to me.
  • Label displaying duplicates seems problematic:
    • Label does not appear to display tabs. Using "| " instead.
    • It seems unclear what the label shows once the preview text is overwritten with data.
    • When number of duplicates is high, the label does not seem to allow going to the bottom text anymore.
    • Vertical scroll?
    • I would like the list of duplicates to not wrap text.
    • https://duckduckgo.com/?q=winforms+label+wrap&t=opera&ia=web A quick glance gives me the impression that most search results would be about turning wrap on rather than off.
    • No wrap?
    • Try making text box disabled and hope it still scrolls. It does not.
    • Making TextBox.ReadOnly keeps scrolls working unlike TextBox.Enabled.
    • Though scrolling with the mouse pad does not seem to work. I am ok with that.
  • Tab index: Using JJ.Framework.WinForms' AutomaticallyAssignTabIndexes extension method.
  • SimpleFileProcessUserControl's button captions variable?
  • Disabling Scan button while running? And other controls too.
  • Byte comparing may not be the fastest. > Using SequenceEquals instead of Zip collection extension.
  • Try triggering garbage collection?
    • After scanning, memory still seems consumed, while I might expect garbage to be collected. (I worry about the loaded bytes.) Is something retained as a field or something? Try triggering garbage collection?
    • I looked up using GC.Collect() to trigger garbage collection on the internet. I was strongly advised not to use it, while I was not sure why and do not know enough about the garbage collector "to make that call" if I should believe the people answering the questions.
    • I tried implementing some things that might "help" the garbage collector, that I thought I know from memory: implementing and calling IDisposable and setting in Dispose the references to byte arrays objects to null, and references to objects of the same class to null and then calling Dispose on all those objects when done with it. I tried testing. I think I saw inconsistent results. Afters start up 10 MB memory consumption. Sometimes after a scan for duplicates 240 MB. With trying to help garbage collector or without it, inconsistently it seemed to drop back to 130 MB immediately or only after a while.
    • I decided to not implement neither a call to GC.Collect() nor programming code that might help the garbage collector.
    • Removed code:
      : IDisposable
      
      public void Dispose()
      {
          // Trying to help the garbage collector.
          OriginalFileTuple = null;
          FileBytes = null;
          GC.SuppressFinalize(this);
      }
      
      ~FileTuple() => Dispose();
      
      // ...
      // Trying to help the garbage collector to clean up the loaded byte arrays.
      fileTuples.ForEach(x => x.Dispose());
  • Might extend the tool with file pattern.

SplitWithQuotation full code coverage

Retroactively adding missing automated tests aiming for full code coverage.

  • Had bugs
  • Perhaps remember previous char instead of looking ahead 1 char?
  • Default quote-less to split without quote.
  • Perhaps handling escaped quote with SubstringOrLess too or a variation thereof.
  • Separate overloads with char and string separator and quotes.
  • More tests.
    • Programming.
    • Making them run.
  • Separate test class with char and string separator and quotes.
  • Preventing false positives:
    • Varying values.
    • Varying quote characters and separators more.
    • Making separator and quote strings different lengths.
  • Debuging tests.
  • Testing members made obsolete.

KeyHelper custom separator

KeyHelper is a helper method for generating a single string dictionary key out of multiple disparate values. By adding the option for a custom separator, a shorter key may be generated, which could improve performance in certain cases.

  • Giving KeyHelper a custom separator option.
  • Making ReflectionCache a bit faster with custom separator for KeyHelper.

File dedup utility localization

+/- 2020-09-30

  • Localization of progress messages.
    • I already run into wanting to use an int for a formatting argument. Or decimal. The generic tests may be adapted to that. It seemed that already worked by invoking with reflection with nulls for parameters.
  • Bug: "Are you sure?" question still seems not localized.
  • Bug: Leaving out the word "Klaar" at the end of bulk deletion. > Trying to start the message with "Klaar." rather than end it.
  • Running all the unit tests from IDE.
  • The word 'recursive' might be jargon. Might replace it with something like 'also scan subfolders'.
  • "Exception" might be translated to "Uitzondering"
  • Outtakes:
    if (!(propertyValue is string propertyValueString))
    {
        throw new UnexpectedTypeException(() => propertyValue);
    }
    
    if (string.IsNullOrWhiteSpace(propertyValueString))
    {
        throw new NullOrWhiteSpaceException(propertyInfo.Name);
    }

File dedup utility setup locale using "WiX" ("Windows Installer XML Toolset")

+/- 2020-10-14

  • I may get away with using the standard texts and that they would be localized by Wix itself.
  • May want to localize my product name etc.
  • I seem to be getting an installer for each language.
  • I was not able to get a single installer that adapts to the OS language.
  • Details what I tried are below.

2020-10-17 Brainstorm Trying Setup Locale using WiX using a How To for File Dedup Utility

  • This maybe: http://www.geektieguy.com/2010/03/13/create-a-multi-lingual-multi-language-msi-using-wix-and-custom-build-scripts/
  • That text sounds knowledgeable, seems like it should work.
  • Root msi would contain all languages?
    • Something about it made me think I could infer that the 'root' msi should contain all the localized texts, even though it does not seem to show it when you run the msi, because of what input/output would step by step lead to localization according to the text.
    • I tried this: Msiexec.exe /i JJ.TryThingsOut.DesignerForWixSetupProjects.SecondTry.msi TRANSFORMS=":1043"
    • An experiment like that earlier seemed to result in some localization while executing the 'root' msi.
    • My assumption was it must somehow take the msi from the folder nl-nl, but when I removed that folder, it still worked and localized the word I had translated to Dutch as a text. So it seemed the nl-nl folder was not needed.
  • That gives me some trust in myself that I might have understood the text of that person.
  • I may try it.
  • If it works, I may want to turn it into a reusable component. JJ.Framework.Wix or something.
  • I am thinking about an edge case in advance: What about Dutch (Belgium)? Should I use language nl instead of nl-nl and would that give Belgium/Flanders Dutch translations too? I do not think trying that edge case would be the first thing to do.

  • I have this idea that an exe bootstrapper might be able to be multi-lingual?
  • Maybe if I read more about WiX, I might see more possible solutions.
  • Bootstrapper exe might still be an idea to look up.

The installer did not pop up Dutch on my big PC with Windows set to Dutch language.

LCID codes used in WiX Installer projects:
https://www.ryadel.com/en/microsoft-windows-lcid-list-decimal-and-hex-all-locale-codes-ids/

Tried adding nl next to nl_nl.

Noticed intermediately created msi's were not translated either ("MyInstaller_nl_nl.msi" and "MyInstaller_nl.msi") as I ran them.

In earlier attempts I was able to produce a Dutch-only installer. "MyInstaller_nl_nl.msi" should actually show up in Dutch I think. There may be something I did wrong. I did do some things differently than that earlier attempt, I think because I followed the steps as pointed out by the web page telling me how to do it.

I also noticed that "CreateLangTransform_nl.txt" seems an output log that names both LCID's (language codes) 19
1043, while CreateLangTransform_nl_nl.txt mentions only one (1043). These seems to suggest to me some sort of fallback mechanism would automatically be handled. I would have expected then such a fallback to appear in something called nl, rather than nl_nl. Perhaps 'it thinks' nl-NL might have to translate to more general nl too. I wonder what would happen if I were to add Flemish (Dutch Belgium). What would happen to those fallback codes?

Anyway, a lot of mind activity. I would first try getting a dutch language somewhere at all in this project.

I suspect I would need to create wxl's. I suspect that the system would then detect to add languages. Oddly I would have nothing to put in these wxl's, but I would hope that the standard UI would pick languages then.

Somewhere around the corner lurks a solution I think.

Adding a wxl for neutral culture or trying to specify it in Cultures to Build both seems to lead to the error.
It seems Cultures to Build is used first, otherwise a sum up of the cultures for which there seem to be wxl's. Practically it sort of means I can use either. Perhaps a matter of taste. But if I use neither, I seem to not get multiple cultures.

I do not understand what happened to the usability of a neutral culture. Perhaps a typo. Not sure. I might not be clear on how it works: neutral culture.

Maybe add that other UIRef for the localization?

Language="0" might need to be loc.ID or something.

This seems something:
https://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/specifying_cultures_to_build.html
It seems to mention building a single multi-lingual install. One thought I get is: Sigh. Another how-to that may or may not work.

It seems either setting cultures to build in the project properties or adding wxl's causes build errors to be generated like 'the localization variable is unknown'.

Not sure. A different project would not generate this problem. I do seem to be generating multiple cultures of setups with this project for the first time. And this seemed to have made this error emerge.

Specifying Cultures to Build "nl-NL" works, after correcting the Language attribute to be LCID "1043" (which stands for nl-NL).

Is something wrong with wanting to specify neutral language (to be English)?

In one of the experiments I am quite sure I had both culture-specific folders with msi's in it plus one in the root. But I cannot find it right now in any bins. I think it was in the JJ.Utilities.FileDeduplication.Setup.Wix. I also remember having inferred that the root one indeed would contain all languages but might require a less handy way of starting it, would it use an alternative language.

I see in my notes that it seemed to appear in the Visual Studio Designer experiment, but I also think I remember it from the JJ.Utilities.FileDeduplication. But if I build those, the 'root' msi does not seem to appear.

Look at first localization tutorial again?

en-US;nl-NL

2020-10-20 Brainstorm File Dedup Utility Setup Locale

  • Ideas:
  • Try making the bat files use en-US instead of 'root' msi (that does not exist currently)
  • Try scripting assuming no 'root' msi, but just culture-specific msi's?
  • I feel in theory I am getting more of a grasp of the matter, but the installer still does not seem to adapt to the system (OS) language.
  • Could I try running the output msi with parameters telling to transform, to see if the output msi does contain all the languages?
    • msiexec /i SampleMulti.msi TRANSFORMS="nl-nl.mst"
    • or:
    • msiexec /i SampleMulti.msi TRANSFORMS=":nl-nl.mst"
    • This command line seems to work on the final msi without an mst (transform) file near it:
    • msiexec /i MyInstaller.msi TRANSFORMS=":1043"
    • So I think the language is in the final msi and I think I need to keep that syntax in mind. The transform in the msi is apparently called 1043.
    • How and if that changes the language for depending on the Windows OS language I am not sure.
  • If I embed transforms, how does it know when to apply it? So how does Windows Installer know to apply a language transform based on the OS language?
  • Could I combine this with knowledge from a different piece of documentation?
  • Would it be healthy to try and let it go (for now)? Can I make hobby plans, that make me not be stuck on this difficult issue?

Replace method full code coverage

Retroactively adding missing automated tests aiming for full code coverage.

  • Comparing behavior with other .NET overloads.
  • Running without debugging, resolving errors.
  • Testing multiple matches.
  • Varying values more.
  • Testing regex escaping.

Error "Package ID is Reserved"

2021-05-06 Done Error "Package ID is Reserved"

  • JJ.Framework.Data:
    2021-05-07T18:31:37.8988227Z ##[error]The nuget command failed with exit code(1) and error(System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 409 (The package ID is reserved. You can upload your package with a different package ID. Reach out to [email protected] if you have questions.).
  • https://devblogs.microsoft.com/nuget/package-identity-and-trust/
  • First try another one?
  • JJ.Framework.VectorGraphics:
    2021-05-07T19:33:01.6585138Z Pushing JJ.Framework.VectorGraphics.1.7.7797.34941.nupkg to 'https://www.nuget.org/api/v2/package'...
    2021-05-07T19:33:01.6585581Z PUT https://www.nuget.org/api/v2/package/
    2021-05-07T19:33:01.6585923Z Conflict https://www.nuget.org/api/v2/package/ 743ms
    2021-05-07T19:33:01.7020320Z ##[error]The nuget command failed with exit code(1) and error(System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 409 (The package ID is reserved. You can upload your package with a different package ID. Reach out to [email protected] if you have questions.).
  • Otherwise: email them
  • 🙂 They responded. It seems they gave me ownership of "JJ.*"
  • 🧪 Testing again
    • ↜ With JJ.Framework.VectorGraphics.

2021-05-07 Done Error "Package ID is Reserved": Draft Email for NuGet.Org

Dear NuGet,

I think I might be having a bit of a problem related to package ID reservation.

I tried uploading a few new packages, with names similar as before. I seem to be getting the following error:

"The package ID is reserved. You can upload your package with a different package ID. Reach out to [email protected] if you have questions."

I tried uploading new packages "JJ.Framework.Data" and "JJ.Framework.VectorGraphics". Both seem to give me this error.

This is my NuGet profile: https://www.nuget.org/profiles/jjvanzon

I am wondering, might you be able to help me with this? Thank you.

Kind regards,
Jan Joost van Zon

2021-05-07 Done Error "Package ID is Reserved": Unsent Email Texts for NuGet.Org

Here some info about my project in advance:

My project is called JJ.Framework.
Here is the NuGet profile: https://www.nuget.org/profiles/jjvanzon
The source code is available on GitHub: https://github.com/jjvanzon/JJ.Framework
Here is a bit of logging I got with the error in it:

2021-05-07T19:33:01.6585138Z Pushing JJ.Framework.VectorGraphics.1.7.7797.34941.nupkg to 'https://www.nuget.org/api/v2/package'...
2021-05-07T19:33:01.6585581Z   PUT https://www.nuget.org/api/v2/package/
2021-05-07T19:33:01.6585923Z   Conflict https://www.nuget.org/api/v2/package/ 743ms
2021-05-07T19:33:01.7020320Z ##[error]The nuget command failed with exit code(1) and error(System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 409 (The package ID is reserved. You can upload your package with a different package ID. Reach out to [email protected] if you have questions.).

ReflectionCache.GetMethod with generic type arguments

+/- 2021-06-08

StringExtensions_Casing full code coverage

Retroactively adding missing automated tests aiming for full code coverage.

  • StartWithCap
  • StartWithLowerCase
  • ToCamelCase
    • The implementation might not work as expected.
    • Several different cases are not considered.
    • Something becoming an upper case letter or a lower case letter might be more subtle.
    • This is more interesting.
    • It feels better to actually create something, even when it means the previous version was not as good.
    • Debugging
  • RemoveAccents

Full code coverage for public JJ.Framework components

Retroactively adding missing automated tests aiming for full code coverage.

Reasons

  • Because: newer code.
  • Maybe being more thorough than before.
  • There used to be a rule: unit test all, no questions asked (in the predecessor of this code base from 2012).
  • Maybe just diff with previous version and see what has changed?
  • Maybe thorough feels better.
  • Maybe thorough is not inefficient.

JJ.Framework.Resources NuGet reference not added

2021-05-26

  • Turned out to be that .Resources is a reserved package suffix. Steps:
  • Still bothered a bit by JJ.Framework.Resources not being automatically referenced after NuGet install.
  • Checking if the problem disappeared now that more rework was done.
  • ~ Testing in isolated project.
  • It appears by design: NuGet/Home#1499
  • I think I might then rename JJ.Framework.Resources
  • I'd like an as clean as possible name.
  • JJ.Framework.CommonResources
  • JJ.Framework.Resource
  • JJ.Framework.ResourceTexts
  • JJ.Framework.ResourceStrings
  • Also changing name in build pipeline elements.
  • Updating dependent solutions:
    • JJ.QuestionAndAnswer
    • JJ.Synthesizer master branch
    • JJ.Synthesizer synth-doc-based-storage
    • JJ.MedsUseInfographic
    • JJ.SaveText
    • JJ.SaveText Public
    • JJ.Demos.sln
    • JJ.MusicThumper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.