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 ‘Debugging’ Category

CodeRage 4 session material download locations changed – CodeCentral messed up

Posted by jpluimers on 2009/09/18

Somehow, CodeCentral managed to not only delete my uploaded CodeRage 4 session materials (the videos are fine!), but also newer uploads with other submissions.

Since I’m in crush mode to get the BASTA! and DelphiLive 2009 Germany sessions done, and all Embarcadero sites having to do with their membership server perform like a dead horse, I have temporary moved the downloads, and corrected my earlier post on the downloads.

I have notified Embarcadero of the problems, so I’m pretty sure they are being addressed on their side as well.
Edit 20090919: Embarcadero indicated that between 20090913 and 20090914 there has been a database restore on CodeCentral. Some entries therefore have been permanently lost.

When I get back from the conferences, and CodeCentral is more responsive, I’ll retry uploading it there, and correct the posts.
In the mean time, be sure not to save shortcuts to the current locations, as they are bound to change.

The are the new download locations can all be found in my xs4all temporary CodeRage 4 2009 download folder.

This is the full list of my CodeRage 4 sessions and places where you can download everything: Read the rest of this entry »

Posted in .NET, ASCII, CodeRage, CommandLine, Conferences, CP437/OEM 437/PC-8, Database Development, Debugging, Delphi, Development, Encoding, Event, Firebird, InterBase, ISO-8859, ISO8859, Prism, Software Development, SQL Server, Unicode, UTF-8, UTF8, Windows-1252 | 1 Comment »

CodeRage 4: session replays are online too!

Posted by jpluimers on 2009/09/13

Embarcadero has made available the replays of the CodeRage 4 sessions.
You can find them in the CodeRage 4 sessions overview.

In order to download them from that overview, NOTE: To access this session replay, you must be logged into EDN. you can login or sign-up (which is free).

To make it easier to find all the relevant downloads, below is an overview of my sessions and their links.

Let me know what you use it for, I’m always interested!

Update 20090918: changed the download locations because CodeCentral messed up.
Read the rest of this entry »

Posted in .NET, ASCII, C#, C# 2.0, CodeRage, CommandLine, Conferences, CP437/OEM 437/PC-8, Database Development, Debugging, Delphi, Development, Encoding, Event, Firebird, InterBase, ISO-8859, ISO8859, Java, Prism, Software Development, Unicode, UTF-8, UTF8, Visual Studio and tools, XML, XML/XSD, XSD | 4 Comments »

CodeRage 4: session “Reliable Communication between Applications with Delphi and ActiveMQ” chat and Q&A transcripts

Posted by jpluimers on 2009/09/11

Not only can you download CodeRage 4 session on materials on Reliable Communication between Applications with Delphi and ActiveMQ, but below you can also find the chat transcripts below.

VIP Room Transcript with Q&A

(9/11/2009 8:13:51 AM) The topic is: Session Room 2 – “Reliable Communication between Applications with Delphi and ActiveMQ” by Jeroen Pluimers
(5:38:29 PM) Christine_Ellis [christinellis@chat.codegear.com/jwchat] entered the room.
(5:38:37 PM) Christine_Ellis left the room.
(5:38:46 PM) Robert_Evans [resevans@chat.codegear.com/jwchat] entered the room.
(5:46:29 PM) davidi: johnhofland asked: Do you have any expirience when the queue system (server) fails? We have an application where speed is less relevant then then the message has to be delivered. Are messages saved when bringing up again?. Answer: The Messaging system keeps it in the queue. when the recipient or server come up – the message gets delivered. That’s tbe beuty of the architecture.
(5:47:34 PM) Jeroen_Pluimers: https://wiert.wordpress.com/2009/09/09/coderage-4-session-materials-available-for-download/
(5:48:47 PM) Jeroen_Pluimers: http://en.wordpress.com/tag/coderage/
(5:52:14 PM) The topic is: Session Room 2 – “Using Unicode and Other Encodings in your Programs” by Jeroen Pluimers

Public Room Transcript

(9/11/2009 8:13:51 AM) Christine_Ellis has set the topic to: Session Room 2 – “Reliable Communication between Applications with Delphi and ActiveMQ” by Jeroen Pluimers
(9/11/2009 8:24:45 AM) Jeroen_Pluimers: hi everyone; jibber lost the connection, just like the web interface over the last couple of days.
(9/11/2009 8:25:11 AM) Jeroen_Pluimers: hopefully it stays alive for the next two sessions though.
(9/11/2009 8:25:49 AM) Nicole_Boivin: Sorry David. Wrong room. The comment was meant for Room 1. I am currently multi-tasking to the extreme: phone call, both sessions and an app for my phone info. In general I am impatient person. I insist that the apps I build launch under 2 seconds and I start to hammer them that fast. The clients are usually impressed.
(9/11/2009 8:28:20 AM) davidi: yes – don’t auto-create forms and load them dynamically. Delphi client apps can come up fast :)
(5:15:34 PM) b_fisher left the room.
(5:15:51 PM) Jeroen_Pluimers: If you have questions; please queue them up so I can start looking at them.
(5:15:58 PM) b_fisher [rcf2@chat.codegear.com/jwchat] entered the room.
(5:16:41 PM) Nicole_Boivin: So right David. Also proper management of resources, using in-memory databases such as TClientDataSet, fast components such as TVirtualTreeview, so on. Anyway at this point I am not only commenting in the wrong room but well beyond the time window for Michael Swindell’s presentation. I look forward to the downloads as my day job keeps interfering with my session attention. Cheers
(5:22:54 PM) Thomas_Grubb: Jeroen, I missed the very beginning. You are using the ActiveMQ to build one big distributed application or one application for a system of applications
(5:22:58 PM) Thomas_Grubb: ?
(5:24:19 PM) Jeroen_Pluimers: We use ActiveMQ to be able to switch the middleware from a Delphi+Firebase one (running on Windows) to a Java + Firebird one (running on Windows) or Java + DB/2 one (running on AS/400)
(5:25:13 PM) Jeroen_Pluimers: the really cool thing is that clients do not need to know anything about the servers (or maybe I should say ‘senders’ to clients and ‘receivers’ to servers)
(5:25:39 PM) Jeroen_Pluimers: so you can switch on the fly, or even (if you keep everything stateless) have a server farm or fall back scenario
(5:27:37 PM) Thomas_Grubb: Was there ever a concern with your project about being tied to one middleware? For many years, I worked for NASA’s GMSEC (now open source), which is a multi-language message oriented abstraction API that supports multiple middleware (Tibco SmartSockets, GSFC Message Bus, and I believe IBM WebSphere and ActiveMQ as of this month), e.g., write to the C/C++/Java/Perl API and it can work with any of those middleware, allowing them to be swapped out. (I wrote a Delphi API to GMSEC, but it was dropped because no customers were requesting it :-( )
(5:29:06 PM) Jeroen_Pluimers: Since ActiveMQ is well known, has been stable for a long time, and runs on many platforms, it was never a question to switch to other types of middleware.
(5:29:49 PM) Thomas_Grubb: The reason GMSEC existed is because middleware kept coming and going too fast for our customers (NASA likes to think long term). At one time, GMSEC has supported ICS’ Message Bus, Elvin, and a few others.
(5:30:21 PM) Thomas_Grubb: How is the speed of ActiveMQ with Delphi?
(5:30:34 PM) Jeroen_Pluimers: This whole project is a proof of concept, so no ‘really long term’ things yet.
(5:31:33 PM) Jeroen_Pluimers: If you keep your connection open, it is really quickly. Within a VM you can have round trips (client sends request so server; server sends response back to client on a different queue) in milliseconds
(5:31:54 PM) Jeroen_Pluimers: this includes the XML serialization/deserialization
(5:32:15 PM) Thomas_Grubb: Message Oriented Middleware are extremely cool and definitely the way to go for a large distributed system of applications (like a satellite control center)
(5:32:28 PM) Jeroen_Pluimers: it is!
(5:33:18 PM) Thomas_Grubb: The reason I asked about the Delphi overhead is because I mis-wrote the Delphi wrapper for GMSEC and it doubled the time (but was 10x easier to use)! :-)
(5:34:01 PM) Jeroen_Pluimers: Oops :-)
(5:34:44 PM) Carlos_Adolfo_Garcia_Anaya [dolfuz@chat.codegear.com/jwchat] entered the room.
(5:36:19 PM) Carlos_Adolfo_Garcia_Anaya: I can’t enter to the conferecnes, is there any problem now?
(5:36:37 PM) Thomas_Grubb: Of course, since the comm time was the real concern it only became a problem when hundreds of messages started coming in per second
(5:36:40 PM) Jeroen_Pluimers: @Carlos: Live Meeting is up and running fine here
(5:36:52 PM) Carlos_Adolfo_Garcia_Anaya: :( thanks jeroen
(5:37:35 PM) Jeroen_Pluimers: @Thomas: so your Delphi stuff was server as well as client?
(5:38:26 PM) Robert_Evans [resevans@chat.codegear.com/jwchat] entered the room.
(5:38:53 PM) Erwin_Mouthaan [mouthaane@chat.codegear.com/jwchat] entered the room.
(5:39:46 PM) davidi left the room.
(5:40:31 PM) davidi [davidi@chat.codegear.com/jwchat] entered the room.
(5:47:23 PM) Borland [jajackson@chat.codegear.com/jwchat] entered the room.
(5:47:29 PM) Thomas_Grubb: Thanks for your presentation. It’s great to see Delphi being used with MOMs!
(5:47:35 PM) Thomas_Grubb: About your question, the Delphi/GMSEC stuff was concerned with the client. The middleware provided the server code and was hidden from the clients. (In the context of your project if I understand it correctly, the Firebird app would be considered another client)
(5:47:40 PM) Jeroen_Pluimers: https://wiert.wordpress.com/2009/09/09/coderage-4-session-materials-available-for-download/
(5:47:41 PM) Neville_Cook [neville+cook@chat.codegear.com/jwchat] entered the room.
(5:47:48 PM) Thomas_Grubb: Got to go now… Good luck with your other presentations
(5:47:55 PM) Jeroen_Pluimers: Bye Thomas!
(5:48:03 PM) Thomas_Grubb left the room.
(5:48:43 PM) Jeroen_Pluimers: http://en.wordpress.com/tag/coderage/
(5:50:15 PM) Neville_Cook left the room.
(5:52:14 PM) Christine_Ellis has set the topic to: Session Room 2 – “Using Unicode and Other Encodings in your Programs” by Jeroen Pluimers

–jeroen

Posted in Component Development, Database Development, Debugging, Delphi, Development, Encoding, Firebird, Java, Software Development, Unicode, XML, XML/XSD, XSD | Leave a Comment »

CodeRage 4: session “Practical XML in Delphi” chat and Q&A transcripts

Posted by jpluimers on 2009/09/09

Not only can you download CodeRage 4 session on materials on Practical XML in Delphi, but below you can also find the chat transcripts below.

Note the times are a bit odd: when the chat window refreshes, it sometimes uses the PST time zone, but new posts are using the local time zone.
Hence the sudden jump from 9 AM to  almost 6 PM.

VIP Room Transcript with Q&A

[5:46:28 PM] <davidi>

Q: thomasgrubb asked: “Is there an implementation for XMLDocument (for Delphi Win32) that is file-mapped, e.g., the whole doc is not loaded into memory?”
A: Not that Jeroen is aware of.
[5:46:54 PM] <davidi>

Q: thomasgrubb asked: “Is there an implementation for XMLDocument (for Delphi Win32) that is file-mapped, e.g., the whole doc is not loaded into memory?”
A: Not that Jeroen is aware of. Send Jeroen an email and he will blog about other solutions.
[5:47:20 PM] <davidi>

Q: thomasgrubb asked: “For Embarcadero Technologies: Are you going to develop a better option for validating XML on the Win32 side in the future?”
A: David I – replied – I will forward this to R&D and Product management
[5:53:14 PM] <davidi>

Q: devtux asked: “are you using any XML test generator? Please, suggest one if yes”
A: XMLSpy
[5:53:47 PM] <davidi>

Q: richz asked: “I’ve been trying for weeks to find out how to have the Win32 Delphi IDE generate code to serialize/de-serialize my class properties to an XML file. Is there anything in the IDE to do that?”
A: From Delphi 2010 on – you can use DBX support for JSON!

Public Room Transcript

[7:58:58 AM] * Christine_Ellis has set the topic to: Session Room 2 – Next Session”Practical XML in Delphi” at 8AM PDT
[8:02:15 AM] <Jeroen_Pluimers> Starting livemeeting
[8:03:59 AM] * Jeroen_Pluimers is wondering why LiveMeeting is always asking for email/company. Does it suffer from Korsakov’s disease?
[8:07:34 AM] <Christine_Ellis> It asks because we tell it to.
[8:08:22 AM] <Jeroen_Pluimers> but it never remembers, even if you start it with the same session parametes.
[8:08:41 AM] <Christine_Ellis> live meeting doesn’t use cookies and doesn’t know who you are
[8:08:47 AM] <Jeroen_Pluimers> ok.
[8:09:29 AM] <Jeroen_Pluimers> can we do a quick audio test?
[8:12:48 AM] <Jeroen_Pluimers> I mean: fro my current Microphone; it works with sound recorder, but wonder if Live Meeting will get it today as well.
[8:15:55 AM] * Christine_Ellis has set the topic to: Session Room 2 – “Practical XML in Delphi
[8:35:37 AM] <Peter_Wolf> a lot of memory = usually 10 timer more than the size of XML file bytes
[8:36:27 AM] <Peter_Wolf> … the size of XML file in bytes
[8:39:14 AM] <Jeroen_Pluimers> @Peter: that totally depends on what you use to read that XML. The MSXML and Internet Explorer are notorous memory hogs. But .NET is much more efficient on memory usage.
[8:40:15 AM] <Peter_Wolf> i ment MSXML which is default for most users
[8:41:17 AM] <Jeroen_Pluimers> @Peter: yup, that’s why I mentioned that as the first one. Most of the Win32 users will use MSXML, because that is the default for Win32.
[8:43:45 AM] * Jeroen_Pluimers warns: be carefull where you press ESC in IE: it can unload your chat window.
[8:47:29 AM] <Scott_Hollows> my brain hurts
[8:48:57 AM] <Jeroen_Pluimers> Scott: let me know later on if I can make it more clear to you.
[8:50:27 AM] <Ryan_Ford> Will this presentation be available for download?
[8:51:05 AM] <Jeroen_Pluimers> @Ryan: yes it will.
[8:52:59 AM] <Ryan_Ford> Its so nice to run 8GB for development
[8:52:59 AM] <Jeroen_Pluimers> @Ryan: the session materials are available for download here: https://wiert.wordpress.com/2009/09/09/coderage-4-session-materials-available-for-download/ The replays will be available for download after the conference.
[8:58:56 AM] <Jeroen_Pluimers> My VIP room died.
[9:00:08 AM] <AbsaLootly> … you have to hate it when that happens…
[9:01:46 AM] <Ryan_Ford> What alternatives for MSXML are there for WIN32
[9:02:22 AM] <Peter_Wolf> it also takes forever to open really big XML files wh MSXML
[5:45:31 PM] <AbsaLootly> I saw one developer try to put an entire database in one xml file… it took several hours to load it.
[5:51:59 PM] <Jeroen_Pluimers> MSXML
[5:52:03 PM] <Jeroen_Pluimers> ADOM XML
[5:52:05 PM] <Jeroen_Pluimers> Xerces
[5:52:56 PM] <Jeroen_Pluimers> That straight from the Delphi 2010 TXMLDocument.DOMVendor property
[5:53:25 PM] <Jeroen_Pluimers> XMLSpy can generate test ML
[5:54:16 PM] <Rich__> Thx
[5:55:17 PM] <Jim_Ferguson> Can you briefly describe JSON?
[5:56:02 PM] <Jim_Ferguson> what tool do you use transcribe your chat?
[5:56:23 PM] <Jon> it’s called a keyboard :)

–jeroen

Posted in .NET, CodeRage, CommandLine, Conferences, Database Development, Debugging, Delphi, Development, Encoding, Event, ISO-8859, ISO8859, Prism, Software Development, Source Code Management, TFS (Team Foundation System), UTF-8, UTF8, Visual Studio and tools, XML, XML/XSD, XSD | Leave a Comment »

CodeRage 4: session materials are available for download« The Wiert Corner – Jeroen Pluimers’ irregular stream of Wiert stuff

Posted by jpluimers on 2009/09/09

My CodeRage 4 session materials are available for download:

CodeRage 4 is a free, virtual conference on Embarcadero technologies with a lot of Delphi sessions.
It is held from September 8 till 11, 2009, i.e. while I write this :-)
If you want to watch sessions live, be sure to register through LiveMeeting (the technology they use for making this all happen).

Let me know if you download, and what you are using the sample code for.

–jeroen

Posted in .NET, CodeRage, CommandLine, Conferences, Database Development, Debugging, Delphi, Development, Encoding, Event, Firebird, InterBase, ISO-8859, ISO8859, Prism, Software Development, Source Code Management, SQL Server, TFS (Team Foundation System), Unicode, UTF-8, UTF8, Visual Studio and tools, XML, XML/XSD, XSD | 4 Comments »

CodeRage 4: sessions recorded; Delphi 2010 migration was a beeze; samples/slides will be uploaded soon

Posted by jpluimers on 2009/09/05

I just finished recording my CodeRage 4 sessions:

  • Practical XML in Delphi
  • Reliable Communication between Applications with Delphi and ActiveMQ
  • Using Unicode and Other Encodings in your Programs

CodeRage 4 is a free, virtual conference on Embarcadero technologies with a lot of Delphi sessions.
It is held from September 8 till 11, 2009, i.e. next week :-)
If you want to watch sessions live, be sure to register through LiveMeeting (the technology they use for making this all happen).

This week, I found some time do migrate all the sample projects to the release versions of Delphi Win32 2010 and Delphi Prism 2010.

Delphi Win32 2010 works like a charm: it is much faster and has a much smaller footprint than any other Galileo based IDE.
In fact, it feels almost as fast as the pre-Galileo based IDE’s.
With the added benefit that all the new features make me much more productive, not the least because it has not yet crashed on me this week once.
Crashing has been a frequent thing on me since Delphi 4 (maybe I should not even mention that number ), for most IDE’s at least a couple of times a week, so this is good.

Delphi Prism 2010 works really nice too, it is rock solid, and the language as some great features not found in other .NET languages.
But it still needs a tiny bit more polishing on the Visual Studio IDE Integration part.
There are a few things not as smoothly integrated as I’m used to in C# and VB .NET (for instance when adding assembly references; C# and VB.NET allow you to do that from multiple places in the IDE; Delphi Prism from only one).
I know it is nitpicking (the same holds for the Team Foundation System integration in the Visual Studio IDE: ever tried to add files or folders? There is only one icon that allows you to do it. Ever tried to move files or folders around? No way you can drag & drop, in fact you can move only 1 file or folder at a time, and then the folder tree leaves you at the target).

