Save yourself the data fee, 1:50
- 2/3 rubbing alchohol
- 1/3 water
- in a spray bottle
–jeroen
Posted by jpluimers on 2021/01/29
Save yourself the data fee, 1:50
- 2/3 rubbing alchohol
- 1/3 water
- in a spray bottle
–jeroen
Posted in LifeHacker, Power User | Leave a Comment »
Posted by jpluimers on 2021/01/29

Different keying for each colour in the SB50 series. Note that black and grey are keyed the same making them interchangeable.
I bumped into [WayBack] Anderson Powerpole – Wikipedia through Cheap VS Expensive Solar Panels | 12v Touring | Project Cyan – YouTube.
APC uses some of these connectors (I have seen the yellow, blue and grey ones) in many of their systems: [Archive.is] apc battery connectors – Google Search
Images from wikipedia.
Quotes from the article:
Powerpole connectors are physically and electrically hermaphroditic, thus avoiding the need to worry about which end is the plug and which the socket, or which end has the correct polarity.
…
The Anderson Powerpole connector is more expensive than the older de facto standards of the two-wire trailer plug and the Molex connector, but provides a more reliable electrical connection (both mechanically and electrically), and is easier to adapt to a wider range of wire gauges.[19] Another advantage over the older trailer or Molex connectors is the Powerpole’s superior ratings to withstand 100,000 no-load insertions and 250 hot-plugs at full load. The specific hermaphroditic nature of the powerpoles is a significant advantage since batteries can be both a power source or a power sink, a power supply can be connected to a radio and/or a battery, and multiple batteries, radios, and/or redundant power sources can be connected in parallel using the same power distribution panels.
…
For use in amateur radio, the community has adopted a standard color code, polarity, and specific physical arrangement for assembling pairs of Powerpole connectors. One red and one black powerpole housing can be physically arranged in 4 topologically different mechanical orientations (red left, red right, red top, red bottom – when viewed from contact side with tongue up), 2 of which are mechanically incompatible (connectors won’t mate with ARES) and 1 is electrically incompatible (will mate but reverse polarity) with the ARES standard; there are also additional unusual configurations in which one housing is rotated 90 degrees. The standard is red positive and black negative. When viewed from the contact side, a mnemonic for remembering the arrangement is: “Red [on] Right — Tongue [on] Top” (note the first letter alliteration).
–jeroen
Posted in LifeHacker, Power User | Leave a Comment »
Posted by jpluimers on 2021/01/29
Interesting: [WayBack] Detecting what language or script a run of text is written in, redux – The Old New Thing.
Do not confuse language with the scripts in which one or more languages can be written, and much more is covered in it.
Related:
–jeroen
Posted in Development, Software Development, The Old New Thing, Windows Development | Leave a Comment »
Posted by jpluimers on 2021/01/28
[WayBack] Nick Craver on Twitter: “1. “Are you ready to work on the auth code?” 2. New dev: “Hell yeah, bring it on!” 3.… “.
Relevant because security often is a nightmare:
Both threads are a good read.
–jeroen
Posted in .NET, Android, Development, Fun, Mobile Development, Software Development, Xamarin Studio | Leave a Comment »
Posted by jpluimers on 2021/01/28
Interesting read: [WayBack] Deciphering the Messages of Apple’s T2 Coprocessor | Duo Security.
Via:
–jeroen
Posted in Development, Security, Software Development | Leave a Comment »
Posted by jpluimers on 2021/01/28
If you have a class (like TMyClass) in the current unit, you can get the unit name as follows:
UnitName or UnitScope to get the unit nameTMyClass.UnitName or TMyClass.UnitScopeDelphi added UnitName [WayBack] and Delphi XE2 added UnitScope [Archive.is]. Their implementations are different, but I have not seen classes where the outcome is different.
The code below shows that when the underlying RTTI UnitName field inside a PTypeData referred by a PTypeInfo contains an @ sign, then UnitName takes the part before the @, and UnitScope the part after the @, but I have not yet seen units where the underlying field contains an @ sign.
If you have seen that, please let me know.
I needed this in order to research some unit initialisation order issues.
A post helpful with that was [WayBack] windows – Can I determine the order in which my units have been initialized? – Stack Overflow for which this comment by Ritsaert Hornstra is the most important bit:
Related: If you use a unit in the interface section you know that that unit will be initialized BEFORE the unit that uses that unit. When using units in the implementation section this is not the case. So usually when you are using a unit with a singleton in it, created in it’s initialization section, you should use that unit in the interface section to make sure that it is initialized before use.
There is also an answer [WayBack] by Remko Weijnen that shows how to hack the current initialisation order if you know the address of InitContext inside the System.InitUnits method.
Back to UnitName versus UnitScope, the code:
class function TObject.UnitName: string; var LClassInfo: Pointer; S: _PShortStr; begin LClassInfo := ClassInfo; if LClassInfo <> nil then begin S := @PClassData(PByte(LClassInfo) + 2 + PByte(PByte(LClassInfo) + 1)^).UnitName; if S^[1] <> '@' then Result := UTF8ToString(S^) else Result := UTF8ToString(Copy(S^, Pos(_ShortStr(':'), S^) + 1, MaxInt)); end else Result := ''; end; class function TObject.UnitScope: string; var LClassInfo: Pointer; S: _PShortStr; begin LClassInfo := ClassInfo; if LClassInfo <> nil then begin S := @PClassData(PByte(LClassInfo) + 2 + PByte(PByte(LClassInfo) + 1)^).UnitName; if S^[1] <> '@' then Result := UTF8ToString(S^) else Result := UTF8ToString(Copy(S^, 2, Pos(_ShortStr(':'), S^) - 2)); end else Result := ''; end;
Related:
–jeroen
Posted in Delphi, Development, Software Development | 1 Comment »
Posted by jpluimers on 2021/01/27
I am really glad this keynote got recorded. Still very relevant, it is as much about software development as it is about society.
Go watch it, as it gives you reason to think about your role in the software development process, and in the information fire hose at large.
Back in the days, David Intersimone was right when he created the regular blog post “Sip from the Firehose” (for early materials, see [WayBack] GetPublished – Author Information: Firehose).
The talk main thread is about current and ever growing overload of information which basically makes it disinformation, combined with the abundance of “AI” recording devices around you that basically make you the product.
Basically we reached all the tick marks of these books:
The session is not just about “how bad is the situation” (it is very), but also provides directions on how to get out of it for both people in the development process, as well as consumers, producers and sharers of information.
via:
–jeroen
Posted in .NET, Development, Opinions, Power User, Security, Software Development | Leave a Comment »
Posted by jpluimers on 2021/01/27
A while ago, I saw this tweet:
It mentions LISP (nowadays mostly called Lisp), likely because their derivatives like Scheme and Clojure still actively mention their ancestry.
ALGOL is not in the list, but has had so much influence on modern programming. So here the thread that followed:
–jeroen
Posted in ALGOL, Delphi, Development, LISP, Software Development | Leave a Comment »
Posted by jpluimers on 2021/01/27
On one of the sites, when having some Delphi package registration issues, the standard measure was to delete the complete Package Cache subtree (like HKEY_CURRENT_USER\Software\Embarcadero\BDS\17.0\Package Cache).
Since there is so little information about it, it is on my list of things to eventually research.
Some links I already found, but had no time for to fully read:
Hopefully the Cleaning package cache for Jcl110.bpl in this post will help me find more details.
Unrelated: You should not delete the folder C:\ProgramData\Package Cache\? – Super User, but matched my initial delphi registry “Package Cache” – Google Search.
Yup, I did it: I added an “Undocumented Delphi” category.
–jeroen
Posted in Delphi, Development, Software Development, Undocumented Delphi | Leave a Comment »
Posted by jpluimers on 2021/01/26
TL;DR
The examples in this post are specific for NUnit but, you can apply this pattern for safely running unit tests in parallel to any unit test framework that supports parallel execution.
To safely run tests in parallel, do the following:
- Mark your test fixtures with the
Parallelizableattribute and set the parallel scope toParallelScope.All.- Create a private class called
TestScopeand implementIDisposable.- Put all startup and clean-up logic inside the
TestScopeconstructor and.Dispose()method respectively.- Wrap your test code in a
using (var scope = new TestScope) { ... }block
From [WayBack] Run your unit tests in parallel with NUnit, which also covers:
Via: [WayBack] Sander Aernouts on Twitter: “Run unit tests in parallel with NUnit without having one test interfere with another test. https://t.co/FC0fNocGov”
–jeroen
Posted in .NET, Development, Software Development | Leave a Comment »