[ctpug] Python or Delphi to be taught at SA Schools

17 views
Skip to first unread message

Robert Ketteringham

unread,
May 24, 2010, 12:15:57 PM5/24/10
to ct...@googlegroups.com
Hi

We have been approached by Curriculum advisors for IT at the Western
Cape Education Department to present the benefits of Python as the
language taught at School's nationally.

At the moment Western Cape, KZN and two others teach Java whilst Gauteng
and 4 others teach Delphi. However, the education department wants a
common language to be taught. Python is one option they're looking at,
however they need to convince the Delphi provinces.

We need to provide reasons why teaching Python as a first programming
language is easier and better than Delphi. We also need to demonstrate
some of the IDE's available (for Windows). Here we need a lightweight
easy to use program, as well as one that provides "Drag and Drop" GUI
creation. Another aspect that needs to be addressed is database
connectivity with MS Access.

If you can think of any reasons why Python is better than Delphi, or if
you have experience with any particularly good Python IDE's, please feel
free to contribute at http://ietherpad.com/5V44WqKKhT

Kind Regards

Robert Ketteringham
UCT Algorithm Circle

signature.asc

Johan Venter

unread,
May 25, 2010, 7:59:54 AM5/25/10
to ct...@googlegroups.com
Hi

I taught computer studies to Grade 10, 11 & 12 a few years back and have since been a full time Python/Perl programmer, so I thought I'd weigh in.

I have no doubt that Python is the right choice, especially for introductory level programming. There is one caveat though which I'll mention later.

My reasons for saying Python blows the other choices out of the water is as follows:

1) The python interpreter. I sincerely believe there is no better way to get kids excited about programming than by letting them loose in the interpreter. It builds confidence since they are immediately getting stuff to work. As far as I'm concerned confidence is the most important thing for learning programming. This brings me to ...

2) Java's verbose syntax sucks (as an introductory language). I have seen the faces of kids go from excited to terrified (OK, I'm exaggerating a little, but only a little) when I wrote out a simple Java "Hello World" on the board on day one. Once they see "public static void main" or "System.out.println" they believe programming is akin to maths and the same fears/misconceptions bubbles up. And from then on it's an uphill battle. This brings me to ...

3) Python's awesome syntax. There is no "code fluff" to learn, it really is like coding in pseudo code. Data structures like Arrays and dictionaries (hashes) are simple, easy to explain and intuitive to work with. Forced indentation makes code easy to read and understandable. It's an interpreted language, so no compiling or need for a heavy weight IDE. Which brings me to...

4) Ease of use. All you need is a text editor and to have python installed, and your off. It comes with batteries included :D

There are plenty of free/open source IDEs, tools & tutorials for Python out there. From lightweight Editor-Interpreters (Python Genie, I think one is called ?) to full blown IDEs (Eric).


The caveat:
AFAIK Python does not have a native "drag & drop" programming "interface". I know QT (QTdesigner) has some cool tools, and it should be sufficient.
However, I don't believe programming should be taught this way, but I'll leave that discussion for another day.

Regards

Johan
--
You received this message because you are subscribed to the Google Groups "Cape Town Python Users Group" group.
To post to this group, send email to ct...@googlegroups.com.
To unsubscribe from this group, send email to ctpug+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ctpug?hl=en.

Jonathan Groll

unread,
May 25, 2010, 8:13:11 AM5/25/10
to ct...@googlegroups.com
On Mon, May 24, 2010 at 6:15 PM, Robert Ketteringham <rob...@gmail.com> wrote:
> If you can think of any reasons why Python is better than Delphi, or if
> you have experience with any particularly good Python IDE's, please feel
> free to contribute at http://ietherpad.com/5V44WqKKhT

Hi Robert,

I keep on experiencing etherpad timeouts/reconnections, so here are
some pros and cons (some of which were not on etherpad):

* Trend. This google trend graph demonstrates the decline of Delphi
http://www.google.com/trends?q=python%2C+delphi&ctab=0&geo=all&date=all&sort=0
For many years Borland seemed to be on the verge of bankruptcy until
it was bought by Micro Focus in 2009. Even now though, it is not a
certainty that the parent company will still provide for Delphi five
years from now.

* It is arguable that strong typing in Delphi assists with
teaching. However, it can also be argued that not explaining dynamic
typing (duck typing, etc) would be doing students a great disservice
and not leaving them adequately prepared.

* Licensing. Students are able to install the software on their own
machines without concern for licensing, espcially relevant to South
Africa.

* Open source and innovation. Open source inherently cultivates
innovation - student's can build their own products for sale. Python
is an attractive language for embedded devices, Delphi never was.

* Python has an interactive shell which makes it very easy to
demonstrate and learn code snippets

* Syntactically python does a much neater job of dynamic programming,
in Delphi the syntax appears artifical and more difficult to learn. An
example:

(Caveat: I don't have a Delphi compiler at hand, so the Delphi example
may not run)

DELPHI:
program demo;

type
TSimpleFunction = reference to function(x: Integer): Integer;

var
y1: TSimpleFunction;

begin
y1 := function(x: Integer): Integer
begin
Result := (x * x);
end;
Writeln(y1(10));
end.

PYTHON:
y1 = lambda x: x*x
print y1(10)

Regards,
Jonathan

Louis Cordier

unread,
May 25, 2010, 9:04:06 AM5/25/10
to ct...@googlegroups.com

> * Trend. This google trend graph demonstrates the decline of Delphi
> http://www.google.com/trends?q=python%2C+delphi&ctab=0&geo=all&date=all&sort=0

Trends are like self-fulfilling prophecies, depending on the choice
of education department more people will program in that language and thus
an increase in the trend.

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Just see what iphone apps did to Java.

> However, it can also be argued that not explaining dynamic typing (duck
> typing, etc) would be doing students a great disservice and not leaving
> them adequately prepared.

But if you have exposed the kids to Python you could use
Boo http://boo.codehaus.org/ or Cobra http://cobra-language.com/docs/why/
to teach static typing priciples, those languages are nearly like Python.

I also had problems with the EtherPad, it says the presentation is on
Tuesday, today is Tuesday, what Tuesday?

Regards, Louis.

--
Louis Cordier <lcor...@point45.com> cell: +27721472305

Walter Leibbrandt

unread,
May 25, 2010, 9:10:20 AM5/25/10
to ct...@googlegroups.com
On Tue, May 25, 2010 at 3:04 PM, Louis Cordier <lcor...@point45.com> wrote:
> I also had problems with the EtherPad, it says the presentation is on
> Tuesday, today is Tuesday, what Tuesday?
It was today at 12:00.

Jonathan Groll

unread,
May 25, 2010, 9:33:26 AM5/25/10
to ct...@googlegroups.com
On Tue, May 25, 2010 at 3:04 PM, Louis Cordier <lcor...@point45.com> wrote:
> Trends are like self-fulfilling prophecies, depending on the choice
> of education department more people will program in that language and thus
> an increase in the trend.
>
> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
> Just see what iphone apps did to Java.

This is a good argument for the increase in "Objective C" popularity
rather than the decline of Java. In the case of objective C, this
technology is strongly tied to other technologies that are increasing
in popularity (the iPhone/iPad). The same is not true for Delphi
currently, as far as I know.

Also, there does not seem to be any relationship between Delphi being
taught in South African schools and the uptake of Delphi in the South
African market.

Delphi is still a declining language in terms of overall use. That
does not mean it will not get chosen by education departments here
based on other reasons, but the usefulness of the skill being taught
can still be questioned.

Cheers,
Jonathan

Marco Gallotta

unread,
May 25, 2010, 9:49:10 AM5/25/10
to ct...@googlegroups.com
Hey guys

Thanks for everyone who gave their input. The meeting went really
well, and the people we met seem confident they can put in a solid
argument for choosing Python. The timeline is scary, with them having
to propose a complete revised syllabus (including IDE, text book,
etc.) by September. If accepted, teacher training will take place next
year, with it being adopted by the grade 10 class of 2012.

Unfortunately any comments sent after 12:00 we couldn't add, as the
meeting was at this time. However, the majority of these were
mentioned anyway (perhaps not expressed as strongly as in said
comments). We've asked to be kept updated on how things go, so we
might be bouncing more questions off this list in the near future.

While I won't be here, I am going to speak with the others who were at
the meeting about giving a brief talk on how the meeting went at the
next CTPUG meeting (Hodge asked :P).

Marco

--
Marco Gallotta
MSc Student
Department of Computer Science, University of Cape Town
people.cs.uct.ac.za/~mgallott | marco-za.blogspot.com
marco AT gallotta DOT co DOT za | 073 170 4444 | 021 552 2731

Adam Jorgensen

unread,
May 25, 2010, 3:21:45 PM5/25/10
to ct...@googlegroups.com
Awesome. Here's to hoping next years kids get a decent language. I avoided
computer studies and school specifically because I knew they would teach
with Pascal.

Stéfan van der Walt

unread,
May 25, 2010, 4:16:19 PM5/25/10
to ct...@googlegroups.com
On 25 May 2010 12:21, Adam Jorgensen <adam.jor...@googlemail.com> wrote:
> Awesome. Here's to hoping next years kids get a decent language. I avoided
> computer studies and school specifically because I knew they would teach
> with Pascal.

That's a pity; Pascal is a fantastic teaching language!

Regards
Stéfan

Adam Jorgensen

unread,
May 25, 2010, 4:56:02 PM5/25/10
to ct...@googlegroups.com
Yeah, that may be so but at the time I enjoyed learning C more :-)

2010/5/25 Stéfan van der Walt <sjvd...@gmail.com>:

Chavoux Luyt

unread,
May 26, 2010, 9:51:57 AM5/26/10
to ct...@googlegroups.com
Hi guys

As a Delphi programmer myself, I thought that I's like to give my
perspective. There is no doubt in my mind that Python is the best
programming language to learn how to quickly start programming.

On 25 May 2010 13:59, Johan Venter <a.johan...@gmail.com> wrote:
>
> Hi


>
>
> I taught computer studies to Grade 10, 11 & 12 a few years back and have since been a full time Python/Perl programmer, so I thought I'd weigh in.
>
> I have no doubt that Python is the right choice, especially for introductory level programming. There is one caveat though which I'll mention later.

I fully agree.

>
> My reasons for saying Python blows the other choices out of the water is as follows:
>
> 1) The python interpreter. I sincerely believe there is no better way to get kids excited about programming than by letting them loose in the interpreter. It builds confidence since they are immediately getting stuff to work. As far as I'm concerned confidence is the most important thing for learning programming. This brings me to ...

Amen: Python was designed from the beginning to help non-programmers
(especially scientists) to get programming as soon as possible.

>
>
> 2) Java's verbose syntax sucks (as an introductory language). I have seen the faces of kids go from excited to terrified (OK, I'm exaggerating a little, but only a little) when I wrote out a simple Java "Hello World" on the board on day one. Once they see "public static void main" or "System.out.println" they believe programming is akin to maths and the same fears/misconceptions bubbles up. And from then on it's an uphill battle. This brings me to ...

THIS is my greatest single problem with Java. Simple things should be
simple IMHO. Delphi is also better than Java in this regard.

>
>
> 3) Python's awesome syntax. There is no "code fluff" to learn, it really is like coding in pseudo code. Data structures like Arrays and dictionaries (hashes) are simple, easy to explain and intuitive to work with. Forced indentation makes code easy to read and understandable. It's an interpreted language, so no compiling or need for a heavy weight IDE. Which brings me to...

Agree. Even better than Delphi.

>
>
> 4) Ease of use. All you need is a text editor and to have python installed, and your off. It comes with batteries included :D

This is pretty much true of Delphi as well (the text editor is even
included in the IDE : p).

>
>
> There are plenty of free/open source IDEs, tools & tutorials for Python out there. From lightweight Editor-Interpreters (Python Genie, I think one is called ?) to full blown IDEs (Eric).

Lazarus (with Free Pascal) is also open source and mostly source
compatible with Delphi. Furthermore, it runs and compiles on different
platforms (Linux, Windows). The greatest drawback of Lazarus is that
it is not as easy to install as well as compiling slow compared to
Delphi proper (still quicker than C++).


>
> The caveat:
> AFAIK Python does not have a native "drag & drop" programming "interface". I know QT (QTdesigner) has some cool tools, and it should be sufficient.
> However, I don't believe programming should be taught this way, but I'll leave that discussion for another day.

I agree that this should not be the starting place for teaching
programming. However, it is very nice to be able to create a
professional-looking program within is a short while of learning the
basics of programming. What I also liked about Delphi, is that all the
GUI code is also in Delphi and available to see what the program does.
This is in contrast to e.g. C# .NET where they try to hide the GUI
functions. I have looked at the Boa constructor "GUI designer" for
Python and compared to Delphi/Lazarus it seemed very complicated. I
would not like to use it for teaching GUI programming to beginners.
Maybe there is something better?

Another question I have about using only Python for teaching
programming: Most commercials programs I have written makes use of a
SQL (RDMS) database backend. Delphi (and Lazarus) has components for
simplifying connecting to SQL databases. I am not sure how easily this
is done from Python?

In my opinion it would be nice to start with Python and maybe from the
second year on include Delphi. I do think it is good to teach some
programming with a statically-typed language. Even though Delphi usage
is declining, it is easy to change from Delphi to C# (or other .NET
language) for GUI programming. Learning Delphi will still not be a
waste of time IMHO.

Regards
Chavoux

Simon Cross

unread,
May 26, 2010, 10:04:39 AM5/26/10
to ct...@googlegroups.com
On Wed, May 26, 2010 at 3:51 PM, Chavoux Luyt <cha...@gmail.com> wrote:
> Another question I have about using only Python for teaching
> programming: Most commercials programs I have written makes use of a
> SQL (RDMS) database backend. Delphi (and Lazarus) has components for
> simplifying connecting to SQL databases. I am not sure how easily this
> is done from Python?

