Quantcast
Channel: Planet Object Pascal
Viewing all 1725 articles
Browse latest View live

Delphi Code Monkey: ARC is awesome: My comments on Allen Bauer 's blog

$
0
0
Allen is a pretty talented guy, and he has a long history and deep insights into the history of Delphi.  I can confirm (from outside the Embarcadero/CodeGear fold) that everything he says is exactly the way it is, even the motivation for .Net being that Microsoft planned to "yank" the Win32 platform out from under us Win32/VCL programmers, and force everybody onto new "managed" .Net runtime APIs, to the point that existing Win32 APIs would be a "penalty box" environment, a sandboxed subworld inside the real windows, the equivalent of the NTVDM, the virtualization layer that kept 16 bit DOS mode executable compatibility around in Windows even as recently as Windows 7 32 bit.   You may remember that NTVDM only went away when we got to the 64 bit Windows world, because Win32 is a virtual layer inside the main windows environment, now known as "WOW" (Windows-on-Windows).    As being at the root of the platform's APIs is key to Delphi being Delphi,   the now mostly dead and buried "Delphi for .net" product seemed necessary to Delphi's continuing health and it having a future on a .Net-only Windows world, that never materialized.


If Embarcadero could ship a WinRT targeting version of Delphi, they would have already. But Microsoft is holding all the keys, as they have meticulously crafted a sandboxed, signed, Apple-App-Store rip-off mode inside Windows 8.   But WinRT is just a "penalty box" inside Windows 8.  Rather than enabling new features, it is primarily notable for what it takes away.   In Windows 8 AppStore/WinRT applications, your application does not get to decide when it runs, and is more heavily "managed" by a power-consumption-optimizing user shell that is more similar to Windows Phone,  iOS, and Android than it is to classical Windows programming. It's also heavily asynchronous, and if you haven't noticed code-samples for Windows 8 WinRT applications in C# make heavy use of the "magic"await keyword in C#.   I am not slavering for such magic to appear in Delphi, because such magic has a dark underside.     Just as .Net garbage collection has a dark underside.

Does ARC have a difficult and dark underside?  Not really.  But there are a few things to be aware of in reference-counting based memory management, things you probably already should know if you are a competent Windows COM/DCOM programmer, things like:

  • Reference counting cycles are something that happen when object A holds a reference to B and object B either directly holds a reference to A, or holds a reference to something else that holds a reference to A.    A "directed acyclic graph" means "a bunch of dots with lines in between them, and each line has an arrow, sort of line a one-way street sign, and you could follow the arrows any way you like, but never end up back at a node you had previously visited." If your references are like that, they could in some way be considered a "tree" instead of a "spiderweb".  In your "tree" of objects there are no cycles.  If however your application has more of a spiderweb structure, then you will need to learn how to break these cycles.

  • Breaking reference counting cycles is easy to do in a CLANG/LLVM based ARC scenario, such as Objective-C in XCode, and the same is true in Delphi on iOS.  Weak references are the answer.  Weak references are really cool.  They are like a C++ smart pointer on steroids.   The compiler and its code generation back ends provide some really strong guarantees that enable you to work with a really easy to use programming model.  If the object pointed to by a weak reference still exists, you get that object. If it does not, you get a null (or nil if you like) object reference.  If you were curious how this worked when you first heard about it, you might want to read up on the Apple Clang/LLVM documentation on Weak references, because the Delphi implementation and mechanics are almost 100% guaranteed to be the same, since they're based on the same LLVM code.    Weak references are expensive.  They slow your application down, but remember that correctness (not crashing) is always more important than performance.  It would be a real mistake to pathologically avoid weak references where they are the correct solution just because they can introduce performance issues if abused or used too much.  On the other hand, if you can avoid circular references completely in your design, then you avoid the problem of refcount cycles for free.  Use your head, and choose on a case-by-case basis, and optimize after profiling and running and testing your code, not before.
Having used Objective-C with manual memory management (retain and release calls), and with garbage collection (which was crap, and is going away out of Objective-C), and now having used Objective-C with ARC, I am very happy to see ARC coming to Delphi.

I predict that when ARC comes to delphi on VCL Windows Desktop, a lot of old crap in your codebases is going to have to go away including:

  • Length delimited string syntax like  string[30] which is really the ancient shortstring type from TurboPascal
  • A lot of old compiler flags to turn on dos-mode real48 compatibility,  alias string to shortstring ({$H-}) 
  • UPDATED When I first looked at ARC, I thought Variant Records might be incompatible with it, but actually upon reflection, I'm guessing that there will just be continued restrictions on the combination of Variant Records with Managed Types, which is already the case today. You can't put an AnsiString in a Variant Record for example. So you won't be able to put an ARC object reference into a variant record.
