two presentations about patterns in dynamic languages

today I found two presentations about programming patterns and how their implementation changes in context of dynamic languages. http://norvig.com/design-patterns/

http://www.scribd.com/doc/49333574/-Design-Patterns-in-Dynamic-Languages-Presentation

They are both worth reading, lot’s of interesting information.

I have to “nitpick” on Neil Ford’s, of ThoughtWorks fame, sample code… Here are two “pearls” from his presentation:

So, Command class method names are doCommand and undoCommand? This typically comes from the playbook of procedural programming: stuff all your state and behaviour in a single class, but give them names in the form of verb-noun, to make it easier to understand… Here is one more sample:

Here we have behaviour attached to the class that really  doesn’t belong there. This Customer has inventory and can be shipped? uh, oh… this is code from the presentation on (good?) patterns 😦

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: