Home > Delphi, Object Pascal > Delphi community edition, learn real coding

Delphi community edition, learn real coding

Update: I updated the text to better point out writing in past-tense at one point. I apologize for not catching the formulation quicker, but I have edited the text to better reflect this now.

embheader

With the release of the community edition of Delphi and C++ builder, Embarcadero is finally making Delphi accessible to anyone who wants to enjoy the rich flavour of object-pascal that Delphi represents. In my 30+ years of coding I have yet to find a language or development toolkit as creative as object pascal, with Delphi being the flagship compiler and toolkit. Java and C# might appeal to some, but for developers solving real problems out there, the stability of Delphi is hard to match (more about that later).

Besides, object-pascal is fun, highly creative and easy to learn! Just imagine the wealth of knowledge a language that has stood the test of time has to offer!

Finally a straight up license

The license Embarcadero has landed on is easy to understand and straight to the point: the community edition is free for open source projects, and you can use it for commercial products until your sales reach a certain sum – and then you are expected to buy it. I wish I had this back in the day, I bought my first Delphi with money from my student loan.

maxresdefault

Unreal engine operates with a similar license

This license is incidentally the same used by market leading game and multimedia companies. Both Crytech (CryoEngine) and Epic Games (Unreal engine) operate with the same concept. Instead of charging you a sum up-front, you can create your product and pay when your earnings justify it. Unreal-engine has a fixed percentage if memory serves me correct. So the Embarcadero license is more than fair.

What the community edition of Delphi and C++ builder means in practical terms, is that you get to learn, build and bring your idea to market without that initial investment. When you boat floats and you make money, then you pay for the toolbox that helped you be successful.

If you are a startup company with investors and limited funds, you get to adjust your license fee to your runway after the fact rather than before. So if your product tanks and you never make the expected sum; well that’s one bill less to worry about.

The myth of free Microsoft products

visual_studioOne of the things I often hear when talking to developers, is the “visual studio myth”. The notion that Visual Studio is free and there are no strings attached. And this is a myth, just to be clear. Microsoft have ridicules amounts of money so they could afford to lend you Visual Studio for five years (which was how they operated until very recently). If you checked the license for Visual Studio that’s what it said: you get to use it for five years, then you better pony up the cash. And by that time you have no doubt advanced to Enterprise level, which means that check will be signed in blood.

So this illusion that Visual Studio is free, is just that. Young developers are just as likely to use a pirated copy as violating a community agreement – so even today with the subscription model and ordinary trial they don’t notice the devil lurking in the details.

But for entrepreneurs that are starting from scratch, that need to set up a budget for their product that a board or single investor can trust, well it’s hard work because development is never an exact science. The coding part is, but it’s the human factor that is challenged, not the technology. It’s the spirit and individuals ability to see solutions where others see only walls that is tested; especially when you are making something truly unique. Something that doesn’t exist yet.

And once you are in that basket and have your entire product, perhaps even your career, riding on the investors being happy (which are rarely developers I might add) – the temptation of going “all in” is very real and very tangible. Let’s use MSSQL since we already have a VS license. Let’s use IIS instead and get rid of Apache. Lets use Sharepoint since we get a nice discount. Complete dependency doesn’t take long.

Now it’s no secret that my brief affair with C# makes me biased, and I am biased. Proudly biased. Bias on tap even. This is an object pascal blog where all things object pascal is loved and valued. So read my articles while imagining me with a cheeky smile in the corner of my mouth, and a slight sparkle in my eyes.

But in all fairness, the new Delphi community license is up-front, no hidden fees, honest and direct. If it wasnt.. well, I have a history of shooting myself in both feet by being painfully honest. I cant find anything wrong with the license and believe me I have tried. This is christmas and my birthday all rolled into one! Embarcadero has put their ears to the ground and listened to their customers.

With this in place Embarcadero is cementing a foundation of growth for our community, the languages they deliver and our future.

Rock solid

Delphi has always been known for producing rock solid, reliable database solutions. Delphi is awesome because it covers the whole spectrum of coding, from low level procedural dll files to system services, industrial scale servers, desktop and mobile applications – the list goes on. There are 3 million active Delphi developers around the world. Not to mention the millions more relying on older versions of Delphi or alternative compilers to power their businesses.

livebindings

Visually bind database fields to containers, its details like this that saves time

If you mentally jump into a time machine and travel back to the 1980s, then slowly walk along the timeline and look at the changes in computing. Look at all the challenges before Delphi and how in 1995 Delphi took the world by storm. Into Delphi, Anders Hejlsberg and his team invested all their knowledge and everything they had learned from previous compilers and run-time libraries. This investment never stopped. There have been many architects involved over the years, each adding their contribution.

The amount of skill, insight, technique and dedication is breathtaking.

C# might be the cool kid on the block right now, but it’s painfully unsuitable for a wide range of tasks. Tasks that require a programming language with more depth. There is also something to be said about the test of time. Delphi and C++ builder have decades of evolution behind them. Many of the core principles were inherited from Turbo Pascal which dominated the 1980s and early 1990s.

And let me back that up with an example:

I used to do some work for a Norwegian company that delivers POS terminals to most of northern europe. When I got there they had a C# department and a Delphi department. Obviously I thought they wanted me to work on the Delphi codebase, but to my surprise they threw me into C#.

While I was there I noticed that Delphi was used on the hardware, the actual terminals themselves and the data transmissions. POS terminals is a potentially fragile but important instrument for any store; it has to operate 24/7 and a single mistake can be a financial disaster. I doubt more needs to be said here.

terminal

A POS terminal consists of many parts, here showing the card reader. Instability in the terminal can lead to loss of data, corrupted backups and network problems

The irony in all this was – that two years earlier they had tried to replace Delphi on the terminals with C#. They invested millions into rewriting the whole thing from scratch. But the rollout of this monstrosity was a total fiasco.

The bro-grammer’s forgot that some things are there for a reason. They neglected the subtle nuances of how each language works and how code behaves under extreme conditions; conditions where ram, storage space and cpu power are severely limited. On cheap, low-powered embedded boards even the slightest fluctuation in CPU activity can tank the whole system.

C# and Java were unfit because the GC (garbage collector) would kick in on random intervals to clean up the heap, this caused CPU spikes. The spikes were enough to freeze the terminal for a brief second, disturbing network activity, disk operations and database stability. It was the first time since the early 90s that I actually saw “Disk C: has a read-write error” dialog. I had to bite my lip to not laugh out loud. I tried so hard, honestly.

