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 the ‘Design Patterns’ Category

Anti Patterns Catalog

Posted by jpluimers on 2018/02/06

Recommended for any software developer or architect: browse [Archive.isAnti Patterns Catalog and re-read it 6-12 months later, then contemplate if you have improved.

Summary:

This catalog lists AntiPatterns in two ways:

–jeroen (who is re-reading right now).

via:

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

Life Beyond Distributed Transactions – ACM Queue

Posted by jpluimers on 2018/01/31

This article focuses on how an application developer can build a successful scalable enterprise application when he or she has only a local database or transaction system available. Availability is not addressed, merely scale and correctness.

I’m re-reading [WayBackLife Beyond Distributed Transactions – ACM Queue as it such a great article.

Via: [WayBack] Pat Helland on scaling: If you are not willing to pay the cost of distributed transactions, what options do you have and what are the costs associated with this choice – Kristian Köhntopp – Google+

Executive Summary: embrace uncertainty. It can’t be avoided.

–jeroen

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

Session plan for all of CodeRage XII (starts 20171107)

Posted by jpluimers on 2017/11/07

Schedule in European time zone:

Schedule in USA time zones:

–jeroen

via: [WayBack] If you’re not sure what the sessions are at this year’s CodeRage – here’s a full list and timetable. CodeRage is a free multi-day online conference wit… – David Millington – Google+

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

Designing your way out of the CanHandle-Handle conundrum | Software on a String

Posted by jpluimers on 2017/08/23

I recently had to refactor exactly this: Designing your way out of the CanHandle-Handle conundrum | Software on a String [WayBack] so I was glad that Marjan Veenema paved the path in 2015 for me.

–jeroen

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

Software Design Patterns Are Not Goals, They Are Tools

Posted by jpluimers on 2017/08/09

From a while ago: Software design patterns are tools, not goals. Use them as such, and only when you actually need them, not before.

Recommended reading!

via: Oh, hell yeah – Richard Haven – Google+

–jeroen

 

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

Robert C Martin – Functional Programming; What? Why? When? – YouTube

Posted by jpluimers on 2016/12/26

Great after X-mas watch: Robert C Martin – Functional Programming; What? Why? When? – YouTube subtitled “the failure of state”.

Thanks [WayBackAndrew Rohn – YouTube for the timestamp list:

  • 4:07 “Functional Programming: What? When? Why?” or “The Failure of State”
  • 5:10 Rich Hickey is the author of Clojure. Listen to his talks. 5:40 What is state? Variables.
  • 11:15 Structure and Interpretation of Computer Programs. This is a fascinating book. For the first 250 pages, the book uses no assignment statements.
  • 14:15 Here’s how SICP’s model of computing worked before they introduced an assignment statement. Simply replace a function call with its implementation.
  • 15:58 Once you introduce assignment. You can no longer replace a function call with its implementation. Why? Because the state of the system may have changed. An assignment statement introduces the concept of time.
  • 18:04 Side effect: an assignment statement. If there’s no assignment, there’s no side effect.
  • 20:22 What “hack” have we done to protect us from memory leaks? Garbage collection.
  • 31:46 Functional programming was invented in 1957 before OO and structured. But memory was too expensive to make it practical. But memory is cheap now.
  • 32:53 Should we change how we program? We should because: 1) Functional programs are simpler – which makes them easier to write and maintain 2) There’s no temporal coupling – no worrying if some function was called before another function. 3) Fewer concurrency issues. In a purely functional program, there’s no concurrency because there is no state. 4) No asking, “What’s the state?”
  • 38:38 We’re using multicore CPU’s now because we can’t increase clock rate anymore. And hardware makers are doing bizarre tradeoffs. They’re making individual processors slower but putting more processors in. So individual cores slow down but the chip throughput goes up if you can take advantage of all the cores.
  • 42:00 How are you going to work with an abundance of cores? Maybe we need to walk away from the assignment statement.
  • 49:49 OO = procedure + state. OO is exposed procedure but hidden state (encapsulation). It’s possible to write functional programs using an OO style. All of the objects become immutable.

–jeroen

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

Recursion

Posted by jpluimers on 2016/11/23

Apple fanboys all know about 1 Infinite Loop. Turbo Pascal adepts about the index entries “infinite loop See loop, infinite” and “loop, infinite See infinite loop”.

Google as a more direct approach: www.google.com/search?q=recursion

Read the rest of this entry »

Posted in Algorithms, Apple, Borland Pascal, Design Patterns, Development, Google, Pascal, Power User, Software Development, Turbo Pascal | Leave a Comment »

Sacrificial Architecture: design your software to live for a limited time.

Posted by jpluimers on 2016/05/05

Today I revisited a post by Martin Fowler on Sacrificial Architecture from last year because I was looking for this quote:

“design for ~10X growth, but plan to rewrite before ~100X”

Thanks Lars Fosdal for pointing me to it in the first place back then.

–jeroen

via:

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

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 »

Some links to Delphi Unit Testing history

Posted by jpluimers on 2015/01/29

Unit testing has been here for a long time, and so has Unit Testing in Delphi. Below a summary of historic links together with some notes on how the state of affairs changed over the years.

Charlie Calvert

I’ll start with one of the first large Delphi Unit Testing articles was a paper by Charlie Calvert summarizing the state of the art on Delphi Unit Testing in 2004. It is present in the wayback machine as DUnit Talk and on his elvenware.com site.

Note that the elvenwere.com site is sometimes slow or hard to reach. Since his evangelist days at Borland/CodeGear, Charlie has moved through a few evangelist jobs at Falafel and Microsoft and finally went back to his old profession: being a great teacher – this time at Bellevue Collegeoften using script based languages and cloud computing, with less focus on his web-presence.

Many of his IT books (during his writing period, he wrote both as Charles Calvert and Charlie Calvert) are still relevant though.

DUnit; Juanco Añez Read the rest of this entry »

Posted in Agile, Conference Topics, Conferences, Delphi, Dependency Injection, Design Patterns, Development, Event, FreePascal, History, Inversion of Control / IoC, Pascal, Software Development | 3 Comments »