-
Content Count
3586 -
Joined
-
Last visited
-
Days Won
176
Everything posted by David Heffernan
-
Delphi compatibility with Windows 11?
David Heffernan replied to PeterPanettone's topic in General Help
From my brief time with win11 it seems really responsive. Start menu search is instant which is huge. -
The only real solution is to attack the source of the problem. Kaspersky.
-
Thoughts on using begin end merely to limit inline var scope.
David Heffernan replied to MarkShark's topic in RTL and Delphi Object Pascal
Not wishing to defend Perl too much, but that function could be written more clearly with a named variable, but it would look much the same in any language. The regex wouldn't change. In fact the regex match and substitute syntax in Perl is actually very readable. I don't think the Delphi version would be clearer. -
Thoughts on using begin end merely to limit inline var scope.
David Heffernan replied to MarkShark's topic in RTL and Delphi Object Pascal
When has an abundance of visual noise been a problem before with Pascal, the most verbose of languages!!! -
Starting Service app gives Error 2: The system cannot find the file specified
David Heffernan replied to Fivecord's topic in General Help
You shouldn't add any files to the system directories, either system32 or syswow64. They are for the system. -
Is Graphics32 ready for Delphi 11 yet?
David Heffernan replied to RCrandall's topic in Delphi Third-Party
Well done. It usually turns out that there's very little that needs to be done to update a library to a new version, but the number of errors can be daunting until you realise that they are all the same error! -
Is Graphics32 ready for Delphi 11 yet?
David Heffernan replied to RCrandall's topic in Delphi Third-Party
Have you tried cloning the latest from the repo and then compiling it? -
SmartPointer implementations, Pros's and Con's
David Heffernan replied to Rollo62's topic in Algorithms, Data Structures and Class Design
Does TMonitor work correctly yet? -
Why are you looking to use threads? What problem are you trying to solve with threads? Are you aware of the impact of the Python GIL?
-
You missed the point. I'm not disputing that the variable is Extended. I'm discussing the terminology decimal, binary, floating point and fixed point.
-
That's even worse! Currency is decimal fixed, but Single, Double and Extended are all binary float! Probably you are trolling me now for fun!
-
Currency isn't a floating point type, it's a fixed point type. Sorry to be so pedantic, but you know me on this topic......
-
This is clearly a bug. Check if there is a bug report in QP, and if not submit one.
-
Traybar application, get the last active windows on desktop
David Heffernan replied to mvanrijnen's topic in Windows API
It uses a timer to poll and therefore is likely to be unreliable -
Interfaces, Factories, Dependency Injection under D2007?
David Heffernan replied to Javier Tarí's topic in Algorithms, Data Structures and Class Design
Consequence of your decision to use an ancient tool. Upgrade to modern delphi. -
There are lots of articles and resources and examples on JSON parsing on the web. What have you found and what have you tried. Did you start by parsing a very simple bit of JSON first. You shouldn't try to learn something new by trying to solve your ultimate problem. Start simple and work up.
-
Traybar application, get the last active windows on desktop
David Heffernan replied to mvanrijnen's topic in Windows API
I think that when windows are activated they are also told which window is being deactivated to make this window activate. Perhaps that's what you need. -
Compiler detecting repeated lines?
David Heffernan replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
What if the function has side effects? -
I don't think it is this simple though
-
That doesn't make sense. You seldom attempt to write tests that exercise all combinations. That's the art of testing, finding a good set of test cases that are concise enough to verify, yet broad enough to provide comprehensive coverage.
-
And then proceeds to offer six bullet points of advice! I think that there is a lot more to unit testing than meets the eye. Unit testing is clearly about proving correctness of your code at the time you write it. It's also obviously about ensuring correctness of the code in the future in the face of modifications to code, refactoring etc. But I think what is often overlooked is that unit testing (and indeed other forms of testing) is very much about defining what your code does, pinning down the contract between the code and its clients (fancy word for the things that call the code under test). Well written tests can provide clear documentation of the code under test. This can be extremely useful when you need to remind yourself what a particular piece of code does. The implementation of the code may be hard to read and extensive. The documentation of the code may be sparse or non-existent. But a well-written test can provide the information you need to fully understand what you can expect a function or class to do. Furthermore, I routinely find that when I write tests, especially with this perspective of a test as documenting the contact, that I am unhappy with the original implementation and the contract that is implied. I will then refactor the code to achieve the contract that I want. This implies that testing early is good. Test driven development takes that view to the ultimate of writing tests before the code. But even if you aren't going that far, write tests as early as possible. Then when you discover that the contract isn't ideal, you can change it and reduce the impact of that change. Change to design always has smaller impact the earlier it is done in a design process.
-
One-button app to stop all explorer windows from flashing.
David Heffernan replied to bilbo221's topic in VCL
Perhaps the behaviour is caused by the manner in which you create these windows. We don't know that. -
You don't need a Delphi specific text to learn about unit testing. In fact I expect that the best texts won't be Delphi specific.
-
A nice scaled false bug in Delphi 11 update 1
David Heffernan replied to Lajos Juhász's topic in Delphi IDE and APIs
What value does the form's Position property have? -
Your Pos statement will find FOR SELECT so will call Open. But you say ExecSql is called. What you describe happening doesn't match the code therefore. I am confused. Also SQL is case insensitive but Pos is not.