Making Wrong Code Look Wrong

Here’s a very good article which discusses a coding design principle “Making wrong code look wrong”.

Understanding the contents of this article will make any C++ or Delphi programmer write better code.

Making Wrong Code Look Wrong – Joel Spolsky on Software.pdf

Author Joel Spolsky is a great thinker on how to write good code.

As a C++ programmer I do feel I have to take issue with his arguments against C++ exceptions. You can regard the C++ Exception as a “goto” with an unknown destination. This does sound like a recipe for a “bad smell” in your code. But C++ Exceptions are designed for handling errors that occur in a self contained part of code that can’t know what the correct way (because it depends on the time of usage) to behave when the error is encountered. By passing back an exception it allows the calling code to decide how to handle the error condition. This is an invaluable tool when used correctly. C++ Exceptions are great for solving this design challenge. But please don’t use them for anything else. Any other use immediately drifts into the problem area discussed by Joel Spolsky in his document.

The Software is Finished – Part 2

I have customers who ask “When will the software be finished?”. I have more experienced customers who ask “When will the software be ready to use?”. The previous posting was heading to the conclusion that software is very very rarely actually “finished”.

You need a bit of software. So it must be doing some kind of useful task. Parts of the software may very well be useful in the future (even as part of a solution to a completely different task).

It’s a failure for all concerned if software has to be consigned to the “Recycle Bin” because it has become “so tangled and uncontrolled that it is no longer maintainable or useful” . If you are investing your time (or your money to pay for someone elses time) you want your investment to be worth while. This is achieved by taking time out to plan how to avoid “case b)” and to design according to you plans.

So….

Do use Unit Tests.
Do think about how you are going to test the overall software operation (and document this).
Do refactor
Do use sensible function and variable names
Do keep your documentation up to date.

Never to a quick fix “because the software is basically finished”. Never think software is finished.

A Forum for Embarcadero C++ Users ?

As mentioned on my posting of 16th Nov 2020, Embarcadero have shut down the invaluable forum that used to be at https://community.idera.com/

I’ve been alerted to the new branch on the Delphi-Praxis forum site that is devoted to Embarcadero C++ users. This has been set up in response to the Embarcadero closure.

You can reach this new forum by clicking on https://en.delphipraxis.net/forum/41-general-help/

Embarcadero Close Down their Community Forum

Embarcadero have shut down the invaluable forum that used to be at https://community.idera.com/

If you try to open this page you get automatically re-directed to https://blogs.embarcadero.com/ which is an Embarcadero authored page of useful postings with no opportunity for users to ask questions for other users to answer (in other words it is not a forum).

So where should Embarcadero C++ users go to ask questions?

Embarcadero’s answer seems to be “Stackoverflow”

As an MVP we were warned that this change may happen. I strongly discouraged Embarcadero from going in this direction, indicating that they would lose a channel that provides good feedback for them as to how well their products are performing and also provides a chance for them to demonstrate their level of technical support.

It seems such a shame to have lost this site.

Delphi Bold – Open Source

Strange: I don’t mention open source very often and now we have two blogs in a row about Embarcadero making items open source. Delphi Bold was a Delphi experiment with the Model Driven Architecture approach to programming.

Embarcadero discontinued the development of this a long time ago, but have now decided to allow access to the source code for the open source community. It will be interesting to see if anyone picks this up and runs with it! More information at the following link

#DesktopFirst ! – Embarcadero Summit

As well as very recently releasing RAD Studio 10.4.1 (see previous post) Embarcadero have launched their #DesktopFirst summit.

Embarcadero are very wise to be promoting desktop design in this way. It’s a subject that is still of vital importance and has lost a bit of public (and developer’s !) focus recently.

I’m pleased to say that I will be making a short presentation as part of this event. With the title “Right Click is Right !” I will be suggesting that the orginal Windows approach to applications design (do you remember Windows 95? or earlier?) has a lot going for it.

Click here to join the summit. It will be a fascinating experience !

 

Embarcadero RAD Studio and C++ Builder now Bundle TwineCompile

The clang C++ compilers are very powerful, offering full support for C++ 17. Anyone who has read Bjarne Stroustrup’s “A Tour of C++” (the second edition covers C++ 17) will realise that a compiler has a very large amount of things to do as it translates source code to object code. This comes at a price. Compiling RAD Studio or C++ Builder projects using the clang compiler for any reasonably sized project takes tens of seconds (tens of minutes for a complete build of a very large project).

Jomitech produce a RAD Studio plugin called TwineCompile that can very significantly shorten compile times.

TwineCompile

In August 2020 Embarcadero announced a bundling of TwineCompile for all customers using RAD Studio or C++ builder Enterprise or Architect with an up to date subscription package. For those who qualify this is now available under the Getit package manager in the IDE.

So if you are on Enterprise or Architect what are you waiting for ? Go “Getit” !

Embarcadero Change of policy on Android C++ Support

There has been much publicity on the excellent Embarcadero community pages about the recent announcement that Embarcadero are not going to deliver on the previously publicised road map deadline of Android 64bit C++ support by Autumn 2020.

The announcement of this change of policy was made by David Millington at

https://community.idera.com/developer-tools/b/blog/posts/c-builder-and-platforms-support

Developers looking for good VCL Windows 64 bit development will be pleased by the news that this is the area Embarcadero are focusing on.

RAD Studio 10.4 – Being Well Received !

Recently released RAD Studio version 10.4 “Sydney” seems to being well received by everyone. I’ve just moved a project due for delivery at end of June across from 10.3 to 10.4.

There’s a good video about what’s new at:

What’s new in 10.4

There’s also a load of support / demonstration material on a Google Drive shared folder provided by Embarcadero at:

Shared google drive folder for RAD studio