Embarcadero RAD Studio – Code Rage 2018 is Coming

Behind Embarcadero’s first class products are a strong on-line community and a company keen to keep it’s customer base bang up to date with what’s going on. One way they achieve this is an annual on-line event, “Code Rage. This is a free series of presentations that cover a very wide range of programming aspects. It most definitely is NOT a series of sales or marketing talks!

It’s free to anyone and registration is simple and quick. Once registered there is no obligation to attend any o the on-line events, but when you see the line up, why wouldn’t you?

To register, head over to Embarcadero CodeRage 2018

Advertisements

Embarcadero RAD Studio Rio 10.3 is here!

Embarcadero have just announced the availability of RAD Studio Rio 10.3. The road map published this summer promised this before the end of the year so they have delivered on time.

 This release has many major new features and enhancements. I talk more about this release in future postings here, but in the meantime to see “what’s new” information have a look at this link.

What’s new in Rio 10.3

Delphi and Automatic Reference Counting

There is an ongoing debate about the advantage of using/not using an automatic reference counting approach to compiler memory management.

Embarcadero are not immune to this discussion and have recently hinted that they may be changing direction here with their Delphi compilers. This is a big step which will affect virtually everyone who uses Delphi so you can be sure that the designers at Embarcadero will have taken this decision after much discussion.

For a little more information have a look at this link.

Embarcadero blog about Delphi ARC

More good things about Embarcadero C++ and Delphi Community Edition.

I mentioned the release of the free version of the Embarcadero C++ or Delphi development environment back on 19th July 2018.

This version is free to most people who make litte or no money from s/w development. There are full details of the precise license restrictions at the download links at the bottom of this posting.

This has gone down very well with hobbyists and open source enthusiasts and also allows “start up” companies to get going with a professional s/w development IDE and only have to pay when they start to make some genuine income.

Since it’s release two other advantages have occured to me.

a) Customers who are worried about ongoing support their software that I have supplied, should my company suddenly collapse (or be taken over) can now get hold of a genuine copy of community edition and can prove to themselves that the source code package I am supplying can actually be compiled and linked by someone else. I’ve always known this but now they can check for themselves. [This only applies to customers who are not in the software development business of course, but this applies to all of my company’s customers (that’s why they use my company)].

b) Anyone applying for a job at my company can now be asked to get a copy of Community Edition and be asked to develop or debug code using their copy as part of our interveiw/selection process.

Community Edition is great: Here are the links, if you are new to Embarcadero products go get it now!

C++ Builder Community Edition

Delphi (object pascal) Community Edition

Embarcadero release updated product “road map”

Embarcadero continue to add innovative features to their RAD Studio (C++ Builder and Delphi) product. They have just released an updated product road map which shows their plans for the rest of 2018 and the start of 2019.

 The introduction of C++ 17 support and the improved support for high DPI screens are two of the many features mentioned.

 For full details of the road map go to

Road map (Aug 2018)

For convenience we reproduce a copy of the road map here:

EmbarcaderoRoadMapAug2018

Embarcadero release free C++ and Delphi IDE for students, home users and open source.

Embarcadero have anounced new editions of their C++ IDE and Delphi IDE. Known as “Community Edition” these are free licensed versions of the “Professional edition” for students, home users, open source developers and anyone who programs but does not generate an income. There are accurate details of the restrictions on use at the links below.

 This is a very positive move by Embarcadero. It makes it easy for anyone to experience first hand the quality of their products. It can’t help but increase the popularity of the Embarcadero C++ and Delphi programming environments.

 Here are the links, if you are new to Embarcadero products go get it now!

 C++ Community Edition

Delphi (object pascal) Community Edition

Error codes from functions

Many functions in third party libraries, APIs or in your own code often return some kind of error indication as to the success or otherwise of the function call.

Always check errors when a library (or other) function returns an error (even if you are going to ignore it !).

Why do we make this statement? For all the following reasons.

a) It documents in your source code the fact that the function returns an error (you may decide to check this later).

b) It makes it easier to check the error status when you are debugging your code as/when it doesn’t work.

c) It makes it easier to add error checking at a later date.

