Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Languages used in class
Index -> General Discussion
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ryan.s




PostPosted: Thu Nov 01, 2012 8:02 am   Post subject: Languages used in class

Hi,

i was just wondering, why are we forced to learn a certain language in classes like comsci? Especially an obsolete language such as turing.

I really wish schools in ontario would abandon turing finally, because learning it doesnt benifit students as much in the future as it would if we learned something like c++ right off the start.

I feel like it is unfair that some schools get to use real programming languages like C / C++ / JAVA, while we are stuck using turing which is slow, boring, limited, and not challenging enough. We aren't even learning JAVA untill like part way through grade 12, but even so I would prefer C/C++.

I understand that they can only teach one language to the class but I think the thing that is really unfair is that you are not allowed to hand in assignments written in another programming language, even if you can fulfil or exceed all the requirements.

I just think it is really unfortunate that we are learning Turing, as it messes with your understanding of other languages somewhat because it does so many things completely differently and in a non standard, illogical way (see locate and locatexy). I wish they had said in the course description that the course is pretty much all turing
Sponsor
Sponsor
Sponsor
sponsor
QuantumPhysics




PostPosted: Thu Nov 01, 2012 8:50 am   Post subject: RE:Languages used in class

They find the C line of system to be too difficult. Hey, personally I would prefer to learn Vala, Lisp, C, or even LXML, but you don't see me complaining. If you persue to clarify. You can take it up with the schoolboard, go to them with a presentation on why you think this should be changed.
DemonWasp




PostPosted: Thu Nov 01, 2012 9:58 am   Post subject: RE:Languages used in class

The problem with C and C++ is that C is fairly complicated, and C++ is absurdly overcomplicated. Neither language can feasibly be used if it must be taught to students (along with basic programming constructs) in a single term. Both languages are also incredibly unforgiving and fairly difficult to set up (compiler, linker, IDE all need to talk to each other, plus then there's Makefiles).

The problem with Java is that it's not designed with teaching in mind. The language is simple and straightforward (and fairly uncomplicated) but it's got a few throwbacks to the C era that don't make any sense to new programmers. Plus, the language is so verbose it's usually only written with the help of a fairly advanced IDE, which is a lot of additional complication that doesn't really help the learning experience.

Languages like Scala, Python, Scheme, and LISP are becoming more common at the university level because of their concise, expressive syntax and powerful built-in constructs, as well as the ease of "getting started" in those languages. It will be a few years before high schools pick up on the change (mostly because doing so will require re-writing the curriculum, a huge task).

@QuantumPhysics: Vala looks mildly interesting. LXML appears to be a Python library for processing XML, so I don't know what you're talking about there.
TerranceN




PostPosted: Thu Nov 01, 2012 12:24 pm   Post subject: RE:Languages used in class

"turing which is slow, boring, limited, and not challenging enough"

As long as you learn the important concepts the language doesn't really matter for the class. But from the sounds of it, you're hitting the limitations of using Turing. If those other languages interest you, you should learn them and use them in your spare time.

"why are we forced to learn a certain language in classes like comsci? Especially an obsolete language such as turing"

I know the feeling, high school cs is all over the board in terms of quality. No one who has actually worked in computer science in the last 10 years would chose Turing over much more powerful, expressive, and much easier to understand languages like Python.

"as it messes with your understanding of other languages somewhat because it does so many things completely differently and in a non standard, illogical way (see locate and locatexy)"

You will find differences like that in pretty much every language and library you use. In fact for most languages you have to talk to the OS or use a library to draw things, which are usually all different.

@DemonWasp: C/C++ could probably be fine for teaching if an appropriate subset of the language is used (like Scheme and Racket teaching languages).
Tony




PostPosted: Thu Nov 01, 2012 1:37 pm   Post subject: Re: Languages used in class

ryan.s @ Thu Nov 01, 2012 8:02 am wrote:
I think the thing that is really unfair is that you are not allowed to hand in assignments written in another programming language, even if you can fulfil or exceed all the requirements.

It depends on the teacher and your ability to reason with them; but it introduces a lot of complexities for them. They might not be familiar enough with your language of choice to help you with questions or even grade assignments. Some languages make certain kinds of problems much easier, while others are much more difficult (e.g. string manipulations are trivial with Python. C++ requires complex setup just to get basic graphics going). A different paradigm (e.g. Scheme that would be heavy on recursion and functional programming) would likely send you on a very different path of reasoning from anyone else in your class.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
DemonWasp




PostPosted: Thu Nov 01, 2012 1:59 pm   Post subject: Re: RE:Languages used in class

TerranceN @ Thu Nov 01, 2012 12:24 pm wrote:
C/C++ could probably be fine for teaching if an appropriate subset of the language is used[...]


The problem there is defining a suitable subset. Let's start with C++, and let's ignore the basics of the language (addition, what-is-a-statement, conditionals, looping, etc, which are common to most languages).

Well, you definitely need to learn about stack allocation and heap allocation. That implies you need to understand object lifetimes, and either use exclusively stack allocation (impractical for real applications) or learn to use pointers correctly (maybe unique_ptr and shared_ptr). Well, pointers open a whole ridiculous kettle of fish and preferably you would use references where possible (same general use, but safer), so let's say people learn about references.

Well, now you want to put items in a list (vector) or an array, without constructing them in-place (you can construct them in place, but that requires knowledge of some more advanced C++ features surrounding construction and templates). So you need to implement (at least) copy constructors and assignment operators. So I guess you may as well learn about all kinds of operator overloading, as well as the new C++11 move-assignment and move-constructors.

Oh, and you're using the STL, so you should have a passing knowledge of templates.

Since you already have objects in a list, you probably want to sort them. Well, that implies either you overload operator<(), or you learn about functors / function pointers / lambdas.

In all of this, somehow we've managed to avoid learning about input, input validation, output, or drawing anything to the screen (which is pretty much everything you cover in grade 10 CS in Ontario). We learned a lot about some pretty hardcore CS topics (compilers, linkers, memory models, etc), but we still can't get a program to draw a house on a screen.

This also doesn't even begin to cover exception handling, which is a seriously complicated subject. It also ignores the whole C/C++ preprocessor, include guards, resolving circular dependencies, etc. You could do without these by ignoring exceptions and putting all your code in one file, but then you aren't really writing C++, are you?

The problem is similar in C, but the language is so much smaller that you very rapidly find you have to use almost all of the features it provides.
jr5000pwp




PostPosted: Thu Nov 01, 2012 3:24 pm   Post subject: RE:Languages used in class

You also have to consider the fact that you can't have a comp sci class with 4 students. They need to make the course accessible, and by starting on C/C++ they are making it way too hard.

I agree that turing isn't the best language to start students on, but a language of similar simplicity such as python would benefit both the students, teachers and you. (More students could bring more funding) You only need one semester with a simple language like Python or horrible turing, to prepare yourself for a common language like Java or C#.
Aange10




PostPosted: Thu Nov 01, 2012 5:27 pm   Post subject: RE:Languages used in class

Quote:

The problem is similar in C, but the language is so much smaller that you very rapidly find you have to use almost all of the features it provides.

Why is that bad?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Nov 01, 2012 6:41 pm   Post subject: Re: RE:Languages used in class

Not "bad", just relevant to:
DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:
TerranceN @ Thu Nov 01, 2012 12:24 pm wrote:
C/C++ could probably be fine for teaching if an appropriate subset of the language is used[...]

The problem there is defining a suitable subset.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Insectoid




PostPosted: Thu Nov 01, 2012 7:15 pm   Post subject: RE:Languages used in class

Turing is basically C where all the complicated technical stuff is hidden and with easy access to graphics. Learning Turing as a first language is easy. C as a first language is hard. Moving from Turing to C, however, is much simpler than starting with C off the bat. Moving to C++ from C is exponentially easier than starting with C++.

It's all about progression. Start with the basics then move on to something harder. That's how you learn. If you've hit your limit with Turing, there's no reason not to progress on your own time.
ecookman




PostPosted: Thu Nov 01, 2012 9:10 pm   Post subject: RE:Languages used in class

I started with VB in a summer camp, then did Turing, Qbasic and then Java and then C# in school.
In some ways I would have liked to start with Turing simply because, as you said it is boring and obsolete, but it teaches you methods that you will need to use later on in more complicated languages, without a fancy syntax (although powerful). Using the more basic languages first and learning them till you're sick of them, greatly benefits you later on.
Think of it as trying to do solve and graph rational functions when you just know how to solve and graph y=2x+1. It is possible to learn how to solve and graph the rational functions with that basic understanding, but from learning the material in detail that leads up to the rational functions before just jumping in... you will start to be able to see where you can factor and simply the function to the point where it is very easy to identify... just like you take advanced functions before calculus, you'll learn you basically wasted a semester in adv functions, but without knowing the long way, you won't understand how the calculus works without a lot of difficulty. Same thing with just starting in Java or C - you have to balance a difficult syntax and try to learn how different routines and functions work, try to figure it all out at the same time, spend for ever looking for the one } you missed along the way, not knowing where to look for it.... versus already having a general idea how to program, learn how classes work and more complex sub routines then all you need to do is get use to the syntax, then you will see how you can combine routines and classes together faster and easier, letting you get more in depth with the current language, and overall having a better understanding of the language...not to mention making more efficient code!
TerranceN




