Sigh...Delphi is good enough to write crap



I knew this was going to hurt:
a code review of all of our apps, focusing on

1) code that works
2) efficient code
3) code that plays nicely with the OS
4) fragile code
5) questionable algorithms
6) code that only works sometimes
7) code that doesn't work
8) inefficient code
9) code that works in one environment but not another
10) code that works but trashes the system

There's no particular order for these, and I'm very embarrassed about
how my own apps scored.

Unfortunately, I have managed to write a fair few #7s

#4 probably covers some of the rest, but is included as a catch-all

Where I have scored badly, I have tried to see how I could write the
same thing better, or if I could do it better in C, C++, Java, or some
other language.

Maybe it is my familiarity with the Delphi language that makes me want
to try again, but in each case I have found that I cannot improve what I
have been trying to do by switching languages. Every single case of bad
code that has been identified as a problem has been easily fixed by
slight tweaks to the Delphi code.

The thing that I find most difficult is the string handling in Delphi.
Not that I find it difficult per se, more that I find it difficult to
get things wrong in the spectacular ways that C and C++ programs often
manage to get things wrong when handling strings. It is easy to write
phenomenaly inefficient string handling routines in Delphi which (bad as
they are) will still work flawlessley.

I'm still a D7 programmer. I'm kinda stuck there 'coz I have no idea
how I can achieve some of the things that my apps are required to do in
..NET

I've read about a hack that can be used to make the IDE start faster
that has to do with discovering unit names in packages (and a limitation
in the loader mechanism that makes the hack essesntial)

All of my apps depend on a package which is in itself a package loader
which circumvents this limitation without hacking the IDE, but does rely
on some obscure Win32 stuff to do its magic.

It would be nice to re-write this package loader as some kind of .NET
assembly that could do the same thing (be a smart loader) but for the
moment I have no idea how to do this, or even if I should try.

The thing that bugs me is that all of the code to make this work, with
the exception of the package-loader magic, is pure Delphi classes and we
both know how powerful they can be. And even more irritating is that if
I supply the package loader class (and package) to the worst offenders,
they'll come up with some way to abuse it and tie it to either Win32 or
..Net.

Hence the post subject.

How can anyone stop people from writing crap Delphi code, releasing it
into the wild, and by so doing give Delphi a bad name?
.



Relevant Pages

  • Re: Attention doomsayers
    ... I am very worried where Code Gear, and more importantly Delphi will be in 3 years. ... One, is to seed the market with low to zero costs (not sure CodeGear can afford to do this), The Turbos are a good idea and can aid with this introduction. ... start making deals with third party vendors to create plugins for their environments. ... MS apps are at the point with VS 2008, ...
    (borland.public.delphi.non-technical)
  • Re: Attention doomsayers
    ... I am very worried where Code Gear, and more importantly Delphi will be in 3 years. ... One, is to seed the market with low to zero costs (not sure CodeGear can afford to do this), The Turbos are a good idea and can aid with this introduction. ... start making deals with third party vendors to create plugins for their environments. ... MS apps are at the point with VS 2008, ...
    (borland.public.delphi.non-technical)
  • Re: Attention doomsayers
    ... That independence is one thing that Codegear can bring to ... Delphi will be in 3 years. ... The JBuilder team used to include plugins for Vignette, ... Windows GUI apps, IMHO, is a no go. ...
    (borland.public.delphi.non-technical)
  • Re: Borland kills another developer tool
    ... and that is that Borland have stopped innovating. ... the Delphi team are buulding great new things all the time but I can't ... If the public interface of a package ...
    (borland.public.delphi.non-technical)
  • Re: Over 100 Microsoft MVPs Have Signed Online Petition - Give Us Back VB!!
    ... Microsoft tools are not cheap for lack of spending on them. ... > For the most demanding programmers, ... apps I know aren't thin data covers. ... >> FORTRAN code in any language, including Delphi. ...
    (borland.public.delphi.non-technical)