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

Archive for February, 2020

Why does HRESULT begin with H when it’s not a handle to anything? – The Old New Thing

Posted by jpluimers on 2020/02/06

Interesting bit of history: [WayBackWhy does HRESULT begin with H when it’s not a handle to anything? – The Old New Thing.

TL;DR:

  1. It used to be a handle
  2. Few programs cared about the underlying objects
  3. Managing the underlying objects was way too expensive
  4. It got trimmed down to a number, but the name stuck

–jeroen

Posted in Development, History, Software Development, The Old New Thing, Windows Development | Leave a Comment »

Delphi Berlin and up without disabled Castalia: Use Ctrl+W to select content in the IDE code editor. Place your curso…

Posted by jpluimers on 2020/02/06

If you have enough guts to keep Castalia enabled and have Delphi Berlin or higher, then you can use this shortcut:

[WayBack] Tip: Use Ctrl+W to select content in the IDE code editor. Place your cursor some random piece of code, preferably deep in code that have nested block… – Lars Fosdal – Google+

–jeroen

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

Check your PHP project for known security issues – SensioLabs Security Advisories Checker

Posted by jpluimers on 2020/02/05

If I ever cross a PHP project, this is my first requirement to pass: [WayBack] Check your PHP project for known security issues – SensioLabs Security Advisories Checker

–jeroen

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

Why Your Team Is Not Working as a Team – The Startup – Medium

Posted by jpluimers on 2020/02/05

Being part of a team can be tough, so this article has Seven ways individualism is getting in their way: [WayBack] Why Your Team Is Not Working as a Team – The Startup – Medium.

Via: [WayBack] “When your top players don’t know how to work together, their individual talents are useless.” – Marjan Venema – Google+ (who is a great coach!)

–jeroen

 

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

The magic Delphi ReturnAddress intrinsic

Posted by jpluimers on 2020/02/05

I could not find any official place where ReturnAddress is documented even though it is used at quite a few places in the RTL, VCL, FMX and 3rd party libraries like DUnitX, Spring4D, JCL, ReportBuilder, TeeChart.

I tried searching it in the contexts of Delphi 2007, Delphi 2009, but there is only a [Archive.is] different System.ObjAuto.TParameters.ReturnAddress documented in XE2 and higher.

procedure Abort;
begin
  raise EAbort.CreateRes(@SOperationAborted) at ReturnAddress;
end;

There is a (usually broken*) ReturnAddr function used in various places of the RTL/VCL/FMX and (therefore wrongfully copied) in many other peoples code.

  function ReturnAddr: Pointer;
  // From classes.pas
  asm
    MOV     EAX,[EBP+4] // sysutils.pas says [EBP-4], but this works !
  end;
  • See the above link; I think this was fixed in Delphi XE, but the issue is still open.

Related to the above is the documented ExceptAddr.

I’ve used this in my ExceptionHelperUnit to build a GetStackTrace function in the example gist below.

I found these posts documenting the behaviour of the above intrinsic functions and more:

–jeroen

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

I love installers that can download and install in parallel threads….

Posted by jpluimers on 2020/02/04

[WayBack] I love installers that can download and install in parallel threads. Embarcadero and Zypper can learn from this. – Jeroen Wiert Pluimers – Google+

Most Linux distributions have package managers that can do this (apt and yum can), but OpenSuSE zypper (actually ZYpp) cannot even download packages in parallel:

Embarcadero is in the same state as zypper.

–jeroen

Posted in *nix, Development, openSuSE, Power User, Software Development, SuSE Linux, Tumbleweed | Leave a Comment »

Delphi: Bezier in FMX

Posted by jpluimers on 2020/02/04

In case I ever need to do some Bezier curve coding in Delphi: [WayBack] GitHub – zhaoyipeng/FMXComponents: Firemonkey Opensource Components

Via: [WayBack] Interesting set of components for FireMonkey – Christen Blom-Dahl – Google+

–jeroen

Read the rest of this entry »

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

TL;DR: Raspberry Pi models 1..3 become hotter and hotter under load; no housing gives best cooling.

Posted by jpluimers on 2020/02/04

[WayBack] TIL Raspi Kühlkörper bringen nix. Lego schon.  – Kristian Köhntopp – Google+

Background information: [Archive.is] Mein Raspberry Pi 3 und sein Problem mit der Systemtemperatur · Un*xe

–jeroen

 

Posted in *nix, Debian, Development, Hardware, Hardware Development, Linux, Power User, Raspberry Pi, Raspbian | Leave a Comment »

Those nice User Experiences: two shortcuts binding to Alt-O on the Dutch Windo…

Posted by jpluimers on 2020/02/03

[WayBack] Those nice User Experiences: two shortcuts binding to Alt-O on the Dutch Windows 10 translation… – Jeroen Wiert Pluimers – Google+

I know it is hard to do UX, but at least test your translations.

–jeroen

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

Managing sendmail TLS authenticated users

Posted by jpluimers on 2020/02/03

A few notes for managing the users that should be allowed to send mail via sendmail using TLS authentication.

Most of it is derived/summarised for [WayBack] SMTP AUTH in sendmail 8.10-8.13 and [WayBack] Creating Users for a Postfix-Based Mail Relay – Scott’s Weblog – The weblog of an IT pro specializing in cloud computing, virtualization, and networking, all with an open source view

  1. Verify your sendmail allows TLS:
    # sendmail -d0.1 -bv | grep SASL
    NETUNIX NEWDB NIS NISPLUS PIPELINING SASLv2 SCANF SOCKETMAP
  2. The list of TLS authentication users differs from the ones in /etc/passwd
  3. The tools and files manage if  the output is SASLv2 or older. For SASLv2 they are:
    • /etc/sasldb2 has the users/passwords
    • sasldblistusers2 lists the users
    • saslpasswd2 manages users

For instance, this commands creates a new user for use with sendmail:

# saslpasswd2 -c -u example.org firstname.lastname
Password:
Again (for verification):

sasldblistusers2

firstname.lastname@example.org: userPassword

cat /etc/sasldb2

....................firstname.lastname@example.orguserPassword

For future reading:

I thought I needed this so I could add an alias @pluimers.com to my gmail box, as I read only the accepted answer at [WayBack] Add new alias to Gmail without SMTP (forwarding-only address) – Web Applications Stack Exchange pointing to:

I should have read the second answer at [WayBack] Add new alias to Gmail without SMTP (forwarding-only address) – Web Applications Stack Exchange:

As of writing, however, you can simply use the Gmail SMTP server, as long as you use [WayBackGoogle two-step authentication.

So just for completeness, the full steps:

  1. Gmail settings, Accounts and Import tab.
  2. Add another email address you own
  3. Type name and email address to be added.
  4. For SMTP Server, put smtp.gmail.com
  5. For Username, your full Gmail address including @gmail.com
  6. For password, provide an App Password generated in Google Accounts at https://security.google.com/settings/security/apppasswords
  7. Leave Secured connection using TLS selected as is.
  8. Add Account

–jeroen

Posted in *nix, *nix-tools, Power User, sendmail | Leave a Comment »