Friday, March 17, 2006

David I.'s sales pitch

I just received this from Borland - it's a Flash video featuring David I. demonstrating the best features of Borland Developer Studio 2006.

http://www.borland.com/media/en/edm/delphi_demo/delphi.html

I even got my name in there somewhere... ;)

Wednesday, March 15, 2006

Polymorphism ad nauseum

As all object oriented languages Delphi (née Object Pascal) supports the concept of polymorphism. Polymorphism is a Greek word that literally means many-shapes or many-forms. In programming-speak it refers to the idea that invoking a conceptual operation is detached from the actual implementation of that operation. In fact, at run-time the actual implemented operation may change radically depending on the type of the object being used to perform the operation.

One of the driving factors for OOP were graphical user-interfaces (GUIs). The archetypical schoolbook example of polymorphism follows the translation slavishly by using an abstract TShape base class with TRectangle and TEllipse descendants that override a virtual Draw routine. The main drawing routine loops over a list of TShape instances, calling the virtual Draw method - each call will be handled by a descendant and draw a rectangle or ellipse (or any other) shape.

In its most basic concept polymorphism is about changing the target address of a CALL instruction dynamically at runtime. From this angle the numbers of mechanisms that can provide polymorphism are many.

At the Delphi language level:
virtual
dynamic
message
procedure pointer
event (procedure of object)
interface
IDispatch

By using dirty hacks:
overwrite virtual method pointer
overwrite VMT pointer
overwrite message/dynamic slot
overwrite call-site address
overwrite callee instructions
overwrite DLL imports slots

I'll try to cover some of these in upcoming articles, so stay tuned!

Thursday, March 09, 2006

Verity Stob strikes again

Verity Stob is a legend in satirical computer writing. She has written columns for many magazines, including .EXE, Dr Dobb’s Journal and more recently The Register. Covering all aspects of computing and programming with stinging, half-serious satirical wit, she has also written some (IMO) hysterically funny old-testament style pieces of the more dramatic events in Borland and Delphi’s history.

The first piece appeared in the (now defunct) .EXE magazine in 1996(?) and was republished by The Register here. It covers the raise of Delphi/VCL as a VB-killer and descendent of Turbo Pascal and OWL, and finally Anders Hejlsberg’s move to Microsoft.

The second piece appeared only a few days ago in The Register. Predictably, it mocks the divesting of Delphi, but also covers such events as Dale Fuller’s departure, Tod Nielsen’s management speak, and Delphi 2005 quality issues. Verity also includes nuggets from the community’s non-tech discussions such as "Skype is written in Delphi" and improving the help system by following the PHP’s wiki-lead. She even throws in a Ballmer-inspired David I. for good measure.

The King-James-Bible style is hard to read, but probably fitting considering the religious-like cult of the Delphi community. The British angle and Monty Pythonesque humor is not for the faint-of-heart, but I think we should have enough self-irony to get a good laugh out of it.

I certainly did.

Update: David I. has written a calming and funny email to Ms. Stob, and got a reply!

Update II - New scrolls found
Thanks to my diligent readers, three additional Borland scrolls have been found. Here is the currently known list:

Wednesday, March 08, 2006

Comment moderation turned on

I'm sorry for the inconvenience, but in an attempt to eliminate comment spam I've had to turn on comment moderation for this blog (in addition to the word verification that was already there). This means that whenever you enter a comment, I have to manually approve and publish it. When you click on the "Post a comment" link below, you will be informed about this new policy:

Comment moderation has been enabled. All comments must be approved by the blog author.

Please don't post duplicate comments - your comment will be published soon, as long as it is not spam.

Tuesday, March 07, 2006

Classic Delphi and .NET book in the making

As I have mentioned earlier, I've been working until recently with tech-editing Jon Shemitz' upcoming book .NET 2.0 for Delphi programmers. The book has been taken a long time to complete, spanning the timeframe from the .NET DCCIL preview compiler to BDS 2006, from .NET 1.0 to .NET 2.0, and from VS 2002 to VS 2005. Due to print-schedule issues, the first books should be available in June 2006.

I may be biased having worked on and off with tech editing the book the last two years. In the end, I even contributed Chapter 10 on the new and improved features of the Delphi language since Delphi 7. Nevertheless, I'm one of the few that have read the book's chapters in their entirety (twice!), so I feel entitled to writing the first review of it ;).

In general, I very much like Jon's candid way if writing. He doesn't just describe how a system or API is working, he wants to figure out and explain why it works that way, how it compares with other technologies (Win32 and Java for instance). He doesn't talk down to us, reading the book rather feels like discussing the issues with a peer programmer.

I think the book will be very relevant for a large number of programmers. It will be useful to both beginners, intermediate and advanced programmers. Clearly, the book is primarily targeted at Win32 Delphi programmers that have or will take the step into the .NET world, or even just wants to have a better understanding of .NET from a Delphi programmer's perspective.

Like .NET itself, the book is primarily language agnostic with example code in C# and Delphi. While the author admits that C# is now his primary .NET language, the right-tool-for-the-job rule still applies. For a quick overview of the sections and chapters in the book, go to the author's book page here.

Conclusion
In my opinion this will be a classic Delphi book, one that should be on almost every Delphi programmer's bookshelf. In many ways it is a more readable, mature and Delphi-friendly version of Jeff Richter's Applied .NET Framework Programming. Note that the book does not cover specific IDE features - instead it gives you a comprehensive and practical understanding of .NET fundamentals, the CLR, the JITer, the memory and threading model, the FCL and the C# and Delphi programming languages.

Highly recommended!

Click here to order your copy at Amazon.

Update:
There have been some misunderstandings about the book's coverage of .NET 2.0 vs Delphi.

While it is true that Delphi does not fully support .NET 2.0 yet, the book is about .NET 2.0 nonetheless. And it is primarily targeted at existing Delphi programmers.

Delphi programmers can still use Delphi to program against .NET 1.1, or they can use C# to program against .NET 2.0. Or they can even use the Delphi command line compiler to compile and run against the .NET 2.0 framework, even though they cannot directly use 2.0 specific features such as generics. (I admit this is a little tricky.)

And when Delphi for .NET 2.0 becomes available, the book will still be highly relevant.

The book is mostly about .NET 2.0 (but it does explicitly mention what is new in 2.0 compared to 1.1), but it is (AFAIK) the only .NET boook from the perspective of a Delphi programmer.

It doesn't contain much IDE specific information (BDS or VS), concentrating more on the .NET foundations, FCL and at the language level of C# *and* Delphi.

The book contains a great deal of Delphi code both in inline samples and as complete online examples. And explanationsxplainations of how to do things in Delphi, how things compare with Win32 Delphi, etc. One chapter (10) is only about the Delphi language changes, for instance.

It will be very relevant for users that wants to:

  • Learn about .NET
  • Learn about Delphi for .NET (on a language level)
  • Learn about how to target .NET with Delphi
  • Learn about how to target .NET with C#
  • Use the right tool for the job

So it is a very pragmatic book, describing the world as it is, letting the programmer decide what tools he wants to use in each specific situation.

Friday, October 28, 2005

Recordings of 24h of DeXter

The recordings of the 24 hours of Dexter sessions are now available in streaming and downloadable mp3 formats. There is a ton of interesting high-quality technical listen material here.

Not totally unbiased, I must recommend my own session where I talk about two samples that will most likely be included on the Delphi 2006 CD (a Delphi7 compatible memory manager, and a TComplex record with operator overloading for Win32), Jon Shemitz' upcoming classic .NET for Delphi programmers book (where I am the technical editor and may end up contributing an Appendix on the Delphi language), and our great products at Infront AS, including The Online Trader™, X-Quote™ and WebBroker On Steroids based WebQuote™ engine.

Other recommended sessions (I haven't heard them all yet) are:

Danny Thorpe - "Danny details the new Delphi compiler enhancements in DeXter, such as records with methods and operator overloading in Win32, and improved function inlining."

Allen Bauer - "Allen discusses the new features of the DeXter IDE."

Pierre Le Riche & John O'Harrow - "Pierre talks about the new memory manager in DeXter. He discusses backward compatibility, the new features, as well as the differences in behavior between the old and new memory managers. He will also give a technical insight into the inner workings of the new memory manager. John discusses the Fastcode project: What it is, who it is, the history behind it, and the contribution that it has made (and continues to make) to Delphi and the Delphi developer community. He also mentions some of the improved runtime library functions that were developed by the Fastcode project and are now incorporated into DeXter."

Chris Hesik & Alastair Fyfe - "Chris and Alastair cover all that is new, improved and cool about the Integrated Debugger for Dexter, including features for both native and managed debugging. They also discuss what C++Builder 6 users can expect from the debugger when moving to Dexter."

But by all means, do check out the other sessions - I'm sure you'll find your own favourites. 
     
During the interview and live chat I got some questions about where my "stuff and tools" can be downloaded. I might blog more about some of these items later, but you can browse and download several of my tools from Borland's excellent CodeCentral repository.

I'd also recommend reading my The Delphi Magazine articles, including the one in issue 82 about the WOS (WebBroker On Steroids) framework. If you haven't already, do yourself a favour and order the CD with all the back issues - a real gold mine of high-quality information. Most of my articles come with source that can be downloaded for free here.

Let me know if there is any of this stuff you'd like me to blog about.

Monday, October 24, 2005

I'll be on the 24 Hours of DeXter live audio chat!

Borland's amazing live audio chat, 24 Hours of DeXter, is on as I write this (10:47 Oslo time). You can plug-in and listen to the audio, join the text chat to ask questions (roomkey is "livechat"), and even win prizes if you register your presence! Be sure to tune in around 16:00 Oslo time (15 GMT, 07 AM CA time) when I will join the audio chat:

"Hallvard will talk about his Win32 memory manager clone, and his Win32 record operator overloading example for DeXter. He will also talk about his company's new product, the leading Nordic financial real-time information and trading product, The Online Trader, and how they developed it using native Delphi."

Be sure to /ask some cool questions from the chat window!



Copyright © 2004-2007 by Hallvard Vassbotn