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,640 other followers

Archive for the ‘Development’ Category

delphi – How to hide the inherited TObject constructor while the class has overloaded ones? – Stack Overflow

Posted by jpluimers on 2019/07/18

Interesting, need to try this one day to see how well this works so the base constructor TObject.Create cannot be called.[WayBack] delphi – How to hide the inherited TObject constructor while the class has overloaded ones? – Stack Overflow

–jeroen

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

How to support full Unicode in MySQL databases · Mathias Bynens

Posted by jpluimers on 2019/07/18

TL;DR: use the MySQL utf8mb4 character set and convert any MySQL utf8 character set as those are not UTF-8.

The source describes how: [WayBackHow to support full Unicode in MySQL databases · Mathias Bynens

–jeroen

Via: [WayBack] ‪#MySQL’s ##UTF8 of course isn’t UTF8. ##WheresMySurprisedFace – Jan Wildeboer – Google+

 

Posted in Development, Database Development, MySQL | Leave a Comment »

PowerShell: Format-Table to show all columns/members

Posted by jpluimers on 2019/07/18

I’m not even sure if I’ve posted this before, but I always forget how to show all members (or columns) using Format-Table.

It’s dead easy: -Property *

Get-ChildItem | Format-Table -Property *

Later I found out this is equivalent with the shorter version where you omit the -Property part which I wrote about in [WayBackPowerShell: when Format-Table -AutoSize displays only 10 columns and uses the width of the console when redirecting to file.

So you can shorten the above to:

Get-ChildItem | Format-Table *

It has way more columns than this:

Get-ChildItem | Format-Table

The extra members in both marked with *:

  • PSPath
  • PSParentPath
  • PSChildName
  • PSDrive
  • PSProvider
  • PSIsContainer
  • BaseName
  • Mode *
  • Name *
  • FullName
  • Parent
  • Exists
  • Root
  • Extension
  • CreationTime
  • CreationTimeUtc
  • LastAccessTime
  • LastAccessTimeUtc
  • LastWriteTime *
  • LastWriteTimeUtc
  • Attributes

The odd thing: one property fails in the -Property * table:

  • Length

I tracked this down to how -Property * works: it takes the first entry in the list. If that is not a file, then it has no Length property: [WayBackpowershell – Measure-Object : The property “length” cannot be found in the input for any objects – Stack Overflow.

Note that for a GUI version, you can replace Format-Table with Out-GridView. See

-jeroen.

Posted in CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »

Threads are not the answer | CompuTruthing

Posted by jpluimers on 2019/07/17

Long read, but worth it: [WayBack] Threads are not the answer | CompuTruthing

We argue that the thread-oriented approach to concurrency is a bad approach. It has severe modifiability problems, but also performance problems. We should not think in terms of low level primitives.

It has great analogies between threading and cars on roads:

Software world Automotive world
thread road
work unit set of cars that pass over a road in a period of time
work unit dependencies cars need to go from one road to another
total execution time total time for all cars to reach the destination
lock/semaphore traffic lights / roundabout
too few work unit dependencies (highway) road network badly connected (sometimes this means long way to nearby locations)
too many work unit dependencies too many intersections or access points (too much time spent in these)
too many small threads (descheduled often) small roads
threads that are not descheduled from cores highways

Via

[WayBack] Kevlin Henney – Google+ 

Related videos under the fold (more at DevTube – Videos by @kevlinhenney)

–jeroen

Read the rest of this entry »

Posted in Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »

Tweaked TStringBuilder in FastCode is now 2x faster than the stock…

Posted by jpluimers on 2019/07/17

Reminder to self as occasionally I concatenate a lot of strings:

[WayBack] After some tweaking TStringBuilder in FastCode is now 2x faster than the stock Builder in SysUtils.  – Johan Bontes – Google+.

Source: FastCode/FastStringBuilder.pas at master · JBontes/FastCode

–jeroen

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

 
%d bloggers like this: