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 2018

Watch “Modifying an old light with LED tape.” on YouTube

Posted by jpluimers on 2018/11/21

Posted in Uncategorized | Leave a Comment »

In operations, code is not your friend. Make things simple, make them boring …

Posted by jpluimers on 2018/11/21

Painful lesson learned a while ago: In operations, code is not your friend. Make things simple, make them boring and make them obvious, and keep an eye on the configuration complexity cloc… – Kristian Köhntopp – Google+

Read the rest of this entry »

Posted in Cloud, Development, DevOps, Infrastructure, Software Development | Leave a Comment »

Date and time conversion is hard in databases: `conversion error from string “30-12-1899″`

Posted by jpluimers on 2018/11/21

Converting string literals to to date/time/timestamp related data is always tricky in many Database environments.

Firebird is no exception, especially because sometimes it truncates a zero time portion from a date-time/timestamp.

So you can get this:

select cast('30-12-1899' as TimeStamp)
from rdb$database

Throwing an error:

conversion error from string "30-12-1899"

And this:

select cast('30.12.1899' as TimeStamp)
from rdb$database

Returning

CAST
30-12-1899 0:00:00

–jeroen

Posted in Database Development, Development, Firebird, Software Development | Leave a Comment »

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

–jeroen

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

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, GitHub, Opinions, Pingback, Software Development, Source Code Management, SourceTree, Stackoverflow | 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 – http://stackoverflow.com/a/26573179) we need a help from compiler or it could be achieved using RTTI.

There is a discussion on Google+ community [WayBackhttps://plus.google.com/+StefanGlienke/posts/AsGHSLF4rTX.
The function could be designed as
NameOf(x: Identifier)
following the same (or similar) warranties C# provides.

Using Assert:

–jeroen

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):

–jeroen

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

EPOX EP-8RDA3i motherboard with code FF before POST starts

Posted by jpluimers on 2018/11/19

From a long time ago: EVGA motherboard are very similar to EPOX ones (they

Once I had an FF motherboard code before even the POST started on an EP-8RDA3i motherboard.

Basically taking everything out, clearing the CMOS and putting everything back in solved the problem:

The capacitors were still OK.

–jeroen

Read the rest of this entry »

Posted in Hardware, Power User | Leave a Comment »

Refurbish the battery on an HP P410 BBWC | Opensource Blog

Posted by jpluimers on 2018/11/19

TL;DR: BBWC are using NiMh batteries that you can replace with bigger ones.

Source: [WayBackRefurbish the battery on an HP P410 BBWC | Opensource Blog

Via: [WayBack] Very useful hack if you are running old HP Xeon servers and want to use the original disk controllers and spinny rust. – Alan Cox – Google+

–jeroen

Read the rest of this entry »

Posted in Hardware, Power User, RAID | Leave a Comment »

nmap for Windows: ncat as a TCP client to servers

Posted by jpluimers on 2018/11/16

Downloads are from a bit cryptic page [WayBack] Download the Free Nmap Security Scanner for Linux/Mac/Windows via [WayBack] Windows | Nmap Network Scanning.

An alternative is to go to [WayBack] nmap.org/dist, then search for the bottom most files having .exe or .zip extensions.

It is much more modern than netcat (see some links on that below) and has elaborate documentation:

As a comparison some netcat links:

–jeroen

Posted in *nix, nmap, Power User | Leave a Comment »