The Joys Of Data-Driven Programming

Marko Rauhamaa marko at pacujo.net
Sun Aug 21 15:01:31 EDT 2016


Rustom Mody <rustompmody at gmail.com>:

> On Sunday, August 21, 2016 at 7:50:39 PM UTC+5:30, Marko Rauhamaa wrote:
>> Don't know jam, but can heartily recommend SCons.
>
> Likely true at some point
> Probably not now: http://stackoverflow.com/questions/2847730/c-build-systems
> [ tup seems to be the rage; scons seems to have the worst performance]

If SCons performance becomes an issue for you, your source code
repository is far too large. Time to break it up into independent
components.

Maybe there are other builders as good as SCons, but the nice thing
about SCons is that the "rule language" is ordinary Python. That's key:
don't invent a new rule language; use a real programming language.

>> Lisp's "data is code and code is data" is a good principle. I have
>> successfully used it with Python as well.
>
> Heh Really?!?

Yes. I was the treasurer of some soccer teams. I recorded the financial
transactions by updating a simple Python program that looked like this:

========================================================================
    :        :        :
paid('2014-11-17', 'DOE JANE', '1274',
     'November', None,
     { FEE_INCOME : 150.00 })
owed('2014-11-30', 'November',
     { 150 : [ SOPHIA, EMMA, OLIVIA, AVA, ISABELLA, MIA, ZOE, LILY ] })
    :        :        :
========================================================================

The program produced web pages, spreadsheets, emails etc.

> I can tell you if a student of mine mixed up code and data like
> emacs-lisp throwing customize *data* into user-config *code* (.emacs)
> he would be very sorry...

Er, ok...


Marko



More information about the Python-list mailing list