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

Archive for October, 2019

.NET: IHostedService – hosting services inside any .NET process

Posted by jpluimers on 2019/10/31

Have any service related stuff implement IHostedService, so it is easy to deploy it in all kinds of processes:

  • console to test
  • windows service
  • ASP.NET Core service
  • Linux host application

Peter Groenewegen ([WayBackpgroene (Peter Groenewegen) · GitHub; [WayBack] { Think Rethink }) has some great examples and blog articles at [WayBack] IHostedService – { Think Rethink }:

Background information:

Posted in .NET, .NET Core, .NET Standard, Development, Software Development | Leave a Comment »

Before using the PPL, I need to check to see if a few things have been fixed yet

Posted by jpluimers on 2019/10/31

Before using the PPL ever, I need to check out at least a few posts like these:

Most of the PPL code was written by Allen Bauer when he was Chief Scientist at Embarcadero in the 2007-2010 time frame and it was still called DPL (Delphi Parallel Library). The code was released in Delphi XE7 (see [Archive.isUsing the Parallel Programming Library – RAD Studio) but seems hardly maintained after he left.

You can find some of his notes at [Archive.isThe Oracle at Delphi: Parallel Programming

–jeroen

Read the rest of this entry »

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

SQL code smells

Posted by jpluimers on 2019/10/31

A while back I bumped into [WayBack] SQL Code Smells – Simple Talk, which is an extensive article covering all sorts of SQL related code smells.

It reminds me that one day I need to dig up some old links on other code smells as well.

–jeroen

via: [WayBackMartin Fowler on Twitter: “It’s an old anti-pattern, and sadly is still going strong: The Entity Service Antipattern.”

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

Public database servers

Posted by jpluimers on 2019/10/30

I could not find any vendors/architectures have public database servers.

So there is no good way to go beyond SQLFiddle (of which I wrote before in SQL Fiddle | A tool for easy online testing and sharing of database problems and their solutions and David Rodriguez: a few nice posts on SQL (via: Google+)), that does not provide database access, but allows you to fire SQL statements onto these architectures:

  • MySQL 5.6
  • Oracle 11g R2
  • PostgreSQL 9.6
  • PostgreSQL 9.3
  • SQLite (WebSQL)
  • SQLite (SQL.js)
  • MS SQL Server 2017

I get the thing (it is very hard to secure an “over the internet” connection to a database server; do NOT do this: [WayBack] connectivity – Connect to SQL Server over Internet – Database Administrators Stack Exchange), so the alternative is to run locally.

If you run locally, there are plenty of example/demo database, like:

–jeroen

Posted in Database Development, Development, MySQL, OracleDB, PostgreSQL, SQL, SQL Server, SQLite | Leave a Comment »

Dixin’s Blog – Use Fiddler with Node.js

Posted by jpluimers on 2019/10/30

[Archive.is] Dixin’s Blog – Use Fiddler with Node.js Fiddler is an useful HTTP proxy debugger on Windows. It would be nice if it can work with Node.js applications. To do this, just need to proxy Node.js requests through Fiddler… on port 8888.

There is a snippet for it at github/Dixin/CodeSnippets/…/fiddler.js (now moved to [WayBack] github.com/Dixin/Blog/…/Blog/Dixin.Nodejs/fiddler.js)

It complements a few posts I’ve written about Fiddler using port 8888 as a proxy before:

–jeroen

via: [WayBack] Use Fiddler with Node JS – CHUA Chee Wee – Google+

Posted in Cntlm, Development, JavaScript/ECMAScript, Node.js, NTLM, Power User, Scripting, Software Development, Windows, Windows-Http-Proxy | Leave a Comment »

Antipatterns in software development, architecture and management

Posted by jpluimers on 2019/10/30

If you develop software, be sure you recognise Antipatterns just as well as Patterns.

Luckily [WayBack] SourceMaking has a full sub-site covering software development, -architecture and management AntiPatterns: [WayBackAntiPatterns.

Of course it isn’t complete, so be sure to read [WayBack] The Majestic Monolith – Signal v. Noise as well.

via: [WayBackMartin Fowler on Twitter: “It’s an old anti-pattern, and sadly is still going strong: The Entity Service Antipattern.”

–jeroen

Posted in Design Patterns, Development, Software Development | Leave a Comment »

E2398 Class methods in record types must be static (Delphi) – RAD Studio

Posted by jpluimers on 2019/10/29

[WayBack] E2398 Class methods in record types must be static (Delphi) – RAD Studio present since at least Delphi 2007 ([WayBack] E2398: Class methods in record types must be static).

This is a Delphi compiler limitation for records, that is not present for classes.

Maybe one day when record inheritance kicks in, this will be resolved (as Stefan Glienke hinted in the below tread), because currently Self (which is present in non-static class methods on classes) then points to the current type. In static class methods, there is no Self, which is OK as that would point to the only available type anyway.

Via: [WayBack] why a class method of a record without the static keyword raise E2998 error ? AFAIK it can not be anything else then static ?! – Paul TOTH – Google+

Note that [WayBack] Error and Warning Messages (Delphi) – RAD Studio shows various other errors around the use of static:

All are marked “No further information is available for this error or warning.“, though they would at least deserve some examples.

–jeroen

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

Sparkle and WinSparkle – frameworks to update your applications on Apple Mac OS X / MacOS and Windows.

Posted by jpluimers on 2019/10/29

Since I will need these one day as native apps are useful:

via: [WayBack] Looking for ideas how to display to the users that ‘New version is available’ info… – Mike Torrettinni – Google+ which also has some good tips on how to notify the user about the availability of new updates.

–jeroen

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

BNNVARA – De Wereld Draait Door – Boek: Beginnen over het einde – Henk en Nina Blanken

Posted by jpluimers on 2019/10/29

Just in time for a very heavy period in my life: [WayBack] BNNVARA – De Wereld Draait Door – Boek: Beginnen over het einde – Henk en Nina Blanken

It is about changing legislation about euthanasia in cases when someone has documented that urge, but cannot execute that urge any more because of for instance Alzheimer’s disease, or brain damage because of (metastasis of) cancer.

The driving force is writer Henk Blanken who was diagnosed with Parkinson’s disease 8 years ago, and has a very high change of getting Alzheimer’s.

From that page:

24 okt 2019

Acht jaar geleden werd oud-journalist en schrijver Henk Blanken gediagnosticeerd met parkinson. Daardoor kreeg hij ook een grote kans op dementie. Sindsdien strijdt Blanken voor een wijziging van de euthanasiewet. Hij wil dat zijn familie het moment van euthanasie kan bepalen, als hij dement wordt. Vandaag verschijnt daarover zijn boek ‘Beginnen over het einde’ met een manifest waarin hij een steunoproep doet voor een [WayBack] humaan levenseinde voor iedereen. Hij zit aan tafel met zijn dochter Nina.

His book is available as of today: [WayBack] Beginnen over het einde – Henk Blanken – De Correspondent

Nergens ga je zo prettig dood als in Nederland. Behalve als je dement bent. Waarom is euthanasie bij dementie zo moeilijk? Journalist Henk Blanken vindt een uitweg in zijn boek Beginnen over het einde.

[WayBack] Beginnen over het einde – Henk Blanken – De Correspondent

Nergens ga je zo prettig dood als in Nederland.

Behalve als je dement bent.

Want ook al mag het van de wet, geen arts helpt je bij het sterven als je niet meer begrijpt wat er gebeurt.

Waarom is euthanasie bij dementie zo moeilijk? En hoe kan het wél?

In dit openhartige boek laat Henk Blanken zien hoe belangrijk het is om op tijd te beginnen over het einde. Met je naasten en met je arts. Zodat je niet te vroeg dood gaat, maar ook niet te laat.

Op 29 oktober in de boekhandel!

For People in The Netherlands:

Read the rest of this entry »

Posted in About, LifeHacker, Personal, Power User | Leave a Comment »

Spring4d Marshmallow ORM – ensuring the right identifier quoting is used

Posted by jpluimers on 2019/10/29

When an ORM generates the SQL for a certain database back-end, it needs to use the right quoting.

Normally, the Spring4D Marshmallow project derives that from the back-end specific adapter used.

But if you use a generic TDriverConnectionAdapter, then you need to manually set the QueryLanguage property in your IDBConnection using a valid value from Spring.Persistence.SQL.Interfaces. This then uses the correct SQLGenerator from the TSQLGeneratorRegister to generate the SQL including correct quotes.

To quote identifiers, most back-ends use a double quote, but MySQL uses a backtick.

via:

You obviously already modified that code as the commented out code is the correct one.
I guess you already got that mistake when you started using MySQL via ADO as MySQL needs the backtick.

Set QueryLanguage of your IDBConnection properly (the valid values are in Spring.Persistence.SQL.Interfaces). Then the correct SQLGenerator will be used.
If you are using an adapter that is specific to a certain database then it sets the QueryLanguage properly but if you are using an adapter for components that can connect to multiple databases (like ADO or FireDAC) it does not, hence the need you specify it.

 

–jeroen

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