tulipemoutarde.be

Software Developer

Smalltalk, Swift, Java, Obj-C

@fstephany | Email | LinkedIn

I'm currently working at Ta Mère SCRL a small development shop in Belgium.

We mainly do mobile apps (iOS, Android) for clients. We also have a strong interest in Pharo Smalltalk and Rust.

logo Ta Mère SCRL

Metacello configurations readability

24 Aug 2011 in metacello pharo seaside smalltalk 

I’m polishing a very small package to interact with ogone, a payment platform, from a Seaside application. So it’s time to write a Metacello configuration to share it easily.

I always have hard time to read Metacello configurations and wonder if a vertical alignment wouldn’t help. Basically, I find this:

baseline10: spec
  spec for: #common do: [
    spec blessing: #baseline.
    spec
      repository: 'http://www.squeaksource.com/ogone';
      package: 'Ogone-Core';
      package: 'Ogone-Seaside-Example' with: [spec requires: 'Ogone-Core'];
      package: 'Ogone-Tests'           with: [spec requires: 'Ogone-Core'].

    spec
      group: 'default'         with: #('Core' 'Seaside-Example' 'Test');
      group: 'Core'            with: #('Ogone-Core');
      group: 'Seaside-Example' with: #('Ogone-Core' 'Ogone-Seaside-Example');
      group: 'Tests'           with: #('Ogone-Core' 'Ogone-Test')
  ].

More readable than this:

baseline10: spec
  spec for: #common do: [
    spec blessing: #baseline.
    spec
      repository: 'http://www.squeaksource.com/ogone';
      package: 'Ogone-Core';
      package: 'Ogone-Seaside-Example' with: [spec requires: 'Ogone-Core'];
      package: 'Ogone-Tests' with: [spec requires: 'Ogone-Core'].

    spec
      group: 'default' with: #('Core' 'Seaside-Example' 'Test');
      group: 'Core' with: #('Ogone-Core');
      group: 'Seaside-Example' with: #('Ogone-Core' 'Ogone-Seaside-Example');
      group: 'Tests' with: #('Ogone-Core' 'Ogone-Test')
  ].

Am I the only one ?