• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Noulakaz

Noulakaz

The blog of Avinash, Christina, Anya and Kyan Meetoo.

  • Home
  • About
  • People
    • Christina & Avinash Meetoo
    • Avinash Meetoo
    • Christina Meetoo
    • Anya Meetoo
    • Kyan Meetoo
  • General
    • News
    • Mauritius
    • Politics
    • Education
    • Business
    • Travel
  • Computing
    • Apple
    • Linux
    • LUGM
    • Programming
    • Web
    • Technology
    • Knowledge Seven
  • Entertainment
    • Music
    • Movies
    • Photography
    • Sports

Scheme is a good language for beginners

11 April 2008 By Avinash Meetoo 7 Comments

I am currently teaching programming languages to second year students. I spent about 4 weeks introducing Scheme to them and I covered the following topics:

  • Expressions
  • Functions
  • Scope
  • Recursion and tail-recursion optimization
  • Pairs and lists
  • Higher-order function

Each lecture was followed by a lab session where students practiced what they saw in class.

I then gave the students an assignment to do where they had to write moderately complex higher-order functions. Last week, I asked the students to demonstrate to me what they had done. During the demo, I asked them a couple of questions.

What did they think about the assignment

Most students told me that they liked the assignment even if it was moderately tough. This was a surprise to me as I did not expect the students to like assignments. But this might be normal as I devised the assignment to appeal to the social networking generation. Another possibility is that many students managed to do a substantial part of the assignment without having to copy from a friend as Scheme is so beginner-friendly and powerful at the same time.

What did they think about Scheme

Many of them told me they found Scheme (and the DrScheme IDE) easier to understand than C++ which they used in Year I. Some said that higher-order function were very powerful and made their functions very compact yet powerful and easy to understand. A few didn’t use higher-order functions at all and relied on plain old recursion to solve the problems (that’s ok with me).

Interestingly, some students told me that Scheme should have been used in Year I instead of C++.

My opinion

I agree with them and I think there are two important reasons why Scheme is better than C++ for teaching programming:

  • Scheme, when used as a functional language, is waaaaaay simpler than C++. The only keywords we used were define, let*, lambda, cond, cons, car, cdr, add1, sub1 and null? With those, students managed to build very powerful functions. Compare this to the complexity of ISO C++.
  • Scheme has DrScheme which is, quite simply, the best Integrated Development Environment for students. It has fantastic stepping and tracing facilities (which are pretty much essential when one is learning…) and also provides a very powerful read-eval-loop. I learned programming around 1987 using a BASIC interpreter and I guess I would have become a poorer programmer if I only had a compiler at that time.

Of course, Scheme can be replaced by something like Haskell or even by the disciplined use of Ruby or Python.

The point is to use a simple (subset of a) language with a beginner-oriented IDE featuring a read-eval-loop. This is the exact opposite of using the most complex programming language ever with an IDE designed for professional software developers.

The top five universities in the world can’t all be wrong after all :-)

Filed Under: Education, Programming

Reader Interactions

Comments

  1. Stéphane Lee says

    11 April 2008 at 15:21

    OK, you are telling me that C++ was their first programming language? I fear for your students. Ada or Pascal would be my choice for the first language. C and then C++/Java would be the next languages that the students should learn.

    As I always say, one should learn his algorithm first, then pointers and oop.

  2. avinash says

    11 April 2008 at 16:28

    Yes, their very first exposure to programming was

    #include <iostream.h>

    void main()
    {
      cout << "Hello world" << endl;
    }

    instead of

    puts "Hello world"

    Poor them…

    An update: I don’t want to give the impression that the choice of the programming language is the only important decision to make. There is also the choice of the topics to be covered. In my opinion, students are shown the syntax and semantics of the language but not really how these can be used to solve real problems. This is very apparent during the ACM Local Programming Contest we organize every year…

    Personally, I think that a mix like Harvard’s is close to perfect: introduce programming to students using C (to understand how a computer works) and Ruby (to learn about problem solving) in parallel.

  3. fluxy says

    14 April 2008 at 23:17

    Hi!
    Having been a beginner once, and far from being currently an expert, I believe:
    – Logo is the perfect language for people having only basic computer skills (it’s almost natural).
    – Visual Basic : lots of clicking here, easy and fun – but vb can be misleading (people failing to understand the true notions of programming)
    – Php makes a perfect starter language, the advantage being that its rules are not very strict (especially as far as variables are concerned), you can start doing lots of things thanks to its library of functions (which makes programming more interesting), added to (my)SQL it can give you notions of databases and given its C-inspired syntax, you can easily move to other languages like C or other C-Syntax-inspired languages. Php was my first ‘serious’ programming language after vb. The problem with php is that html knowledge is highly desirable such that it can become a pre-requisite.
    – Python : it is an all-rounder programming language, and being interpreted it can be learnt using the interactive shell, which helps grasp the basics. Added to Tk bindings it can provide strong notions of gui creation (unlike vb’s point and click or php’s html). A great guide (http://www.framasoft.net/article1971.html) helped me get started easily and quickly which is kind of cool.

    The problem with Scheme (based on my first glances thereof) is its language style which is unlike other ‘popular’ (C-Styled) programming languages, and hence is confusing for me. I will try to take a better look at that later though.

  4. avinash says

    14 April 2008 at 23:34

    Hi fluxy,

    Thanks for this great comment. I am starting to think that Ruby (or Python) would make a better programming language for beginners than Scheme not because they are better but they look familiar.

    Decreasing the pain of adoption is what matters after all…

  5. selven says

    15 April 2008 at 23:18

    “The top five universities in the world can’t all be wrong after all :-)”

    You’ve still not changed.. when the top 5 universities think they are doing something right… it doesn’t mean THEY ARE RIGHT!

    “In my opinion, students are shown the syntax and semantics of the language but not really how these can be used to solve real problems. This is very apparent during the ACM Local Programming Contest we organize every year…”

    :p hmm .. i believe i am supposed to think i can’t solve real problem because of a local programming contest :D?
    *[i or anyone who didn’t win :p]

    “I am starting to think that Ruby (or Python) would make a better programming language for beginners than Scheme”

    one thing that we both agree on :D

    +$3|v3n

  6. avinash says

    16 April 2008 at 00:46

    Everything is relative in life: there is no absolute right or wrong.

    What is probably true is that when the top 5 universities in the world agree not to teach C++ to beginners and opt for either a functional language or a modern dynamic scripting language then, personally, I am happy to believe that what they are doing is RIGHT.

    Since 2006 when we had the first local contest, I noticed two things: (i) few students participate and (ii) among those who participate, few managed to answer more than one question.

    This has only one explanation: our students have issues solving problems and writing programs quickly. The important word here is quickly. Given time, most of them (including you :-) ) would solve all problems given…

    As for Ruby > Scheme, it’s because Ruby looks more familiar. It has nothing to do with the respective qualities of the two languages.

  7. selven says

    16 April 2008 at 15:12

    Given time, most of them (including you :-) ) would solve all problems given…

    aahh you are wrong about me
    :D given time.. i wouldn’t be able to solve it in time there.

    ever since i found out why :p [i.e why i will never succeed in that], i automatically got in a good mood and gain arrogance :D

    i am 1337 :)

    don’t try to figure it out :p

    personally, I am happy to believe that what they are doing is RIGHT.
    I would hate to be ruled by the *top universities* rather than my own sense perverted sense of reasoning

    +$3|v3n

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Our Personal Websites

Avinash Meetoo
Christina Meetoo
Anya Meetoo
Kyan Meetoo

Related Posts

  • Learning Scheme with me
  • Learning by experimenting (with Scheme)
  • Was the C Programming Language one of the best and, at the same time, one of the worst things to happen?
  • Answers for my Scheme and Prolog test

Random Posts

  • Christina has set up her blog
  • Moving towards native Apple M1 ARM64 audio plugins
  • Programming Quiz #1
  • New York, New York…

Archives

  • May 2025 (2)
  • April 2025 (4)
  • January 2025 (3)
  • December 2024 (2)
  • November 2024 (2)
  • October 2024 (3)
  • September 2024 (7)
  • August 2024 (1)
  • July 2024 (1)
  • June 2024 (2)
  • May 2024 (3)
  • January 2024 (2)
  • December 2023 (1)
  • October 2023 (1)
  • September 2023 (4)
  • August 2023 (3)
  • July 2023 (1)
  • June 2023 (4)
  • May 2023 (1)
  • April 2023 (1)
  • March 2023 (5)
  • February 2023 (1)
  • December 2022 (1)
  • November 2022 (1)
  • October 2022 (4)
  • August 2022 (4)
  • July 2022 (3)
  • June 2022 (5)
  • May 2022 (5)
  • January 2022 (3)
  • December 2021 (2)
  • November 2021 (1)
  • October 2021 (1)
  • September 2021 (4)
  • August 2021 (2)
  • July 2021 (14)
  • May 2021 (2)
  • April 2021 (4)
  • March 2021 (9)
  • February 2021 (2)
  • January 2021 (1)
  • October 2020 (1)
  • September 2020 (1)
  • August 2020 (2)
  • July 2020 (5)
  • June 2020 (3)
  • May 2020 (5)
  • April 2020 (6)
  • March 2020 (2)
  • February 2020 (2)
  • January 2020 (2)
  • October 2019 (1)
  • September 2019 (2)
  • July 2019 (2)
  • June 2019 (1)
  • May 2019 (3)
  • April 2019 (2)
  • March 2019 (1)
  • February 2019 (1)
  • January 2019 (3)
  • December 2018 (1)
  • October 2018 (3)
  • August 2018 (2)
  • July 2018 (2)
  • June 2018 (1)
  • May 2018 (2)
  • April 2018 (1)
  • February 2018 (1)
  • December 2017 (1)
  • October 2017 (1)
  • September 2017 (1)
  • August 2017 (1)
  • July 2017 (1)
  • May 2017 (4)
  • April 2017 (3)
  • March 2017 (4)
  • February 2017 (5)
  • January 2017 (3)
  • October 2016 (1)
  • September 2016 (1)
  • August 2016 (4)
  • July 2016 (1)
  • June 2016 (1)
  • March 2016 (3)
  • February 2016 (3)
  • January 2016 (1)
  • December 2015 (1)
  • November 2015 (2)
  • September 2015 (1)
  • August 2015 (3)
  • March 2015 (1)
  • December 2014 (1)
  • November 2014 (4)
  • October 2014 (1)
  • March 2014 (2)
  • February 2014 (3)
  • December 2013 (1)
  • October 2013 (1)
  • September 2013 (1)
  • August 2013 (1)
  • July 2013 (1)
  • June 2013 (2)
  • May 2013 (1)
  • March 2013 (3)
  • January 2013 (2)
  • December 2012 (3)
  • November 2012 (4)
  • September 2012 (3)
  • August 2012 (2)
  • July 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (2)
  • February 2012 (1)
  • January 2012 (4)
  • December 2011 (2)
  • November 2011 (1)
  • October 2011 (4)
  • September 2011 (2)
  • August 2011 (1)
  • July 2011 (2)
  • June 2011 (4)
  • April 2011 (7)
  • March 2011 (2)
  • February 2011 (1)
  • January 2011 (3)
  • November 2010 (3)
  • October 2010 (1)
  • September 2010 (2)
  • August 2010 (4)
  • July 2010 (2)
  • June 2010 (1)
  • May 2010 (3)
  • April 2010 (4)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (5)
  • December 2009 (2)
  • November 2009 (3)
  • October 2009 (1)
  • September 2009 (5)
  • August 2009 (3)
  • July 2009 (1)
  • June 2009 (3)
  • May 2009 (2)
  • April 2009 (7)
  • March 2009 (12)
  • February 2009 (10)
  • January 2009 (5)
  • December 2008 (4)
  • November 2008 (11)
  • October 2008 (6)
  • September 2008 (7)
  • August 2008 (3)
  • July 2008 (8)
  • June 2008 (6)
  • May 2008 (5)
  • April 2008 (7)
  • March 2008 (6)
  • February 2008 (3)
  • January 2008 (6)
  • December 2007 (11)
  • November 2007 (10)
  • October 2007 (7)
  • September 2007 (9)
  • August 2007 (3)
  • July 2007 (7)
  • June 2007 (8)
  • May 2007 (14)
  • April 2007 (11)
  • March 2007 (18)
  • February 2007 (14)
  • January 2007 (15)
  • December 2006 (16)
  • November 2006 (10)
  • October 2006 (7)
  • September 2006 (8)
  • August 2006 (8)
  • July 2006 (6)
  • June 2006 (4)
  • May 2006 (13)
  • April 2006 (10)
  • March 2006 (11)
  • February 2006 (7)
  • January 2006 (14)
  • December 2005 (8)
  • November 2005 (6)
  • October 2005 (7)
  • September 2005 (2)
  • August 2005 (6)
  • July 2005 (2)
  • June 2005 (6)
  • May 2005 (15)
  • April 2005 (12)
  • March 2005 (3)
  • February 2005 (8)
  • January 2005 (3)
  • December 2004 (1)
  • November 2004 (2)
  • October 2004 (2)
  • September 2004 (3)
  • August 2004 (3)
  • July 2004 (3)
  • June 2004 (3)
  • May 2004 (6)
  • April 2004 (10)
  • March 2004 (12)
Creative Commons License This work is licensed by Avinash Meetoo under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License.