Jump to content

Lars Fosdal

Administrators
  • Content Count

    3416
  • Joined

  • Last visited

  • Days Won

    113

Everything posted by Lars Fosdal

  1. Lars Fosdal

    New annoying IDE malfunction

    Why do I waste my time on your posts?
  2. Lars Fosdal

    New annoying IDE malfunction

    It was handled publicly. it was Identified as a duplicate of an internal report and updated with a reference to that report, which means when the internal report is updated and closed, the external one will be as well. Just the same way as it has always been done.
  3. Lars Fosdal

    New annoying IDE malfunction

    It's not secret. It is just that internal issue tracker probably have lots of tasks/requests/issues that are just that - internal. So, an externally reported issue, happened to be a duplicate of an already registered internal issue. Basically, it went into the internal laundry basket, instead of the external one.
  4. Lars Fosdal

    enums with duplicate values

    If I remember correctly, enums with constants it is a bit tricky with regards to RTTI?
  5. I honestly don't care about RAD/MVVM. I just want the visual form editing capabilities in VSC so that I wouldn't have to use two IDEs.
  6. FMX / VCL form designer plugins for VSC would be sweet.
  7. Lars Fosdal

    Delphi 10.4 compiler going senile

    What other things than the refactoring code is .NET dependent in the IDE?
  8. If I can avoid it, and I usually can, I do not modify third party code. It adds to the maintenance burden.
  9. Lars Fosdal

    Patch 2 for RAD Studio 10.4 now available

    Remember to start an elevated CMD before running the patch bat file.
  10. Lars Fosdal

    Anybody up for an ethics question?

    Basically, this case needs the nullable types that we have been promised for some time.
  11. Lars Fosdal

    Anybody up for an ethics question?

    Having proper logging of the context of the error is a must - but if they are routinely producing crap data, and rarely take corrective action - the problem definitively is upstream. A specification must exist that describes the appropriate action on erroneous data. Having worked with live data from external sources all my life, I can say with some weight that replacing erroneous data with "neutral/zero" data can have negative effects downstream. There is no joke in the old saying: Garbage in, garbage out. Without knowing the nature of the data, I would say that the only viable option with regards to simply halting, would be to omit import of data that fails validation and instead properly log what fails. The problem here is how much will need to be discarded. This is something that needs to be agreed on. Example for data that are hierarchical: Orders can have a order head, one or more delivery heads, with one or more order lines. If one order line fails, do you fail just that delivery and its order lines, or the entire order? If a delivery head fails, do you fail just that delivery and its order lines, or the entire order? If the order head fails, are you able to eliminate all the deliveries and order lines? Example of data that are sequential: If each line is a time series item, and one line in the series fails - do you fail just that line or the entire series?
  12. We are fighting a memory leak, but neither FastMM nor EurekaLog reports what is leaking. This is a service without a GUI, which uses COM objects, sockets and FireDAC databases. Is there a non-UI FastMMUsageTracker anywhere that could shine light on if this is a fragmentation issue? Are there other things that I should be looking at using?
  13. Lars Fosdal

    FastMM - Fragmentation Analysis?

    We don't use direct Windows heap allocations at all. Nor do we use C DLLs. I starting to suspect that we have stale objects lingering in lists, which gets cleared at app exit - hence no leaks.
  14. Lars Fosdal

    FastMM - Fragmentation Analysis?

    Both report something, but it is just a few K data which are all known leaks related to startup configuration.
  15. Lars Fosdal

    FastMM - Fragmentation Analysis?

    1) The COM objects are ancient and provided by the ERP system. No new versions have been introduced for years. We have very little code that uses interfaces. 2) We have an object hierarchy that tracks allocations and deallocations - and on app close, we report the stuff that has not been properly disposed of. There is nothing in the list that stands out as gobbling memory. 3) I am familiar with tools for inspecting memory, but there are simply so much movement in memory that it is not viable. 4) We are logging threadid and FastMM allocation size throughout the logfile. using this function function MemoryUsed: cardinal; inline; var MMS: TMemoryManagerState; Block: TSmallBlockTypeState; begin GetMemoryManagerState(MMS); Result := MMS.TotalAllocatedMediumBlockSize + MMS.TotalAllocatedLargeBlockSize; for Block in MMS.SmallBlockTypeStates do Result := Result + (Block.UseableBlockSize * Block.AllocatedBlockCount); end; LineNo {Time (ThreadId) Memory} Logged text 4331737 {10:44:39,145 (10488) 970150k} TPSDTask_HandleServerNotifications - End (id:113072) The allocated memory that FastMM reports stays approx in tune with what the system reports. 5) We use TObjectList<T> - not arrays, and mostly for actual objects. We have control over initial size and growth strategy, and adapt it to the respective usages by overriding virtual methods. function TPSDBaseList<T>.DefaultCapacity: Integer; begin Result := 32; end; function TPSDBaseList<T>.DefaultGrowBy: Integer; begin Result := 32; end; It seems that the problem appeared when we started using 10.3.3 - but then again - we made a LOT of other changes for that release, so it may not be relevant.
  16. Lars Fosdal

    Anybody up for an ethics question?

    So, some input is invalid. What would you put instead of that corrupt value? Are the data line by line? Is there a sequence among those lines that gives interdependency (f.x. main/detail, header/line, etc)? Can you skip a line without corrupting the import? I agree that the specification should contain instructions on handling empty or invalid fields. If it doesn't - letting it crash and burn and returning that fact to the client is appropriate.
  17. It was not the history folders that I meant. It is the list of files under File | Recent Files. Naturally, I exclude the IDE history folders from VCS.
  18. Several. https://git-scm.com/download/gui/windows
  19. From the other thread FWIW, we don't use the built-in version control integration in Delphi. We tried way back when it was new, but it just didn't work out for us as it didn't allow merges. We use TortoiseSVN, Github Desktop/SourceTree. Update from repository, start Delphi, do the work, exit Delphi, Commit, Merge if necessary. I am a creature of habit, so I have a root checkout folder: C:\src\Programs This contains the branch of my apps that I am currently working on i.e. typicallly trunk in SVN speak, or dev in git terms. C:\src\Programs\App1 C:\src\Programs\App2 C:\src\Programs\App3 C:\src\Programs\Common etc. I also have other versions in separate folders that I update regularily C:\src\Programs.Live C:\src\Programs.Pilot C:\src\Programs.Trunk C:\src\Programs.ThatVersionThatNeverGotReleased If I need to work on f.x. the Live branch, I used the Switch feature in Tortoise to switch the branch in C:\src\Programs. Why don't I just work with the files in their respective check-out folders? Because of Delphi file history. It is so freaking annoying to open a file from the history list and get a file from the wrong folder. With SVN, I commit my changes from C:\src\Programs, and if the changes also should be merged with a different branch, like f.x. Live - I ensure that folder is updated, and merge to it, and then commit it. We are going to make a move to using git for everything, but we are still trying to come up with a robust and easy to use workflow. Git is a little more finickey for us long time SVN users.
  20. Lars Fosdal

    How do you organize developing new features in big projects?

    Why revision control... - Tracking changes - what is the change history of a unit? (Yes, you SHOULD write commit comments) - Comparing changes between current version with any previous version - Comparing changes between any previous version and another previous version - Automatic merging - ensuring that every little change makes into the other branch - Rolling back to a previous version if your changes turned out to be crap - Linking code changes to your issue management system such as Jira All at a click of a button, no manual tinkering, and not requiring multiple team members Taking it one step further - using f.x. Continua CI which is available in a free version limited to one task at a time, every time you commit a change, you can - Automatically build of each of the changed branches - Automatically run unit tests and integration tests - Automatically do translations, code signing, packaging, deployment to wherever you need to deploy - Export snapshots to your offsite backup system Yes, you can do manual zip archiving of code revisions - but man, they invented the wheel!
  21. Lars Fosdal

    How do you organize developing new features in big projects?

    We use frames extensively in one of our UI apps, and I've made a FrameTestBench app that has the required plumbing of the main app, but which only instantiates the frame I want to work on. It reduces the compile time a lot. But - as everybody else says - using revision control really is essential. Once the frame "graduates" from the test bench and needs to go into the main app for further testing, I don't want to have that happen in the current live branch since I may need to do fixes in that branch before the new frame is ready for release.
  22. Lars Fosdal

    Strange Notification Center message suddenly appearing

    Definitively changes to Notifications from a user perspective, but I can't find any docs with regards to notification API changes. https://news.softpedia.com/news/windows-10-version-2004-new-options-for-managing-app-notifications-530012.shtml Edit: Can it be a permission thing? Do you have to enable notifications explicitly for your FMX app in the Windows 2004 Notification settings?
  23. Lars Fosdal

    Does debugger handle WITH better in latest versions, 10.3+?

    Add a Caption: string to TResult and try again. It will set TResult.Caption to A, and you get no hint or warning that there is a name space collision. Using inline variable declarations - you can eliminate with without a lot of extra code. procedure TForm1.FormCreate(Sender: TObject); begin var r := GetResult; Caption := r.A; end; var p := GetComponent as TPanel;
  24. Lars Fosdal

    Export to PDF speed

    What about the queries that provide the data to the report - are they fast if they are run stand alone?
×