Archive for the ‘Development’ Category
Posted by jpluimers on 2018/11/23
If you are not a company good at infrastructure, then do not start hosting new things yourself. This is why I like the DelphiPraxis forums (both English and German), as they really know what they are doing.
Of course, forums never have all the features in a way that each user wants, but DelphiPraxis is secure, has well maintained and public moderators, and a history if quality posts.
But the G+ group did move there for a reason (: [WayBack] We have moved to https://en.delphipraxis.net ! Starting January 1st, 2019 – the G+ Delphi Developers Community will be closed for new posts and new mem… – Lars Fosdal – Google+
After a long series of goofing around with infrastructure (old forums, new forums, now newer forums, years of TLS trouble, selling software or which the infrastructure has been down for a long time), last week, finally they had the [WayBack] New official Embarcadero forums online http://community.idera.com/developer-tools/ The sign-up/login is a bit prickly at first, so keep your login name… – Lars Fosdal – Google+.
The announcement already has a the catch in the title: initially they were http only, so totally insecure for your logon data. They could have easily circumvented that by deploying some LetsEncrypt renewal, for instance the commercial one in Delphi ([WayBack] Execute’s Online Store), of which this is a demo: [WayBack] GitHub – tothpaul/LetsEncryptDelphi: Let’s Encrypt component for Delphi Tokyo 10.2.3
I have not added them to embarcaderomonitoring.wiert.me, as they are now on the Idera.com domain, so I will likely start a special monitoring page for those subdomains.
–jeroen
Posted in Delphi, Development, Power User, Security, Software Development | Leave a Comment »
Posted by jpluimers on 2018/11/22
The first messages on G+ saw about Delphi 10.3 Rio are these:
- [WayBack] Delphi 10.3 is online. – Ralf Stocker – Google+
- [WayBack] The platform selection in Delphi Rio seems to be down. – Gert Scholten – Google+
- [WayBack] license.embarcadero.com is down. Perhaps this is a good sign, because of overwhelming interest in Rio, but it does not make a great impression. Can thi… – Johan Bontes – Google+
- [WayBack] Great new feature of 10.3 – Tomasz Kunicki – Google+

- [WayBack] Just installed Delphi 10.3 and used migrationtool.exe to import 10.2 settings, and my projects fail to compile with the following error (I am not even c… – Eric Grange – Google+
- [WayBack] FMX minimize bug fix for Delphi Rio Community. The two screenshots show you how. https://quality.embarcadero.com/browse/RSP-17322 You at home would ne… – Gustav Schubert – Google+
- [WayBack] … but I am working on it. I have already installed the new version and it compiles on my machine. But don’t hold your breath, there are some issues. Unt… – Thomas Mueller (dummzeuch) – Google+
- [WayBack] I’m having serious problems with the license registration. Have submitted a support case this morning but did not get a reply yet, and now it is weekend… – Reinier Sterkenburg – Google+
- [WayBack1/WayBack2] RIO – First thoughts: No additional downloads, no interbase (I check install everything). No love for the Win64 C++ compiler. First time I can recall th… – Joe C. Hecht – Google+
- [WayBack] I’ve had quite a few enquiries about when the Parnassus plugins (Bookmarks and Navigator) are coming to 10.3 Rio. The answer is soon! Ideally, they’d … – David Millington – Google+
-
“I would have preferred to have the plugins ready at the same time Rio shipped, but shipping Rio itself took precedence.” – if you would have done that you would have seen for yourself where it still has some glitches and what is problematic for third party plugin developers before the release, but hey…
https://en.wikipedia.org/wiki/Eating_your_own_dog_food
[WayBack] Are these menus removed in 10.3 Rio? “The context menus for the code editor tabs and files in the Project Manager now have a “Show In Explorer” menu it… – Zhan Wang – Google+
-
They got lost during the IDE revamp – known but not fixed yet. -.-
- [WayBack] I have just downloaded 10.3 and after less than 1 minute I already have found an issue. Does this happen to you too? It seems that code insight does n… – Alberto Miola – Google+ about [RSP-21719] Error insight incorrectly marks inline var as error – Embarcadero Technologieswhich has a nice discussion on inline variables (for me, inline variables often indicate a refactor-to-method should take place, but I do like the type inference part), including:
-
+Ralf Stocker On the contrary. Inline variables reduce scope, make code more readable and remove a whole range of potential bugs.
You can make fine mess out of your code with or without inline variables. And if you do it will not be their fault but yours.
-
+Darian Miller So we should never get any new features because existing tutorials will be broken and we will have to learn something new?
If you are confused by reading code with inline variables more than five minutes after you have learned about existence of that feature, maybe you are in the wrong profession.
And no, reducing scope is not code smell. You cannot always refactor into another method. Small methods are good, but they must have some logical organization.
Too much granulation can be equally bad as too less granulation.
-
+Darian Miller First of all, you don’t have to use inline variables if you don’t like them. Cost of readability, departure from historical context/documentation, lack of backward compatibility will equal to zero. Even the tooling will not be broken if you don’t use it (unless, of course you don’t write tools)
Some benefits, there are too many to write them all:
- loop variables – they definitely belong into loop scope, and they do pollute variable declaration block with unnecessary cruft.
- Other temporary variables you may need, that also don’t belong into main declaration block, like explicit references for better handling and more control over compiler introduced implicit references – those are especially useful for controlling ARC references – and we do have ARC in classic compiler, too.
- skip unnecessary automatic initialization/finalization of managed variables in code paths that will not execute – speed optimization.
- Preventing errors (for some you have compiler hints, but if you miss the hint…) – some examples
You cannot forget to initialize variable before use
procedure Test1;
begin
var sl := TStringList.Create;
try
finally
sl.Free;
end;
end;
You cannot use variable that belongs to wrong scope and might be uninitialized – this code will not compile
procedure Test2;
begin
try
var sl := TStringList.Create;
finally
sl.Free;
end;
end;
5. Type inference – repeating type two times, especially with generics makes code harder to read because while you are skipping reading redundant information, you may skip important one.
This is just the tip of the iceberg. Inline variables are without a doubt extremely valuable feature.
-
Coding will be a lot simpler as Dalija explained. Here an example using generics:
TYourType = TDictionary<String, Cardinal>;
TYourClass = class
fSomeDic : TYourType
public
procedure DoSomething;
end;
implementation
procedure TYourClass.DoSomething;
begin
for var lItem in fSomeDic do
litem.Value := 10;
end;
As you see this is very easy to read. And litem belongs to the for loop. It doesn’t exists outside. Any reference to it will raise an error.
If you need to change your base type to
TYoutype = TDictionary<string, uint64>;
There’s nothing else to change. No need to hunt every tpair<K,V> declaration.
You have the tools, use it at you see fit!
- Darian Miller
+
Dalija Prasnikar Not sure why I waste the time… but to say cost is zero is just pontification which is sometimes hard to ignore. Say I don’t use the new feature myself as I need to stay on an older version… now, say there’s a new tool just posted to GitHub and it highly leverages this functionality. I cannot use that tool without some effort. The cost is not zero. Say you are on the latest version, but you rely on tooling that cannot parse this new form of variable definition. Your tooling for code documentation, coverage analysis, static code analysis could be completely broken the second any of this code gets introduced into the project. I simply object to saying there’s zero associated cost. That’s really not true. There are actual, real-life difficulties introduced with a major change like this. For me, the costs (all of them) are not worth the benefits (which I acknowledge are present.) But this is a really moot because it wasn’t my decision to introduce this feature at this time (which I would have vehemently voted against – at this time.) I haven’t checked to see if Peganza’s tools were upgraded to handle this version. My assumption is they haven’t, so this coding style is forbidden in new code until such time as the tooling catches up.
- So Error Insight got no changes, which means old bugs are still there: [WayBack] 7 Major versions later and Delphi hasn’t improved a bit! Delphi IDE’s error insight complains about this perfectly valid code: if aHeader.RecType…. – Graeme Geldenhuys – Google+
- [WayBack] +Marco Cantù is unstoppable. I can’t keep up LOL – Clement Doss – Google+
- [WayBack] I have one application, which when I compile it for Win32, ends its compile with: F2084 Internal Error: C2527. This is in Delphi 10.3 Rio. When compili… – Reinier Sterkenburg – Google+
- [RSP-21806] F2084 Internal Error: C2527 – Embarcadero Technologies
program Test_C2527;
{$APPTYPE CONSOLE}
uses
Generics.Collections;
type
TData = record
Z: Integer;
end;
var
Q: TThreadedQueue;
begin
end.
- I’ve checked: Adding a string to the record helps.
Making it a class instead of a record also helps.
- [RSP-21790] Records & Int64 [dcc32 Fatal Error] F2084 Internal Error: C5551 – Embarcadero Technologies
- I also noticed that the error when deactivating the optimization in the project options, no longer occurs .
Project > Options > Delphi Compiler > Compiling -> [ Optimization := False ] works
Project > Options > Delphi Compiler > Compiling -> [ Optimization := True ] doesn’t work
- [RSP-19558] F2084 Internal Error: C2489 – Embarcadero Technologies
program Project3;
{$APPTYPE CONSOLE}
uses
Generics.Collections,
Types;
type
TDateAndRawData = record
Values : PDouble; // pointer to the data 'array'
end;
TDataQueue = TThreadedQueue<TDateAndRawData>;
begin
end.
- Changing “record” to “class” makes the error disappear.
- I also get the error with “values : integer”.
It seems to fail with any non-managed items. Adding a managed field (e.g. x: string) to the record helps!
- It fails for 32-bit Windows target platform.
For 64-bit Windows target platform it compiles without issue.
Other target platforms not tested…
- [WayBack] Delphi IDE Explorer is broken in Delphi 10.3 Rio – twm’s blog because the Project Options dialog now uses the Screen.OnActiveControlChange event itself and does not bother to call the original event.
- [WayBack] Andreas on Twitter: “What’s with the Delphi Rio Debugger? The CPU view shows the wrong XMM registers in the disassembly. The blue dots in the RTL/VCL (rtl.bpl/vcl.bpl) are at the correct position but when debugging (breakpoints, stop over/in) the debugger jumps like crazy through the code.”
- [WayBack] I’m wondering today after receiving my renewal quote which is 50% of the value of a new license, do we ever get the right to force Embarcadero to do wha… – Andrew Pratt – Google+
- [WayBack] Delphi 10.3 Rio – Language Changes – VSoft Technologies blog via [WayBack] Blogged – Delphi 10.3 Rio Language Changes – Vincent Parrett – Google+:
So lets take a look at which suggestions made the cut for 10.3 – referencing my original post.
Related:
I think I will wait a while before installing until more positive messages are being published.
If you do want to try, the hashes of delphicbuilder10_3_0_94364.iso are these:
crc32 157b6e36
md5 0882d58cb53a7d0a828cc45d06c6ecd0
sha1 21579b530f781895885923809d9e670b439ebf9d
sha256 9213de93c2abdd6a2ee23aa84fc7e63a87d62d0344f0d0f0ee162d0e7dce7c7d
and for the radstudio10_3_0_esd_94364.exe they are:
crc32 033aeb53
md5 b25fab9d5f0724fb1d59ea77deff6702
sha1 289bbf33c90ae43b151af116e1e7c7a5348591e6
sha256 fb9a825ddaf235441ff72c10fbb03d2cf94adb3f037508e69f0978a37dc95773
––jeroen
PS: [WayBack] How to verify file hashes on macOS | ModMy
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »
Posted by jpluimers on 2018/11/22
One occasion I had SSH throw a Connection Reset by Peer on my when was the SD-card of a Raspberry Pi started failing and the ext4 filesystem got mounted in read-only mode.
Then sshd was still listening on port 22, but since it could not write to disk any more, it threw a Connection Reset by Peer to the client.
It was on OpenSuSE Tumbleweed, but would failed just as well using Raspbian.
Lessons learned:
- IoT hardware will fail.
ext4 breaks when the hardware breaks.
–jeroen
Reference:
Posted in *nix, *nix-tools, Debian, Development, Hardware Development, IoT Internet of Things, Linux, Network-and-equipment, openSuSE, Power User, Raspberry Pi, Raspbian, SuSE Linux, Tumbleweed | Leave a Comment »
Posted by jpluimers on 2018/11/21
Converting string literals to to date/time/timestamp related data is always tricky in many Database environments.
Firebird is no exception, especially because sometimes it truncates a zero time portion from a date-time/timestamp.
So you can get this:
select cast('30-12-1899' as TimeStamp)
from rdb$database
Throwing an error:
conversion error from string "30-12-1899"
And this:
select cast('30.12.1899' as TimeStamp)
from rdb$database
Returning
CAST
30-12-1899 0:00:00
–jeroen
Posted in Database Development, Development, Firebird, Software Development | Leave a Comment »
Posted by jpluimers on 2018/11/20
When creating a library of libraries where the libraries use parts of the other libraries creates a mess when organised as a repository with subrepositories having other subrepositories.
It might be better to have one big repository containing a suite of functionality. This is why darkThreading became part of darkGlass: [WayBack] Why no git submodules for the libraries it depends on? · Issue #1 · chapmanworld/darkThreading · GitHub:
You might want to maintain that suite as one big versioned repository, with a different means of structuring it than a tree of submodules. That way you can keep the more complex interdependencies between the parts you have now.
Example of the mess: [WayBack] Duplicate submodules with Git – Stack Overflow
–jeroen
Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »
Posted by jpluimers on 2018/11/20
StackOverflow / StackExchange is growing too large:
You’ve got a question about git. Its not uncommon, lots of people have questions about git. But where should the question be asked?
Source: Where does my git question go? – Programmers Meta Stack Exchange
–jeroen
Posted in Development, DVCS - Distributed Version Control, git, GitHub, Opinions, Pingback, Software Development, Source Code Management, SourceTree, Stackoverflow | Leave a Comment »
Posted by jpluimers on 2018/11/20
It’s been a wish for a very very long time: to get the name of an identifier as a string in Delphi:
For now the best one can do is either using an Assert and catching the exception (it gets you the unit name, source file name and source line number) in the links below, or using debug symbol information (like a MAP or TDS file) mentioned in the StackOverflow questions above.
C# has had a [WayBack] nameof for many years now that is evaluated at compile time: [WayBack] c# – Is nameof() evaluated at compile-time? – Stack Overflow.
There is a request RAD Studio – RSP-13290: NameOf(T) compiler (magic) function in Quality Portal by Horácio Filho about 3 years ago quotes below.
Since it took the C# team about 3 years after the original [WayBack] Add nameof operator in C# – Visual Studio request, I wonder how fast the Delphi team is.
NameOf .NET-like compiler magic (intrinsic) function would eliminate a lot of hand-written exception messages from several units.
C# 6 introduced nameof operator to obtain the simple (unqualified) string name of a variable, type, or member.
With the current Delphi implementation, after changing variables name we have ot change the related exception message as well. Putting variables name in the code is not a good practise, and is here that NameOf taking place saving tons of lines of code. As the result of NameOf(T) function (if so) is evaluated at compile time (according to the C# implementation – http://stackoverflow.com/a/26573179) we need a help from compiler or it could be achieved using RTTI.
There is a discussion on Google+ community [WayBack] https://plus.google.com/+StefanGlienke/posts/AsGHSLF4rTX.
The function could be designed as
NameOf(x: Identifier)
following the same (or similar) warranties C# provides.
Using Assert:
–jeroen
Read the rest of this entry »
Posted in Delphi, Development, Software Development | 2 Comments »