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,862 other subscribers

Firebird; testing for NULL and equality in practice: IS [NOT] DISTINCT FROM

Posted by jpluimers on 2017/06/14

Boy, I totally missed that this was introduced back then in Firebird 2.0:

 In Firebird 2 and higher, you test for null-encompassing equality with DISTINCT. This has already been discussed, but here’s a quick recap. Two expressions are considered:
  • DISTINCT if they have different values or if one of them is NULL and the other isn’t;
  • NOT DISTINCT if they have the same value or if both of them are NULL.

[NOT] DISTINCT always returns true or false, never NULL or something else. Examples:

if (A is distinct from B) then...
if (Buyer1 is not distinct from Buyer2) then...

Splendid!

Source: Testing for NULL and equality in practice

–jeroen

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

Bug fixes from both sides for “Windows 10 Creators update and Delphi debugging don’t go well”

Posted by jpluimers on 2017/06/13

It looks like Microsoft and Embarcadero solved their ends for [WayBack] Windows 10 Creators update and Delphi debugging don’t go well… :

The issue was caused by the Windows LoadLibrary trying to optimise loading which backfired for libraries (PE files like DLL/EXE…) that have multiple import tables in them as generated by the Delphi and C++ Builder linker (and maybe other linkers as well).

Microsoft finetuned their optimisation whereas a future update to Delphi and C++ Builder will generate more optimised import tables.

–jeroen

via [WayBack] Blog post “The Issue with Delphi Runtime Packages and Windows 10 Creators Update”… – Marco Cantù – Google+

 

Posted in Delphi, Development, Power User, Software Development, Windows, Windows 10 | Leave a Comment »

URLs for Mikrotik scripts to block IP addresses after repetitive login failures

Posted by jpluimers on 2017/06/13

For my research list:

–jeroen

Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | Leave a Comment »

Keep consistent formatting – via: The Oracle at Delphi: Code is the language, formatting is the dialect.

Posted by jpluimers on 2017/06/13

When this developer finally went to commit his/her changes, they had also reformatted most of the codebase into his/her preferred coding style/format. This was even for files for which no other changes had been made!Imagine the next developer coming along and pulling down the latest changes from the source control system and trying to merge them into their own local changes.

Because of all these code-format-only changes, it became nearly impossible to merge any changes without going through every conflicted file and painstakingly reconcile the changes.

I’ve seen this happen on a few projects where there have been sequential single developers some of which reformatted the whole code base within a few days of taking over.

It made it impossible to perform a “blame” or proper history tracking of feature changes.

That increased the cost of maintenance a lot.

I’ve been on several teams that enforced a pre-checkin standardised formatting of the code. Only rarely that causes problems, usually it’s a blessing to as it makes for a consistent formatting of the code-base where it is much easier to cut the crap and focus on what the real problem is.

–jeroen

Source: The Oracle at Delphi: Code is the language, formatting is the dialect.

Posted in .NET, C#, Delphi, Development, Software Development | 2 Comments »

QC overview

Posted by jpluimers on 2017/06/12

I wish I made WayBack copies when I drafted the below QC post last year sans [WayBack] links.

Edit 20171221: since QC is back up, I’ve archived the queries. I still have to archive the reports.

Some QC entries I forgot to archive:

Luckily I did archive most of the QC entries I posted about after november 2013.

About 11-thousand of 135-thousand entries are archived by now, in part of a script I tried to make early 2016 (but crashed after a few thousand entries):

https://web.archive.org/web//http://qc.embarcadero.com/wc/qcmain.aspx

About 5 thousand entries are here, but I’m not sure which ones are duplicate:

https://web.archive.org/web//http://qc.codegear.com/wc/

About 20 thousand entries are here, but I’m also not sure which ones are duplicate:

https://web.archive.org/web//http://qc.borland.com/wc/

–jeroen

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

Reverse ssh tunnel between two linux boxes to allow RDP traffic over port 3389

Posted by jpluimers on 2017/06/12

You know the drill: site that limits incoming traffic and has painful VPN. Luckily this time outgoing ssh traffic on port 22 was allowed (because they do SFTP which is SSH File Transfer).

Since I’ve outside Linux boxes and could run a Linux VM there (all Tumbleweed based), this allowed me to do a reverse SSH tunnel. Those are always a bit confusing, but this set of drawings really helps: What’s ssh port forwarding and what’s the difference between ssh local and remote port forwarding – Unix & Linux Stack Exchange [WayBack].

Which brings me to a statement like this:

ssh -o "ExitOnForwardFailure yes" -R :3389:192.168.199.114:3389 -p 33322 93.184.216.34

That didn’t work: a remote machine could not RDP to port 3389, but a local telnet localhost 3389 would. The reason is that by default sshd binds a remote port to the local address only and not the wildcard addres.

So you have to open up the remote config a bit: at least /etc/sshd_config and most likely also your firewall.

Read the rest of this entry »

Posted in *nix, Communications Development, Development, Internet protocol suite, Linux, openSuSE, Power User, SSH, SuSE Linux, TCP, Tumbleweed | Leave a Comment »

munki/createOSXinstallPkg: Tools for packaging OS X installers – upgrade Mac OS X from InstallESD.dmg

Posted by jpluimers on 2017/06/12

You can use this package to install OS X on an empty partition, but perhaps more interestingly, you can also use it to upgrade existing OS X installations to a newer version of the OS X. There are many tools and workflows that support the installation of Apple packages; you can use these together with an OS X installation package to upgrade machines to the latest version of OS X.This is especially interesting when used with tools like Munki — you can automate the upgrade of a group of machines while still preserving user data, or offer an upgrade as a “Self-Service”-type option where a user can initiate an OS X upgrade themselves without needing to have administrative rights.

I will probably need this one day.

Source: munki/createOSXinstallPkg: Tools for packaging OS X installers

–jeroen

Posted in Apple, iMac, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.11 El Capitan, OS X 10.9 Mavericks, Power User | Leave a Comment »

QC does this logon call to http://qc.embarcadero.com/coBugCGI.exe/soap/ICDSReportPublicInterface

Posted by jpluimers on 2017/06/09

I drafted this in 2014 and given the recent QC news:

I was quite shocked to see that the Embarcadero QC client logs in over HTTP, not over HTTPS, especially since it passes the password in plain text.

QC does this logon call to http://qc.embarcadero.com/coBugCGI.exe/soap/ICDSReportPublicInterface:


POST http://qc.embarcadero.com/coBugCGI.exe/soap/ICDSReportPublicInterface HTTP/1.1
SOAPAction: "urn:CDSReportPublicInterfaceIntf-ICDSReportPublicInterface#Login"
Content-Type: text/xml; charset="utf-8"
User-Agent: Borland SOAP 1.1
Host: qc.embarcadero.com
Content-Length: 665
Proxy-Connection: Keep-Alive
Pragma: no-cache
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><NS1:Login xmlns:NS1="urn:CDSReportPublicInterfaceIntf-ICDSReportPublicInterface"><EMail xsi:type="xsd:string">nobody@example.org</EMail><Passcode xsi:type="xsd:string">password</Passcode><ClientID xsi:type="xsd:string">QCWINCLNT</ClientID><BDN xsi:type="xsd:string">1</BDN></NS1:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>

Time to cut down on my usage of QC.

–jeroen

via: QC does this logon call to http://qc.embarcadero.com/coBugCGI.exe/soap/ICDSReportPublicInterface.

Posted in Delphi, Development, QC, Security, Software Development | 3 Comments »

Why I care about QC and the Delphi community.

Posted by jpluimers on 2017/06/09

QC now forwards to QP and it is no longer possible to see your older open QC posts. Since the RAD Studio IDE still appear to report issues to QC – how can we now keep track of our submitted issues?

When will the internal error reporting in RAD Studio file reports to QP instead of QC?

[WayBack] – Lars Fosdal – Google+

in a response to

[WayBackQuality Keeps Moving Forward – Community Blogs – Embarcadero Community

A few people wondered about my (QC) criticism and some mistakenly see this as frustration.

Not being an MVP any more allows me to continue voicing these, as I get these from fellow other Delphi developers and clients.

I’m not frustrated. I voice criticism on social media as I still deeply care about the Delphi community. They are entitled to excellent products and easily searched/obtained information, especially for less than current products as these are the ones that are still widely used and made Delphi great and Borland/Inprise/Embarcadero/Idera earn a lot of money. QC is an important part of that as it has input from a lot of knowledgeable people inside the Delphi community.

Of course I know that the Delphi team has lost a lot of valuable people and resources, their infrastructure is having difficulties (hence deleting forum posts, shutting down services and even suffer from outages every now and then for which I usually warned them shortly after they happened) and they have a truckload of things on their hands. But I hardly see them reach out to the community for any help, so there is not much I can guess on how they want to be helped.

Criticism that canalizes sentiments from parts of the community at least gives them a place to respond and help set things straight.

The reason I care about the Delphi community is that they still give me a big feeling of a kind of family helping each other.

Even being in the field for well over 20 years, I still find that there are lots of Delphi things I do not know or have forgotten. Asking around in the community in a proper way usually gets me going very quickly for the former. For the latter, I have wiert.me/category/development/software-development/delphi/ and Google Search.

I spent almost a day investigating which QC links I had already archived and which I didn’t. That’s the dedication I expect from the Delphi team as well.

BTW:

This is yet another reason to keep QC: even the Tokyo release notes refer to them: [WayBackList of new features and customer reported issues fixed in RAD Studio 10.2 Tokyo.

–jeroen

Posted in Delphi, Development, QC, Software Development | 3 Comments »

Mikrotik – splitting your local LAN so you can assign different gateways and DNS servers by the DHCP server

Posted by jpluimers on 2017/06/09

When you want your Mikrotik DHCP Server handout different gateways (or DNS/WINS/NTP/.. servers and other settings), many of the answers tell you to fiddle with the DHCP networks like DHCP Server different gateways – MikroTik RouterOS [WayBack] but lack concrete examples, so here we go elaborating a lot on DHCP server with static leases – MikroTik RouterOS [WayBack]:

Read the rest of this entry »

Posted in Internet, MikroTik, Power User, routers | Leave a Comment »