Jump to content

David Heffernan

Members
  • Content Count

    3710
  • Joined

  • Last visited

  • Days Won

    185

Everything posted by David Heffernan

  1. David Heffernan

    Playing multiple wave files simultaneously

    What is more important to you? A solution that works, and 1mb extra exe file size, or no solution and 1mb smaller exe size?
  2. David Heffernan

    Delphi Memory Managers?

    Depends on your program's requirements and memory usage patterns. What are you trying to achieve with a change of memory manager?
  3. David Heffernan

    Record constants that are actually constant?

    Attributes are fragile by design. The compiler cannot verify that you supplied the appropriate attributes to make your program work correctly. For example, at the outset of this thread you are faced with an attempt to pass a typed constant to an attribute constructor and the compiler objects. Well, remove the entire attribute declaration and now your program will compile.
  4. David Heffernan

    Record constants that are actually constant?

    Really? I think that new features are poorly documented, but long standing language features are actually well documented.
  5. David Heffernan

    Restart the same App?

    Except that it doesn't work. Doesn't handle errors at all. Also, it's fine that you don't want to disturb your code. But if you are going to offer up code as an example, it should be exemplary.
  6. David Heffernan

    Restart the same App?

    Why do you think ShellExecute throws exceptions? It doesn't. If you want proper error handling use ShellExecuteEx, and check the return value. Even ShellExecuteEx would be wrong here though. Use CreateProcess. As for services, why use cmd.exe to run net.exe? Why not run it directly? Of course, the API is the right way to start a service.
  7. David Heffernan

    E2161 Warning: Duplicate resource

    Why put up with it. Progressively strip code out until the warning disappears. That will lead you to the duplication.
  8. I don't buy that argument. Your program needs to be able to adapt to changes in screen resolution. When restoring the form layout you must deal with the screen resolution having changed, roaming or not. User can change resolution, font scaling, changes attached monitors, etc. Having said that, I am sure that an argument could be constructed to justify not having such settings roam. In fact, using that part of the user profile that resides on the filesystem allows you to choose between roaming and local on a per setting basis. That's certainly an advantage over HKCU.
  9. I understood that HKCU did roam
  10. I can't make sense of this. You are implying that HKCU always roams? And that roaming is not appropriate for such settings?
  11. %appdata% surely. But why not the registry?
  12. David Heffernan

    Refer to Form Control without using the Form unit?

    Cyclic dependencies are not necessarily bad. Sometimes they are essential. Try writing a linked list without a cyclic dependency.
  13. David Heffernan

    Disaster planning by archiving GetIt installers

    The issue is not what components you use. The issue is the development process. You need to be able to create development environments in a robust way. These environments need to be identical. And you need to be able to build with different versions of your codebase, including different versions of your components. That isn't something that you get with naive package manager use. Yes. That's pretty much the point.
  14. David Heffernan

    Best way to check if an internet SMTP server is available?

    It's very hard to reproduce the exact series of steps which are undertaken when sending an email. And why bother? Since you have to handle the case when it fails for real, why not use that? The best code is the code that doesn't exist. Can't be a defect in code that doesn't exist.
  15. David Heffernan

    Best way to check if an internet SMTP server is available?

    I expect that if you do that you'll have clients complaining that your program refuses to send mail when it would succeed if it tried to do so.
  16. David Heffernan

    Best way to check if an internet SMTP server is available?

    You have to deal with any errors that arise when you try it for real. Why do you feel the need to do more?
  17. David Heffernan

    Disaster planning by archiving GetIt installers

    How easy does it seem right now?
  18. David Heffernan

    Disaster planning by archiving GetIt installers

    Why would any professional programmer be using getit anyway? As I understand it, it is suitable for hobbyists and no more.
  19. David Heffernan

    Floating point problems with external dlls

    Doesn't sound likely to me at all. Do you understand why I suggest to mask floating point exceptions when calling into other code?
  20. David Heffernan

    Floating point problems with external dlls

    I guess you need to mask floating point exceptions before calling in to the dll. https://stackoverflow.com/q/19187479/505088
  21. David Heffernan

    The Android 64bit deadline warnings have started

    Thanks. Actually I think we agree on most things, we just have a disagreement on the mechanics of SO. I don't think that's very important in the grand scheme of things, and I am extremely appreciative and admiring of all the good work you do in the Delphi community.
  22. David Heffernan

    The Android 64bit deadline warnings have started

    Perhaps this comes down to perception, and the type of work involved, and the other attractions of the company, but personally I hire programmers. If they don't know a specific language when they arrive, we teach them that language. I don't really buy in to the idea that there are Java programmers and C# programmers and Python programmers and so on. In my mind there are just programmers.
  23. David Heffernan

    The Android 64bit deadline warnings have started

    Sadly, I've not seen much that gives me cause for optimism.
×