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

Archive for the ‘Delphi’ Category

A few more classics on BitSavers in the /pdf/borland tree

Posted by jpluimers on 2011/09/27

Hope you like these classics from the early Borland era:

Oh, and if you – like me – started in the Apple ][ and Lisa era, there are lots of nice documents of Apple products from that period to, for instance:

–jeroen

Via: Index of /pdf/borland.

Posted in BitSavers.org, Delphi, Development, History, Software Development | 5 Comments »

C# Using Blocks can Swallow Exceptions | DigitallyCreated

Posted by jpluimers on 2011/09/22

I got to the SafeUsingBlock extension method because of a nice StackOverflow thread on exceptions swallowed in a using block.

Actually, you can broaden the case into a wider scope: in any language when you protect resources in a try finally block (essentially, a using will turn into an implicit try finally block), and both the core logic and the finally throw an exception, the exception from the core block is swallowed.

Simple C# example:

using System;
public class Example
{
    public void Main()
    {
        try
        {
                try
                {
                    throw new ApplicationException("logic block");
                }
                finally
                {
                    throw new ApplicationException("finally block");
                }
        }
        catch (Exception error)
        {
            Console.WriteLine(error.ToString());
        }
    }
}

Simple Delphi example:

program Example;
begin
  try
    try
      raise Exception.Create('logic block');
    finally
      raise Exception.Create('finally block');
    end;
  except
    on error: Exception do
    begin
      Write(error.ClassName, ' ', error.Message);
    end;
  end;
end.

Both examples will only write out the finally block exception message, not the logic block exception message.

This is a corner case (like the example from the MSDN documentation), from which the SafeUsingBlock protects you from by providing an AggregateException class.

In C#, it is a guideline to avoid throwing exceptions in the Dispose when implementing the disposable pattern.

This is good practice in any programming environment: when disposing objects, only throw exceptions in very critical situations when the containing process has been corrupted.

Practically this is very easy as the disposers are very thin and should not contain any business logic, so it is pretty easy to spot places where the program state really is corrupt.

An other alternative is for instance have a Close method that throws an exception, and a disposer not throwing.

–jeroen

via C# Using Blocks can Swallow Exceptions | DigitallyCreated.

Posted in .NET, C#, Delphi, Development, Software Development | 7 Comments »

Dropbox – Simplify your life – easy way to sync your iOS Delphi XE2 FireMonkey stuff between your Mac and PC

Posted by jpluimers on 2011/09/20

One of the things hard when doing FireMonkey iOS development Delphi XE2 is that you have a multi stage process:

  1. Develop and test using Delphi XE2 on Windows
  2. Compile and deploy on the iOS Simulator using xCode on OS X
  3. Deploy on the real iOS hardware using xCode OS X

Basically you need to share your project files both ways between Windows and OS X.

Naturally, you would share files between your Mac and Windows using Samba. With the introduction of OS X Lion, the Samba support was rewritten, causing all sorts of problems.

One of the problems is that it uses a lot of CPU (I tried copying over a 40GB VM, and stopped because the fan in my MacBook Air was making so much noise, I was afraid it was going to take off).
I didn’t even realize it had one, but a MacBook Air has a Fan, and it vents through the keyboard :)

Now I use DropBox to share files between it. If you like that to, sign up with the URL at the end of this line. The 2GB account is free! http://db.tt/6f95UJW

And if you know a better way of sharing: please let me know!

–jeroen

Via: Dropbox – Referrals – Simplify your life.

Posted in Apple, Delphi, Development, FireMonkey, Mac OS X 10.7 Lion, Power User, Software Development | 15 Comments »

Windows Metro Style Apps Developer Downloads: very early version of Windows 8

Posted by jpluimers on 2011/09/14

The download page states

The Windows Developer Preview is a pre-beta version of Windows 8 for developers.

But of course this is also interesting to designers and regular users: getting a hands-on impression of what Metro will bring to Windows 8.

–jeroen

via: Windows Metro Style Apps Developer Downloads.

Posted in .NET, Delphi, Development, Power User, Software Development, Windows, Windows 8 | 2 Comments »

Delphi XE2 x64 Extended floating point support: CodeCentral 28488 TExtendedX87: FPU-backed 80-bit Extended type for Win64

