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,860 other subscribers

Archive for the ‘Delphi’ Category

Subtle things on naming conventions (:

Posted by jpluimers on 2013/11/26

Sometimes a naming convention has been in place for quite a while, then new functionality breaks it.

One of the naming conventions in the JVCL is that all Delphi design-time packages follow the naming pattern *Design##.bpl

Until a package with run-time design functionality came along named (for Delphi XE3) as JvRuntimeDesign170.bpl. The actual design-time package for that is JvRuntimeDesignDesign170.bpl (:

I guess some of the reporting tools bumped into the same thing when they added run-time design support as well.

–jeroen

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

Optimize your Delphi installed disk size

Posted by jpluimers on 2013/11/26

Another instalment in the WordPress Missed Schedule series (:

Each version, Delphi gets more features, and grows bigger.

Especially in testing environments (where you want to have a cut-down base machine you can clone from), it is wise to cut down on the installation size.

A few directories you might want to consider compressing for your Delphi installation:

  • C:\Users\All Users\{*}
    The directories with GUID names contain the installer cache. You can ditch the whole installer cache if you keep ISO images of all installations. I prefer just to compress these directories.
    Compressing usually saves 50% of the storage there, which can count for 5+ gigabyte of savings for the newest Delphi version.
  • C:\Users\Public\Documents\RAD Studio
    Contains (among others) the help files and SVN examples, and (for the most recent version) the Platforms SDKs.
    Saving is usually a couple of 100 megabytes for less recent Delphi versions until about 1 gigabyte for the most recent.
  • C:\Program Files (x86)\Embarcadero\RAD Studio\#.0\lib
    This contains all the precompiled files. Since they are readonly in nature, it pays of compressing them, usually saving 50% or more.
    Saves 5+ gigabytes for the most recent Delphi version.

–jeroen

Posted in Delphi, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Missed Schedule, SocialMedia, Software Development, WordPress | Leave a Comment »

Remote Android screen monitoring and viewing

Posted by jpluimers on 2013/11/25

Another one in the “WordPress Missed schedule” series.

Below are the Android remote screen monitoring/viewer/mirror tools I know about:

  • For a long time, I have used Droid@Screen: an Open Source,  Java based mature cross platform tool that uses ADB (it can even restart it for you in case it hangs) with lots of features (zooming, no temporary files, device recognition, disabling emulator devices, etc). There are some Screen Shots | Droid@Screen.
  • A while ago, I saw android-screen-monitor – Android Screen Monitor – Google Project Hosting. It is a mixed Java/C++ solution that only works on Windows.
  • Recently, Jim McKeeth open sources his Android Screen View: Android Screen View | The Podcast at Delphi.org. It is written as a quick hack in Delphi XE5, so right now it has less features and works in a more crude way than the two Java based tools, but it shows the potential of doing similar things with Delphi.

I primarily use Droid@Screen as so far it works best for me.

But I keep a close eye on the other two just to make sure I don’t miss improvements.

–jeroen

Posted in Android Devices, Delphi, Delphi XE5, Development, Java, Missed Schedule, Mobile Development, Power User, SocialMedia, Software Development, WordPress | 1 Comment »

30 years of Turbo Pascal: Integrated Approach Revolutionized Software Development (via: heise Developer)

Posted by jpluimers on 2013/11/21

Thanks for the German heise Developer people that reminded me yestarday was a special birthday of Turbo Pascal: 30 Jahre Turbo Pascal: Integrierter Ansatz revolutionierte die Softwareentwicklung | heise Developer.

The Google Translation into English isn’t bad at all.

–jeroen

Posted in Delphi, Development, Pascal, Software Development, Turbo Pascal | 2 Comments »

When the Delphi XE5 commandline compiler fails with `error F1026: File not found: ‘False.dpr’`

Posted by jpluimers on 2013/11/20

If you an error like below when compiling Delphi XE5 .dproj files using msbuild … then note the documentation for Debug information (Delphi) – RAD Studio. has not been updated yet as it still lists the values {$D+} or {$D-} {$DEBUGINFO ON} or {$DEBUGINFO OFF}.

(_PasCoreCompile target) -> C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\Bin\CodeGear.Delphi.Targets(187,5): error F1026: File not found: 'False.dpr'

With Delphi XE5, you can specify 3 additional values: {$D1}{$D2} and {$D0}, or {$DEBUGINFO 1}{$DEBUGINFO 2} or {$DEBUGINFO 0}

In the msbuild .dproj files , the values are stored as DCC_DebugInformation elements. Read the rest of this entry »

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Missed Schedule, SocialMedia, Software Development, WordPress | 13 Comments »

ITDevCon 2013: speaker; Last=Pluimers

Posted by jpluimers on 2013/11/19

This summer was rough with some intestine issues, so I was really happy the recovery worked out and I could make it to a couple of conferences this fall.

ITDevCon 201 3was one of them, and I had great fun!

The BitTime people organizing the conference took many nice pictures of which one of me when I was explaining MVVM.

Note that the conferences downloads are online at https://bitbucket.org/jeroenp/conferences/src/tip/2013, so even if you didn’t make it you can still watch he slides and play with the examples.

Thursday there is one more conference to go: Be Delphi, and I will upload the materials from there as well.

–jeroen

Posted in Delphi, Delphi XE5, Development, Software Development | Tagged: | Leave a Comment »

Android 4.2+: enable USB debug mode (Nexus 4, Nexus 7, etc)

Posted by jpluimers on 2013/11/15

Researched this a long while ago, but just presented this at my Delphi cross-platform session on ITDevCon 2013 (of which some sessions have been broadcasted on YouTube):

With Android 4.2 and up, they did hide the debug mode a bit.

Perform these steps one to enable debug mode:

  1. Go to “Settings”.
  2. Scroll down to “About phone” or “About tablet”.
  3. Tap on “About phone” or “About table” to go to the “About” screen.
  4. In the “About” screen, scroll down, to “Build number”
  5. Tap on “Build number” seven (7!) times. It will give you some messages until finally it shows “You are now a developer”.
  6. (On some devices): confirm with the PIN code for your phone.

The above steps unlocked the “USB debugging” mode.

To enable or disable “USB debugging” mode:

  1. Go to “Settings”
  2. Choose “Developer Options”
  3. Choose “Debugging”
  4. Choose “USB Debugging”

–jeroen

via:

Posted in Android, Android Devices, Delphi, Delphi XE5, Development, Missed Schedule, Mobile Development, Power User, SocialMedia, Software Development, WordPress | 1 Comment »

Delphi – Direct3D and the wrong FPU state: Now() function returns a wrong value (via: StackOverflow)

Posted by jpluimers on 2013/10/31

The question datetime – Delphi Now() function returns a wrong value – Stack Overflow is similar to my article Delphi – Michael Justin had strange floating point results when his 8087 FPU Control Word got hosed.

Good that stackoverflow user Anton Zhuchkov found out the cause himself: his answer indicates the Precision Control (and rounding) part of the FPU state got hosed by wrongly initializing the Direct3D device.

I edited his answer with some extra links to documentation.

Finally I’ve found the solution. I needed to specify the D3DCREATE_FPU_PRESERVE flag when creating a D3D device by D3D.CreateDevice.

Otherwise, without that flag, all floating point operations are performed with single precision. As the TDateTime is a simple Double, and Now() functions is consist of simple addition of date value to time value, it all get messed up by DirectX “smart” override.

Problem solved. It was a tricky one indeed. :)

–jeroen

via: datetime – Delphi Now() function returns a wrong value – Stack Overflow.

Posted in 8087, Algorithms, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Floating point handling, Software Development | 2 Comments »

Interesting SO question: What are the experiences with using unicode in identifiers?

Posted by jpluimers on 2013/10/29

Toon Krijthe posted an interesting question to SO.

Though 5 years old, I think it stilll is very valid one:

At my work, we have decided to stay with the ANSI characters for identifiers. Is there anybody out there using unicode identifiers and what are the experiences?

For all projects I work on (in various Languages like  English, German, Dutch or other), I stick to ASCII characters (not even ANSI) for:

  • file names
  • identifiers

I also try to abstract the non-ASCII strings into places where I am sure that the encoding is preserved (for text files, I prefer UTF-8), or where these characters are properly escaped.

What is your take on this?

–jeroen

via: uniqueidentifier – What are the experiences with using unicode in identifiers – Stack Overflow.

Posted in .NET, Agile, AS/400 / iSeries / System i, C, C#, C++, COBOL, Continuous Integration, Delphi, Development, F#, Prism, Scripting, Software Development, VB.NET, Visual Studio and tools | 4 Comments »

.NET/C#/VB.net: some links on ExpandoObject

Posted by jpluimers on 2013/10/10

Still a C# 4.0 / .NET 4 feature that I need to investigate more deeply: ExpandoObject, partially because I had very bad memories of Variant support in Delphi.

So here are a few links.

First of all: since VB.NET already does late binding with the Object keyword, you cannot use ExpandoObject with Strict On in VB.NET 10.0 and up:

Now the C# links:

–jeroen

Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 5 Comments »