The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for December, 2020

Copy files on Mac OS X using drag-and-drop | alvinalexander.com: secret is to hold the Option key

Posted by jpluimers on 2020/12/14

The Finder pure keyboard way of file copy+paste is using CommandC at the source position followed by CtrlCommandV in the destination position (in the destination position,  CommandV will do only a cut+paste) as the paste/copy decision is determined in the final stage.

This is unlike Windows, where CtrlC means copy, CtrlX means cut, and CtrlV finishes the initial action to copy+paste or cut+paste

If you combine mouse dragging, on the Mac it becomes Optiondrag, whereas on Windows it still is Ctrldrag.

I think the Windows ones are more consistent, especially when looking at them in table form:

Action Windows Mac
Keyboard-Only Mouse-drag Keyboard-Only Mouse-drag
copy+paste CtrlC; CtrlV Ctrldrag CommandC; Ctrl+CommandV Optiondrag
cut+paste (or move) CtrlX; CtrlV drag CommandC; CommandV drag

(table with help of HTML Table generator – TablesGenerator.com)

Mac shortcuts via:

–jeroen

Posted in Apple, Mac, Mac OS X / OS X / MacOS, Power User, Windows | Leave a Comment »

Listen Notes: The best podcast search engine

Posted by jpluimers on 2020/12/14

For my link archive: [WayBack] Listen Notes: The best podcast search engine:

The most comprehensive podcast database online. Discover best podcasts. Search podcast show notes and audio transcripts by people, places, or topics.

Via: [WayBack] interesting imo The Best Podcast Search Engine: https://www.listennotes.com – DoorToDoorGeek “Stephen McLaughlin” – Google+

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

FAQ Desk: Autosaving “unnamed” `new 1` files | Notepad++ Community

Posted by jpluimers on 2020/12/14

From [WayBack] FAQ Desk: Autosaving “unnamed” new 1 files | Notepad++ Community:

Check your directory %AppData%\Notepad++\backup\

–jeroen

Posted in Power User, Windows | Leave a Comment »

Win32 build of less 530

Posted by jpluimers on 2020/12/11

Since I do not have a C or C++ build environment, I was looking for the less 530 release for Windows.

I found it via these links:

Searching for less 530, I bumped in these links as well:

  • [WayBack] `less` performs differently when invoked from Bash and from Git – Unix & Linux Stack Exchange 
    • When invoked via git, it does not restore screen content
  • Cause: [WayBack] Git – git-config Documentation: core.pager

    core.pager

    Text viewer for use by Git commands (e.g., less). The value is meant to be interpreted by the shell. The order of preference is the $GIT_PAGER environment variable, then core.pager configuration, then $PAGER, and then the default chosen at compile time (usually less).

    When the LESS environment variable is unset, Git sets it to FRX (if LESS environment variable is set, Git does not change it at all). If you want to selectively override Git’s default setting for LESS, you can set core.pager to e.g. less -S. This will be passed to the shell by Git, which will translate the final command to LESS=FRX less -S. The environment does not set the S option but the command line does, instructing less to truncate long lines. Similarly, setting core.pager to less -+F will deactivate the F option specified by the environment from the command-line, deactivating the “quit if one screen” behavior of less. One can specifically activate some flags for particular commands: for example, setting pager.blame to less -S enables line truncation only for git blame.

    Likewise, when the LV environment variable is unset, Git sets it to -c. You can override this setting by exporting LV with another value or setting core.pager to lv +c.

 

–jeroen

Posted in Power User, Windows | Leave a Comment »

Vaccineer de kinderen die je wilt behouden, om de verspreiding van besmettelijke ziektes te voorkomen

Posted by jpluimers on 2020/12/11

[WayBackEenVandaag op Twitter: “Vaccineren was het afgelopen jaar onderwerp van discussie, ook op social media. Deze video over polio-patiënt Roelofje werd in 2018 het meest bekeken op onze Facebook-pagina.”

Vaccinatiegraad is helaas nog onder de 95% in veel gebieden van Nederland.

Een aantal gebieden is het nog veel lager, waardoor ze geen kudde-immuniteit meer hebben waardoor het verspreidingsrisico enorm versterkt.

Gerelateerd:

 

 

 

–jeroen

Read the rest of this entry »

Posted in Awareness, LifeHacker, Power User | Leave a Comment »

Why We Should Change The Rhythm Of Business | Corporate Rebels

Posted by jpluimers on 2020/12/11

This should be on the reading list of every corporate manager: [WayBack] Why We Should Change The Rhythm Of Business | Corporate Rebels:

The problem arises when people bring their accounting background and mindset with them into business management. Decimals no longer works very well when the focus is on a future with lots of dynamics and uncertainty.

The solution is simple: (1) Targets must have natural deadlines; (2) Forecasting must be dynamic or rolling; (3) Resource allocation must be dynamic; and (4) Performance evaluation must take place when work is completed.

Or as Marjan Venema quoted:

“Yes, something is definitely wrong, but maybe more in the finance manager’s head than with the fisherman’s work rhythm!”

–jeroen

via: [WayBack] “Yes, something is definitely wrong, but maybe more in the finance manager’s head than with the fisherman’s work rhythm!” – Marjan Venema – Google+

Posted in Development, LifeHacker, Power User, Software Development | Leave a Comment »

On Windows 7 and 8.x too: Completely disable Windows 10 telemetry collection – twm’s blog

Posted by jpluimers on 2020/12/10

From [WayBack] Completely disable Windows 10 telemetry collection – twm’s blog:

So I don’t forget: According to an article in c’t magazine, disabling the “DiagTrack” service (“Connected User Experience and Telemetry”) will completely disable user tracking in Windows 10. They also say that they did not see any negative effects.

Source: [WayBack] Telefonierverbot in c’t 01/2019 page 172 (in German)

I saw at least one system where the service is not shown when you run Services.msc: it did not list DiagTrack, nor Connected User Experience and Telemetry. How awful is that!

The service can also be installed non older Windows versions: [WayBack] Just found DiagTrack running in Services – Tips and Tricks

Sometimes, it gets re-enabled. I think this happens during major Windows updates.

To inspect, stop and disable

Run all commands from the console the below bold commands. The non-bold text was the output on my system. If instead of the cmd.exe console, you run a PowerShell console, then remove the bits PowerShell -Command " and " at the start and end of each command.

The first command does not require an Administrative (UAC Elevated) command prompt; the last one does.

However, the first command, needs the | Select-Object * bit as otherwise most of the fields will not be displayed, excluding for instance StartType.

powershell -Command "Get-Service -Name DiagTrack | Select-Object *"


Name                : DiagTrack
RequiredServices    : {RpcSs}
CanPauseAndContinue : False
CanShutdown         : True
CanStop             : True
DisplayName         : Connected User Experiences and Telemetry
DependentServices   : {}
MachineName         : .
ServiceName         : DiagTrack
ServicesDependedOn  : {RpcSs}
ServiceHandle       :
Status              : Running
ServiceType         : Win32OwnProcess
StartType           : Automatic
Site                :
Container           :

On an Administrative command-prompt:

powershell -Command "Set-Service -Name DiagTrack -StartUpType Disabled"
powershell -Command "Get-Service -Name DiagTrack | Stop-Service"

Two notes:

Read the rest of this entry »

Posted in Batch-Files, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »

Stofradar – RevSpace

Posted by jpluimers on 2020/12/10

On my list to play around with: [WayBack] Stofradar – RevSpace.

It gets data from [WayBack] luftdaten.info – Feinstaub selber messen – Open Data und Citizen Science aus Stuttgart , then visualises it.

Via: [WayBack] Helga van Leur on Twitter: “Deze animatie van de uitstoot fijnstof tijdens jaarwisseling is ook treffend… Opvallend is hotspot Veghel e.o. en op Veluwe. Bron: …”

jeroen

Read the rest of this entry »

Posted in Development, Software Development, Web Development | Leave a Comment »

Delphi TRegExOption: Where is description of roNotEmpty option? What does this option do? – Jacek Laskowski – Google+

Posted by jpluimers on 2020/12/10

I really dislike using regular expressions, mainly because every time I bump into code using them either:

  • I cannot decipher them any more
  • It is used for things not suites for (like parsing JSON or XML: please don’t!)

For more background on when NOT to use regular expressions, remember they describe a regular grammar, and can only me implemented by a finite state machine (a state machine that can be exactly one state out of a set of finite states).

As soon as you need to parse something that needs multiple states at once, or the number of states becomes infinite,

Some background reading:

Read the rest of this entry »

Posted in Delphi, Development, RegEx, Software Development | Leave a Comment »

How To Write Unmaintainable Code: Ensure a job for life ;-) by Roedy Green Canadian Mind Products

Posted by jpluimers on 2020/12/09

A great reference on how not to code still is

How To Write Unmaintainable Code

Ensure a job for life ;-)

Roedy Green Canadian Mind Products

I am still amazed when browsing through code, how many people use one or more of the anti-patterns in it.

One example I came across was this piece of Delphi RTL code:

class function TMarshalUnmarshalBase.ComposeKey(clazz: TClass; Field: string): string;
begin
  if clazz <> nil then
    Result := clazz.UnitName + SEP_DOT + clazz.ClassName + SEP_DOT + Field
  else
    Result := '';
end;

So I did a quick search at in the Delphi RTL for clazz, then found these occurences, indicating not only the authors of them have been under a rock, but also the code reviewers:

  • 98 in data\dbx\Data.DBXJSONReflect.pas
  • 7 in data\dbx\Data.DBXTransport.pas
  • 97 in data\rest\REST.JsonReflect.pas
  • 3 in DUnit\src\TestFramework.pas
  • 22 in indy\abstraction\IPPeerAPI.pas

I have seen similar things in many environments, even run-time libraries of others, though this is one of the worst examples and falls under the anti-pattern:

Thesaurus Surrogatisation

To break the boredom, use a thesaurus to look up as much alternate vocabulary as possible to refer to the same action, e.g. displayshowpresent. Vaguely hint there is some subtle difference, where none exists. However, if there are two similar functions that have a crucial difference, always use the same word in describing both functions (e.g. print to mean “write to a file”, “put ink on paper” and “display on the screen”). Under no circumstances, succumb to demands to write a glossary with the special purpose project vocabulary unambiguously defined. Doing so would be an unprofessional breach of the structured design principle of information hiding.

There is a great other anti-pattern in the document too:

Delphi/Pascal Only

: Don’t use functions and procedures. Use the label/goto statements then jump around a lot inside your code using this. It’ll drive ’em mad trying to trace through this. Another idea, is just to use this for the hang of it and scramble your code up jumping to and fro in some haphazard fashion.

Enjoy reading the anti-pattern descriptions, which are now maintained at [WayBack] GitHub – Droogans/unmaintainable-code: A more maintainable, easier to share version of the infamous http://mindprod.com/jgloss/unmain.html, as it was originally a multi-page hard to maintain set of small articles:

A lot of comments were posted because of it: [WayBack] Responses to Roedy’s Unmaintainable Code Essay

Via:

–jeroen

Posted in .NET, Delphi, Development, Software Development | 1 Comment »