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
Cool feature I discovered from [WayBack] How to read network requests in Chrome for new tab or popup window:
chrome://net-internals/#events
It will immediately show all events from all tabs including networking events.
The red bar at the top has a drop down on the right where you can stop them and perform a few other actions.
During or after capture, you can select relevant requests from the list (through checkboxes) so the right of the pane gets their info (which is a lot: not just the request/response content including all headers and cookies, but also any delegates from extensions and their results).
Posted in Bookmarklet, Chrome, Google, Power User, Web Browsers | 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
Interesting for some projects: [WayBack] DC12V COB LED Light Strip Panel 5W 10W 20W 50W 200W 300W LED Bulb White Blue Red Flip Chip COB Lamp DIY House Car Lighting 12V-in LED Bulbs & Tubes from Lights & Lighting on Aliexpress.com | Alibaba Group
Note they are not current limited!
This means I need to read more on current limiting; these might be a start:
Via The biggest LED COB panel yet! Voltage/current tests. – YouTube
–jeroen
Posted in Development, DIY, Hardware Development, Power User | Leave a Comment »
Posted by jpluimers on 2020/05/19
From [WayBack] ipmi – Linux: Why does Single User mode work on Serial Console but not on the attached Keyboard/Video/Monitor? – Server Fault (slightly edited; thanks Patrick!):
Becauseinithas not spawned off multiple TTYs yet (getty,mgetty, etc), so you only have the primary TTY. The primary TTY is the lastconsole=parameter on the kernel command line. All the console parameters get the output, but only the last one will be able to act as input.
–jeroen
Posted in *nix, Debian, Linux, openSuSE, Power User, RedHat, SuSE Linux, Tumbleweed | 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/18
This is still so cool: [WayBack] Free Linux cloud shell for Gmail users … – Adrian Marius Popa – Google+:
Free Linux cloud shell for Gmail users
https://news.ycombinator.com/item?id=16247577
comments are more interesting
“If you want a free Linux box with a Public IP and SSH, I’d recommend spinning up an f1-micro VM. It’s part of the permanent free tier”
Even cooler is that you can use it both from a web browser and from your own console, more on that below.
The above links:
Posted in Google, GoogleCloudShell, Power User | Leave a Comment »