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

Archive for the ‘Development’ Category

Learn How To Debug JavaScript with Chrome DevTools – codeburst

Posted by jpluimers on 2020/10/06

Long read for later: [WayBack] Learn How To Debug JavaScript with Chrome DevTools – codeburst

Ditch console.log debugging once and for all! Learn how to use breakpoints to debug code within the Chrome Developer Tools

Via: [WayBack] Learn How To Debug JavaScript with Chrome DevTools… – Lars Fosdal – Google+

–jeroen

Posted in Chrome, Development, Google, JavaScript/ECMAScript, Power User, Scripting, Software Development | Leave a Comment »

golang – joining a URI (either with our without terminating slash) with a URI part

Posted by jpluimers on 2020/10/06

path.Join is for file paths, which will call path.Clean and malform the path by converting double slash in front of the authority in a URI into a single slash.

The workaround is to parse the URI, then join the path bit.

One day I will encapsulate all that.

Some relevant bits for when I write that encapsulation:

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

Oval car stickers – translating to ISO 3166-1

Posted by jpluimers on 2020/10/06

A while ago, I had to translate from the country codes used on cars to ISO country codes, so here are a few links:

–jeroen

 

 

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

Logging request body in HAProxy · GitHub

Posted by jpluimers on 2020/10/05

I will likely need this one day: [WayBack] Logging request body in HAProxy · GitHub.

Related:

–jeroen

Read the rest of this entry »

Posted in *nix, Development, HAProxy, Power User, Software Development | Leave a Comment »

Packer template for Alpine Linux on Hyper-V and Azure; GitHub – tomconte/packer-alpine-azure

Posted by jpluimers on 2020/10/05

Cool: a Packer template for Alpine Linux on Hyper-V and Azure: [WayBack] GitHub – tomconte/packer-alpine-azure

I like Alpine Linux because it is lightweight and the focus of being very secure, how popular it is in the Docker scene where it replaced Ubuntu and is now the standar package at [Archive.is/A2] library/alpine – Docker Hub and the motto [WayBack] Alpine Linux; Small. Simple. Secure. Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.

Alpine is not yet out of of the box endorsed by Azure ([WayBack] Endorsed distributions of Linux | Microsoft Docs) so this is a very welcome tool.

From the readme:

Read the rest of this entry »

Posted in Azure Cloud, Cloud, Cloud Development, Development, Hyper-V, Infrastructure, Power User, Virtualization, Windows Azure | Leave a Comment »

Jeroen Pluimers on Twitter: “You will likely complete the circle at least twice in your career (;… “

Posted by jpluimers on 2020/10/02

For anyone in IT: [WayBack] You will likely complete the circle at least twice in your career (;…

–jeroen

Posted in Development, Fun, History, Infrastructure, Quotes | Leave a Comment »

Baseboard Management Controller: bmc-toolbox · GitHub, supporting Dell, HP and SuperMicro

Posted by jpluimers on 2020/10/01

Cool stuff by booking.com for interrogating Baseboard Management Controller on Dell, HP and SuperMicro equipment using golang.

A bunch of tools to ease BMC management.

Source: bmc-toolbox · GitHub

Via: [WayBack] bmclib talks to the Baseboard Management Controller of your server. It is written in Go, and understands Dell iDRAC, HP C… – Kristian Köhntopp – Google+

Repositories:

–jeroen

Posted in Development, Go (golang), Software Development | Leave a Comment »

Go character and string literals: regular (‘), double (“) and back-tick (`) quotes

Posted by jpluimers on 2020/10/01

For my link archive:

Back-ticks can be very useful for instance when you need to specifying json tags.

References for that:

–jeroen

Posted in Development, Encoding, Go (golang), JavaScript/ECMAScript, JSON, Scripting, Software Development | Leave a Comment »

sql server – Index Seek vs Index Scan – Database Administrators Stack Exchange

Posted by jpluimers on 2020/10/01

Below some links I used to get a feel for the different query execution plan entries I observed.

The first one was the most important for me, so hopefully this post helps bump it up in the search engine results.

–jeroen

Posted in Database Development, Development, SQL, SQL Server | Leave a Comment »

From Delphi 1: Type Compatibility and Identity

Posted by jpluimers on 2020/09/30

A feature overlooked by many Delphi programmer was already introduced in Delphi 1 which is more or less the same as in the Delphi 2007 documentation at [WayBack] Type Compatibility and Identity.

There is a distinction between these explained in the above link:

type
  TMyInteger1 = Integer;
  TMyInteger2 = type Integer;

Where TMyInteger1 is an alias for Integer, TMyInteger2 introduces a new type which is distinct from Integer and TMyInteger. That way the compiler can set them apart, and even generates separate RTTI (Run-Time TypeInformation) for them.

Probably the most used distinct types are these:

TDateTime = type Double;
...
TDate = type TDateTime;
TTime = type TDateTime;
TFontName = type string

These are unlike TColor which is defined as “just” a subrange of Integer, but because it is a subtype, also gets a distinct type:

TColor = -$7FFFFFFF-1..$7FFFFFFF;

Type identity is important because Delphi 1 introduced these mechanisms:

  • the streaming instances and their properties
  • editing instances and properties in the object inspector
  • two way binding of designer (form/datamodule/frame/…) and the underlying Pascal source

Without them, very basic Delphi features would not work.

In addition, a lot of other RTTI based code now enables features like object relational mapping, binding to JSON/XML and many others.

What I did not know is that the Pascal and Delphi type systems have been heavily influenced by ADA. Luckily Lutz Donnerhacke pointed me to ADA [WayBack] Types and Subtypes.

Example

I made an example Distinct type types in Delphi · GitHub showing the differences on RTTI level in these properties:

property IntegerProperty: Integer read FIntegerField write FIntegerField;
property ColorProperty: TColor read FColorField write FColorField;
property DoubleProperty: Double read FDoubleField write FDoubleField;
property DateTimeProperty: TDateTime read FDateTimeField write FDateTimeField;
property DateProperty: TDate read FDateField write FDateField;
property TimeProperty: TTime read FTimeField write FTimeField;
property StringProperty: string read FStringField write FStringField;
property FontNameProperty: TFontName read FFontNameField write FFontNameField;

The generated table (see also the source below using [Archive.is] TRttiContext added in Delphi 2010) indeed shows distinct types on the RTTI level:

Name Type.Name Type.QualifiedName Type.TypeKind
IntegerProperty Integer System.Integer tkInteger
ColorProperty TColor System.UITypes.TColor tkInteger
DoubleProperty Double System.Double tkFloat
DateTimeProperty TDateTime System.TDateTime tkFloat
DateProperty TDate System.TDate tkFloat
TimeProperty TTime System.TTime tkFloat
StringProperty string System.string tkUString
FontNameProperty TFontName System.UITypes.TFontName tkUString

This post was inspired by an interesting discussion on [WayBack] What’s the technical term for the following construct: type intx = type integer; type inty = integer; What term would you use to describe the differen… – Johan Bontes – Google+

Documentation:

RTTI dump inspired by [WayBack] delphi – How can I distinguish TDateTime properties from Double properties with RTTI? – Stack Overflow.

–jeroen

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | 2 Comments »