The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • Pages

  • All categories

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

    Join 1,854 other subscribers

Embarcadero has some cool new Delphi iOS technology in the pipeline (via: Xcode – Debug iOS application on device without symbols – Stack Overflow)

Posted by jpluimers on 2012/06/27

Today exactly a month ago, Allen Bauer (Chief Scientist at Embarcadero) asked a really in depth question about debugging the startup sequence of iOS apps on a device not originating from Xcode on Stack Overflow indicating on what Embarcadero is researching.

Last week, he also answered the same question using manual steps for GDB. Not easy, but it works.

For a development tools company, getting your tools to work on a new platform is hard, and in this case it seems exceptionally hard.

I’m really looking forward to see what kind of cool tools come out of this, as the current developemt platform choices (Xcode or MonoTouch) can really use more competition to make it easier for us developers.

Exciting times ahead (:

–jeroen

via: xcode – Debug iOS application on device without symbols – Stack Overflow.

PS:  I really love the comment by Danny Thorpe on using Periscope breakout switches – I remember those NMI days well (:

Posted in Debugging, Delphi, Development, GDB, iOS Development, Mobile Development, Software Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 4 Comments »

C# Remove Duplicate Lines From Text File? – Stack Overflow

Posted by jpluimers on 2012/06/27

Recently I had to do a quick removal of duplicate lines in bunch of text files.

A quick search revealed that back in 2009, John Skeet came to the rescue with a couple of examples (:

--jeroen

via: C# Remove Duplicate Lines From Text File? – Stack Overflow.

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Jon Skeet, Software Development | 1 Comment »

Stefan Glienke on Delphi generics: Implementing List Enumerator OfType in Delphi – Stack Overflow

Posted by jpluimers on 2012/06/26

Stefan Glienke posted a nice StackOverflow answer on some things to watch for when using Delphi Generics to implement an IEnumerator of type for a generic usage that works better than the stock one.

–jeroen

via:generics – Implementing List Enumerator OfType in Delphi – Stack Overflow.

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

Repeating characters into strings in C# and Delphi (via: .net – Best way to repeat a character in C# – Stack Overflow)

Posted by jpluimers on 2012/06/26

Switching back and forth between mainly Delphi and C#, sometimes it is hard to remember which idiom works best in each environment.

Recently, I had to dupe a lot of tab characters for some Tab-Delimited interface to an archaic system.

I remembered the Delphi idiom: use the DupeString function as about Delphi explains (yes, I know: it dupes more than just characters).

In C#, these work best for me:

Small code sample of the first way (thanks CMS):

static string Tabs(int n)
{
    return new String('\t', n);
}

–jeroen

via: .net – Best way to repeat a character in C# – Stack Overflow.

Oh BTW: I have reduced my StackOverflow presence. It looks like the success of StackOverflow made them instantiate many moderators. A lot of those moderators work under the mantra “we follow the rules strictly, and favour punishment over encouragement” (some  even talk about “changing heritage“). That’s a real pity, as I see a lot of StackOverflow users get scared by the very active downvoting, question/answer closing and even deletion of material that is in essence valuable, if it were edited up a bit. Deleting content is always bad, as it increases the link rot that StackOverflow are trying to prevent in questions/answers as per their FAQ. Links are the foundation of the web.

Alas, devoting real attention to the quality of StackOverflow requires putting real energy in it, which for some of the moderators seems to be too much to ask.

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Delphi, Development, Pingback, Software Development, Stackoverflow | 5 Comments »

Fonts in Microsoft products; Lucida; Microsoft Typography; fonts on other platforms

Posted by jpluimers on 2012/06/25

19941123 - Polyvroom - Failissement

19941123 – Polyvroom – Failissement

Historically I have an interest in digital typography: in the early 90s, I used to freelance for Polyvroom in Lisse (that went belly up on 19941123, the remains bought by Trip Productions) that digitized (together with the still existing Visualogik) many of the TrueType and PDF fonts for Mecanorma and Monotype (now acquired by Agfa and – after Agfa acquired ITC as well –  renamed into Monotype Imaging).

I even have the whole set of Lucida Fonts that beta testers got for testing a Windows version (I think it is Windows 95, but it might be earlier as TrueType was introduced in Windows 3.1). (sidenote: most of the Lucida fonts got designed by Kris Holmes, the rest by Charles Bigelow, so now you know where Bigelow and Holmes stems from; they don’t run their own site any more).

There are many good articles on screen fonts, but that’s not the point of this post, maybe in a future post.

Historically, I kept an eye on the Microsoft Typography website (I have backups from early this century) because of the information quality and cross platform information.

Back in the default.asp era, they had a few pages with fonts for certain platforms:

http://www.microsoft.com/typography/fonts/atm.htm Adobe Type Manager
http://www.microsoft.com/typography/fonts/mac.htm Mac OS 
http://www.microsoft.com/typography/fonts/unix.htm Unix/XFree and GhostScript
http://www.microsoft.com/typography/fonts/win2000.htm Windows 2000
http://www.microsoft.com/typography/fonts/winxp.htm Windows XP

Since then, they redesigned the site, and now their http://www.microsoft.com/typography/fonts fonts page is aspx based, and contains lists with links for:

  • virtually all Microsoft products showing which fonts ship with that product
    (alphabetically from Age of Empire till Windows XP)
  • fonts from families indicating in which product ships which version of the font
    (an odd thing: Office 2010 ships with older versions of mosts fonts than Office 2007)

All individual fonts referred on those links (like Vladimir Script) have a sample as well.

The fonts page also contains a few bonus links:

http://www.microsoft.com/typography/fonts/web.aspx Core Fonts for the Web
http://www.microsoft.com/typography/fonts/cleartype.aspx ClearType Font Collection
http://www.microsoft.com/typography/fonts/windows7.aspx New Fonts in Windows 7
http://www.microsoft.com/typography/fonts/popular.aspx Most Popular Fonts in Microsoft Products
http://www.microsoft.com/typography/fonts/cs4.aspx Adobe Creative Suite 4
http://www.microsoft.com/typography/fonts/unix.aspx UNIX / XFree and GhostScript
http://www.microsoft.com/typography/fonts/macosx.aspx Mac OS X 10.5

The really cool thing is that they kept the old links, thereby preventing link rot. Well done!

Another cool thing is that the vast majority of Ubuntu users have the mscorefonts installed. I learned something new there too!

Now they should include some more information on the Metro design language, that is heavily based on the use of typography.

One of the fonts that has Metro like look and is available in many Microsoft products is Century Gothic. I love the geometric design of it!

–jeroen

Posted in Font, Internet, link rot, Power User, Typography, WWW - the World Wide Web of information | 1 Comment »

Fix to force Google Chrome to use google.com as default search (via: I cannot get Chrome to use www.google.com as the default search engine rather than www.google.com.hk. – Google Chrome Help)

Posted by jpluimers on 2012/06/22

Every couple of Google Chrome versions it starts using the local Google search domain (the one that Google things that geographically matches you, probably in a language you do not understand).

I have the “Use Google.com in English” cookies set, the right Chrome language settings, the right Google language settings, etc.

This is not the “right” solution, but it works, thanks Dwight Stegall:

  1. Right click the address bar and click on Edit search engines. When the box opens click the Google option in the list. Then click the X to the right to delete it.
  2. At the bottom look for a box with “Add new search engine”. Type in Google and in the next box type in a keyword. I use “g” for Google.
  3. Where it asks for URL paste this in.
    http://www.google.com/search?hl=en&q=%s

You can use a similar solution for instance to force Google.co.uk as your default search domain.

–jeroen

via I cannot get Chrome to use www.google.com as the default search engine rather than www.google.com.hk. – Google Chrome Help.

Posted in Chrome, Google, Power User | Leave a Comment »

Delphi: [##] numbers in DFM files determine order of subcomponents (via: Strange [number]s in Delphi DFM files – origin and necessity? – Stack Overflow)

Posted by jpluimers on 2012/06/21

Another interesting SO thread that explains [##] numbers in DFM files.

They are used to determine the order of subcomponents when using form/frame inheritance.

–jeroen

via: Strange [number]s in Delphi DFM files – origin and necessity? – Stack Overflow.

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

.NET/C# – WinForms splash screen research material

Posted by jpluimers on 2012/06/21

I’m in the midst of converting a suite of WinForms C# projects from a range of .NET versions (1.x till 3.x) to 4 totalling some million lines of code.

One of the problems is that some people hacked together some splash screen stuff using multi-threading, doing all sorts of things that was forbidden in .NET 1 (and broke in .NET 2+).

On my research list for getting this to work:

  1. Mahin Gupta | Winforms splash screen – Great work by Tom. which is an update of
  2. A Pretty Good Splash Screen in C# – CodeProject.

–jeroen

Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, Development, Software Development, Visual Studio 2002, Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, WinForms | Leave a Comment »

Direct Visual Studio 2012 RC and Windows 8 Release Preview ISO download URLs

Posted by jpluimers on 2012/06/20

Somehow many software vendors seem to make it a sport to make it hard to get download URLs.

So here is a bunch of direct download URLs for the (almost new <g>) Visual Studio 2012 RC (formerly and internally known as Visual Studio 11).

There are both ISO files (big, but convenient for offline installation).

Visual Studio 2012 (formerly VS11) ISO downloads
Edition Download page Download binary
Ultimate http://go.microsoft.com/fwlink/?LinkId=247147 http://download.microsoft.com/download/6/9/7/697096F6-4EEA-4704-AF2D-F3BAF57C7634/VS2012_RC_ULT_ENU.iso
Premium http://go.microsoft.com/fwlink/?LinkId=247144 http://download.microsoft.com/download/4/D/6/4D602B41-DFB6-4350-89CD-DC78B0C06996/VS2012_RC_PREM_ENU.iso
Professional http://go.microsoft.com/fwlink/?LinkId=247141 http://download.microsoft.com/download/0/B/2/0B29F8C6-C2C7-4187-A792-BDBAFB1802ED/VS2012_RC_PRO_ENU.iso
Test Professional http://go.microsoft.com/fwlink/?LinkId=247152 http://download.microsoft.com/download/F/A/D/FAD0D06E-A8BA-40D4-8F12-FE94A153EB85/VS2012_RC_TESTPRO_ENU.iso
Express For windows 8 http://go.microsoft.com/?linkid=9810160 http://download.microsoft.com/download/A/7/C/A7C0FFAF-E8D6-45F9-8820-0A7972DF5683/VS2012_RC_WinExp_ENU.iso

Web installers (depending on the choose install options, the total download can be a lot less than the complete ISO, but your system needs to be online during the full installation process).

Visual Studio 2012 (formerly VS11) ISO downloads
Edition Download page Download binary
Ultimate http://go.microsoft.com/?linkid=9810263 http://download.microsoft.com/download/6/9/7/697096F6-4EEA-4704-AF2D-F3BAF57C7634/vs_ultimate.exe
Premium http://go.microsoft.com/?linkid=9810243 http://download.microsoft.com/download/4/D/6/4D602B41-DFB6-4350-89CD-DC78B0C06996/vs_premium.exe
Professional http://go.microsoft.com/?linkid=9810223 http://download.microsoft.com/download/0/B/2/0B29F8C6-C2C7-4187-A792-BDBAFB1802ED/vs_professional.exe
Test Professional http://go.microsoft.com/?linkid=9810304 http://download.microsoft.com/download/F/A/D/FAD0D06E-A8BA-40D4-8F12-FE94A153EB85/vs_testprofessional.exe
Express For windows 8 http://go.microsoft.com/?linkid=9810150 http://download.microsoft.com/download/A/7/C/A7C0FFAF-E8D6-45F9-8820-0A7972DF5683/win8express_full.exe

You can find similar Windows 8 Release Preview download links here (they were distilled from the official download page, which now gives a 404 because of the atdmt link redirect is broken).

I use the x64 and x86 shortcuts for the x64 and x86 ISO links.

The Windows 8 Release Preview Upgrade Assistant also comes in handy.

The above links give a sustained transfer rate here of at least 3 megabit/second.

–jeroen

Posted in .NET, .NET 4.5, C#, C# 5.0, Development, Power User, Software Development, Visual Studio 11, Visual Studio and tools, Windows, Windows 8 | Leave a Comment »

Strong name for Interop.Scripting – .NET Framework

Posted by jpluimers on 2012/06/20

So I won’t forget:

I was trying to generate from the interop.scripting.dll which I guess was the automatically generated dll without strong naming. A wrapperof a wrapper apperently doesnt work.
The following did work:

tlbimp.exe C:\WINDOWS\system32\scrrun.dll /keyfile:..\nameHere.snk /out:Interop.Scripting.StrongNamed.dll

The suite of .NET projects I’m refactoring relies in part on scripting in the Microsoft Script Runtime because the original was build by people bringing their COM love from the VB6 world into the .NET world.

I don’t see COM as the first class citizen it was in the VB6 era. On the other hand, COM and ActiveX play an important role in the .NET world. Sometimes I regret that, as dealing with COM is hard.

Some consider COM a first class citizen in .NET as it was in VB6, especially after the dynamic keyword was added in C# 4.0. The variant type available since Delphi 2 since 1996 does more or less the same as dynamic keyword in C#. I know how Anders Heijlsberg disliked the Delphi Variant support of COM. But COM is what the market wanted in 1996, and that seems true until today.

But I digress.

At least parts of the .NET code needs to become strongly named, so I’m hesitating:

  1. kick out the COM stuff – and verify through unit tests that the encompassing code still works – or
  2. generate a strongly named COM Interop Wrapper as described above.

Not sure yet.

Opinions anyone?

Anyway, I’m expecting a few problems here and there, so I’ll be using the CLR Interop Tools like the P/Invoke Interop Assistant and Type Library Importer in Managed Code where needed.

–jeroen

via: Strong name for Interop.Scripting – .NET Framework.

Posted in .NET, C#, Delphi, Development, Software Development, VB.NET | 1 Comment »