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

Archive for the ‘Conferences’ Category

EKON15 download materials on-line at bo.codeplex.com

Posted by jpluimers on 2011/11/03

I uploaded the EKON15 conference download materials to http://bo.codeplex.com.

The changeset you are after is http://bo.codeplex.com/SourceControl/changeset/changes/70872

It contains most of the materials for the Delphi Tage and the Delphi Live conferences too, though I will upload the missing pieces soon.

With the [WayBack] demise of codeplex, these links now have moved to

–jeroen

Posted in Conferences, Delphi, Development, EKON, Event | Leave a Comment »

EKON 15 conference news and discount (German text at the end of the blog post): Cary Jensen presents the keynote @caryjensen #ekon

Posted by jpluimers on 2011/10/11

EKON 15 – first day has many English sessions

From 26 till 28 of October, I’ll be speaking at the 15th EKON conference at the Renaissance Hotel in Düsseldorf, Germany.

I just sat next to the conference organizer, and he proudly announced that well known and long time Delphi guru Cary Jensen will be presenting the keynote on the evolution of Delphi from Delphi 1 to XE2.

I still have the disks marked “Wasabi” and “Mango” from the early 90s (and funny that Microsoft is using the same name for a 7.5 product, where Delphi 1 was a real revolution).

Next to the German sessions, there will be English sessions as well: Cary also does his other sessions that day (on cross platform development, windows services, and RESTful webservices).

Being a German conference, most of the other sessions will be in German, but it is good that the English ones are all in one day: you get a one-day visit to conference as a non-German speaker, get a discount and visit the beautiful city of Dusseldorf (especially the Altstadt is recommended).

Contact me for more information on discounts: there are both discounts for the English day and the full the whole conference.

On the EKON 15 site there is a nice conference planner and session overview.

Last but not least, on friday after the conference, Edwin van der Kraan and I will present a full day Delphi XE2 workshop covering x64, new VCL and of course FireMonkey cross platform development (so bring your Mac and iOS devices with you!).

15. EKON Konferenz – Delphi XE2 und mehr…

Vom 26. bis zum 28. Oktober findet die 15. Entwickler Konferenz (EKON) im Renaissance Hotel in Düsseldorf statt. Ich werde als Speaker ebenfalls vor Ort sein.

Als ich gerade mit dem Organisator der Konferenz zusammen saß, verkündete er mir stolz, dass Cary Jensen, bekannter und langjähriger Delphi-Guru, auf der EKON 15 eine Keynote zu Delphis Evolution von Delphi 1 zu XE2 halten wird.

Ich bin immer noch im Besitz von Disketten aus den frühen 90er Jahren, die mit „Wasabi“ und „Mango“ beschriftet sind (witzig dabei ist, dass Microsoft den gleichen Namen für ein 7.5-Produkt nutzt, während es bei Delphi 1.0 eine richtige Revolution gab).

Neben den deutschen Sessions werden auf der EKON auch Sessions auf English angeboten: Cary wird unter anderem auch über Cross-Plattform-Entwicklung, Windows Services und RESTful Web Services sprechen.

Zwar werden die meisten Sessions auf Deutsch gehalten, jedoch gibt es diesmal eine Besonderheit bei den englischen Sessions: Diese finden an einem Tag statt!
Somit können auch die Nicht-Deutschsprachigen für ermäßigten Eintritt an den Sessions auf Englisch teilnehmen und ganz nebenbei die schöne Innenstadt Düsseldorfs erkunden
(besonders die Altstadt ist sehr empfehlenswert).

Zu guter Letzt präsentieren Edwin van der Kraan und ich am Freitag einen ganztägigen XE2 Power Workshop zu x64, New VCL und natürlich zur FireMonkey Cross-Plattform-Entwicklung (bringen Sie also Ihre Macs und iOS-Geräte mit!).

Bei weiteren Fragen, Interesse und Infos über die Ermäßigungen können Sie mich gerne kontaktieren (Ermäßigte Preise gibt es sowohl für den English-Day als auch für die Gesamtkonferenz). Auf der Website finden Sie eine übersichtlichen Zeitplaner, die Sessions im Überblick und alle weiter Informationen zur Entwickler Konferenz.

–jeroen

Posted in About, Conferences, Delphi, Development, EKON, Event, Personal, Travel | Leave a Comment »

Just uploaded by BASTA.NET conference session materials on .NET Cross Platform Mobile Development on Windows 7, Android and iOS

Posted by jpluimers on 2011/09/27

This morning I gave a well attended session at the BASTA.NET conference on .NET Cross Platform Mobile Development on Windows 7, Android and iOS

If you were attending my session, or just interested in Cross Platform Development with a touch – pun intended – of .NET (and Mono, MonoTouch, MonoDroid, MonoMac, Xcode) then you can download the materials here: http://bo.codeplex.com/SourceControl/changeset/changes/70132 and http://bo.codeplex.com/SourceControl/changeset/changes/70133 (yes, 2 change sets: somehow with SVN  “Check for modifications” I still missed part of the batch).

It consists of the PDF with session slides and the demo apps based on an old (.NET 1.1 and .NET Compact Framework 1.0 era) C# tic tac toe demo (which was based on some Turbo Pascal sources from 20+ years ago), now revived for the Windows Phone 7 (with Visual Studio), iOS (with MonoTouch) and Android (with MonoDroid) platforms.

The conference is held at the beautifully designed Rheingoldhalle conference center adjacent to the Rhine (German: Rhein) river in Mainz, Germany.

Oh: and I enjoyed a bit of the great weather outside (while it lasts <g>).

–jeroen

Posted in .NET, BASTA!, C#, Conferences, Development, Event, Software Development | Leave a Comment »

Delphi XE2 FireMonkey: the reason you should not have used assembly

Posted by jpluimers on 2011/09/09

Right now, I’m porting a bunch of stuff over to FireMonkey in Delphi XE 2 so it can run cross platform.
(Be sure to attend the RAD Studio XE2 World Tour when possible, this stuff is way cool!)

Having avoided Windows x86 assembly in my own sources for years, I’m astonished by the number of 3rd party libraries that do.

Right now, third party libraries that you want to use with FireMonkey need these requirements:

  1. In order to run on x64 or OS X:
    Don’t rely on x86 assembly instructions, or provide alternatives for other platforms than Windows x86
  2. In order to run on the an iPhone, iPad or iPod touch iOS device (which all run on Arm), or iOS simulator from the iOS SDK (which is not an emulator, it runs x86):
    Be compatible with Free Pascal 2.5.1.

And the fact that you should have separated your business logic from your UI logic years ago :)

Of course that was what the Future proofing your Delphi apps seminar from Simon Stuart was about.

What baffles me is that so little 3rd party code adheres to that.

–jeroen

PS:

Today and tomorrow I’m be at the German Delphi-Tage.de conference; I’ve already met a lot of people in the Delphi XE2 tutorial and look forward to meet more tomorrow.
Contrary to what the schedule says, my session on a pragmatic Delphi code generator will be in German, I’m sure most attendees will like that.

Sunday I’ll fly to SFO to speak at the DelphiLive.com conference in San Jose, CA.
There, my preconference tutorial on Delphi Certification and sessions on XML and XSLT will be in English, as I’m sure more people there understand that better than German :)

Posted in About, Certifications, Conferences, Delphi, Delphi-Tage.de, DelphiLive, Development, Event, FireMonkey, Personal, Software Development | 6 Comments »