PostPosted: Thu Nov 01, 2012 9:29 pm   Post subject: Re: RE:Languages used in class

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

Well, you definitely need to learn about stack allocation and heap allocation. That implies you need to [...] either use exclusively stack allocation (impractical for real applications) or learn to use pointers correctly (maybe unique_ptr and shared_ptr).


A shared pointer class could make dealing with raw pointers/references virtually non-existent. And remembering that you do "new Type" when setting the value of a shared pointer is easier to remember than Turing's "new" operator.

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

Well, now you want to put items in a list (vector) or an array, without constructing them in-place [...]. So you need to implement (at least) copy constructors and assignment operators.


Who says full OOP would need to be covered so soon? Many beginner programming classes (especially high-school level) don't cover OOP precisely because of the complexity it adds.

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

Oh, and you're using the STL, so you should have a passing knowledge of templates.


Using the STL (at least for the student's perspective) shouldn't be necessary.

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

Since you already have objects in a list, you probably want to sort them[...]


That's the same for virtually every language. I don't get your point.

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

We learned a lot about some pretty hardcore CS topics (compilers, linkers, memory models, etc)


Through the use of an IDE (even a simple turing-like text editor with a run button would suffice) students don't need to know about the intricacies of compiling and linking.

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

This also doesn't even begin to cover exception handling, which is a seriously complicated subject.


In my experience exceptions are often ignored in beginner computer science classes.

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

It also ignores the whole C/C++ preprocessor, include guards, resolving circular dependencies, etc.


Include guards are not hard to learn.

DemonWasp @ Thu Nov 01, 2012 1:59 pm wrote:

You could do without these by ignoring exceptions and putting all your code in one file, but then you aren't really writing C++, are you?


Yes you are. Why should code in one file be considered not C++? Especially for a beginner class.

I'm not saying C++ is ideal, it's obviously not. My point is that even a complicated language like C++ could be taught - at least in part - to beginners with well thought out libraries (which would allow easy access to IO and drawing), and carefully avoiding more hazardous areas like pointers and object oriented programming. Then those areas that had been avoided can be discussed in subsequent classes.
Tony




PostPosted: Thu Nov 01, 2012 11:16 pm   Post subject: Re: RE:Languages used in class

TerranceN @ Thu Nov 01, 2012 9:29 pm wrote:
... with well thought out libraries (which would allow easy access to IO and drawing), and carefully avoiding more hazardous areas like pointers and object oriented programming...

This is pretty much the intend of Turing -- easy IO and drawing, avoiding complex areas.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
QuantumPhysics




PostPosted: Thu Nov 01, 2012 11:38 pm   Post subject: Re: RE:Languages used in class

DemonWasp @ Thu Nov 01, 2012 9:58 am wrote:

@QuantumPhysics: Vala looks mildly interesting. LXML appears to be a Python library for processing XML, so I don't know what you're talking about there.


All I meant is, I want to under the structure of the actual library because I looked around and cannot find the LXML source written in C++ (That is what I want to learn, how it is transfered, it is a very interesting library)
DemonWasp




PostPosted: Fri Nov 02, 2012 12:28 am   Post subject: RE:Languages used in class

The LXML home page wrote:
The lxml XML toolkit is a Pythonic binding for the C libraries libxml2 and libxslt.


It even provides links to the underlying libraries, libxml2 and libxslt.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: