Skip to content

{ Category Archives } Delphi

Building a Generic Statistics Library, Part 2: Unit Tests

Since I have a signature, I have enough to start writing unit tests, even without an implementation. Not only does this allow me to check that my implementation works, it’s also a convenient way to run routines in a library-in-progress, without building a "throwaway" user interface.

Building a Generic Statistics Library, Part 1: Interface

In the comments to another post on the subject of Delphi 2009 generics, Raymond asked for an implementation of MapReduce. I thought about how I might demonstrate that in the context of generics, and decided that implementing the higher order functions Fold and Map would be a slightly better demonstration than MapReduce. But since higher order functions can be a pretty abstract concept, I wanted to show an example of how you might use them, so I will use these functions to build a library that does some simple statistical operations, namely, computing the average and the standard deviation of a list of numbers.

D2009 Generics and Type Constraints

The .NET type system is rooted at System.Object. The Delphi/Win32 type system isn’t rooted (built-in simple types, records, and classes don’t have a common ancestor), and primitive types can’t/don’t implement interfaces, so someone in the newsgroups asked how to deal with generics which must perform operations on primitive types, without the use of IComparable, et. [...]

An Enumeration of Prime Numbers with Anonymous Methods

In this post, I am going to demonstrate a programming technique which cannot be done without anonymous methods (or lambda expressions). I’ll throw in some generics for fun.

FullTrust on the LocalIntranet

I had missed this before, but with .NET Framework 3.5 SP 1, Microsoft has changed the default permission for LocalInternet to FullTrust. It can do this because .NET 3.5 SP1 also installs .NET 2.0 SP2 and .NET 3.0 SP2. This should effectively end the headache that many Delphi for.NET developers experienced when referencing (instead of [...]

Generics: Not Just for Lists

It appears that the next version of Delphi, code-named Tiburón, will include support for generic types in the Win32 compiler. Developers without .NET experience may not be familiar with use cases for generics. Of course, generics work really well for typed containers, and this is often the first example that people give as a use case. But they have many other uses as well. I’ll give a few examples; I hope this will help Delphi developers think about how they might want to use the feature in their own code.

Tagged ,

Understanding Anonymous Methods

It appears that the next version of Delphi will support a feature called anonymous methods. The circumstances in which one might use an anonymous method do not seem to be obvious to everyone in the Delphi community, so I’m going to attempt to answer that.

JAWS, XP Themes, and Accessibility

It seems that the popular screen reader (software which translates text on the computer screen into spoken audio for the blind) JAWS has problems with applications produced in Delphi when they are manifested for Windows XP.  I don’t know if the problem is limited only to Delphi applications, though.  What I do know is that [...]

If You Use OnUpdate, Your Code Must Be Perfect

I’ve never particularly liked the idea of OnUpdate events.

New Delphi Blog

MelanderBlog is the home of Anders Melander, who, among other things, developed the TGIFImage component included with Delphi 2007. This site includes a number of useful Delphi components.
Share This | Email this page to a friend

Bad Behavior has blocked 713 access attempts in the last 7 days.

Close