I will be really surprised though, if the trial-balloon that Embarcadero has floated about non-mutable zero-based strings will fly.  I expect that is a deal breaker, as there are hundreds of millions of lines of otherwise clean code that still depend on Strings starting at position 1.   Parsing strings with Pos() and Copy()  and the lack of requirement to deal with a separate String and StringBuilder type are classic differentiators between a Delphi managed-heap-of-strings and a Java or .Net managed string environment.   Changing these semantics is not a simple matter of adding or subtracting 1 from a string position, it is a symptom of a fundamental difference between the classic mutable Delphi AnsiString and UnicodeString copy-on-write behaviours, and the behaviour of the type that it seems is being chosen to replace it, which is in the end,  something homeomorphic to the Cocoa/Apple immutable NSString type.   

  Homeomorphic means "same shape", or in this case, "if it walks like a duck, quacks like a duck, and plays poker as badly as a duck, then it is a duck".  It looks like the easiest way to move Delphi onto an LLVM compiler backend and ARC is to adopt immutable NSString as part of Delphi's base way of doing strings. I think that's a mistake.  I believe it is possible to preserve the appearance and semantic model that Delphi has always provided.  Strings are (to a user of the language, not to the implementor) as simple to work with as integers and characters. This differs from most compiled languages.  Strings in Delphi are as simple to work with as strings in Python or C#.   I am not aware of any other language that is strictly statically typed, and runs without an interpreter, JIT or VM, and yet provides as simple a string model as Delphi.   Don't even try to tell me that C++ has it, because while you could probably write a string class in C++ that only you even use, real world C/C++ codebases routinely mix 10 or 20 string-like types per codebase.  Erasing that advantage would not only break how Pascal/Delphi string coding has worked since 1984, it would prevent people from moving their existing codebases up, and would slow Delphi adoption.  

I expect that the new compiler and the old compiler will be co-hosted in a single Delphi IDE for  the next four to eight releases of Delphi, and that eventually the classic non-LLVM compiler will go away. During that time, it's critical that all Delphi codebases get transferred into a form that allows them to move up.  That means that ad-hoc hacks like "obj.Free" doing nothing, and, if this is going to fly, it also means that String semantics stay exactly where they are, with no attempt to even offer immutability or zero-based offsets is made to users.  The last thing we need is a new {$H+} and {$H-} compiler switch to replace the old one.

A simplified, rational coding model that can be easily applied and used without any possibility of bad things happening silently in the background, and without requiring users to rewrite around immutability or zero-based strings is required for this move towards ARC to be a success.




The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Niklaus Wirth developed the Pascal Programming Language in the early 1970s.

This summer, 40 years ago, he published an important report in that era: “The Programming Language Pascal (Revised Report) July 1973“.

The report describes the language after it had been use in a while and includes a few language changes (packed records and arrays, file handling behaviour, and a few others) introducing a period of language stability.

If you are part of the Swiss research community, you can download the original PDF at

http://e-collection.library.ethz.ch/eserv/eth:3059/eth-3059-01.pdf?pid=eth:3059&dsID=eth-3059-01.pdf

If you are not, then Switch.ch will block access.

However, there are at least 2 ways to view the report:

An earlier (November 1972) draft of the report is also available.

–jeroen


Filed under: Development, Pascal, Software Development, Standard Pascal

TPersistent: SyncEdit How UseFul is It?

$
0
0

Today I ran across yet another limitation of SyncEdit.  Incredible you say?  Check out the following sample code:

procedure CreatePackage(anInvoiceItem :ThcInvoiceItem; aClient :ThcClient);
begin
  if anInvoiceItem.AssociatedProduct.StockType.AsString = 'PACK' then
    CreatePackage(anInvoiceItem.AssociatedProduct.PackageType.AsString);
end;

Rather than use a Search/Replace as I would normally, I chose to invoke SyncEdit after highlighting the method.  Then I discovered I could not replace anInvoiceItem.AssociatedProduct with aProduct.  SyncEdit will not allow you to remove an identifier, so the closest I could get was a.aProduct.  Likewise, SyncEdit cannot be invoked when you use Ctrl+A to select the entire unit.  While it may be flashy, it’s not as flexible or as fast to use as Search/Replace IMHO.

