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,854 other subscribers

No thank you, Mr. Pecker – Jeff Bezos – Medium

Posted by jpluimers on 2019/02/09

If this is the norm inside world wide politics and business, what is outside the norm?

[WayBack] No thank you, Mr. Pecker – Jeff Bezos – Medium

Via:

Related:

–jeroen

Read the rest of this entry »

Posted in Opinions | Leave a Comment »

Quantum Computing for Computer Scientists – YouTube

Posted by jpluimers on 2019/02/08

On my list of videos to watch:

Via: [WayBack] Quantum computing for computer scientists, explained by Microsoft. Despite the pop lecturing style the explanation is deep enough. I’ve wondered before… – Sergey Kasandrov – Google+

–jeroen

Posted in Development, Software Development | Leave a Comment »

Link archive: ASUS MN78 PRO URLs

Posted by jpluimers on 2019/02/08

Since my brother has this motherboard: M4N78 PRO GREEN.

It does WOL, but doesn’t always wake up when powered down.

–jeroen

ASUS Serial 93M0AI195747; Part 90-MIB7C0-G0EAY00Z; M4N78 PRO GREEN; UPC 61083916977; EAN 4719543169773

Posted in Ethernet, Hardware, Mainboards, Network-and-equipment, Power User, Wake-on-LAN (WoL) | Leave a Comment »

Some Postfix configuration guidelines

Posted by jpluimers on 2019/02/08

Not just for Postfix are the first two guidelines:

  • Change one thing at a time
  • Save known working configurations

For the latter, I’m using etckeeper pushing to an external git repository hoster.

For Postfix are the others from [WayBackPostfix Configuration Guidelines.

One tip that’s missing, but saved my life numerous of times:

In /etc/postfix/main.cfg do not use this line ever:

inet_interfaces = $myhostname

If the resolving (through DNS or hosts file) of $myhostname fails for any reason in the future, then Postfix will not start at all, but in stead emit a fatal error like this:

/usr/sbin/postconf: fatal: parameter inet_interfaces: no local interface found for 127.0.0.2

Specify exact interfaces in stead, like any of these:

inet_interfaces = all

inet_interfaces = localhost

inet_interfaces = 192.168.24.68

–jeroen

Posted in *nix, *nix-tools, etckeeper, Linux, postfix, Power User | Leave a Comment »

Navigation bar notifications for Google web products will go away on March 7, 2019. Via Manage your notifications – Google Account Help

Posted by jpluimers on 2019/02/08

After March 7, 2019, notifications for Google web products will no longer be accessible from the navigation bar.

[WayBackManage your notifications – Google Account Help has more details, but it does not look good.

More Google stuff is dying, almost every month now. For a list of dying products see: [WayBackdidgoogleshutdown.com

Given more is dying, and the increased lack of confidence many people have in Google, more people are abandoning Google. More on that in a future post.

For now: [WayBack] “Manage your Notifications”: After March 7, 2019, notifications for Google web products will no longer be accessible from the navigation bar. If you’d l… – Edward Morbius – Google+

“Manage your Notifications”: After March 7, 2019, notifications for Google web products will no longer be accessible from the navigation bar. If you’d like to receive similar notifications in the future, you can update the notification settings for your individual Google products.

As usual, it’s not clear whether or not this will affect the notifications widget on G+ itself. Google’s standards for clarity in exposition remain uncorrupted. Which is to say: entirely inadequate.

Otherwise, the article addresses Google Photos, Hangouts Chat, and Google+ (G Suite users).

Update: Further close reading suggests that Consumer Google+ will lose Notifications on March 7:

Note: Google+ notifications are available for G Suite users only.

https://support.google.com/accounts/answer/9231049

Via: [WayBack] “Manage your Notifications”: After March 7, 2019, … – Lars Fosdal – Google+

–jeroen

Posted in G+: GooglePlus, Google, Google Photos, GoogleHangouts, Power User, SocialMedia | Leave a Comment »

Why the New V8 is so Damn Fast – NodeSource

Posted by jpluimers on 2019/02/07

Wow, impressive work, and a very good explanation of some of the optimizations that take place and how you can check which ones work on your code: [WayBack] Why the New V8 is so Damn Fast – NodeSource:

The entire V8 compiler pipeline was overhauled and shipped with Node.js version 8. This post investigates what speed improvements we can expect as a result.

Via: [WayBack] Adrian Marius Popa – Google+

–jeroen

 

Posted in Development, JavaScript/ECMAScript, Node.js, Scripting, Software Development | Leave a Comment »

Why you should always do documentation before development | Opensource.com

Posted by jpluimers on 2019/02/07

Food for thought, especially on the UX side of software: [WayBack] Why you should always do documentation before development | Opensource.com.

Via:

–jeroen

Read the rest of this entry »

Posted in Development, Software Development, User Experience (ux) | Leave a Comment »

Delphi threadvar: TLS thread local storage

Posted by jpluimers on 2019/02/07

Managing TLS correctly with all kinds of dynamic storage seems to be a nightmare.

From what I think it’s safe to use a TStopWatch [WayBackSystem.Diagnostics.TStopwatch (introduced in Delphi XE2) as threadvar (which gets into TLS: Thread-local storage) because it’s a record type and as a bonus will be zero-initialised in something like this:

threadvar
 ThreadStopwatch: TStopwatch; // threadvars are zero-initialised, like TStopwatch.Reset was called. Ensure TStopwatch.InitStopwatchType called before using this.

... thread code:
var
  lThreadElapsedMilliseconds: string;
begin
...
  if not ThreadStopwatch.IsRunning then
    ThreadStopwatch.Start;
  try
    lThreadElapsedMilliseconds := ThreadStopwatch.ElapsedMilliseconds.ToString();
    // log duration of call-to-call somewhere
... logic
    lThreadElapsedMilliseconds := ThreadStopwatch.ElapsedMilliseconds.ToString();
    // log duration of logic somewhere
  finally
    ThreadStopwatch := TStopwatch.StartNew; // resets new count
  end;

As long as I perform this in the main thread somwehere to pre-initialise the class variable, then no thread should have the penalty for that:

TStopwatch.Create(); // ensures non-public TStopwatch.InitStopwatchType is called, enabling the threadvar ThreadStopwatch get the penalty for that

If I ever need to dig deeper into TLS with Delphi, then these are starters:

–jeroen

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

Some links on keystore, encryption and decryption on Android

Posted by jpluimers on 2019/02/06

For my link archive:

 

Basically:

  • storing encrypted data plus IV in preferences is OK
  • store the symmetric encryption key (for instance an AES one) in the keystore for the application
  • likely a salt is also needed, then store the salt with the IV and encrypted data

–jeroen

Presumptions:

  • The keystore of a specific application UUID is only accessible by only that application UUID when the device has been unlocked by the user
  • The keystore saves credentials in a secure way
  • It is OK to save both the encrypted data and associated IV

Approach (plain data is “hashed application PIN”, encrypted data is “encrypted hashed application PIN”:

  1. store a symmetric AES key in the application key store
  2. after entering application PIN:
    1. hash the application PIN
    2. use the hashed application PIN to to enter the application
    3. from the keystore, obtain the symmetric AES key
    4. create a cipher based on the AES key
    5. use the cipher to obtain an IV, and to encrypt the hashed application PIN
    6. store the encrypted hashed application PIN and IV both in the application preferences
  3. when needing to enter the application, present the user to either enter the application PIN again or proof that they can pass the device unlock sequence (using an unlock activity)
    1. if the user provided the application PIN, then:
      1. hash the application PIN
      2. try to enter the application with the hashed application PIN
    2. proved the device unlock, then:
      1. from the preferences, obtain the IV and encrypted hashed application PIN
      2. from the keystore, obtain the symmetric AES key
      3. create a cipher based on the AES key
      4. decrypt the encrypted hashed application PIN using the cipher and the IV into the hashed application PIN
      5. try to enter the application with the hashed application PIN

Posted in Android, Development, Mobile Development, Software Development | Leave a Comment »

The company as a social engine – The Isoblog.

Posted by jpluimers on 2019/02/06

Food for thought about work: [WayBackThe company as a social engine – The Isoblog.

–jeroen

via: [WayBack] The company as a social engine… – Kristian Köhntopp – Google+

Posted in LifeHacker | Leave a Comment »