ISO 8601 Date, Time and DateTime in Delphi (was: Simple example to show DateTime.Now in ISO 8601 format on ideone.com | Online C# Compiler & Debugging Tool)

Posted by jpluimers on 2011/08/18

In the past I wrote about a Simple example to show DateTime.Now in ISO 8601 format on ideone.com | Online C# Compiler & Debugging Tool , using ISO 8601 in batch-files, and how ISO 8601 is used in Google Calendar URLs.

Time to write something about ISO 8601 Date, Time and DateTime and Delphi.

First of all the DateUtils unit contains a bunch of routines (for instance DecodeDateWeek) that understand ISO 8601 week numbers, where:

  • Weeks start at Monday
  • The first week of a year contains (these are equivalent):
    • The first thursday in that year
    • Has at least 4 days in that year
    • Contains the 4th of January

Otherwise the week containing January 1st is week 52 or 53 of the previous year

ISO 8601 also specifies how to format Dates, Times,  DateTimes and durations according to some basic principles.

XML uses ISO 8601 to format Date, Time and DateTime and some other formats as text too.

So it is no wonder that since Delphi 6, it contains a XSBuiltIns unit covering (among other things) ISO 8601 formatting.

Given the many Delphi ISO 8601 relates questions on StackOverflow of which I answered two, and my need for ISO 8601 DateTime conversion for exporting Excel XML, here is are some samples to get started in the unit below (and in this codeplex changeset).

The unit covers Date, Time and DateTime.
You can write similar code for Duration.

Oops, I covered it already in ISO 8601: Delphi way to convert XML date and time to TDateTime and back (via: Stack Overflow)

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, ISO 8601, Power User, Software Development | 4 Comments »

Speaking at DelphiLive! 2011 in San Jose, CA, USA from September 12th to 14th 2011

Posted by jpluimers on 2011/08/04

I’ll be speaking at a few conferences this fall.

The furthest for me will be DelphiLive! 2011 in San Jose, CA, which will be held from September 12th to 14th (slightly more than a month from now).

Note that if you want to come, the early bird discount is until augusts 15!

Part of the sessions and speakers lists are already published, but it will be extended shortly (some nice Delphi XE2 sessions are in the pipeline), followed by a workshop tutorials list, and agenda.

My sessions are going to be these:

Not everything for those sessions is set in stone yet, so if you have ideas for things I should include, exclude, emphasize or understate, please let me know.

I’m looking forward to meet (often again!) a lot of attendees and speakers.

The social part of conferences is very important too.
Last year, after the conference, a few speakers, attendees and other people had a marvelous steak dinner. Great fun!

Hope to see a few of my blog readers at one conference or the other.

–jeroen

PS: Like last year, the conference will be held at Crowne Plaza Hotel San Jose Downtown, 282 Almaden Boulevard, San Jose, CA 95113, USA (it has a special room rate of USD 139 per night for conference attendees).

PS2: Some more events will follow shortly.

Posted in Conferences, Delphi, DelphiLive, Development, Event, Software Development | 1 Comment »

ISO 8601: Delphi way to convert XML date and time to TDateTime and back (via: Stack Overflow)

Posted by jpluimers on 2011/07/19

Recently I needed a way of concerting back and forth ISO 8601 DateTime values used in XML from Delphi.

Thoug the Delphi DateUtils unit has some ISO 8601 features for calculating week numbers, you actually need to the XSBuiltIns unit for converting back and forth to ISO 8601 text representation of a DateTime.

I remembered answering the related In Delphi is there a function to convert XML date and time to TDateTime question on StackOverflow a while ago (and forgot that this was back in 2009 <g>).

ISO 8601 dates can either include a time-zone, or be in UTC, which is not part of that answer. So lets elaborate on that answer a bit now:

UTC times in ISO 8601 format end in a Z time zone designator like this:

    <Created>2011-06-29T17:01:45.505Z</Created>

The Z UTC indicator is basically a shortcut for a timezone offset of +00:00 or -00:00, effectively being a zero (or zulu) timezone.

Nonzero timezones start with an optional + or -, followed by the hours and minutes offset from UTC, for instance +01:00 for the Central European Time zone.

    <Created>2011-06-29T17:01:45.505+01:00</Created>

When you want historical time zones, then you need the Delphi TZDB interface to the historical TZ database.

To do the timezone calculations, I used the TimeZoneBias function from Indy, which is either in the IdGlobal unit (Indy <= version 9) or the IdGlobalProtocols unit (Indy 10 and up).

Conversion is done by using the TXSDateTime (that like all the XS conversion classes descends from TRemotableXS in the InvokeRegistry unit).

Most of the classes descending from TRemotableXS contain two methods: NativeToXS and XSToNative doing the underlying conversions.

Since I didn’t need the historical reference in the TZDB, this is the code that I came up with:

unit Iso8601Unit;

interface

type
  TIso8601 = class(TObject)
  public
    class function DateTimeFromIso8601(const Value: string): TDateTime; static;
    class function UtcDateTimeToIso8601(const Value: TDateTime): string; static;
    class function DateTimeToIso8601(const Value: TDateTime): string; static;
    class function UtcNow: TDateTime; static;
    class function ToUtc(const Value: TDateTime): TDateTime; static;
    class function FromUtc(const Value: TDateTime): TDateTime; static;
  end;

implementation

uses
  IdGlobalProtocols, {IdGlobal for Index   SysUtils,
  XSBuiltIns;

class function TIso8601.DateTimeFromIso8601(const Value: string): TDateTime;
begin
  with TXSDateTime.Create() do
  try
    XSToNative(value); // convert from WideString
    Result := AsDateTime; // convert to TDateTime  finally
  finally
    Free();
  end;
end;

class function TIso8601.UtcDateTimeToIso8601(const Value: TDateTime): string;
begin
  with TXSDateTime.Create() do
  try
    AsUTCDateTime := Value;
    Result := NativeToXS; // convert to WideString
  finally
    Free();
  end;
end;

class function TIso8601.DateTimeToIso8601(const Value: TDateTime): string;
begin
  with TXSDateTime.Create() do
  try
    AsDateTime := Value; // convert from TDateTime
    Result := NativeToXS; // convert to WideString
  finally
    Free();
  end;
end;

class function TIso8601.UtcNow: TDateTime;
begin
  Result := ToUtc(Now);
end;

class function TIso8601.ToUtc(const Value: TDateTime): TDateTime;
var
  Bias: TDateTime;
begin
  Bias := TimeZoneBias;
  Result := Value + TimeZoneBias;
end;

class function TIso8601.FromUtc(const Value: TDateTime): TDateTime;
var
  Bias: TDateTime;
begin
  Bias := TimeZoneBias;
  Result := Value - TimeZoneBias;
end;

end.

–jeroen

via In Delphi is there a function to convert XML date and time to TDateTime – Stack Overflow.

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 7 Comments »

Some great links to Quotes on Programming and Software Development #fun #bastacon

Posted by jpluimers on 2011/02/23

Many, many nice sayings have been done about Programming, Software Development, the people that do the work, etc.

I collected a few links to nice lists of them, and used some of them at my talk on The Best C# Extension Methods at the BASTA! Spring 2011 conference this week in Darmstadt, Germany (yes, I do speak German, don’t ask me about my German writing though <g>).

A few teasers:

Programming is similar to a game of golf.  The point is not getting the ball in the hole but how many strokes it takes.
~Harlan Mills

If debugging is the process of removing software bugs, then programming must be the process of putting them in.
Edsger Dijkstra

They don’t make bugs like Bunny anymore.
~Olav Mjelde

So here it goes:

Enjoy ;-)

BTW:
You can download all the sample code on my session from our bo.codeplex.com sourcecode repository.
If you want a PDF of the slides, just drop me an e-mail.

–jeroen

Posted in BASTA!, Conferences, Event, Opinions | Leave a Comment »

PowerShell: the 2 most common error messages for starters

Posted by jpluimers on 2010/11/11

I’ve waited for PowerShell to become pretty mature before diving into it:
Version 2 has been out for a year, no service packs have been needed, so time to get into it.

PowerShell code can be stored in scripts.
The convention is to use the .ps1 extension for that (even when running PowerShell 2.0. Lesson learned: don’t put version numbers in file extensions).

Having lots of scripting and programming experience, I was a PowerShell beginner, and similar people usually bump into a few error messages.

Luckily, lots of people have gone through that phase, so there is lots of help on the internet.
So this post is not only to show you about some common things you bump into when starting with PowerShell, but also about the power of the internet as a collective pool of knowledge.

This was the first error message I bumped into:

C:\bin>powershell first-script.ps1
The term ‘first-script.ps1’ is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
At line:1 char:16
+ first-script.ps1 <<<<

A message by mosoto (Marcel J. Ortiz Soto) answered this as one of the first in the search results for “is not recognized as a cmdlet, function, operable program, or script file”.
The reason for this error is that unlike cmd.exe (but similar to unix shells), PowerShell does not include the current working directory (.) in the search path.

Solution: prepend the directory for your script file, in this case by prefixing it with “.\”.

This immediately leads to PowerShell rookie error message 2:

C:\bin>powershell .\first-script.ps1
File C:\bin\first-script.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
At line:1 char:18
+ .\first-script.ps1 <<<<

Even though searching for “cannot be loaded because the execution of scripts is disabled on this system” quickly reveals a few posts describing the cause, the error message gives a hint: get-help about_signing.

Executing this on the command-prompt gets youa lot of help about signing:

c:\bin>PowerShell get-help about_signing

This is the summary:

  • PowerShell scripts can be signed.
  • PowerShell as a global execution policy defaulting to Restricted (see below).
  • By default, PowerShell does not want to run any scripts at all.
  • You can assign these values to the execution policy: Restricted, AllSigned, RemoteSigned and Unrestricted
    (note if not specified, the policy is global, so changing this changes it for your whole system, so better define the scope)

Documentation is at:

If you set the execution policy in all scopes to Undefined and the Group Policy is not set, the default execution policy, Restricted, is effective for all users of the computer.

This is how you ask for the current policy:

C:\bin>powershell Get-ExecutionPolicy

This is how you set the current policy to only require remote scripts to be signed:

C:\bin>powershell Set-ExecutionPolicy RemoteSigned

Now you can run unsigned local scripts.
Beware: if anyone sends you a virus in an unsigned PowerShell script, that can now be executed too!

Hope this helps a few other PowerShell rookies too :-)

–jeroen

Posted in CommandLine, Conference Topics, Conferences, Development, Event, PowerShell, Software Development | 2 Comments »

Delphi: Use TStrings to parse non-standard separated strings, and validate it with DUnit tests

Posted by jpluimers on 2010/09/08

Recently, I was at a client where in a project strings had to be split from:

'FI-150 1U; FI-049-I L=20 MM;LET OP LASVORM'

Into:

  • 'FI-150 1U'
  • 'FI-049-I L=20 MM'
  • 'LET OP LASVORM'

At first sight, this looks simple: Semicolon Separated Values and you are done.
Not so fast Mr Smart Alec: watch the optional spaces!

The best thing for problems like these is to start with an empty implementation that some units tests covering it.
I use DUnit for Delphi unit testing.

Unit testing should go with code coverage, but there are few Delphi code coverage articles.
I’ll get into code coverage later on, as I’m working with two of the code coverage people to get this to work nicely with Delphi 2010.

Mock objects can be a good addition to unit testing too, so in a future article, I will cover using mock objects with Delphi.

Read the rest of this entry »

Posted in Agile, Conference Topics, Conferences, Delphi, Development, DUnit, Event, Software Development, Unit Testing | 8 Comments »