d) It encourages you to think “should I be really ignoring the error code returned by a function” at the time that you write your code. In most cases the answer to this question is probably “no”. Checking errors almost always adds little to code complexity and often saves time in the long run.

 

A C++ Software Development Tip – * = multiply and pointer

When developing C++ code it is very common to declare a pointer to a variable of a specific type (either as a local variable, a class member or (hopefully more rarely) a global variable.

Consider the following two exactly equivalent lines

TMyType *Variable; // no space between the * and the variable – *** preferred ***

TMyType * Variable; // space between the * and the variable

Similarly when using the value pointed to (dereferencing) consider the following two exactly equivalent lines

TMyType X = *Variable; // no space between the * and the variable – *** preferred ***

TMyType X = * Variable; // space between the * and the variable

In each case we prefer the first of the two lines. Why? because the second form looks too much like the multiply operator (z = x * y).

It is very important to be consistent throughout all your code. Knowing that we always use the first form allows us to use a search on “*Variable” and find ALL the instances where the pointer is dereferenced.

 

A Note For Managers – How To Manager Software Engineers

If I have a person sawing a log for me and it takes them three quarters of an hour to saw through three quarters of a log I can reasonably assume that it will take an hour to finish the job. Given this information I can also assume that if there are ten logs that require sawing and one is done each day (so the person sawing is fresh each time) then each day I need to allocate one hour to the sawing task.

How can we software engineers explain to our managers that software development is not like sawing a log?

Firstly it’s exceedingly hard to know how far through the software you are at a given time.

Secondly you can’t usually predict when the next time consuming challenge is going to hit you. Some parts of a design may go smoothly but then the development may uncover something that had not previously been considered and the sensible engineering solution may well be to re-write (or at least refactor) some of the earlier design that may have been considered “finished”.

With larger projects this unpredictably does tend to even out so that you can (with experience) make estimates of the time needed to get a software system to a point where it is useable.

But I’ve just been asked how long will it take me to fix an issue with a particular type of output on a particular type of device. Once I find how to make the change it will be a ten minute fix. But how can I estimate how long it will take to find (or even if it is actually possible?). How much of the device manual will I have to read and understand in order to find the correct method to achieve the result ? And how much of the code will need to be redesigned to accommodate the required change(s)? And if the documentation is poor (as it usually is) how much experimenting / testing will be required to get it working?

So what do I do ? Quote a short delivery time and then look a fool (and perhaps upset the customer’s planned schedule) if it takes three times as long as I said ? or quote a long delivery time and get the reaction “how long? just to do that simple job! ”. Best is to try to get managers to read and consider this blog !

A Software Development Tip – !!!

When developing code it is a frequent occurance that you write something as a quick “get it to compile” fix whilst your mind is focused on the key part on which you are working.

Let me offer an example. Whilst developing a TCP/IP interface to a set of remote digital and analogue i/o you come across a need for a function to extract a set of characters that are specific within a string. You might quickly write a function with a prototype:

String ExtractSpecificCharactersFromString(String IncomingString);

 In order to keep going on the main code you are writing on you may quickly write a dummy function body:

 String ExtractSpecificCharactersFromString(String IncomingString)
{
  return String(“D0=0xf5c9”);
}

 This allows your code to compile and it retuns a sample data String that allows you to start testing your code, all of which is good!

 But there is a real danger that “dummy” code like this can get left in genuine code for too long. You end up creating your own bug: “I am sure that digital output byte is set to 0xf500, so why does it keep reading as “0xf5c9?”

 Having wasted time as a younger programmer chasing these self inflicted bugs I have adopted a procedure where I reserve a comment statement with three consecutive ’!’ characters specifically for tagging code that is still to be written. For the above example create the function body as:

 String ExtractSpecificCharactersFromString(String IncomingString)
{
  return String(“D0=0xf5c9”); // !!! still to be written
}

 Then at regular “low concentration” moments you can go back to the code and search for the character string ”!!!! in “all project files” (using the Embarcadero C++ search terminology here) and quickly find all examples of dummy code where you know further work is required.

 I chose ”!!!” for this task as it is a string which is exceedingly unlikely to appear in genuine C++ code. Choose something else if you like but whatever you choose stick with it!