The glorified update was haunted by broken transmissions, un-responsive UIs and ruined backups (the device backs up its receipt database both locally and remotely many times a day). After a couple of weeks they rolled back the whole thing. Customers demanded their old system back. The system written in Delphi (and if you think the C# “native image compiler” from Microsoft made things better, think again).

So Delphi and object pascal still powers a large amount of financial transactions in northern europe. You will find Delphi used by the government, security companies, oil companies, POS brokers, ATM’s, missile guidance systems – anywhere where a high level of reliability is essential.

Getting started

Jumping into a new programming language or learning your first one can be daunting. Thankfully Delphi has been around almost as long as C/C++ (3 years younger) so there is plenty of knowledge online, most of it free (always google something before asking on forums, make that a habit).

tomes

Study the classics that teaches you how and things work

But to really save you time I urge you to buy a couple of books on Delphi. Now before you run off to Amazon or google around, there are two types of books you want.

You want a book that teaches you Delphi in general, a modern book that shows you OOP, generics and all the features that were added to Delphi after the XE version naming. So make sure you buy a book that teaches you Delphi from (at the very least) XE6 and upwards. Delphi “Berlin” or “Tokyo” is perfect.

The next book has to do with technique. What makes Delphi so incredibly powerful is this awesome depth. You can write libraries in hand optimized assembly code if you want – or you can write object-oriented, generics driven high-level mobile apps. Between those two extremes is a wealth of topics, including system services, your own servers, every database engine known to mankind and much, much more.

But you want a good book that teaches you techniques, techniques that underpin all the cool high-level features people take for granted. The most cherished book you will ever own for Delphi, is The tomes of Delphi: Algorithms and data structures (catchy title, but this is a book you can come back to over many years).

Now go download that thing and enjoy! Welcome to the coolest language in the world!

Happy coding!

  1. sglienke
    August 2, 2018 at 3:10 pm

    Can you please provide a link to back up your claim that the free Visual Studio (I was assuming you are referring to Visual Studio Community) is time limited?

    To my understanding as you can see in the comparison chart (see https://visualstudio.microsoft.com/vs/compare/) it is only limited by revenue and company size. And I cannot find anything different in the license terms for Visual Studio Community 2017 (see https://visualstudio.microsoft.com/de/license-terms/mlt553321/).

    • August 2, 2018 at 9:49 pm

      I was not refering to the community edition but past experiences with VS.

      • sglienke
        August 3, 2018 at 1:53 pm

        Can you elaborate a bit more on that and/or provide any source? As far as I know if you were not using Community (previously Express) you had to use a version that you had to pay for.

        You wrote: “If you check the license for Visual Studio that’s what it says: you get to use it for five years, then you better pony up the cash.” but I cannot find such a paragraph.

        I am asking because you are making some serious accusal by writing: “Young developers are just as likely to use a pirated copy as violating a community agreement”

        • August 18, 2018 at 3:14 am

          Serious accusation? You have seen the “Delphi experts” website right? Piracy is rampant.
          The same is true for Visual Studio. And the group that does piracy is in general young men with a limited income.
          I was a member of quartex, I have done my share of piracy. I also teach delphi for free at the local school and the age is either 19-22 or 35-40.
          Guess which group show up with a Delphi stickpiled with pirated components.

          “you had to use a version that you had to pay for.”
          That is what i wrote, you had a trial period that bound you to a promise of purchase. But you could abort the whole process if you didnt find it useful.

    • August 6, 2018 at 12:48 pm

      I updated the text to better reflect this. On proof reading i realized that you were right and that the experience I was refering to was lost in the text. Hopefully the new text is more clear.

  2. August 4, 2018 at 1:58 am

    If you are going to compare apples to apples then you need to compare the Community Editions of both products.

    I would also like to see a comparison of C# today vs. Delphi today. Not sure when you worked on that POS system, but I would say a lot has changed. C# today can do native code, Xplatform (including 64 bit apps), and target WASM in the browser (Blazer). Can Delphi? The Visual Studio IDE now runs on a Mac and Visual Studio Code everywhere. Delphi still uses a 32 bit Windows only IDE, still doesn’t have Mac 64 bit support, Linux UI support, and uses different compilers for each platform which according to many reports have poor code generation.

    C# is hardly a new kid on the block any more (C# 1.0 was January 2002), and the community is much larger. There are more open source projects and more resources, and if they can write Kestrel in C# I think the argument that C# is slow and unsuitable for many tasks is just a little hard to make with a straight face…..show me some benchmarks and prove me wrong.

    I love Delphi too, and I’m glad you have signed on with EMBT because Delphi is lagging behind the competition in many ways, and we need new blood in EMBT and the community to keep it viable. Turning a blind, or biased eye to the world is no solution though. You may love Delphi, but to get other newbies to love it, a logical and methodical approach needs to be taken – a SWOT analysis and a plan to improve the situation.

    • August 18, 2018 at 3:22 am

      I worked on the POS system in 2015, so not exactly ancient.
      And blind eye? I have used C# and also do parts in C# when I absolutely have to. Its no longer a “one language” game as you know.
      But to say that a single language is exceptional for all things, that is simply not true.
      C# have advantages due to its nature, and financially microsoft is obviously in a position where it can throw millions into R&D.
      But that doesnt mean its better or more true to how a computer works. In most cases the new additions abstracts you away from how a PC works.
      This is not a problem if you already know a spot of assembly and have done coding in college or the university — but when its all you know, then it can be risky when you step out of the comfort zone.

      Im also a bit puzzled by why its OK to be a VS fanboy and sell people on the tooth fairy (we all remember silverlight), but if you proclaim love for Delphi and object pascal people just line up to find flaws or interpret the text above and beyond its intention.

      Delphi is great at many things, the same is true for C#, but they dont automatically overlap.
      Delphi was better for the POS system because C# needs a bigger infrastructure, a bit more ram and a slightly beefier CPU.
      The Delphi POS code has been running 24/7, stable and rock solid for years now (and also a decade before they did their C# experiments).

      And for C#, I prefer remobjects native compiler.

  3. Aplikmuj
    August 5, 2018 at 8:58 am

    In a collapsed industrial line which has been refurbished, since Microsoft is listed at the stock-exchange, aggregated profits are based on just means of accounting and not money.

    Money is used by those who have to somehow to determine the quantity shipped tomorrow. With such money you cannot express value once supply and demand are in almost perfect harmony. Free as in beer is no argument. It’s that simple.

    The model of the refurbished collapsed line once collapsed (in the sense of material industries) are not allowed to have tremendously huge piggy banks or equip it with coins.They always get access to credit but must empty the huge piggy bank every year. They have to pay dividends the one way or the other.

    The coins people might think of never leave the line. We receive the coins once put into the pay envelope together with the goods and immediately return the coins to the provider.

    The original industrial line logic (mid range sized industries, steam engine) is simply that once such a line collapses into a common (no one knows if and where to invest since growth is no option or too slow growth ships no signal anymore) and cannot be refurbished the line starts to lay off and frees humans from having to reside on premise.

    The counter force are busy humans that already start to replace the line which is going to disappear in pre-classic and classic shaped businesses (self-employee to mid-sized company) covering demands at a somewhat higher price tag but in a market place (market economy) but at a higher /different technological lever starting at home in the very beginning.

    Today this process is managed a different way via steadily de-materializing production factors (human work, machine work, material, price indicator) and investments partially compensate the requirement mentioned .Resources freed focus on new products.

    Free as in beer means. Lowering the price indicator does not ship any valuable information concerning the quantity of consumer to be reached.

    But living too long does come at a price…

    You would immediately see the effect if a car could shrink as electronic products. In the 80s the size of a car would have been the size of a match-box or less.

    Except from food a classical line ships tools

    a) The older the line gets the tools turn into consumption and loose material shape. VS Code.
    b) Industrial lines soak up technologies from households in order to survive.

    Visual Studio just helps to provide what belongs or will be put to Microsoft machines in the future. Microsoft cannot add value to Visual Studio not because they would not love to do so.

    All big vendors are huge company that one day fell victim to their own success.

    The time limitation acts as an instrument managing the quantity of developers providing technologies in order to avoid wasting time of those who work for free.

    The big advantage of IDEs is that components introduce a base for decisions especially when it comes to hiring people concerning specialization and comparative advantage even if you start as a one man show.

    In other words. In the long running cycles RAD Studio is more likely to be used for development and for a short period maybe for active prototyping purposes. It’s not possible to be everybody’s darling all the time.

    A tool with a price tag is provided for people who act as undertakers even in a broader sense.

    There is a switch in the logic. In pre-classic structures the market place rules and the demand side. Shaping version 1.0 of a product. Then the logic (especially in Mid-Europe) switches to the classical line which is supplier driven. Less value is added in order to drive the quantities unless supply and demand are in balance. Later the ‘Ford Model’ (adopted neo-classic model) reintroduces the value perspective again. Adding more features people experience as useful can be added again. Afterwards managing the factors starts.

    You just can sell cheap if the underlying technology does the selection process for you. You can ship a programming tool addressing a mainstream DB for a few hundred dollars. Other tools are selling best (matching more consumers) at 2k dollars for example.Marketplace (classic) perspective B2B.

    40 years ago this model (car line) has been put on top of all kinds of companies from the one man show to the hugest corporate. The industrial is forced to de-materialize especially materials and in order to avoid excessive allocation of resources other constraints are applied.

    In such lines, we are used too especially in Mid-Europe, the time preference seems still to be fixed to use credit only in case that de-materializing especially material servers more people a better way than the number of customers reached before. (Cheaper can indeed be better in the beginning and that’s why cheap in the end doesn’t help once supply and demand are in harmony).

    The time preference is more complex in case of company acting in market economic structures. That’s why RAD in a broader sense (methodology perspective), components and visual composition will not disappear. What might change is that work in a line changes into a Kanban from time to time.

  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: