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

Archive for 2020

linux – Bash: Command grouping (&&, ||, …) – Stack Overflow

Posted by jpluimers on 2020/02/18

Excellent answer at [WayBack] linux – Bash: Command grouping (&&, ||, …) – Stack Overflow by Charles Duffy:

Operator precedence for && and || is strictly left-to-right.

Thus:

pwd; (ls) || { cd .. && ls student/; }  && cd student || cd / && cd ;

…is equivalent to…

pwd; { { { (ls) || { cd .. && ls student/; }; } && cd student; } || cd /; } && cd ; }

…breaking that down graphically:

pwd; {                                      # 1
       {                                    # 2
         { (ls) ||                          # 3
                   { cd .. &&               # 4
                              ls student/;  # 5
                   };                       # 6
         } && cd student;                   # 7
       } || cd /;                           # 8
     } && cd ;                              # 9
  1. pwd happens unconditionally
  2. (Grouping only)
  3. ls happens (in a subshell) unconditionally.
  4. cd .. happens if (3) failed.
  5. ls student/ happens if (3) failed and (4) succeeded
  6. (Grouping only)
  7. cd student happens if either (3) succeeded or both (4) and (5) succeeded.
  8. cd / happens if either [both (3) and one of (4) or (5) failed], or [(7) failed].
  9. cd happens if (7) occurred and succeeded, or (7) occurred and succeeded.

Using explicit grouping operators is wise to avoid confusing yourself. Avoiding writing code as hard to read as this is even wiser.

–jeroen

Posted in *nix, *nix-tools, bash, bash, Development, Power User, Scripting, Software Development | Leave a Comment »

Some interesting Delphi MVVM posts…

Posted by jpluimers on 2020/02/18

Via [WayBack] We kick off a week of MVVM with an introduction of the Model-View-ViewModel pattern and how data binding is used to realize it. – Erik van Bilsen – Google+:

I wrote (and gave a few conference talks) about DSharp before, so the above is very interesting.

–jeroen

References:

Posted in Delphi, Development, Software Development | 2 Comments »

Scott Hanselman on Twitter: Learn C# in your browser, no install! Practice your .NET skills on an ChromeBook if you like! Your choice!

Posted by jpluimers on 2020/02/18

This is indeed an interesting live way to learn about C# even if you think you know most of it:

[WayBackScott Hanselman on Twitter: Learn C# in your browser, no install! Practice your .NET skills on an ChromeBook if you like! Your choice!

Here you go:

–jeroen

Read the rest of this entry »

Posted in .NET, C#, Development, Software Development | Leave a Comment »

100 km – how much needs to go into a tank? well2wheels/well to wheels (kWh).png at master · htc1977/well2wheels · GitHub

Posted by jpluimers on 2020/02/17

Since physics does not tend to change, this is still very accurate: [WayBackwell2wheels/well to wheels (kWh).png at master · htc1977/well2wheels · GitHub graphical WELL-TO-WHEELS Report Version 4.1 European Commission, 2014 – htc1977/well2wheels

A big picture is below the fold.

Other graphical file formats at [WayBack] GitHub – htc1977/well2wheels: graphical WELL-TO-WHEELS Report Version 4.1 European Commission, 2014

via:

–jeroen

Read the rest of this entry »

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

Solved: Stuttering Audio Streaming To Apple TV Via AirPlay – The Spotify Community

Posted by jpluimers on 2020/02/17

[WayBack] Solved: Stuttering Audio Streaming To Apple TV Via AirPlay – The Spotify Community:

Try to disable Wifi multimedia (WMM) from your router’s WLAN settings

For my Tomato USB it was easy as described by [WayBack] Installing AirPlay on Tomato – 2017 Edition [StartupCTO]:

disabling WMM in Tomato. (Advanced Settings → Wireless).

–jeroen

Posted in ASUS RT-N66U, Internet, Network-and-equipment, Power User, routers, TomatoUSB, WiFi | Leave a Comment »

When monitoring Windows service memory consumption from Zabbix and you get zeros

Posted by jpluimers on 2020/02/17

This is a small reminder to myself that when monitoring Windows service memory consumption from Zabbix and you get zeros, it means you need to monitor the Windows process instead of the service. The process will give you actual memory usage.

–jeroen

Posted in *nix, Monitoring, Power User, Zabbix | Leave a Comment »

Sometimes your day is brightened by a tweet that is much too kind

Posted by jpluimers on 2020/02/15

Tuesday was a day that got brightened. Thanks Elisabeth!

[Archive.is] Elisabeth met bgh Wendy en Minthe pensionada on Twitter: “@jpluimers Hallo Jeroen, al lang like jij mijn tweets. Vandaag heb ik mij in jou verdiept. Wat ik lees vind ik schokkend, triest, liefdevol en mooi tegelijk. Je bent een geweldig mens, een super broer en je bent ernstig ziek. Je vrouw die met de gevolgen van kanker moet leven. Respect 🌸❤️”

Translated:

Hello Jeroen, you have long liked my tweets. Today I immersed myself in your tweets. What I read is shocking, sad, loving and beautiful at the same time. You are a wonderful person, a super brother and you are seriously ill. Your wife who has to live with the effects of cancer. Respect.

–jeroen

Read the rest of this entry »

Posted in About, Personal | Leave a Comment »

multi-headed

Posted by jpluimers on 2020/02/14

A long time ago, I named a tool Cerberus after the mythical multi-headed dog that guards the gates of the Underworld, as it was to inspect client systems configurations to prevent they would enter a bad state.

Since I need a multi-headed tool later on, below are some links on multi-headed (Polycephaly – Wikipedia) creatures to give me inspiration.

Some of them are centered around war, others around hell, are dragons or monsters, and a few are guardians. Later I will try to put a classification in a table or so.

The idea is to replace my current Apache TLS offloading (that uses letsencrypt/certbot for the certificates) with something else like an nginx one, and maybe even make the internal part TLS too (so it becomes TLS upstreaming) so these will come in useful too:

Instead of nginx, HAproxy might be a an option too, especially as it understands TCP traffic other than http much better than nginx:

This means I should first look into nginx vs haproxy – Google Search, for instance these posts:

–jeroen

Posted in Geeky, History, Infrastructure | 2 Comments »

Happy Delphi 25th anniversary: follow hash tags #Delphi25 and #Delphi25th

Posted by jpluimers on 2020/02/14

I wish I could have prepared something more substantial for the 25th Delphi birthday.

Alas: life has been tough (see below), so please keep an eye on these search terms, hash tags and start posts from past Delphi team key members:

Search term: “Interview with Anders Hejlsberg and Chuck Jazdzewski #Delphi25th”; highlights from it:

  • “The men in this video are responsible for an incalculable amount of software, in one way or another. It boggles the mind to think about their impact on our industry.
    I know, right? If you aren’t using software they were directly involved in, then you are using software inspired by their software.”
  • Delphi 1 being postponed 6 months to ensure the visual designer and live data worked properly; the side effect was top notch quality of other product areas
  • Shipping the RTL and VCL code was very important
  • “If it was done right, we wouldn’t have a job” – had me truly LOL! It is so true! The Windows API was powerful, but hard to use – slightly better today, but still Delphi run circles around any other UI for Win32 tool – VB included.
  • Method Pointers changed the perspective of a lot of software development, even outside the Delphi world
  • Peter Sollich working on the compiler (Wish Peter Sollich was mentioned more; he was instrumental to the compiler.)
  • Garbage Collection is beautiful, but adds a truckload of complexity interfacing to the non-garbage collected underlying Windows API
  • The power of the VCL component model working irrespective of the state (having a Windows Class, Window Handle, etc) of the underlying Windows controls
  • The automatic recreation of underlying controls when certain component properties change is still important today on the supported platforms, for instance when switching from landscape to portrait mode
  • Reference counting (which was already with large strings) only gets you so far, as it can leave isolated islands that never get collected; mark and sweep was hardly used in any other environment
  • The beta/field-test/code names (like Delphi, Wasabi, Mango) depended on the group of people they were sent to
  • “Very important was that the Delphi 2.0 compiler and VCL was long underway before Delphi 1 was released. That made the transition from Win16 to Win32 so much easier.
    Yes, and really interesting in terms of strategic planning”
  • “I think Monet was ObjectVision 1.0 I think -and ObjectVision 3.0 was bundle with TurboC as I remenber it – I was PM on that in Scandinavia. :)”
  • Chuck is now working at Google on a new framework for Android Development called “Compose”.
  • Anders worked for a short while on Visual J++, then on C# and .NET, then adding TypeScript, and helped Microsoft move from inward oriented company to opening up to open source. He now spends his time committing code to github (github.com/ahejlsberg) because he wanted to go back to coding instead of managing.
  • “If playback doesn’t begin shortly, try restarting your device.” It stopped playing as soon as you switched to YouTube.
    Sorry. Must be a network issue. We will send out a replay link.”
  • “The first time I used Pascal, it was Compas Pascal – also written by Anders Heijlsberg. Now he is behind C# and TypeScript – he surely is leaving a major mark on the runestones of software development!”
  • DogFood is important; Turbo Pascal and Delphi were among the first; C# and TypeScript now do this too.
  • “Will the anniversary page Delphi.embarcadero.com be available in future also ?
    Yes, that is the plan. We made it Delphi.embarcadero.com instead of Delphi25. so we can keep it around. Plus we have more content comming on there.”
  • The Delphi compiler version actually started at 1.0 for Turbo Pascal 1.0
  • “Official MS Windows Me image for Virtual Box can be found at https://archive.org/details/win_me_archive_vdi
  • DavidI: Special respect to my “Twin separated at birth” Charlie Calvert for training the world on Delphi !!!
  • [WayBack] (PDF) Borland Software Craftsmanship: A New Look at Process, Quality and Productivity
    A:This is a great paper. By coincidence I actually saw it less than two days ago!
  • “Don’t forget Cary Jensen, I have met him at the first Delphi courses in Amsterdam ~24 years ago. I hope he is well!”
  • “Don’t forget InterBase has been there all the time along the way too! And still going strong, and across all the same target platforms!”
  • “How about a line profiler built-in, rather than having to purchase and install AQTime?”
  • “This site has VirtualBox virtual machine images for all legacy versions of Windows, including “Window 3.1” … http://virtualdiskimages.weebly.com/virtualbox.html
  • “I agree with the very useful feature of being able to make Windows versions of the mobile apps. This is one, that is being used exactly for that… multipurpose. https://play.google.com/store/apps/details?id=com.danvaegt.SmartWeighClient

A few of my recent tweets:

 

Delphi 25th pages

Read the rest of this entry »

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

Use Preview to combine PDFs on your Mac – Apple Support

Posted by jpluimers on 2020/02/14

From [WayBack] Use Preview to combine PDFs on your Mac – Apple Support :Learn how to combine PDFs and reorder, rotate, and delete pages.

Before editing your files: ensure you have a backup!

Combine two PDFs

  1. Open a PDF in Preview.
  2. Choose View > Thumbnails to show page thumbnails in the sidebar.
    (keyboard shortcut: AltCommand2)
  3. To indicate where to insert the other document, select a page thumbnail.
  4. Choose Edit > Insert > Page from File.
  5. Select the PDF that you want to add, then click Open.
  6. To save, choose File > Export.

You can also drag/drop from one thumbnail to the other, but this is tricky as you can easily modify the wrong file.

–jeroen

Posted in Apple, iMac, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, Power User | Leave a Comment »