The Embarcadero folks have worked hard on developer productivity in the Delphi Win32 2010 IDE.
(Did I mention the F6 key? It is an awesome way of directly jumping into configuration dialogs a zillion levels deep.
Did I mention the Ctrl-D key? It instantly reformats your source code to your formatting settings).
So maybe it is now time to put some of that effort into the Prism side as well.

Back to my CodeRage sessions: the recordings are done, they will soon become available as downloads together with the samples/slides.

Keep watching :-)

–jeroen

Posted in .NET, CommandLine, Database Development, Debugging, Delphi, Development, Encoding, Event, Firebird, InterBase, Java, Package Development, Prism, Software Development, Source Code Management, TFS (Team Foundation System), Unicode, Visual Studio and tools, XML, XML/XSD, XSD | Leave a Comment »

Delphi – Using FastMM4 part 2: TDataModule descendants exposing interfaces, or the introduction of a TInterfacedDataModule

Posted by jpluimers on 2009/08/10

This is the second post of a series of posts around using FastMM4.
The start of the series contains a listing of other posts as well and will be updated when new posts become available.

One of the larger projects I’ve becoming involved in, uses a pattern that uses TDataModule descendants exposing interfaces.
Interfaces in Delphi are nice: if used properly, you have reference counting that will automatically free the underlying objects if there are no references left to them.

When you do not do interfaces in Delphi properly, you are bound to have a lot of memory leaks, and this is one of the cases where we did.
The client choose to do testing and QA very late in the product cycle, and we choose to use FastMM to do memory debugging.
Lo and behold: a truckload of memory leaks appeared all having to do with those datamodules.

As a side node:
Another thing we bumped into at an earlier stage was lifetime management in general: (both interface and object) references were kept to objects long after they were disposed.
That caused a lot of EAccessViolation
pain.
It is best not to mix the “interface reference” pattern with the “owned component” pattern: you usually end up with many more EAccessViolation exceptions.

This article is about finding the memory leaks caused by the way the interfaces were exposed from the TDataModule descendants, and a solution for preventing them by introducing the concept of TInterfacedDataModule.
Read the rest of this entry »

Posted in Conference Topics, Conferences, Database Development, Debugging, Delphi, Development, Event, FastMM, Software Development | 10 Comments »

C#/.NET – Small TextBoxTraceListener for quick and dirty tracing in Windows.Forms applications

Posted by jpluimers on 2009/07/15

Don’t know how many decades ago I got the idea, and there are probably dozens of unfinished samples like these, but below is complete one.

bo.Forms.TextBoxTraceListener.

But first the feature list:

  • Allows Trace statements to be catched in a TextBox (you probably guessed this from the name TextBoxTraceListener)
  • Works in both the UI and non-UI threads (so it does not fail when calling from a non UI-thread)
  • Supports Write and WriteLine (no need to override the others as they all come down to this)
  • Does not do indentation (hey, it’s quick and dirty!)

Note that TextBox.Text is not meant for large amount of data, or frequently appending to the data, but again: it’s meant as quick and dirty, not as your tracing ‘silver bullet’.

Read the rest of this entry »

Posted in Debugging, Development | Leave a Comment »