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

Archive for the ‘Development’ Category

A repository with a hierarchy or modules referencing each other might not be a good idea

Posted by jpluimers on 2018/11/20

When creating a library of libraries where the libraries use parts of the other libraries creates a mess when organised as a repository with subrepositories having other subrepositories.

It might be better to have one big repository containing a suite of functionality. This is why darkThreading became part of darkGlass: [WayBack] Why no git submodules for the libraries it depends on? · Issue #1 · chapmanworld/darkThreading · GitHub:

You might want to maintain that suite as one big versioned repository, with a different means of structuring it than a tree of submodules. That way you can keep the more complex interdependencies between the parts you have now.

Example of the mess: [WayBack] Duplicate submodules with Git – Stack Overflow


Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Where does my git question go? – Programmers Meta Stack Exchange

Posted by jpluimers on 2018/11/20

StackOverflow / StackExchange is growing too large:

You’ve got a question about git. Its not uncommon, lots of people have questions about git. But where should the question be asked?

Source: Where does my git question go? – Programmers Meta Stack Exchange


Posted in Software Development, Development, Pingback, Stackoverflow, Source Code Management, Opinions, DVCS - Distributed Version Control, git, SourceTree, GitHub | Leave a Comment »

Reminder to Self: check if NameOf has been implemented yet

Posted by jpluimers on 2018/11/20

It’s been a wish for a very very long time: to get the name of an identifier as a string in Delphi:

For now the best one can do is either using an Assert and catching the exception (it gets you the unit name, source file name and source line number) in the links below, or using debug symbol information (like a MAP or TDS file) mentioned in the StackOverflow questions above.

C# has had a  [WayBack] nameof for many years now that is evaluated at compile time: [WayBackc# – Is nameof() evaluated at compile-time? – Stack Overflow.

There is a request RAD Studio – RSP-13290: NameOf(T) compiler (magic) function in Quality Portal by Horácio Filho about 3 years ago quotes below.

Since it took the C# team about 3 years after the original [WayBackAdd nameof operator in C# – Visual Studio request, I wonder how fast the Delphi team is.

NameOf .NET-like compiler magic (intrinsic) function would eliminate a lot of hand-written exception messages from several units.

C# 6 introduced nameof operator to obtain the simple (unqualified) string name of a variable, type, or member.

With the current Delphi implementation, after changing variables name we have ot change the related exception message as well. Putting variables name in the code is not a good practise, and is here that NameOf taking place saving tons of lines of code. As the result of NameOf(T) function (if so) is evaluated at compile time (according to the C# implementation – we need a help from compiler or it could be achieved using RTTI.

There is a discussion on Google+ community [WayBack
The function could be designed as
NameOf(x: Identifier)
following the same (or similar) warranties C# provides.

Using Assert:


Read the rest of this entry »

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

RegExr: Online Regular Expression Testing Tool

Posted by jpluimers on 2018/11/19

[WayBack] Kevlin Henney – Google+ reminded me of RegExr. Then I found out I collected the below links in 2010, but never published them. Hopefully a few still exist. Let’s see… yup: all do, but archived just in case.

Some other links (that show how much the landscape changed in 8.5 years time):


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

Convert/adapt an old ATX Power Supply into a Bench Power Supply with (or without) 3D Printed Parts

Posted by jpluimers on 2018/11/16

An interesting idea, although I would slightly modify it so I can -12V and -5V as well and maybe other voltage combinations too:

They are based on these underlying links:

Note that some of the newer power supplies with 24-pin molex connectors do not give you -5V any more.

A few notes:

  • depending on the age, ATX supplies can get you these voltages: -12V, -5V, 0V, +3.3V, +5V, +12V
    • -12V and -5V have very limited currents
    • newer power supplies often do not have -5V (especially the ones having 24-pin connectors)
    • newer power supplies have limited +5V power, but higher +12V power
    • older power supplies have limited +12V power, but higher +5V power
  • always take pictures of all connectors and the wire colours connected to them before starting (especially before cutting any wires)
    • this allows you to find back:
      • non-standard wire colours
      • configurations not covered here
  • to get stable 12V, you need a 5V load of about 5W:
    • between RED (+5V) andBLACK (GND),
    • for instance with pin 3 and pin 4,
    • or over one of the molex/floppy connectors: pins RED-BLACK
    • as load,
      • use at least a 10V/10W resistor or 12v/10W halogen lamp
      • ensure they are cooled well
  • to get stable 12V, you need a 12V load of about 10W
    • between YELLOW (+12V) andBLACK (GND),
    • for instance with pin 10 and pin 17,
    • or over one of the molex/floppy connectors: pins YELLOW-BLACK
    • as load,
      • use at least a 20V/20W resistor or 12v/20W halogen lamp
      • ensure they are cooled well
  • if your power supply has a BROWN (+3.3VS),
    • then ensure it is connected to ORANGE (+3.3V)
      • as brown is the SENSING wire to check 3.3V is OK.
  • to turn the power supply on,
    • short GREEN (PWR_ON, pin 14) and BLACK (GND, pin 15)
  • to know when the power is on:
    • connect a LED via a resistor between GREY (PWR_OK, pin 8) and BLACK (GND, pin 7)
  • to know when there is mains power:
    • connect a LED via a resistor between PURPLE (+5VSB, pin 9: stand by) and BLACK (GND, pin 7 or pin17)
  • Wikipedia: ATX Power supply describes
    • PWR_OK (often called Power Good)
    • +5VSB (stand by)
  • read the specs of your power supply to understand how much current it can deliver on which lines
  • some more current information

Example for loads:; more on why you need them and how to choose:

With a few more modifications you can [WayBack] Convert a Computer Power Supply to a Variable Bench Top Lab Power Supply.

I will probably go for this solution as it is easier to swap power supplies.


Via: [WayBack] Nice recycling of an old ATX power supply with a 3D printed part and a few accessories and cables… – Jean-Luc Aufranc – Google+


Read the rest of this entry »

Posted in Development, Hardware Development | Leave a Comment »

%d bloggers like this: