[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] A small programming challenge


Subject: Re: [xsl] A small programming challenge
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Wed, 22 Jun 2005 20:36:36 +1000

On 6/22/05, Mukul Gandhi <mukul_gandhi@xxxxxxxxx> wrote:
> Hi Dimitre,
>  I am keen to solve this problem. But I have a doubt
> .. Do you have a algorithm for this(If yes, please
> share it), which I'll implement with XSLT 2.0 ? Or we
> have to also invent a algorithm for this..

I have an algorithm and an XSLT 2.0 solution that runs successfully
with an available XSLT 2.0 processor and I will make this solution
available, but I don't want to spoil the fun for anyone, who'd accept
the challenge to find their own.

This all started a few weeks ago when my 12-year daughter asked me if
I can write a program that will print all Fibonacci numbers less than
1000000 (1 million).

I quickly wrote something in XSLT and it was a great fun to change
some parameters of the problem and see instantaneously the new result.
She was very curious how the program works and I had to explain
everything, including what is a sequence and what recursion is ...

Surprisingly, all these concepts are not difficult to understand for a
12-year-old.

I can only envy such a girl or a boy, starting their first programming
experience with a functional language at this age.

I have yet to think how we can best encourage interest towards
functional programming at an early age -- probably Jeni or David will
write a nice book for their kids in the next few years and make it
available to other kids?

This is the best we can do for our children.

Cheers,
Dimitre.


Current Thread
Keywords