SQLAlchemy, SQLObject, PEP 249, Python comes with SQLite built-in.

Schiavo
Simon

Ismail Dhorat

unread,
May 26, 2010, 10:56:46 AM5/26/10
to ct...@googlegroups.com
Also check the book how to think like a computer scientist. Written by a teacher and based he clearly states some of the advantages of python over other languages (mostly c/java) but i am sure its applicable to delphi as well.

Regards,
Ismail

Marco Gallotta

unread,
May 26, 2010, 11:00:13 AM5/26/10
to ct...@googlegroups.com
On Wed, May 26, 2010 at 4:56 PM, Ismail Dhorat <idh...@gmail.com> wrote:
> Also check the book how to think like a computer scientist. Written by a
> teacher and based he clearly states some of the advantages of python over
> other languages (mostly c/java) but i am sure its applicable to delphi as
> well.

We gave them a copy of this book as well as byte of python, and dive
into python to get themselves familiar with the language. So they can
pick these things up if they read it.

Marco Gallotta

unread,
May 26, 2010, 11:01:47 AM5/26/10
to ct...@googlegroups.com
On Wed, May 26, 2010 at 4:04 PM, Simon Cross <hodg...@gmail.com> wrote:
> SQLAlchemy, SQLObject, PEP 249, Python comes with SQLite built-in.

We showed them SQLite as an alternative to MS Access if they are
willing to switch, which is unlikely. We also showed them some options
should they stick with MS Access. They seemed stuck on the DB browser,
which SQLite has one but we were not experienced with its
capabilities. So we'll see what they think.

Marco Gallotta

unread,
May 26, 2010, 11:03:44 AM5/26/10
to ct...@googlegroups.com
On Wed, May 26, 2010 at 3:51 PM, Chavoux Luyt <cha...@gmail.com> wrote:
> In my opinion it would be nice to start with Python and maybe from the
> second year on include Delphi. I do think it is good to teach some
> programming with a statically-typed language. Even though Delphi usage
> is declining, it is easy to change from Delphi to C# (or other .NET
> language) for GUI programming. Learning Delphi will still not be a
> waste of time IMHO.

On the contrary, they are actually thinking more of the other way
around. Using a GUI-oriented language to get them hooked and *then*
move to Python to cover them core bits. They're doing a trial course
in scratch to see if this is applicable for the first 6 months, which
we were a bit anti because we think they will be too old.

Ismail Dhorat

unread,
May 26, 2010, 11:05:58 AM5/26/10
to ct...@googlegroups.com
Marco, i think scratch is aimed at ages 5-10? ...


--

Marco Gallotta

unread,
May 26, 2010, 11:08:04 AM5/26/10
to ct...@googlegroups.com
On Wed, May 26, 2010 at 5:05 PM, Ismail Dhorat <idh...@gmail.com> wrote:
> Marco, i think scratch is aimed at ages 5-10? ...

I'd push that up to 13 years as well, but fully agree it's not for
grade 10s (15/16 years) and we told them so.

Marco Gallotta

unread,
May 26, 2010, 11:06:00 AM5/26/10
to ct...@googlegroups.com
On Tue, May 25, 2010 at 3:33 PM, Jonathan Groll
<jonatha...@gmail.com> wrote:
> Also, there does not seem to be any relationship between Delphi being
> taught in South African schools and the uptake of Delphi in the South
> African market.

Correct. They don't care much about the market needs. However, it does
add an additional punch for Python. Also, they say the reason they
won't teach Pascal is because it is no longer supported. /me thinks we
should burn the building from which Delphi is developed to solve the
problem. :P

Keegan Carruthers-Smith

unread,
May 26, 2010, 11:59:24 AM5/26/10
to ct...@googlegroups.com, Johan
I just took a very brief look at scratch. It actually looks nice if
only done for a limited time. Most people who do compsci in high
school don't come into the course with much understanding of control
flow, variables and this is what they struggle with. Maybe this would
make it better for the weaker students to improve? I know more
advanced students will hate it, but that is why it is only for 6
months.

Keegan

Marco Gallotta

unread,
May 26, 2010, 12:05:07 PM5/26/10
to ct...@googlegroups.com
Another concern I have is that they might be okay with scratch, but
then when they move to real programming they get lost and can't keep
up. Hence just postponing when those who can't cope drop IT, which
might end up being too late.

As for the stronger students, they aren't taking them much into
consideration. Rightly so IMHO.

Marco

Reply all
Reply to author
Forward
0 new messages