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

Inversion of Control explained in a few sencences

Posted by jpluimers on 2015/02/04

One of the difficult things with design principles like Inversion of Control, is that virtual all descriptions are lengthy and therefore difficult to grasp.

I’ve been using interfaces to decouple software for a long time, but it also took me a while to get IoC, especially the Inversion part.

The first time I got the Inversion principle was when reading the answer  by Derek Greer to What is the Dependency Inversion Principle and why is it important? and especially the summary in the comment by Patrick McElhaney:

The difference between MyService → [ILogger ⇐ Logger] and [MyService → IMyServiceLogger] ⇐ Logger is subtle but important.

A similar explanation can be found in the somewhat longer, but very well written articles Dependency Injection Is NOT The Same As The Dependency Inversion Principle and A curry of Dependency Inversion Principle (DIP), Inversion of Control (IoC), Dependency Injection (DI) and IoC Container.

The whole point of the “Inversion” part is twofold:

  1. you declare the interface (ILogger) between a service user (MyService) and a provider (Logger) close to the user.
  2. you do this so that MyService does not need to change when you switch to a different provider: a new Logger provider needs to implement the ILogger interface too, even if it is from a completely different source or vendor.

Keeping that interface stable has the consequence that there will be more work on the provider side, for instance by using the adapter pattern to map the provider to the interface.

Knowing this, it was far easier to understand these articles that are often regarded as the fundamental ones, most from Martin Fowler’s site:

–jeroen

Posted in Dependency Injection, Design Patterns, Development, Inversion of Control / IoC, Software Development | 1 Comment »

djm’s personal weblog: Key rotation in OpenSSH 6.8+

Posted by jpluimers on 2015/02/03

Really interesting. Need to implement this when it gets public. djm’s personal weblog: Key rotation in OpenSSH 6.8+.

Watching https://github.com/openssh/openssh-portable

Posted in Power User, Security | Leave a Comment »

On my research list: Pharo – Welcome to Pharo!

Posted by jpluimers on 2015/02/03

Thanks Warren Postma for pointing me at this:

The immersive programming experience

Pharo is a pure object-oriented programming language and a powerful environment, focused on simplicity and immediate feedback (think IDE and OS rolled into one).

And http://jmvdveer.home.xs4all.nl/: Check out Algol68G.

–jeroen

via: Pharo – Welcome to Pharo!.

Posted in Development, Software Development | Leave a Comment »

via Delphi sorcery: Unattended Delphi installation – how?

Posted by jpluimers on 2015/02/03

Cool: this makes it way easier to do repeated Delphi installs for testing purposes:

Setup.exe /s LANGUAGE=English EN=TRUE DE=TRUE KEY1=XXXX KEY2=XXXXXX KEY3=XXXXXX KEY4=XXXX

There are many more parameters in Delphi sorcery: Unattended Delphi installation – how?, but the above is already a good start.

Thanks Stefan Glienke for having shared this!

–jeroen

via: Delphi sorcery: Unattended Delphi installation – how?.

Posted in Delphi, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Software Development | 2 Comments »

Why I like #Gists

Posted by jpluimers on 2015/02/02

For me there are two cool things about gist: it can have multiple files per entry, and it is version controlled.

–jeroen

via: Help! I need input! :) How can I make a TForm “interface-able”? :) It’ll only….

Posted in SocialMedia | Leave a Comment »

Microsoft Windows on Devices – Raspberry Pi 2

Posted by jpluimers on 2015/02/02

Microsoft Windows on Devices – Raspberry Pi 2.

Posted in Uncategorized | Leave a Comment »

Update to “Delphi operator overloading: table of operators”: added the `in` operator

Posted by jpluimers on 2015/02/02

Because of [Wayback/Archive] Delphi sorcery: New dynamic array type in Spring4D 1.2, I updated this article from 2009: Delphi operator overloading: table of operators, names, and some notes on usage and ‘glitches’.

When I wrote the original article in 2009 the in operator wasn’t documented to be overloadable.

It is overloadable, and newer documentation includes it: [Wayback/Archive] http://docwiki.embarcadero.com/RADStudio/en/Operator_Overloading_%28Delphi%29.

In addition I clarified a few things better (like not needing to return Boolean for comparison and set operators) and fixed a few typos and links.

The glitches are still there, so I’ve kept those.

--jeroen

Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Development, Software Development | Leave a Comment »

Raspberry Pi 2 Model B Features Broadcom BCM2836 Quad Core Processor

Posted by jpluimers on 2015/02/02

Dang I bought my Raspberry Pi B+ a few weeks too soon: Raspberry Pi 2 Model B Features Broadcom BCM2836 Quad Core Processor.

–jeroen

Posted in Development, Hardware Development, Raspberry Pi | Leave a Comment »

Fun to watch/listen to: Sorting Algorithms (slower, grouped and ordered) – YouTube

Posted by jpluimers on 2015/02/02

A great way to hear/see how these algorithms work: Sorting Algorithms (slower, grouped and ordered) – YouTube.

–jeroen

Posted in Development, Software Development | 1 Comment »

(NL) fijn al die electronische rekeningafschriften, maar je moet ze of downloaden of 7 jaar bij je bank blijven @ABNAMRO @ingnl @Rabobank

Posted by jpluimers on 2015/01/31

Vrijwel geen enkele bank stuurt standaard nog rekeningafschriften per post: je kunt ze alleen nog maar electronisch downloaden. Ik ken namelijk geen enkele bank die ze ook per email toestuurt.

Dat downloaden moet je dus wel doen. Of je moet nog 7 jaar bij dezelfde bank blijven.

Anders voldoe je niet aan de digitale bewaarplicht van de belastingdienst.

Een quote uit de folder “Uw geautomatiseerde administratie en de fiscale bewaarplicht” van de belastingdienst (in tegenstelling tot de NS staat die pagina ook in het web archive):

Wanneer u gebruikmaakt van bijvoorbeeld elektronisch bankieren of online boekhouden, dan moet u ervoor zorgen dat u gedurende de wettelijke termijn toegang houdt tot de betreffende internetomgeving. Of u moet op een andere manier de oorspronkelijkheid (authenticiteit van de herkomst) en de inhoud van de gegevens (integriteit van de inhoud) van de betreffende transacties waarborgen.

Het lastige is dat elke bank zijn eigen:

Let op: vanaf morgen ondersteunt ING voor boekhoudsoftware alleen nog maar downloads in het nieuwe XML SEPA formaat voor zakelijke rekeningen. Prive kan dat nog wel. Gelukkig kun je nog wel PDF versies van je afschriften downloaden bij Mijn ING zakelijk en bij Mijn ING.

–jeroen

Posted in LifeHacker, Power User | 4 Comments »