Jump to content

Dave Novo

  • Content Count

  • Joined

  • Last visited

Community Reputation

19 Good

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @Nigel Thomas - thanks!
  2. In the situation where you have infinite time, and infinite resources, sure, the above statement is true. Most of us are not in that situation. If you want to simply answer, what is a bottleneck, that is easy... some single (or few) part of your program that throttles the entire execution path. The more difficult question is which bottleneck is worth investigating and fixing. For example, lets say you have some truly awful code in one part of the program that is causing something that should take 5 seconds to take 5 minutes. Really bad. But because of how your end users use the program, only 1% of people encounter this bottleneck. And those people all run that part of the program overnight anyhow, as part of a larger batch run. Is this even worth "looking into"? Maybe, if the "looking into" takes 10 minutes. Maybe not if the "looking into" takes a day. That is a day you are taking away from adding features, or fixing bug that affect the other 99% of your customers. How does your answer change if the bottleneck is such that something that should take 5 seconds takes 12 seconds? IMO, software development is not hard and doesn't fail usually because of programming challenges. i.e. how to code the algorithm, how to add the function. Software Development is hard because it requires choices like the one described above, to which there is no clear cut answer than anyone can give you that applies to all cases. Most coders can figure out how to write whatever SQL query you need and design a database that works. Successful projects / developers / teams consistently come up with the right answers to the more difficult questions like: what refactorings are worth the time it takes to do them? what level of "engineering" (when are you over-engineering, when are you under-engineering) is appropriate for the task I am doing? Which bugs are worth fixing? How to fix them (quick hack or deep rearchitecturing)? All of those questions are easy when you have nothing else to do, but usually that is not the case.
  3. De Novo Software is based on Pasadena, CA. If you happen to be in the area we can accommodate an onsite employee (remote until COVID is resolved) but we will also accept a fully remote position for the right candidate. Details are at https://denovosoftware.com/about-us/careers/software-developer/. We are a team of expert Delphi developers who love Delphi and have put together a cutting edge application used by scientists for state of the art research and clinicians around the world to diagnose many types of cancers and other diseases.
  4. As a developer improves, (hopefully) the developer can write more optimized code in about the same amount of time as they used to write less optimized code. Knowing when to use a TStringBuilder instead of concatenating strings for example, and knowing when doing so will make a difference. Recognizing the use cases and intuitively selecting the data structure most suited for it. etc. Often, it does not take much longer to write faster code than slower code, if you know what you are doing. Beyond that, I would not do much optimization until you had specific use cases that were performing badly. Then, you need to profile those use cases. Once those have been profiled, sometimes it is obvious what to tackle, sometimes sadly its death by 1000 cuts. But I do not not think premature optimization is BS. It happens all the time and is generally a waste. Until you have specific use cases it does not make much sense to make much efforts to optimize, beyond what you are naturally able to do based on your skill level. You can spend hours optimizing some data structure that was never going to be a problem in the first place.
  5. The other issue I have with .Tag is that once things get complex, it is hard to know who is (ab)using the Tag property for what. You have a brilliant idea to use the .Tag of some object to associate it with another object only to find out 3 weeks and 20 hard to reproduce crashes later that someone else is also using the .Tag under certain rare circumstances for other associations. Having explicit lists to hold different types of associations eliminates those problems. If you get in the habit of using .Tag all the time, you cannot even do a search for .Tag to see who is using the .Tag of your object because the search hits so many times. We used to use .Tag quite a bit but moved away from it primarily for that reason. If its a class that we control, we will make a property just for the association, that is appropriately named. If it is a class from a 3rd party library we make a list like @A.M. Hoornweg suggested. Of course, that is just our preference based on our personal experience. Your mileage may vary.
  6. Dave Novo

    64 bit compiler running out of memory

    @Uwe Raabe - thanks for the tip. Everything works great after using the config settings you suggested.
  7. Dave Novo

    Delphi and the new Apple M1 CPU

    The arm M1 has an emulator https://www.computerworld.com/article/3597949/everything-you-need-to-know-about-rosetta-2-on-apple-silicon-macs.html
  8. Dave Novo

    64 bit compiler running out of memory

    @Uwe Raabe - thank you for the tool. After I made it compile for Delphi I ran it, and all it seemed to do was rearrange my uses clause. An example If the unit did have the fully qualified name, it moved them to the top of the uses clause, but otherwise left things alone. i.e. Am I missing something to make it prefix the fully qualified namespaces?
  9. Dave Novo

    64 bit compiler running out of memory

    @Lajos Juhász - we definately are missing the unit scope names. I did not think that would make such a big difference. Certainly easy (but tedious) to fix.
  10. Hello, We are using Delphi Seattle. We have a ~ 2M LOC program with hundreds of units. The 64 bit compiler is running out of memory when compiling. Even when we set to "use MSBuild" to compile in a separate process. The separate process dies with an out of memory around 2GB of RAM usage. The VM I am using has 8 GB of RAM and plenty of spare RAM when the process dies. Aside from breaking the application into different packages/projects, does anyone have any bright ideas. We are in the process of upgrading to Delphi 10.4.1. Is the 64 bit compiler still a 32 bit app?
  11. Dave Novo

    Accessing the memory of a Python List

    @Fr0sT.Brutal - do you have an example of how you can feed python with the pointer to the delphi array and then use this data in Python?
  12. Dave Novo

    Accessing the memory of a Python List

    Hi David, Thanks for the responses. The issue is that we already have a few 100 Mb TArray<Double> already allocated on the Delphi side. We want the user to be able to access that data on the python side without making a copy. ideally, somehow tell the python structure to use our pointer (that we allocated in Delphi) as the source of the data for the numpy array (or matrix). Of course, we would have to tell the user not to modify, or reallocate the contents of that memory, it should be considered read only for them. Is that even possible? or is our only choice to create numpy ndarray array object and copy our already allocated memory into the buffer exposed by the ndarray object?
  13. Dave Novo

    Outdated Delphi Roadmap

    Delphi is perfect. They have run out of things to do! 😀
  14. Dave Novo

    Can VCL, TMS, DeveloperExpress styles be combined?

    Developer Express styles are a whole different beast. They wrote them before Delphi had their own styling engine. AFAIK Dev Ex has no intention of supporting VCL styles. That info was from a few years ago, and things may have changed.
  15. I agree that having two methods to access the list data is helpful. Or maybe just because I got used to it from Delphi. Even Delphi has TList.List forever, so in your example if the developer cared about speed they should be doing for i := 0 to list.Count - 1 do DoSomething(list.list[i]); Mind you, I have rarely found that this makes a difference I could actually time, but sometimes it has.