Archive for the ‘Delphi’ Category
Posted by jpluimers on 2014/10/07
Calling Randomize too often can make your Random numbers even less random.
Sometimes having the Randomize call in a unit initialization section is not practical.
Hence this little method that I think I first wrote back in the Turbo Pascal days:
procedure RandomizeIfNeeded();
begin
if RandSeed = 0 then
Randomize();
end;
–jeroen
Posted in Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Pascal, Software Development, Turbo Pascal | 7 Comments »
Posted by jpluimers on 2014/10/01
I’ve been experimenting with the Delphi hinting directives lately to make it easier to migrate some libraries to newer versions of Delphi and newer platforms.
Hinting directives (deprecated, experimental, library and platform) were – like the $MESSAGE directive – added to Delphi 6.
Up to Delphi 5 you didn’t have any means to declare code obsolete. You had to find clever ways around it.
Warnings for hinting directives
When referring to identifiers marked with a hinting directive, you can get various warning messages that depend on the kind of identifier: unit, or other symbol. Read the rest of this entry »
Posted in Apple Pascal, Borland Pascal, DEC Pascal, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 6, Delphi 7, Delphi 8, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Encoding, FreePascal, ISO-8859, ISO8859, Java, Lazarus, MQ Message Queueing/Queuing, QC, Reflection, Software Development, Sybase, Unicode, UTF-8, UTF8 | 2 Comments »
Posted by jpluimers on 2014/09/30
I recently bumped into the NTCore website by Daniel Pisti.
At a client without my own VMs, I wanted to create a DebugBreak like function in Delphi, which I remembered from my Turbo Pascal days to be something like Inline($CC). So searching for both Delphi and INT 3, I found an EXE injection page at NTCore.
In Delphi, you can do this with a procedure like this, which cannot be inlined because it has an asm block:
procedure DebugBreak();
asm
int 3
end;
(Reminder to self: sort out what to do here to break on an iOS device; Xcode has an alternative)
The site has information about system internals and software security posted as articles until 2009, when he switched to blog posts. Besides that, he has written a bunch of interesting articles at CodeProject. Read the rest of this entry »
Posted in Delphi, Development, Pascal, Power User, Software Development, Turbo Pascal, Windows, xCode/Mac/iPad/iPhone/iOS/cocoa | 3 Comments »
Posted by jpluimers on 2014/09/25
If you are going to do test driven development and unit testing, you should watch these videos and slide decks, most of them by Miško Hevery:
- Not a video, but a good starter: Guide: Writing Testable Code (or read the PDF version).
- 0:32:07 ▶ “The Clean Code Talks — Unit Testing” – YouTube.
- 0:37:56 ▶ The Clean Code Talks – Don’t Look For Things! – YouTube. Read the rest of this entry »
Posted in .NET, Agile, C#, Delphi, Development, Java, Java Platform, JavaScript/ECMAScript, Pascal, Scripting, Software Development, Unit Testing, VB.NET | 2 Comments »
Posted by jpluimers on 2014/09/24
A while ago, I had a client with an exception on a workstation.
There was no permission to run a debugger on their system, or use something like MadExcept or Exceptional Magic in their code base.
The exception looked like this:
---------------------------
Application Error
---------------------------
Exception EInOutError in module MyApplication.exe at 001656B1.File access denied.
---------------------------
OK
---------------------------
These are the steps to get at the source line in an x86 Delphi program (I still have to try the x64, but presume it works similarly): Read the rest of this entry »
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development | 3 Comments »
Posted by jpluimers on 2014/09/18
If you run Continua CI 1.5.x.y and use Git then make sure you upgrade to at least Continua CI 1.5.0.295 (get it from the Continua CI download page).

Click on the shield icon, followed by “CI Server”
After that, reset all your Git repositories in ContinuaCI.
To view all the repositories on the server, follow either of these steps:
- A:
- Logon as an administrator with the rights to view all repositories on the Continua CI server.
- Click on the shield icon in the top bar.
- Then click on “CI Server”.
- In the list on the left, scroll down and click “Repositories”.
- B:
- Logon as an administrator with the rights to view all repositories on the Continua CI server.
- Note the URL in the address bar of your browser (for instance
http://localhost:8080/ci).
- Replace the
/ci part of your URL with /administration/ci/repositories (so you end up at something like http://localhost:8080/administration/ci/repositories).
- Go to that URL.
Now you are in the repositories section, where you see all the repositories configured on the Continua CI. Each repository has a [Reset] link in the right most column.
Then follow these steps: Read the rest of this entry »
Posted in .NET, Continua CI, Continuous Integration, Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/09/15
Simon Stuart yesterday posted a very interesting post on G+ that explains on this (edited) topic:
#Rendering I was having a conversation last night … with +David Berneda regarding rendering performance improvements for FireMonkey applications.
Specifically, custom drawing/rendering on a FireMonkey Canvas.
I just want to summarize the points I raised, and some of the conclusions I’ve come to having been working with rendering in FireMonkey since the end of June this year.
–jeroen
via: Simon Stuart rendering performance improvements for FireMonkey applications. Specifically, custom drawing/rendering on a FireMonkey Canvas.
Posted in Delphi, Delphi XE5, Delphi XE6, Delphi XE7, Development, FireMonkey, OS X FMX, Software Development | 3 Comments »
Posted by jpluimers on 2014/09/11
For a breaking issue, there has been an important bug fix to Coninua CI. From the downloads page:
From the change log:
Read the rest of this entry »
Posted in .NET, Continua CI, Continuous Integration, Delphi, Development, DVCS - Distributed Version Control, git, Mercurial/Hg, Software Development, Subversion/SVN | Leave a Comment »