The Wiert Corner – irregular stream of stuff

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

  • My badges

  • Twitter Updates

  • 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

Reminder to self: be aware of implicit setup/tear down code in methods

Posted by jpluimers on 2020/02/13

If a part of a method requires implicit setup/tear-down code (for instance when using managed types like arrays, strings, etc), especially in rarely taken execution paths, then consider putting that code in a separate method.

I bumped into this recently, and found out it does not just hold for Delphi, it can happen in other languages too.

A Delphi example I found back is this one: [WayBackDelphi Corner Weblog: Speed problems caused by code that never ran.

The problem with Delphi is that the language does not have local scope (variables are at the start of the method) which means the penalty is for the full method.

I bumped into this in C# where a piece of legacy code had the variables declared away from the block where they finally were used.

This historically grew, because originally they were used in more placed of the code.

The refactoring limiting the scope just never put the declaration close to the usage hence violating the proximity principle.

Via: [WayBack] Ouch! Code that doesn’t get executed can still cause other code in the same procedure to become much slower. Of course, in retrospect, once you know the… – Thomas Mueller (dummzeuch) – Google+

–jeroen

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

Alex Thissen @ Techorama Netherlands 2018: Building real world production-ready Web API’s with .NET Core

Posted by jpluimers on 2020/02/12

[WayBack] Alex Thissen @ Techorama Netherlands 2018: Building real world production-ready Web API’s with .NET Core

Follow [WayBack] Alex Thissen(@alexthissen) on Twitter

Pictures taken during session (likely in reverse order; needs cleanup of duplicates/blurs).

Many more [WayBackTechorama 2018 Netherlands stuff at:

More pictures I took during sessions:

They are in reverse order of the what I attended of the [WayBack] Techorama Netherlands 2018: Schedule: Pathé, Ede, The Netherlands – See the full schedule of events happening Oct 2 – 3, 2018 and explore the directory of Speakers & Attendees.

Sessions I could archive, or find recordings of:

--jeroen

Read the rest of this entry »

Posted in .NET, .NET Standard, ASP.NET, Conferences, Development, Event, Software Development | Leave a Comment »

Michael Stapelberg: This soldering reference card from @adafruit is the most to-the-point explanation of good soldering practices I have ever seen

Posted by jpluimers on 2020/02/12

Via [WayBack] Michael Stapelberg on Twitter: This soldering reference card from @adafruit is the most to-the-point explanation of good soldering practices I have ever seen:

Adafruit has some cool reference cards published as PDF files:

I like these the most:

–jeroen

Read the rest of this entry »

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

Delphi desktop settings: .DST naming limitations and content similarity to .DSK files

Posted by jpluimers on 2020/02/12

Based on [WayBack] Bummer, cannot save a Delphi desktop named “Default Layout – right 3/4” – at load this one seems to be restored, but the list does not contain that entry. – Jeroen Wiert Pluimers – Google+:

–jeroen

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

Catch Me If You Can: LLVM back-end cannot catch all exceptions

Posted by jpluimers on 2020/02/11

[WayBack] Catch Me If You Can:

the LLVM backend cannot return from a hardware exception (like AV) if the hardware exception is raised directly within a try...except block. It can only safely return if there is a function (method) call within the try...except block.

Via and by [WayBack] Dalija Prasnikar – Google+

–jeroen

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

The Hard Thing About (Not So) Hard Things – John Cutler – Medium

Posted by jpluimers on 2020/02/11

Long read, but worth it: [WayBackThe Hard Thing About (Not So) Hard Things – John Cutler – Medium.

TL;DR: if you think these are hard, try them by reading the article:

Via: [WayBack] “what we call “hard” is often indicative of fear, lack of safety, lack of support, and limited ability to practice.” – Marjan Venema – Google+

–jeroen

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

Is there a keyboard shortcut to go to the next/previous compiler error in the current …

Posted by jpluimers on 2020/02/11

Via: [WayBack] Is there a keyboard shortcut to go to the next compiler error in the current source file? – Jeroen Wiert Pluimers – Google+:

Primož Gabrijelčič:
Alt-F7, Alt-F8 IIRC

And indeed, it is sort of documented as of Delphi 2007 for “Message View”, but appears to be a much older shortcut:

I also completely forgot the compiler output is indeed a “Message View”.

–jeroen

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

Why you should not use localised operaring system versions

Posted by jpluimers on 2020/02/10

Using localised operating system versions means you have a really hard time finding the cause of an error.

In my case, a net share command gave me a Dutch “Systeemfout 1332.” “Er is geen toewijzing uitgevoerd tussen accountnamen en beveiligings-id’s.”.

Obviously searching for “net share” “Systeemfout 1332.” and “net share” “Er is geen toewijzing uitgevoerd tussen accountnamen en beveiligings-id’s.” delivered nothing, as a did shorter “net share” “Er is geen toewijzing uitgevoerd” only found [WayBack] Welkom bij ronald.repareert.com ….. sites door vrienden en kennissen which got me the error code 1332:

[WayBack] Error code 1332: No mapping between account names and security IDs was done.

This allowed me to search for “net share” “No mapping between account names and security IDs was done.” which did return some meaningful results:

The command I used was this:

mkdir D:\tmp$
net share tmp$=D:\tmp /unlimited /grant:everyone,full

The adding factor was that this was done on a machine inside a domain.

Since there was no group everyone inside the domain, it could not be bound to a SID.

Replacing the last command with net share vincent$=D:\Vincent$ /unlimited /grant:.\everyone,full or  net share vincent$=D:\Vincent$ /unlimited /grant:.\users,full dit get the same error.

But this succeeded, as gebruikers is the Dutch translation for users:

net share vincent$=D:\Vincent$ /unlimited /grant:.\gebruikers,full

So in the end:

  • use localised group names
  • be careful with group names not existing in the domain

If you wonder why I started with everyone in the first place: [WayBack] The Difference Between Everyone and Authenticated Users

In this case, the group .\everyone did not exist, not even in a translated fashion iedereen. The command net localgroup gives you an overview of existing local groups on the machine:

C:\WINDOWS\system32>net localgroup

Aliassen voor \\MYPCINDOMAIN

-------------------------------------------------------------------------------
*Administrators
*Apparaateigenaars
*Back-upoperators
*Cryptografie-operators
*DCOM-gebruikers
*Externe bureaubladgebruikers
*Gasten
*Gebruikers
*Gebruikers van extern beheer
*Hoofdgebruikers
*Hyper-V-administrators
*IIS_IUSRS
*Lezers van gebeurtenislogboeken
*Netwerkconfiguratieoperators
*Ondersteuningsoperators voor toegangsbeheer
*Prestatielogboekgebruikers
*Prestatiemetergebruikers
*Replicatie
*System Managed Accounts Group
De opdracht is voltooid.

I am still not sure why group iedereen does not exist, as I expected that to be there: [WayBack] Windows Built-in Users and Default Groups – Windows CMD – SS64.com.

It might have to do with newer Windows versions not supporting it (this machine was Windows 10, and it looks like Windows Server 2012 also has a problem: [WayBack] An error occurs while sharing folder on WS 2012 with net share command).

–jeroen

Posted in Power User, Windows | Leave a Comment »

A Map Of Wireless Passwords From Airports And Lounges Around The World (Updated Regularly) – foXnoMad

Posted by jpluimers on 2020/02/10

Way more details at [WayBackA Map Of Wireless Passwords From Airports And Lounges Around The World (Updated Regularly) – foXnoMad.

Short list:

–jeroen

Posted in About, LifeHacker, Personal, Power User, Travel | Leave a Comment »

GitHub – synack/knockknock: Who’s there?

Posted by jpluimers on 2020/02/10

[WayBack] GitHub – synack/knockknock: Who’s there?:

KnockKnock displays persistent items (scripts, commands, binaries, etc.), that are set to execute automatically on OS X. For a comprehensive presentation on OS X malware, persistence, and KnockKnock, see the following slides [WayBack].

Via:

–jeroen

Posted in Apple, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, macOS 10.12 Sierra, macOS 10.13 High Sierra, Power User | Leave a Comment »