Delphi Haven: Dont expect the Parent property to be set inside an FMX controls Paint method

$
0
0

So… I’m working on a little custom FireMonkey control. As in the VCL, if you want to handle drawing a custom control yourself, you need to override its Paint method. In my case the override was looking like this:

procedure TMyChildControl.Paint;
begin
  if (Parent <> nil) and (Parent.Parent is TMyOtherControl) then
    Canvas.Font.Assign(TMyOtherControl(Parent.Parent).Font);
  Canvas.FillText(LocalRect, SomeText, False, 1, [], TTextAlign.taCenter);
end;

If you’re wondering, this was partly a workaround for the fact FMX doesn’t have a ‘parent font’ concept like the VCL. Anyhow, the code seemed to work fine until I enabled drag and drop. In FireMonkey, the drag image for an internal drag and drop operation is dynamically created from the image of the dragged control (good), but in my case, the drag image wasn’t being drawn with the proper font set. Digging through the source I discovered the reason: BeginAutoDrag calls MakeScreenshot to generate the drag image, which calls PaintTo… whose final parameter is a parent property override that defaults to nil. As such, while my Paint override was being called, the Parent property was returning nil inside of it. Argh…


Delphi Haven: Programmatically shutting down, restarting, sleeping or logging off on OS X

$
0
0

Browsing StackOverflow, I came across a question asking how to programmatically shut down the computer in Delphi when targeting OS X. Mysteriously, the question has been met with four downvotes as I write this, leaving it ‘on hold as off-topic’ until the darstardly questioner stops thinking a programmer’s Q&A site is a proper place for programming questions or something.

Anyhow, with respect to the question, one easy way to do the deed is to use a Cocoa NSAppleScript object to run the following piece of AppleScript:

tell application "Finder" to shut down

As desired, ‘to shut down’ can be replaced with ‘to restart’, ‘to sleep’ or ‘to log out’.

Now in Delphi, NSAppleScript (or more exactly, a wrapper interface type for NSAppleScript) is declared in the Macapi.Foundation unit. Alas, but this is misdeclared, or at least was when I last looked (see here– if someone wants to confirm this is still the case in the latest and greatest, please do in the comments). As such, you need to fix the declaration before using it. On the other hand, fixing it is easy:

uses
  Macapi.ObjectiveC, Macapi.CocoaTypes, Macapi.Foundation;

type
  NSAppleScript = interface(NSObject)
    ['{0AB1D902-25CE-4F0B-A3BE-C4ABEDEB88BC}']
    function compileAndReturnError(errorInfo: Pointer): Boolean; cdecl;
    function executeAndReturnError(errorInfo: Pointer): Pointer; cdecl;
    function executeAppleEvent(event: NSAppleEventDescriptor; error: Pointer): Pointer; cdecl;
    function initWithContentsOfURL(url: NSURL; error: Pointer): Pointer; cdecl;
    function initWithSource(source: NSString): Pointer; cdecl;
    function isCompiled: Boolean; cdecl;
    function source: NSString; cdecl;
  end;
  TNSAppleScript = class(TOCGenericImport<NSAppleScriptClass, NSAppleScript>)  end;

procedure TForm1.Button1Click(Sender: TObject);
var
  Script: NSAppleScript;
  Error: Pointer;
begin
  Error := nil;
  Script := TNSAppleScript.Wrap(TNSAppleScript.Alloc.initWithSource(
    NSSTR('tell application "Finder" to shut down')));
  try
    if Script.executeAndReturnError(Error) = nil then
      raise EOSError.Create('AppleScript macro failed');
  finally
    Script.release;
  end;
end;

TPersistent: hcOPF now supports XE4

$
0
0

I just updated the sourceforge repo with VCL projects for XE4 with the exception of HengenOPFJVValidators (I don’t have JVCL installed at the moment). Simply define an environment variable “hcOPF” to point to the root folder for hcOPF and you should be able to compile the packages. Rt. Click on all dcl prefixed packages and choose Install from the local menu.

Enjoy!

Delphi Code Monkey: An Unusual Open Source Project for Delphi, by Me.

$
0
0
You might not know that second to Delphi, my favorite programming language is Python.     Also, my favorite version control system, Mercurial, is written in Python, and I keep all my Delphi projects in Mercurial repositories.   I use Git when I have to, such as when contributing to Jedi JCL and JVCL, but when given the choice, I use Mercurial.

As an interpreted  dynamically typed language, Python is wonderful, and it fits in easily when you need a general purpose programming language, or a script, or a system level tool like Mercurial,  build-system tool, or some kind of quick parsing or text manipulation system, or when building a web-application.   When you need something that compiles to optimized non-interpreted code, you usually write that extension in C.  Python also makes it easy to write extensions.   No I do not recommend trying to write extensions in Pascal.

Having said all this about Python, you can even use my new little open source project if you are not a Python programmer.

The project hasn't got a fancy name yet, it's just a mercurial repository with a few python scripts in it yet, but I have plans for all of these tools, and these plans will eventually converge into a bit of a swiss-army knife tool. I am building this tool on my own time, outside my current job's work hours, but I plan to use all of these little scripts while I work.

The project is here:  https://bitbucket.org/wpostma/wppythonscripts

Now I will introduce the scripts, what they do, and what they might do later, when I have time to improve them. The reason for open sourcing them is that I hope that other people who need what I'm trying to provide here will also contribute their own features to these scripts.


fixdfm.py   : Fix invalid .DFM files that won't open in Delphi


Have you ever seen this error: OBJECT expected on line ....


If you are like me, and it happens to you at 5:30 PM on a Friday after you just did a giant merge, you probably are not very happy to see it. It means that Delphi's DFM parser doesn't like your DFM.  If the line number is 23, like here, perhaps you can open the .dfm and find the problem quickly. What if the error is at line 5223?  How fun is that?  And what if the DFM opens just fine, but all or most of the the controls are invisible, and appear to be gone.  How do you like it when that happens at 5:30 PM on a Friday? Well if you're me, it does happen, and you need a tool to sort it out.

Let's run it on the broken .dfm. It's a command line tool, so I run it like this:

C:\dev\myapp>fixdfm.py myform.dfm

Scanning but not saving changes. Provide -save parameter to make changes
1 : inherited Form1: TForm1
testInheritUnit1.dfm : 23  : Unexpected Property Located After Child Object
    Tag = 3

myform.dfm lines could be removed: 1
Changes made to myform.dfm not saved.
---
1 files scanned.

Now let's fix the DFM automatically:


C:\dev\myapp>fixdfm.py -save myform.dfm
Changes will be saved.
1 : inherited Form1: TForm1
myform.dfm : 23  : Unexpected Property Located After Child Object
    Tag = 3

myform.dfm lines removed: 1
---
1 files scanned.


So, for some common cases, like when Merging just inserts some random property that should have belonged to a DFM object declaration in a place where no property declarations are allowed, Delphi does not offer to remove it for you, it just fails to open the DFM at all.   What about if your merge tool removed an end keyword, or added an extra one?   This tool cannot (yet) fix that, but it can detect it, and it can give you a map of where the dangling "scope" in the DFM is, so you can hopefully repair the damage.

A future version of this tool, will use Mercurial's version control system to permit you to scan DFMs, find broken ones, and then revert back through mercurial's log, one revision at a time, until it finds a non-broken DFM.  Then it will repair the dfm, and rename the broken one to myform.dfm.orig  so you can use a diff/merge tool to find any extra objects that should be added to the form, and add them yourself. And if I can, I will even make that part automatic. (Take DFM one,  find objects that are in it that are not in DFM two, and shove them into the correct places in DFM two.)


dailyzip.py

This script is just to make a zip file containing the binary output of a build, or alternatively, a snapshot of source code of a project so you can have a snapshot that corresponds with your releases. It uses Mercurial to find the current repository hexadecimal ID, so you can always associate a daily zip back to the exact Repository revision that created it.  The binary zip of all executables, DLLs and other outputs of a full build could be useful to your Beta testers or QA people. For any software product, a downloadable binary build snapshot showing the latest source still builds, and still works, can be very useful.   Knowing what exact source code state corresponds to those binaries makes it even better.  Since those hex ID codes from Mercurial are guaranteed unique, you will always know what goes with what.

  Note that there is a flaw in my statement above. Knowing the tip revision is enough for most people, but some people might wonder "what bugs were fixed or features added between this daily build and the last".  Such an auto-readme function could easily be added to dailyzip.py. Of course first I have to build a readme-builder.py script, which will extract a bug list like this:

    BUG 1234 :  WP : Fixed the thing that was
    broken in the Thing. By the other thing. 
    Not that thing.  The other one, in Unit3.pas.


As you can see, I am a fan of clear and unambiguous commit comments, which correspond to one and only one bug fix or atomic buildable change per commit.  Always leave your repository buildable.  Never commit unrelated changes together.  And everybody will win.

getrepohex.py

This script is for grabbing the current repository revision (if the current folder is inside a Mercurial repository only)  and doing something with it, like putting it into a file "ver.pas" or "ver.inc" that you could compile into or include into your Delphi app.

md5sum.py

I know there are a million MD5 hash calculation utilities out there, but I prefer to have mine in script form so I can use it to fingerprint things, and maybe even do a little further magic. By having most of what I need in a script instead of a binary, I find that when I need to do something like build a snapshot of a whole bunch of MD5 fingerprints, this script can serve as a basis for whatever task I need to do.   Usually it involves knowing if the files I uploaded to FTP and down onto a client computer are binary equal (and not corrupted) from the time they left my original location, to wherever I'm getting them down to.

vertool.py

This little tool lets you extract version information from a  Delphi .dproj file, or modify the version information
in a delphi .dproj file.  If you ever find keeping a set of related executables and their projects all consistently at the same product revision level, you might find this useful.


Where is all this going?


A. Eventually I'll come up with a better name than wppythonscripts. The name I need would mean "These are mercurial/delphi code workflow and build automation helper utilities".

B.  Eventually I will have a bit of a build and test automation framework put together that can build programs, unit test them, report pass/fail, build the installer MSI, and if it passes, it would be either upload it to an FTP site, or copied to a folder, for further QA/Testing or release processes to occur.

C. It will all play nice with existing tools like Hudson, and CruiseControl, and help take the output of running MSBUILD and make both nice build logs, and error reports, as well as help with statistics calculations so I can see the trends of error and warning counts, commits, builds, etc, from either Hudson or CruiseControl.

D. Because it is written in Python and targets Mercurial users, it is going to support some commit-hooks, which will prevent checkin of broken DFMs, prevent checkins of worthless noise DFM changes -- the Delphi form designer modifies and regenerates with meaningless changes to DFMs even when you just open and modify the .pas file. A meaningless change on two branches now means a meaningless and time-wasting merge conflict later, or even possibly, a corrupted .DFM.  So the dfmfix tool will stop the insanity before it starts, it will soon be able to detect and revert such changes and auto-revert them before you can even commit something like this:




What is this not going to be?

A. Not a complete build tool. Use DANT or TRAIN or FinalBuilder.

B. Not a continuous integration tool. Use Jenkins/Hudson, CruiseControl, or FinalBuilder

C. Not something with a GUI, these are command line tools.

D.  While I would love to build an equivalent to NuGet (Visual Studio), Maven (java), or CPAN (perl),  I doubt I can accomplish that in this project.  

If someone wants  a GUI for the fixdfm.py, I'll accept a contribution of one, if it's coded in Python using the built in python tkinter GUI toolkit.  Or I'll build you one, if you send me some money or a flat of nice Belgian beer.

This is an open source project, and it aims to make your life, if you are a Delphi developer who users Mercurial, a little nicer.


Please report bugs, especially please send me .DFM files mangled by your version control system.  Any version control system that has to merge .DFMs is going to mangle them, if you have more than one developer opening and changing DFMs.  Not only does Delphi make random looking order and object persistence property set changes, it also tends to reorder, remove, and add a lot of noise, especially if you have a codebase that started out in Delphi 5 through 7 and has survived a move up through several versions after that, perhaps up to XE2 or XE4.   Please file bugs on the BitBucket site, and feature requests.  I particularly find that the TMS components with their backwards-compatibility property-upgrade features, can cause some strange surprising things when opening and saving a DFM to make a change in a completely different area.

I really must recommend that all Delphi developers on ALL version control systems review and revert all .DFM changes that they did not intentionally make, to keep their version control history clean. But since asking all Delphi developers to do that is placing a burden on them, I think that a little help mapping Delphi's crazy .DFM changing tendencies to a stable version control system would be good.





Firebird News: Android port of the Firebird Jdbc driver (Jaybird) 2.2.3 is released

$
0
0
New version for Android Jaybird is released This is a port of the Firebird Jdbc driver (Jaybird) You can check what is new in Jaybird 2.2.3 from the official announcement page ps: You can download latest version from Files area also the Netbeans example

Firebird News: SQLAlchemy 0.8.2 released with Firebird related fixes

$
0
0
SQLAlchemy release 0.8.2 is now available. 0.8.2 includes several dozen bug fixes and new features, including refinement of some of the new features introduced in 0.8. Here are the Firebird related bugfixes http://docs.sqlalchemy.org/en/latest/changelog/changelog_08.html#change-0.8.2-firebird

Delphi Haven: The little things

$
0
0

Honestly, for how many versions now has the following got through?

unit FMX.Types;

//...

type
  TGradientPoint = class(TCollectionItem)
  private
    FColor: TAlphaColor;
    FOffset: Single;
    function GetColor: TAlphaColor;
    procedure SetColor(const Value: TAlphaColor);
  public
    procedure Assign(Source: TPersistent); override;
    property IntColor: TAlphaColor read FColor write FColor;
  published
    property Color: TAlphaColor read GetColor write SetColor;
    property Offset: Single read FOffset write FOffset nodefault;
  end;

//...

procedure TGradientPoint.Assign(Source: TPersistent);
begin
  if Source is TGradientPoint then
  begin
    FColor := TGradientPoint(Source).FColor;
    FOffset := TGradientPoint(Source).FOffset;
  end
  else
    inherited;
end;

function TGradientPoint.GetColor: TAlphaColor;
begin
  Result := FColor;
end;

procedure TGradientPoint.SetColor(const Value: TAlphaColor);
begin
  FColor := Value;
end;

What am I whinging about you say? This:

  1. What’s with the weird IntColor/Color duplication? Probably an historical thing… but why wasn’t the IntColor version taken out when the Color version was refactored?
  2. Why does Color have a getter that just directly returns the value of the backing field?
  3. Why doesn’t its setter (and Assign) call the Changed method?
  4. Where’s the Add method for TGradientPoints to cast the TCollection implementation’s result to TGradientPoint?
  5. Where’s the Update override for TGradientPoints? We want a property change to make a visible difference, right?

Oh, and don’t get me started on how the TGradient property editor is both horrible to use and set up to replace (not complement) what would have been perfectly reasonable default Object Inspector behaviour…


twm’s blog: GExperts Formatter features you didnt know about

$
0
0

I am sure you did not know about these features (I had forgotten about them myself):

  • You can save your own custom configuration as
    FormatterSettings-<YourName>.ini
    into the GExperts installation directory. After you did that, you can select this configuration in the same way you can the preinstalled configurations.
  • If you want to format a unit differently from your usual
    configuration, put
    {GXFormatter.config=<configname>}
    at the beginning of it.
    This will make the formatter use the given configuration rather than the currently active one to format that unit
  • If you want to format a whole directory differently from your usual configuration, put a GXFormatter.ini into that directory containing a section [FileSettings] with as many lines as you want of the form
    <mask>=<configname>
    into it. The formatter will use the <configname> from the first line where <mask> matches the filename of the current file.

Firebird News: GSOC 2013: LibreOffice Firebird SQL Connector Integration Status

$
0
0
You can follow the GSOC 2013 LibreOffice Firebird connector blog with it’s initial post and follow up Also on LibreOffice devel list there is a LibreOffice Firebird integration thread. The git log is hosted on feature/firebird-sdbc branch in libo tree. Update: A weekly status was posted for previous week

Delphi Code Monkey: Inprise Reprise

$
0
0
I was reminded recently that Delphi was Borland Delphi first, then Inprise Delphi briefly, then back to Borland Delphi, and then more recently, CodeGear Delphi, and then after the Borland/Codegear split, it became Embarcadero Delphi.

I would love it if anybody who knows more of the real details would come along and fill me in, but from where the Delphi user sat, this is what the whole Inprise thing looked like to us:

Borland in the early days was Philipp Kahn's company.  It was a software company that sold general utilities for microcomputer users.   For DOS, there was  SideKick, an early "PIM" (personal information management) program for DOS, launched in 1983, the same year that TurboPascal was first launched.  You may remember that TurboPascal first was a CP/M tool.  Originally written for Z80 by Anders Hejlsberg, and running on a single board Zilog Z80 CPU based hobbyist computer called the NasCom, that few of us ever heard of,  what became TurboPascal later was originally known as BLS Pascal. When  this code was ported from Z80 to 8086, and the incredibly successful TurboPascal for DOS was born.  That same compiler codebase was used in the creation of Delphi 1.0 for Windows 3.0 (16 bit), and Delphi 2.0 for Windows 95 (32 bit).    I started using TurboPascal around version 5.0, and remember being very excited when TurboPascal 5.5 came out, which included this new Object Oriented stuff.   I believe I paid less than $100 for TurboPascal 5.5 from my campus computer store, and it came in a very large box, with a lot of very nice manuals.    In the DOS era, paper manuals were an essential programming tool.  Online help on an 80x25 or 80x43 EGA DOS text screen was not much of a "help" to programmers, and I relied heavily on the paper manuals while learning and using the system.

 Borland sold millions of copies of TurboPascal in the DOS era.  So from a humble hobby-computing market, they got big.  What happens when companies succeed financially and start getting bigger?  I guess they hire a lot of people, promote some of them to middle management, and generally bloat out from their humble startup days and into their days of fat.  At microsoft, famously at one point, there were more than 10 levels of middle and product and senior management between each developer and the CEO.   I have no inside information on life at Borland circa 1995 (Delphi 1), or when the Inprise debacle started, during the Del Yocam era, in 1998.  I have heard some tales but I will not repeat them.

