Jump to content

Lars Fosdal

Administrators
  • Content Count

    295
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Lars Fosdal

  1. The joys of inherited problems. I am looking for a pattern or advice on how to best allocate a set of records to a specific requestor when there are multiple parallel requests, and there are multiple parallel request viewers. In practice: Allocate a set of deliveries to a user, when there can be multiple users requesting deliveries in parallel, and multiple users viewing the deliveries in parallel. The current SQL can give deadlocks both on allocations and on viewing, so something is definitively not right, and I need to improve on it. There is SO, where it all is an exercise in asking the question right... Are there other good discussion sites?
  2. Not all for loops are created equal.Considerfor x in [value1, value2, value3]You would expect to see x vary in the order of the values in the list. However – if x and the values are of an enumerated type, looping the “list” does NOT loop in the apparent order of the constant, but in the order of the enumerated type declaration, such as it would for any set. Example at: https://larsfosdal.blog/2019/02/18/delphi-pitfalls-enumerated-types-and-for-loops/
  3. Lars Fosdal

    where are search paths stored?

    Ref. paths and VCS systems... We use standard paths C:\SomeFolder\Projects Common ThisCollection ThatCollection External Lib1 Lib2 Proj1 Proj2 We also use a $BIN environment var to direct the project outputs. Allows the team members great freedom for where to put their source, and where to direct the output. and try to ensure that all project search or include paths are on this form ..\Common\ThisCollection Those are stored in the .dproj which can be committed to the VCS. That also allows me to check out various versions Projects <- my typical working branch switched between trunk/pilot/live Projects.Rio <- while still on Tokyo, but testing Rio Projects.Trunk Projects.Pilot Projects.Live
  4. Lars Fosdal

    where are search paths stored?

    Somewhat off topic, but related. Ctr+-F12 gives you a list of units to open, and I assumed it was from the search paths and project paths, Turns out that it also will look at the .dpr uses statement. Ideally, the paths should be relative... uses SomeUnit in '..\RelativeFolder\SomeUnit.pas' But, I had a stale test project in my project group where the uses path used an explicit path uses SomeUnit in 'c:\Obsolete.Path\to\RelativeFolder\SomeUnit.pas' So, pressing Ctrl+F12 gave me both of these - even if Obsolete.Path didn't exist.
  5. Lars Fosdal

    Best site/source for SQL Server questions?

    I usually limit NOLOCK to queries for - data that is used as viewing info (i.e. not acted upon) - data that are currently in the custody of the client (i.e. not likely to be changed by other processes)
  6. Lars Fosdal

    IcoMoon font with TText

    For Windows, the norm would be to install the font. AddFontResource could be used, but as you demonstrated, it doesn't seem to work as intended? For MacOS, I would also assume that installing the font is recommended. I've not used custom fonts with FMX on Android or iOS, so I can't answer that.
  7. Lars Fosdal

    Rapid generics

    I literally do that failing Generics Ctrl-Click several times a day. I guess I am a slow learner 😛 I also wish that the Insight mechanism would deduce the most likely class types in scope and let me select one as jump target, and not ALWAYS send me to the virtual/abstract declarations of the base class.
  8. Lars Fosdal

    10.3.1 has been released

    Virtually, yes. Seriously busy days atm. Themed IDE = Lipstick on pig. I just deadlocked the IDE while trying to abort a compile/run - F9 then Escape -> Not responding.
  9. Lars Fosdal

    10.3.1 has been released

    Is there a FixPack for 10.3.1 ?
  10. Lars Fosdal

    10.3.1 has been released

    The new IDE skinning is a disaster. So! freaking! slow!
  11. Lars Fosdal

    IcoMoon font with TText

    What happens if you install the font in Windows and just try to use it the same way as any other font? (Saw that was answered already). AddFontResource is a WinAPI call, so if you plan for cross-platform FMX code, you should not use it. Also, https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-addfontresourcea says that return value for success = the number of fonts installed, and 0 = failure.
  12. Lars Fosdal

    Best site/source for SQL Server questions?

    Read queries can lock and be deadlocked in MS SQLServer. https://aboutsqlserver.com/2011/09/28/locking-in-microsoft-sql-server-table-of-content/
  13. Lars Fosdal

    Spelling and search

    Grammarly is a nice Chrome plugin for spell-checking in any edit box. https://chrome.google.com/webstore/detail/grammarly-for-chrome/kbfnbcaeplbcioakkpcpgfkobkghlhen
  14. Lars Fosdal

    Spelling and search

    Also, if it is your own old post, you can also check your activities on your profile.
  15. Lars Fosdal

    Spelling and search

    In the Web UI, search is upper right on the white bar.
  16. Lars Fosdal

    Recursive anonymous functions

    You should read this post
  17. Lars Fosdal

    10.3.1 has been released

    So, let's just rename it to Insight Errors...
  18. Lars Fosdal

    Best site/source for SQL Server questions?

    Well, I've added that where it seems safe for the viewers, but it is a short way between being a viewer and being a requestor, so for certain lookups, the data needs to be accurate. The entire allocation part is a very heavy SQL statement with joins, functions, conditions and sorting - and the actual grabbing is totally void of transactions.
  19. Lars Fosdal

    10.3.1 has been released

    It really annoys me that they didn't adapt Error Insight for inline declared variables. So ugly!
  20. Lars Fosdal

    10.3.1 has been released

    Every time this happens to me, there are duplicate source files on different paths. I believe I am editing ./myproject/thisversion/myfile.pas, while I actually am in ./myproject/thatversion/myfile .pas Sometimes this happens because I used find in files on the wrong path, or a file was included in the project from the wrong path.
  21. I use MWSR queues for stuff like logging. Multiple threads queue things for logging, and a single log thread does the actual work. Basically, it is a useable model for any kind of data that in the end needs to be serialized to storage.
  22. https://sdtimes.com/softwaredev/industry-watch-the-developer-transformation/
  23. It is waste if you spend time continuously fixing the same broken code, instead of buying or rebuilding something that can replace it and reduce "daily" maintenance chores?
  24. I am not sure that I am buying Joel's TCP analogy. It doesn't guarantee arrival, but it does guarantee that you as a sender will know if it arrived or not.
×