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

  • Email Subscription

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

    Join 716 other subscribers

Archive for February, 2020

One Story Per “Sprint” – John Cutler – Medium

Posted by jpluimers on 2020/02/25

Food for thought: what is the hardest thing in your sprints, why, can you make it less hard?

[WayBack] One Story Per “Sprint” – John Cutler – Medium:

Delivering a “potentially releasable increment” after N days is not “hard”. It is not rocket science. (Almost) any team can do it.

Via: [WayBack] One Story Per “Sprint” – John Cutler – Medium – Marjan Venema – Google+

it is not funny to always feel behind; that it actually is detrimental to productivity to focus solely on efficiency, working hard and being hero’s; that it might be a good idea to start with changing your perspective and doing something which has a chance of being successful (doing a single story) and build from there.

It is not about looking busy, but it is about getting things done without having any fears.

–jeroen

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

TInterlockedHelper for Delphi interfaces: Spring.Reactive.pas

Posted by jpluimers on 2020/02/25

Reminder so self: [WayBack] sglienke / Spring4D / source / Source / Reactive / Spring.Reactive.pas — Bitbucket fragments:

type
  TInterlocked = SyncObjs.TInterlocked;
  TInterlockedHelper = class helper for TInterlocked // TODO: move to Spring.pas
    class function CompareExchange<T: IInterface>(var Target: T; const Value, Comparand: T): T; overload; static;
    class function Exchange<T: IInterface>(var Target: T; const Value: T): T; overload; static;
  end;

{$REGION 'TInterlockedHelper'}

class function TInterlockedHelper.CompareExchange<T>(var Target: T;
  const Value, Comparand: T): T;
begin
  Result := Default(T);
  PPointer(@Result)^ := CompareExchange(PPointer(@Target)^, PPointer(@Value)^, PPointer(@Comparand)^);
  if PPointer(@Result)^ = PPointer(@Comparand)^ then
  begin
    if Assigned(Value) then
      Value._AddRef;
  end
  else
    if Assigned(Result) then
      Result._AddRef;
end;

class function TInterlockedHelper.Exchange<T>(var Target: T;
  const Value: T): T;
begin
  Result := Default(T);
  PPointer(@Result)^ := Exchange(PPointer(@Target)^, PPointer(@Value)^);
  if Assigned(Value) then
    Value._AddRef;
end;

{$ENDREGION}a

–jeroen

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

When you have physical access to a machine, assume it is compromised

Posted by jpluimers on 2020/02/24

When you have physical access to a machine, assume it is compromised.

Sometimes the compromise can be as simple as a HID device access:

–jeroen

Read the rest of this entry »

Posted in Power User, Security | Leave a Comment »

Tomato by shibby – upgrade procedure and cfg backup | LinksysInfo.org

Posted by jpluimers on 2020/02/24

Reminder to self: [WayBack] Tomato by shibby – upgrade procedure and cfg backup | LinksysInfo.org:

I keep a text file with the changes I’ve made after a fresh install and I keep the file updated as I make changes.

Re-configuring the router after that takes a bit of time, but it is not that bad. Toastman’s method (here) noted above as well as the methods described here and here can also be used, but I haven’t tried them.

which references:

–jeroen

Posted in Internet, Power User, routers, TomatoUSB | Leave a Comment »

Which encoding failure did encode “vóór” into “v3/43/4r”? – Stack Overflow

Posted by jpluimers on 2020/02/24

From quite some time ago, but still very relevant as encoding issues keep occurring:

A while ago, I saw the text “v3/43/4r” in a document.I know it comes from “vóór” (the acute accent emphasises in Dutch), and wonder which encoding failure was applied to get this wrong.

Source: [WayBack] Which encoding failure did encode “vóór” into “v3/43/4r”? – Stack Overflow

From the [WayBack] answer by rodrigo:

  • ó: is U+00F3, and occupies the same codepoint (0xF3) in a lot of different encodings (most ISO-8859-* and most western Windows-*).
  • In CP850 the codepint 0xF3 is ¾ (U+00BE), that is the three-quarters character. It is the same in other, less used, codepages (CP775, CP856, CP857, CP858).
  • The ¾ is sometimes transliterated to 3/4 when the character is not directly available.

And there you are! “vóór” -> “v¾¾r” -> “v3/43/4r”.

The first part (ó -> ¾) is the usual corruption of ANSI vs. OEM codepages in the Western Windows versions (in my country ANSI=Windows-1252, OEM=CP850). You can see it easily creating a file with NOTEPAD, writing vóór and dumping it in a command prompt with type.

–jeroen

Posted in CP850, Development, Encoding, Software Development, UTF-8, UTF8, Windows-1252 | Leave a Comment »

ESXi: Failed to reconfigure virtual machine… There are insufficient licenses to complete this operation.

Posted by jpluimers on 2020/02/21

Failed to reconfigure virtual machine W81Entx64-vs2017. There are insufficient licenses to complete this operation.

Searching for “There are insufficient licenses to complete this operation.” memory did not reveal much, so at first I thought I had a memory issue.

A quick look at esxtop in memory (m) mode indicated that was totally fine:

BTW: esxtop is a fantascit tool, with truckloads of information, so you should definitely read these:

Then something occurred to me:

The cause was that I tried to update the memory of an ESXi Windows VM which I thought I had shut-down from within Windows, but actually bumped an error message during the shutdown.

Shutting down properly (shutdown -s -t 0 in Windows), then increasing the memory worked fine:

Virtual machine W81Ent64-vs2017 was successfully reconfigured.

ESXi cannot increase the memory of a live system, hence the license error as per [WayBack] VMware Hot-Add: How and When to Use it:

One of the most common questions I receive on the daily management of virtual machines is if you should turn on hot-add features and why doesn’t VMware turn them on by default. The answer is very clear.

What are the requirements for Hot-add/Hot-plug:

  • Your virtual machines need to run at minimum hardware version 7.
  • Hot-add/Hot-Plug is not compatible with Fault Tolerance
  • vSphere Advanced, Enterprise or Enterprise plus.
  • Only hot-add is possible. You cannot “hot-remove” RAM or vCPUs.
  • Hot-Add/Hot-plug must be supported by the VM operating system!
  • Guest-OS licensing limitations need to be monitored and taken into consideration. You are changing the number of vCPUs/RAM!

–jeroen

Posted in ESXi6.5, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

Swap and Memory Pressure: How Developers think to how Operations people think – The Isoblog.

Posted by jpluimers on 2020/02/21

Still a very insightful read: [WayBack] Swap and Memory Pressure: How Developers think to how Operations people think – The Isoblog.

I totally agree with the view Kristian Köhntopp presents which I usually call “fail early, fail hard, fail clearly”.

–jeroen

via: [WayBack] Swap and Memory Pressure: How Developers think vs. how Operations people think. – Kristian Köhntopp – Google+

Posted in DevOps, Power User | Leave a Comment »

5 Minutes Early Is On Time; On Time Is Late; Late Is Unacceptable

Posted by jpluimers on 2020/02/21

I agree with this, but used to be very bad at it: [WayBack] 5 Minutes Early Is On Time; On Time Is Late; Late Is Unacceptable

Being late is unacceptable. While that sounds harsh, it’s the truth and something that should be said more often. I don’t care whether you’re attending a dinner party, a conference call, or a coffee meeting — your punctuality says a lot about you.

A few things that helped me:

  • only attend things that are really important
  • reserve way enough time for travel and preparation

It’s still not perfect, but they help me things I had a hard time coping with:

  • planning way too much in a day (hence the only really important stuff)
  • making far to optimistic estimates for travel and preparation (now I do my estimate times 2 or better: 3)

Via: [WayBack] 5 Minutes Early Is On Time; On Time Is Late; Late Is Unacceptable – Marjan Venema – Google+

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Delphi memory allocators and configuration notes in multi-threaded environments with high allocation/deallocation rates

Posted by jpluimers on 2020/02/20

From an interesting discussion at [Archive.is/WayBack] FaceBook: Delphi developer thread by Jarto Tarpio with some measurements by Jarto Tarpio and André Mussche.

  • Manipulation of strings and lists in Delphi have high memory allocation/deallocation rates, so HTTP related services with high call rates are affected more than regular services
  •  FastMM:
    • conditional defines that can help are NeverSleepOnThreadContention, UseSwitchToThread, and UseReleaseStack then measure.
    • has one huge advantage: It’s very, very good at keeping memory fragmentation at bay
    • default settings are for applications that use lots of CPU, but have no really high memory allocation/deallocation rates
    • has very good debugging facilities
    • Under FullDebugMode address space is never released back to the operating system so once the address space has been exhausted there is very little room to manoeuvre.
  • TCMalloc:
    • is very good at multi-threaded memory management with high allocation/deallocation rates
    • needs to be persuaded to releases memory to the OS:
      it only releases to the system under two occasions: Freeing another part of the memory, or asking it to release all parts marked as freed.

    • has no debugging facilities

The differences make it a challenge to integrate in your development and deployment process: because of the debugging facilities, you’d like FastMM in all your environments, but TCMalloc in multi-threaded environments with high allocation/deallocation rates.

One possibility is to have your CI environment deliver both in all stages, run all tests on both, then choose the final one depending on your run-time configuration.

That gives a burden on configuring your Continuous Integration, but the gain might outweigh this cost.

Relevant links from the Facebook thread:

–jeroen

Posted in Delphi, Development, FastMM, Software Development | 5 Comments »

More great free Python books

Posted by jpluimers on 2020/02/20

A while ago I wrote about Until 20171201 you can get free access to “Automate the Boring Stuff with Python”?.

That book is still free. And these great books are too:

Via: [WayBack] Cracking Codes with Python by @AlSweigart teaches complete beginners how to program in Python. The book features the source code to several ciphers and … – ThisIsWhyICode – Google+

–jeroen

Posted in Development, Python, Scripting, Software Development | Leave a Comment »