The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,839 other subscribers

Archive for the ‘Development’ Category

MySQL – there now seem to be replication mechanisms that work

Posted by jpluimers on 2018/06/27

Reminder to self, as yet another client insisted this was possible, but in the past it wasn’t reliably possible, some links from Kristian Köhntopp:

–jeroen

Posted in Database Development, Development, MySQL | 2 Comments »

Stop Delphi generating .res files for unit test applications

Posted by jpluimers on 2018/06/27

By default, Delphi always generates .res resource files when compiling a project.

There are two things you need to change to turn this off; the first is on by default, the second could be your own change:

  1. Remove the {$R *.res} from your .dpr file and turn “Runtime Themes” to “None” from the default “Enable runtime themes” under “Target” settings “All configurations – 32-bit Windows platform” and “All configurations – 64-bit Windows platform”
  2. Disable “Include version information in project” under “Target” settings “All configurations – 32-bit Windows platform” and “All configurations – 64-bit Windows platform”

Read the rest of this entry »

Posted in Delphi, Development, Software Development | 1 Comment »

SQL: “where not exists … having” formulation; anti-join alternative

Posted by jpluimers on 2018/06/26

I need to write up some notes, but there are some links that will help me:

It’s a question of readability. There is no difference in performance.
Old versions of SQL Server were silly enough to look up meta data, but not any more.

SELECT foo FROM bar WHERE EXISTS (SELECT * FROM baz WHERE baz.id = bar.id);
SELECT foo FROM bar WHERE EXISTS (SELECT 1 FROM baz WHERE baz.id = bar.id);

I am not considering NULL or “fun variants” which don’t seem intuitive to me.

SELECT foo FROM bar WHERE EXISTS (SELECT NULL FROM baz WHERE baz.id = bar.id);

SELECT foo FROM bar WHERE EXISTS (SELECT 1/0 FROM baz WHERE baz.id = bar.id);

The question popped up in comments just now. I researched the manuals of the most popular RDBMS:

A search on SO for code:"EXISTS (SELECT 1" yields 5,048 results.
A search on SO for code:"EXISTS (SELECT *" yields 5,154 results.
Updated links and counts 07.2015.

So SELECT * has the popular vote and the big commercial RDBMS on its side.
I find SELECT 1 more intuitive. It’s like saying “if at least one exists”.
Is SELECT * more intuitive?

–jeroen

 

 

Posted in Database Development, Development, Firebird, InterBase, MySQL, PostgreSQL, SQL, SQL Server | Leave a Comment »

A Programmer’s Introduction to Unicode – Nathan Reed’s coding blog

Posted by jpluimers on 2018/06/26

Must read if you do i18n or l10n: [WayBackA Programmer’s Introduction to Unicode – Nathan Reed’s coding blog

Via:

[WayBack] Even if you’ve been programming with Unicode for years, this well-written article is worth reading. – Kevin Powick – Google+

–jeroen

 

Posted in Development, internatiolanization (i18n) and localization (l10), Software Development | Leave a Comment »

Settings Migration Tool – RAD Studio

Posted by jpluimers on 2018/06/26

I totally missed that this was introduced in Delphi XE8: [Archive.isSettings Migration Tool – RAD Studio.

It allows exporting/importing your Delphi settings and migrate them from older Delphi versions.

I need to try to find out which older Delphi versions it supports.

–jeroen

via: [WayBack] For once, I remembered …\Studio\19.0\bin\migrationtool.exe and imported all the IDE tweaks and color settings I had… – Lars Fosdal – Google+

Read the rest of this entry »

Posted in Delphi, Development, Software Development | 4 Comments »

The Mysterious Case Of The Lost Inherited Call | The Art of Delphi Programming

Posted by jpluimers on 2018/06/25

A history lesson: not all minitor Delphi updates are binary compatible.[WayBack] The Mysterious Case Of The Lost Inherited Call | The Art of Delphi Programming.

I am looking forward to the solution that Uwe comes up with.

–jeroen

via [WayBack] Binary compatibility can be hard to achieve. The Mysterious Case Of The Lost Inherited Call https://www.uweraabe.de/Blog/2018/05/28/the-mysterious-cas… – Uwe Raabe – Google+

Posted in Delphi, Development, Software Development | Leave a Comment »

Mad With PowerShell

Posted by jpluimers on 2018/06/25

Cool blog:

[WayBackMad With PowerShell Tim Curwick’s PowerShell blog, tips and tricks, tools and techniques, explanations and explorations

via: [WayBack] Mad With PowerShell – Excellent blog by +Tim Curwick about the use and abuse of PowerShell, and brimming with good examples and clues. – Lars Fosdal – Google+

–jeroen

 

Posted in CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »

Dennis1000/mos6502-delphi: A MOS 6502 CPU emulator written in Delphi (a very basic C64 + VIC20 emulator included)

Posted by jpluimers on 2018/06/25

Really cool history: [Archive.isDennis1000/mos6502-delphi: A MOS 6502 CPU emulator written in Delphi (a very basic C64 + VIC20 emulator included)

It should run on most 32-bit Delphi versions.

via:

–jeroen

Posted in 6502, C64, Commodore, Delphi, Development, History, Software Development, VIC-20 | 2 Comments »

Main Innosetup site down; downloads are now at GitHub thanks to Martijn Laan

Posted by jpluimers on 2018/06/22

Earlier this week, I wanted to install the most recent version of InnoSetup, but found out the main site at jrsoftware.org is down.

The new versions released earlier this month were on my list of things to try:

There WayBack archive editions of most directories but all of them are too old to hold the 5.6.0 or 5.6.1 versions (some do not even have the 5.5.9 version either).

In the mean time, Martijn Laan has provided the most recent binaries on GitHub:

Parallel to that, I have archived or found back the most recent versions of these pages and downloads:

jeroen

Posted in Development, Inno Setup ISS, Installer-Development, Software Development | Leave a Comment »

I wish the Delphi language supported multi-line strings

Posted by jpluimers on 2018/06/21

Very often, I see people ask for how to embed multi-line strings in a Delphi source file.

The short answer is: you can’t.

The long answer is: you can’t and if you want you have to hack your way around.

The answer should be: just like any of these languages that do support multiline strings:

Many languages support this through a feature called HEREDOC.

Now in Delphi and other languages like Java are building ugly workarounds like for instance this one: [WayBackRAD Studio Tip: Using resource scripts to organize project dependencies. – Chapman World.

–jeroen

Posted in .NET, C#, Delphi, Development, JavaScript/ECMAScript, Python, Ruby, Scripting, Software Development | 17 Comments »