Instead I wish to reflect on the simple fact that by renaming yourself and abandoning your constituency, you alienate all your current customers.  There were actions by Borland staffers and corporate leadership prior to 1998 that alienated some DOS and early-Windows-era customers, but the Inprise era is spectacular for the sheer ineptitude and bad timing of the move. As a person who often wonders why Delphi did not achieve more corporate traction than it did,  the later JBuilder-is-the-future fiasco is still second in the list of disasters to the "Abandonment of Borland brand" inspired under Del Yocam's time leading Borland.   On the internet newsgroups,  and at Delphi user groups, the move to the "Inprise" name was met with shock.   Why did the community even care? It's just a name, after all.

No, it wasn't. The "Inprise" name change was basically a message that "We're not that DOS era tools company anymore, and we think we're ready to move into big ticket Enterprise software".   The enterprise software enterprise failed.  Inprise failed. Borland failed.  Later on Borland went chasing after ALM (application lifecycle management) as a new Enterprise era, and abandoned codegear, and Embarcadero picked it up for a song.

So, what is this Enterprise level tools software that every software developer who wants to build enterprise software needs? This is very much still an open question.   Enterprise software development tools, if you will forgive me for answering my own question, are "Snake Oil", pure and simple. Large companies in general need all the same software development tools and functionality that medium and small companies have.  Yes they have the money to buy a high end edition, if that higher edition really helps, and those higher editions exist, and yes people buy them.  I am not saying that nobody buys it.   I'm saying that the tools don't deliver a measurable Enterprise productivity boost that they promise.  In short, I am saying that no high end $5000 development tool provides quite as much inside the box as it promises on the outside of the box and that the claims of "Enterprise" software products often outstrip what they can really deliver.    

 What they have that other companies do not have is (or so we hope) a large pile of cash that they are willing to part with, and additional fear and anxiety that salespeople can trade on, and receive money for for intangible deliverables like "Enterprise readiness" and "Enterprise level functionality", or best of all "Five-Nines" reliability.  

 It's quality sauce, performance and speed as an extra cheese topping, on your mid-market pizza, that makes your Enterprise Pizza.    The word "Enterprise" is still with us, in CodeGear/Embarcadero Delphi land, as the name of an edition of Delphi.

What do the high-SKU Enterprise and Architect editions of Delphi offer me that I would pay for?  Actually, very little. Now in XE4, the new database layer, AnyDAC FireDAC is actually great, and I would almost buy Enterprise or Architect to get it. Almost.

What else?  I don't currently like DataSnap much, but it is definitely the most important and most valuable thing that comes with Delphi Enterprise and Architect.    If Embarcadero could improve DataSnap to the point that people like me want to buy it, that would probably make it worth buying.

What else, else?  Well there's the blobby-gram builder tools, and the code metrics.  Guess what. I think blobby grams are useless, and the code metrics feature is inferior to the $99 Peganza Pascal Analyzer. You've got to do better to earn my dollars for those features.

I really do want to see the Enterprise and Architect editions succeed in the free market and sell lots of copies.  That will do as much to keep Delphi going and growing into the future, as having it become more popular would.   But Delphi is facing a clear and present danger;  New user adoption levels are so low, and the number of publicly findable Delphi jobs is at a deadly near-zero level.  Developers cannot find Delphi jobs, and Delphi employers cannot find Delphi developers.  As the software development manager and team implementation leader at a very small Delphi company, I am painfully aware of both sides of this equation.   I am a developer, and I try to lead a small software team through releases and bug fixing.

The way out of Delphi's current "No Jobs/No Developers" bind, when competing against a free Visual Studio express edition has got to be the opposite direction to the direction that the leaders during the Inprise period at Borland chose.

 I see a considerable pressure coming out of Delphi's product management to drive the dwindling number of Delphi faithful up the curve towards Enterprise and Architect.  I say, most of us are not budging.   Taking away features from Delphi Pro will only hurt Delphi and Embarcadero, terminate Software Assurance agreements and alienate the small shops that still use Delphi.

 What needs to happen is a return to the Borland/DOS era product market and reach.   Somehow Embarcadero needs to find a way to sell 30 million copies of $99 to $399 products, either in one lump sum, or even as an annual $99 rental.  The future of Delphi depends on it.

Was Delphi Starter the right move? I can't say as I don't know the sales and revenue from it, but I can say that it was not enough to make a dent in the NoJobs/NoDevelopers issue.  There needs to be something else done to address the perception that Delphi is a dead end. It's still the best technology out there for building applications.  Unfortunately, it's perceived as a a career-limiting and company-growth -limiting move. That perception needs to be addressed, and changed, with main force.  The cross-platform focus (iOS and then Android) is definitely going to add something to the Delphi toolbox that will attract new people, but something needs to be done to get more developers onto the platform.  A new generation of Delphi developers, these ones should be under 30 instead of graybeards over 40 like me.




Behind the connection: Upgrade from ANY version to XE4

$
0
0
Users of ANY earlier version of RAD Studio, Delphi, C++ Builder or Borland Developer Studio can upgrade to XE4. From now until 31 July 2013. RAD Studio XE4 gives you the tools you need to create multi-device, true native apps for iOS, Windows and Mac. NEW! Completely new Delphi iOS visual development solution and mobile compiler NEW! Create apps for PCs, tablets and smartphones from a

Firebird News: Firebird Node.js Example with AngularJS

$
0
0
For the moment only the code , soon we will have also a blogpost about it This is a complete demonstration of express.io, passport, passport.socketio, firebird sql and angular.

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Sometimes a generic answer to a specific answer gives people a lot more insight into what they actually want to accomplish than a specific answer.

Plus that the knowledge does not only apply to VCL in any Delphi version: it works in any development environment where you can draw.

That’s why I like this 2D transformation answer so much:

A Delphi TShape is nothing more than drawing a bunch of vector graphics.

You can “rotate” the X/Y coordinates themselves with a 2-D transformation matrix. Computer Graphics 101:

Thanks paulsm4!

–jeroen

delphi – Change orientation of a shape – Stack Overflow.


Filed under: Delphi, Delphi 1, Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Development, Software Development

DelphiTools.info: DWScript news roundup July 2013

$
0
0
Here is a summary of DWScript changes since the last update. Language enhancement are centered around several additions for enumeration elements and sets, as well as a standard Map() method for arrays. The JIT compiler also got more capable, and there were various improvements to the support libraries and compatibility with older (D2009) and newer (DXE3) [...]

Firebird News: Firebird ODBC driver 2.0.2 is releasead

$
0
0
Files are uploaded to Sourceforge files area Update the information is on the driver page http://firebirdsql.org/en/odbc-driver

TPersistent: Help me Danny

$
0
0

Maybe I am daft, but ever since HTML help was introduced with the Galileo IDE, I can’t find much in the way of help.  I often configure later versions of Delphi to invoke the D7 help so I can find what I need.  That version of help was apparently put together by Danny Thorpe, so hitting F1 in the D7 IDE would bring up a topic for the current selected identifier in the editor.

So why is it that 11 years later, with technology marching forward, that I can’t do the same thing in XE4?  I quite often can’t even locate items by searching for them.  Despite selecting filter to prevent .NET and Visual Studio related material, I still get nothing relevant to Delphi or “RAD Studio”.  Take for instance the results of these screen shots searching for refactoring information.

Help on Refactoring

Help on Refactoring

Google seems to provide much better results in a shorter search timeframe…

The Wiert Corner - irregular stream of stuff: jpluimers

$
0
0

Just found out that the kind people at BitSavers added some scanned USCD Pascal documentation in PDF format:

It reminds me of my early Pascal days on Apple ][. UCSD Pascal was so slow that I was glad to discover Turbo Pascal 1.0, which lacked some of the UCSD Pascal features (for instance cross platform – including Mac, almost 30 years ago! – and Turtle graphics), but was blazingly fast.

Trade offs indeed (:

–jeroen


Filed under: BitSavers.org, Delphi, Development, History, Pascal, Software Development, Turbo Pascal, UCSD Pascal
Viewing all 1725 articles
Browse latest View live