Almost 20 years old, but still a very nice read [Archive.is] David Korn Tells All – Slashdot.
Another funny story involving David Korn during the not-so open source times of Microsoft late last century: [WayBack] Korn Shell Story
–jeroen
Posted by jpluimers on 2020/05/21
Almost 20 years old, but still a very nice read [Archive.is] David Korn Tells All – Slashdot.
Another funny story involving David Korn during the not-so open source times of Microsoft late last century: [WayBack] Korn Shell Story
–jeroen
Posted in *nix, *nix-tools, bash, bash, Development, History, Power User, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2020/05/21
From [WayBack] Why would the compiler generate a "E2018 Record, object or class type required" helper when I use a ToUpperInvariant (or any TStringsHelper call) on t… – Jeroen Wiert Pluimers – Google+:
Why would the compiler generate a
"E2018 Record, object or class type required"when I use a ToUpperInvariant (or any TStringsHelper call) on theTextproperty of aTEdit?Full failing code is at [WayBack] https://gist.github.com/jpluimers/b5e3684f725216622bdcb80bf5f10698
Failing line is this:
Edit1.Text := Edit1.Text.ToUpperInvariant; // the above line generates this error: // [dcc32 Error] MainFormUnit.pas(29): E2018 Record, object or class type requiredThis fails as well:
Edit1.Text := TStringHelper.ToUpperInvariant(Edit1.Text);Why would the compiler (in this case XE8) throw this error?
Note the workaround is simple:
var lText: string; begin lText := Edit1.Text; Edit1.Text := lText.ToUpperInvariant;My suspicion is that the
Editproperty is of typeTCaptionwhich istype string.Could it be that simple?
To which David Heffernan responded:
Yup, the issue is
TCaptionhas no helper. Pretty distressing.
Typed types are indeed different types. They have been there for a long time (to facilitate generating different type information so you can for instance hook up different property editors to TCaption (a typed string) or TColor (a typed integer).
It is explained at [WayBack] Declaring Types. but has existed since Delphi 1 or Delphi 2.
More on the implications is at [WayBack] pascal – Delphi Type equivalence and Type equality syntax – Stack Overflow.
–jeroen
Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »
Posted by jpluimers on 2020/05/20
From a while back, but still one of the easiest flow charts to see if your organisation really works in an agile way: “graphical flow chart for separating agile from agile BS”
It is part of [WayBack] DIB_DETECTING_AGILE_BS_2018.10.05.pdf (hey, it is military so there are dates and abbreviations).
Source: [WayBack] The Defense Innovation Board wants to help the military recognize ‘agile BS’ – Fedscoop
Via manu links, including:
–jeroen
Posted in Agile, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/05/20
Reminder to self to eventually try to merge this into GExperts: [WayBack] GitHub – NickRing/Delphi-Shortcut-Finder: Shows/find keyboard short-cuts have be assigned, that may be conflicting.
And a reminder to ensure if I ever bump into XE7 again, I need to ensure it is at least update 1: Source: QualityCentral Report # 127616: registry key has incorrect value, 20 should be 21.
–jeroen
via: [WayBack] I need some help from anyone who knows RTTI better than me. I’m writing an OTA tool to list all the actions or keybindings that are associated with a s… – David Hoyle – Google+
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/05/19
The below is based on [WayBack] delphi – Is there any way to catch the error if loading a dll cannot find a dependency? – Stack Overflow which I got via:
The problem is that the [WayBack] SysUtils.SafeLoadLibrary Function (present since at least Delphi 2007, and a wrapper around the [WayBack] LoadLibrary function (Windows)) does many good things – maybe even too many – so you need to take all of them into account:
function SafeLoadLibrary(const FileName: string; ErrorMode: UINT = SEM_NOOPENFILEERRORBOX): HMODULE;
SafeLoadLibrary loads a Windows DLL or Linux shared object file, as specified by Filename.SafeLoadLibrary preserves the current FPU control word, preventing library initialization code from permanently overwriting precision and exception masks.SafeLoadLibrary temporarily sets the system error mode to ErrorMode. The default, SEM_NOOPENFILEERRORBOX, suppresses error dialogs. The previous error mode is restored before SafeLoadLibrary exits. For a list of error modes, refer to [Wayback1/Wayback2] SetErrorMode in the Microsoft documentation.Dummy argument is ignored.Do not ever pass 0 (the number zero) as ErrorMode; I’ve seen lots of applications just passing zero for parameters they are not sure about, but in this case it is the worst solution as it will show all errors as a popup.
Do not forget a parameter either: the default value SEM_NOOPENFILEERRORBOX will only suppress a message box when it fails to find a file. But it will fail to enable SEM_FAILCRITICALERRORS which is what you really want.
LoadLibrary and SafeLoadLibrary load the DLL from a file. But what if you want to load it from a resource?
Then this post from Thomas Mueller applies: he adopted the SafeLoadLibrary logic to load from a resource:
The way Delphi sets the FPU control word is not thread safe: QualityCentral Report # 106943: Set8087CW/SetMXCSR are not thread-safe (you could work around in your implementation by using thread safe versions like mentioned in [WayBack] FastMM / Discussion / Open Discussion:Call to GetStackTrace changes 8087CW).
Calling SetErrorMode sets a global application wide setting (by default including all threads) of error code, so it is better to either:
Because the error mode is set for the entire process, you must ensure that multi-threaded applications do not set different error-mode flags. Doing so can lead to inconsistent error handling.
Second, SEM_FAILCRITICALERRORS prevents an error to pop up when dependencies of the loaded file are not available. You might want to combine (bitwise or) it with other values like SEM_NOGPFAULTERRORBOX.
There are many more modes you can pass to the [WayBack] SetErrorMode function (Windows):
| Value | Meaning |
|---|---|
|
Use the system default, which is to display all error dialog boxes. |
|
The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process.
Best practice is that all applications call the process-wide SetErrorMode function with a parameter of SEM_FAILCRITICALERRORS at startup. This is to prevent error mode dialogs from hanging the application. |
|
The system automatically fixes memory alignment faults and makes them invisible to the application. It does this for the calling process and any descendant processes. This feature is only supported by certain processor architectures. For more information, see the Remarks section.
After this value is set for a process, subsequent attempts to clear the value are ignored. |
|
The system does not display the Windows Error Reporting dialog. |
|
The OpenFile function does not display a message box when it fails to find a file. Instead, the error is returned to the caller. This error mode overrides the OF_PROMPT flag. |
–jeroen
all via:
Related:
Posted in Delphi, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2020/05/18
On my research list: read more about hexagonal architecture – Google Search.
Like:
Related: [WayBack] Learned today: In the praxis most domains are way more than sufficiently complex… – Jeroen Wiert Pluimers – Google+
I think I like a round diagrams better than hexagonal ones, because it gives more clarity to me.
Also on my list:
–jeroen
Posted in Development, Software Development, Systems Architecture | Leave a Comment »
Posted by jpluimers on 2020/05/14
Back in the days, framing stuff from other sites would just work. Nowadays, often they don’t because of a variety of reasons, often the site not wanting to be embedded, which is OK with me.
But it pays knowing what they do and how they do it, to ensure it is not an accidental setting of the address bar URL to the wrong value like in
if(top != window) { top.location = window.location }
So here are some links for me to dig deeper when I encounter framing issues again:
[WayBack] Headers to block iframe loading
My basic idea for a workaround is to go through a proxy.
It looks like others had this idea too, so some links future reading via cors proxy – Google Search:
–jeroen
Posted in Development, JavaScript/ECMAScript, JSFiddle, Scripting, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2020/05/14
I always thought this was the Ctrl+Shift+Up / Ctrl+Shift+Down in ModelMaker Code Explorer, but it is not: the CnPack navigation is the one that comes most close:
[WayBack] Is there a way in the editor to move from the interface section declaration of a method to its implementation (signature)?… – Bill Meyer – Google+
–jeroen
Posted in Delphi, Development, Software Development | 4 Comments »
Posted by jpluimers on 2020/05/13
A cool [WayBack] 108 byte CSS Layout Debugger · GitHub (and sligtly different versions) that makes your page look like this:
[].forEach.call($$("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
–jeroen
Posted in CSS, Development, JavaScript/ECMAScript, Scripting, Software Development, Web Development | Leave a Comment »
Posted by jpluimers on 2020/05/13
Though the shirt is not available on Amazon [WayBack] any more, still – after 25 years – so many recruiters still get it wrong.
Not just recruiters, so: [WayBack] Why is JavaScript called JavaScript, since it has nothing to do with Java? – Stack Overflow, thanks to CMS [WayBack]:
From an interview made to its creator Brendan Eich:
InfoWorld: As I understand it, JavaScript started out as Mocha, then became LiveScript and then became JavaScript when Netscape and Sun got together. But it actually has nothing to do with Java or not much to do with it, correct?
Eich: That’s right. It was all within six months from May till December (1995) that it was Mocha and then LiveScript. And then in early December, Netscape and Sun did a license agreement and it became JavaScript. And the idea was to make it a complementary scripting language to go with Java, with the compiled language.
he continues on the relation of ECMAScript based languages:
JavaScript, was originally named Mocha, later it was renamed to LiveScript, and then to JavaScript.
The LiveScript to JavaScript name change came because Netscape and Sun did a license agreement.
The language was then submitted for standarization to the ECMA International Organization. By that time, Netscape didn’t allow the use of the “JavaScript” name, so the standarized language is named ECMAScript.
JavaScript isn’t actually an open name. Now it’s a trademark of Sun (now Oracle).
There still a lot of confusion, some people still think that JavaScript, JScript, and ECMAScript are three different languages.
ECMAScript is the “standards” name for the language.
JavaScript is technically a “dialect” of ECMAScript, the Mozilla Foundation can use “JavaScript” as the name of their implementations (currently present on the Rhino and SpiderMonkey engines).
In the early days, Microsoft decided also to do what Netscape was doing on their own browser, and they developed JScript, which is also an ECMAScript dialect, but was named in this way to avoid trademark issues.
–jeroen
via: [WayBack] Does it bug you when people say Java when they actually mean JavaScript? https://www.amazon.com/dp/B06Y3XK69B – Jeroen Wiert Pluimers – Google+
Posted in Development, History, Java, Java Platform, JavaScript/ECMAScript, Scripting, Software Development | Leave a Comment »