Posted by jpluimers on 2011/09/14

in the Delphi 64 world, there is no official support for the Extended data type for various reasons.

If you really need it, then you can use the TExtendedX87 unit by Philipp M. Schlüter as mentioned in this Embarcadero forum thread.

–jeroen

Via: 28488 TExtendedX87: FPU-backed 80-bit Extended type for Win64.

Posted in Algorithms, Delphi, Delphi x64, Development, Floating point handling, Software Development | 2 Comments »

Two more FastMM XE2 updates on SourceForge.net in the SVN SCM trunk:

Posted by jpluimers on 2011/09/13

Earlier this week, I wrote about FastMM XE2 update on SourceForge.net in the SVN SCM trunk.

Pierre le Riche has been busy, and got the x64 FullDebugMode working with these two changes to the SourceForge.net: FastMM: SCM:

Needs to be tested, so will do that the upcoming days.

–jeroen

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

Triest bericht: de SDC gaat dit jaar niet door. De altijd kleurrijke conferentie van de SDN voor Nederlandse software ontwikkelaars heeft het dit jaar niet gehaald

Posted by jpluimers on 2011/09/12

Quote van de SDC site:

Helaas heeft de SDN moeten besluiten om SDC voor dit jaar (2011) van de agenda te halen.

In 2012 zullen wij opnieuw een SDC organiseren.

De aankomende SDE van 9 december is reeds in ver gevorderd stadium

Wij hopen u daar te mogen begroeten

Echt heel jammer, want de SDC bracht al heel lang kleur in het landschap van de Nederlandse software ontwikkelaar, juist vanwege de keur aan sprekers (ze haalden altijd de meeste interessante sprekers uit buiten- en binnenland).

SDC (en haar voorloper CttM) was erbij toen Clipper begon, Delphi begon en .NET begon. Warme herinneringen komen boven aan al die prachtige conferenties, en mensen die ik er heb leren kennen.

Laten dus hopen dat het volgend jaar gewoon weer door gaat.

–jeroen

via SDN – Software Development Network > SDN > SDN Event > SDN Conferences 2011.

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

FastMM XE2 update on SourceForge.net in the SVN SCM trunk

Posted by jpluimers on 2011/09/11

Pierre le Riche just committed two changes to the SourceForge.net: FastMM: SCM:

Which means that I can demo this during my DelphiLive sessions.

Great work Pierre!

–jeroen

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

Arrived in San Jose, CA, USA for the DelphiLive tutorial and conference (DelphiLive people get internet free!)

Posted by jpluimers on 2011/09/11

I had a pretty OK direct KLM flight from AMS to SFO.

Apart from some people behind me that seemed to have sufficient motoric coordination issues that they had to grab my chair each time they got up, or put their traytable up.  Some – even Dutch! – seem to think that using force is the only way to get things done. So thank you people in seats 28H, J and K for ruining my sleep.
The advantage of being in seat 27H in a Boeing 747-400 is that you get food really fast, and have direct access to drinks from the galley :)

Frank Stepan – one of the DelphiLive organizers – picked me up at the airport, and got me to the conference hotel in Downtown San Jose.

Check in went smooth.

Connecting to the Internet too: it is a breeze, compared to the Swisscom experience at the NH Hotel in Köln last week.

Not as fast as the KOMED internet on saturday, but you have two choices:

FreeDowntownWifi, which is – err – free. And has reasonable speed.

iBAHN internet, which is – err – free for DelphiLive attendees ans speakers. And also has reasonable speed.

So I upgraded my iPad firmware, downloaded the new TomTom USA Map, and synced my gadgets to the cloud.

Time to do some final preparations on my tutorial and sessions, and then get something to eat.

–jeroen

Posted in About, Delphi, Development, LifeHacker, Opinions, Personal, Power User, Software Development, Travel | 1 Comment »

Bruno Fierens of TMSSoftware just showed their new chart that uses HTML5 with asynchronous event support cool!

Posted by jpluimers on 2011/09/10

An HTML5 grid with no flickering, very little delay and smooth appearance on both regular and iPad webbrowsers: at the Delphi-Tage.de conference, Bruno Fierens of TMS Software just showed their new IntraWeb HTML5 chart component as he promised on his blog.

Cool work in progress.

Should become public soon!

–jeroen

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