Computer Science Canada Turing To Java Translator? |
Author: | uberwalla [ Sun Dec 03, 2006 11:20 am ] |
Post subject: | Turing To Java Translator? |
ok i search the site// google and all i could find were posts talking about them, but no links. does any1 know of any programs like this? if so could u lead me in right direction to it? or let me have it if u have one ![]() thx. |
Author: | Clayton [ Sun Dec 03, 2006 1:49 pm ] |
Post subject: | |
The best you could probably do is learn Java to begin with ![]() I don't really think there is any "translators" out there for any languages, because the thing with programming is, there's always more than one way to do it, and a translator would have a hard time figuring out how to do it. |
Author: | uberwalla [ Sun Dec 03, 2006 2:26 pm ] |
Post subject: | |
ahh ic ![]() i am trying to learn java but because of turings gayness its harder then starting java straight off apparently. ![]() |
Author: | Tony [ Sun Dec 03, 2006 2:29 pm ] |
Post subject: | |
even if there was a 'translator' (and remember, if it's anything Turing - chances are it's hosted on compsci.ca), the translated code might work, but would be a mess. Different languages have different approaches to similar problems. Basically it would be a pretty bad way to learn. Java is heavily Object Oriented. In Turing, you can get away with not using Objects at all. It's much better to learn properly from the beginning. |
Author: | uberwalla [ Sun Dec 03, 2006 3:05 pm ] |
Post subject: | |
ok i wasnt gonna completely use it to learn if there was id just go step by step. kinda use the translator as something to give something to relate to. so id remember the blah blah blah in java = w.e it is in turing and thats howd id remember. but ok ![]() |
Author: | Hackmaster [ Sat Dec 09, 2006 3:35 pm ] | ||
Post subject: | |||
Quote: i am trying to learn java but because of turings gayness its harder then starting java straight off apparently. Turing's gayness? Turing's gayness??? it's like a stake through my Heart!!! for your information, Turing can do everything Java can. it can be heavily object oriented, or not. just like java. As a matter of fact, I find objects easier in Turing than I do in Java. you just have to understand Object oriented programming first. Regarding your question, I have heard of such things. you feed this program a text file, and it converts it into java, or C, or whatever. I saw a demo of the code, and it's easy. For the C version:
I know this is pretty general, but I use it to give you an idea.... hey, I just have a thought... as you learn Java, write a translator! that would be great! Good luck! ![]() |
Author: | Clayton [ Sat Dec 09, 2006 8:51 pm ] |
Post subject: | |
Hackmaster wrote: for your information, Turing can do everything Java can. No, it can't. There are too many things that Turing can't do that Java can, so let's leave it at that. |
Author: | Tony [ Sat Dec 09, 2006 9:35 pm ] |
Post subject: | |
Freakman wrote: No, it can't. There are too many things that Turing can't do that Java can
Such as...? Turing is Turing Complete, and as such can do as much as Java can. Granted that this doesn't mean that it will do that as efficiently, or that you could write code with the same ease. |
Author: | wtd [ Sat Dec 09, 2006 10:37 pm ] |
Post subject: | |
The easiest path to learning Java is to learn other languages first. I'm sorry to have to inform you, Turing does not count. If you know only Turing, then for all intents and purposes you are starting at the same level as someone who has no background. Unfortunately, you may also be a bit handicapped by biases ingrained from learning Turing. Java is all about objects and classes, so you have to learn about those. Unfortunately Java wraps fundamental OOP concepts up in a labyrinth of syntax and static typing. I suggest getting a start with a dynamically-typed OO language with an interactive interpreter. Perhaps Ruby, Python, Io? |
Author: | [Gandalf] [ Sat Dec 09, 2006 10:59 pm ] |
Post subject: | |
wtd wrote: If you know only Turing, then for all intents and purposes you are starting at the same level as someone who has no background. Unfortunately, you may also be a bit handicapped by biases ingrained from learning Turing.
Tsk tsk... Do you really believe this wtd? Knowing Turing has completely no affect on your programming knowledge, and if anything has a negative effect on it? I can't agree with that, not from personal experience. Seriously? ![]() |
Author: | wtd [ Sat Dec 09, 2006 11:02 pm ] |
Post subject: | |
Turing is stuck in a very procedural mindset. This is of very little relevance to programming either on a conceptual basis, or on a practical level any longer. |
Author: | [Gandalf] [ Sat Dec 09, 2006 11:07 pm ] |
Post subject: | |
Turing being very procedurally oriented I agree with, but not the rest. At least you've gone from saying it has none to "little" relevance. ![]() If anything, Turing gives you a fair introduction to thinking like a programmer. If nothing else! |
Author: | md [ Sat Dec 09, 2006 11:19 pm ] |
Post subject: | |
Turing harms people's ability to learn other languages. High school CS courses in general actually serve to hinder further teaching of CS then anything else. It's good that CS programs start at the "I do not know how to use a computer" level; because many times after dealing with the crap forced upon students that really is what happens. Well... kinda... people who are really interested learn on their own and for hte most part ignore CS in high school (except as an easy elective). People who think it'll be an easy and good job get the wrong idea about how hard it can be and waste a lot of their time doing poorly. All in all a wonderful waste of time and energy for all involved. |
Author: | [Gandalf] [ Sat Dec 09, 2006 11:29 pm ] |
Post subject: | |
I'm not talking about the troubles of the Turing curriculum, or any course involving it. What I speak of is the language itself. Turing introduces you to solving problems in a programming environment, it introduces basic, universal, ideas such as subroutines. Other than that, I'll quote wtd from IRC, "I'm not even sure where to start." Sure, it has some things which you might want to forget, but the general basics are there. What is there that, as you seem to believe, will scar you for life and ruin your programming future? |
Author: | wtd [ Sat Dec 09, 2006 11:42 pm ] |
Post subject: | |
Note that I did not say the obstacles are insurmountable. |
Author: | [Gandalf] [ Sat Dec 09, 2006 11:47 pm ] |
Post subject: | |
What requires all this surmounting? All the obstacles I can think of from Turing are far outweighed by what you learn from the language. For all the bad things learnt through Turing, there are two that help you out in the long run. |
Author: | ericfourfour [ Sat Dec 09, 2006 11:52 pm ] |
Post subject: | |
I'm going to side with Gandalf on this one. Turing introduced me to many concepts one of which was object orientation. I think I would have been a lot more scared going into classes in c++ if it wasn't for that. Also, if the student really cares about programming they will learn on their own and most likely find this site where good programming practise is stressed all of the time. This is what happened to me. I started on Turing. My teacher said students can find information easily on the internet so I looked up how to get input from the user. I came across this site. Now (around 1 year and 3 months later) I can program in 3 different programming languages (if Turing counts) and do a HelloWorld in Haskell (but that is about it ![]() This however doesn't change the fact that a person does not actually need Turing to learn other languages. I think I could have started in Java (if it was taught). |
Author: | wtd [ Sun Dec 10, 2006 12:16 am ] |
Post subject: | |
Sigh... The first things you think about as alternatives to Turing are C++ and Java? You need to get out more. ![]() |
Author: | Hackmaster [ Sun Dec 10, 2006 9:22 am ] | ||||
Post subject: | |||||
wtd, you are being way to harsh on Turing... let me tell you a personal experience. I started programming in C. not C++, C. Then, I learned Turing, which is definatly my favourite language to code in. I then Learned Java, and now I am dabbling in Pascal. yet, I always come back to turing because of it's simple syntax, and it's decent structure. Quote: Unfortunately Java wraps fundamental OOP concepts up in a labyrinth of syntax and static typing. you said It yourself, wtd! java has very non-programmer unfriendly syntax... it is really not a good language to pick up. Even with C, another favourite of mine, the syntax just to print on the screen is this:
whereas in Turing, it is simple.
and while experienced programmers like you and I don't care, there is a difference when you just start, and you decide to quit because you needed a semi-colon? Another thing. turing is procedurally based, but you know, what is an object, really? it is simply, at essence, an organized collection of procedures. you have to learn about procs before you can go into objects, which make languages like turing a plus. And, finally... a question, wtd. Why was Turing created? it was created to help students of programming learn, originally at a university level, and now it has come back to highschool. Turing has no real purpose in life except to teach, and it does it well. because of Bias like yours among big companies, nothing is ever written in Turing, and maybe that's a good thing. java has it's purpose as well, and I think that would be to code effeciently when used by expereinced programmers. that's it. because of that effeiceny, software developers love it. I think, in summarry, wtd, you are not giving Turing the Credit it deserves. I think you should probably re-asess. but that's just one guy's (strong) opinion. |
Author: | McKenzie [ Sun Dec 10, 2006 10:45 am ] |
Post subject: | |
First-off to the original poster, I've attached a guide that might help. The only unfortunate part about it is that it uses Holt's HSA package. I think wtd, and those whom hate Turing need to realize that the problems you have with Turing are not unique to Turing. It seems you have a problem with the general "bottom-up" pedagogical approach. There are two basic approaches to teaching how to program. Bottom-Up ~~~~~~~ The bottom, of course, is the computer. Start with a language that allows you to perform opperations that are close to the way the computer performs them. Make variable == memory address. if/loop == jump memory address. When you want to do something you need to tell the computer exactly how. This forces you to develop your own algorithms. As your programs get bigger you add on tools to control the complexity, e.g. subroutines. Once you know how the computer does things you graduate to a higher level (closer to Human) language (typically Object Oriented these days) that allows you think more like a human and usually includes a library that does a lot of the stuff for you. Top-Down ~~~~~~~ Start with the most elegant language you can find so you can think in terms of objects and first-class functions from day one. This way you avoid learning things you'll need to re-learn later. As need be you can fill in knowledge of how lower level details work. There is a heated debate in the educational community about which one is better. I've talked to people (professors, emplorers) on boths sides of the fence and each side firmly believes it is "right." I don't believe either side is "right." Instead I recognize that each method has its advantages and disadvantages. As far as Turing goes, I think it is a solid language to teach in a bottom-up fashion. |
Author: | uberwalla [ Sun Dec 10, 2006 11:40 am ] |
Post subject: | |
kinda old topic that i ignored for a bit, but then i saw many posts and then saw urs. ill take a look at the pdf ![]() ![]() |
Author: | wtd [ Sun Dec 10, 2006 12:05 pm ] |
Post subject: | |
Hackmaster wrote: because of Bias like yours among big companies, nothing is ever written in Turing, and maybe that's a good thing. java has it's purpose as well, and I think that would be to code effeciently when used by expereinced programmers. that's it. because of that effeiceny, software developers love it.
With all due respect, if you think I agree with the choices big business makes in terms of programming languages, then you need to understand me a lot better. Additionally, if you think that Java leads to efficient code*, then you need much greater exposure to the possibilities available. This is not a criticism... well... let's call it constructive criticism. Go out and learn a lot of languages. Make sure they vary not only in terms of syntax, but also conceptually. Heck, even within "object-oriented programming" there is a huge variety. Learn a truly dynamic language like Smalltalk or Ruby. Learn a prototype-based language like Io or Javascript. Learn a language that supports multiple implementation inheritance, like C++. Learn a language that supports structural typing, like O'Caml. Learn something with multi-method dispatch, like CLOS, Dylan or Nice. That's at least five languages, and you're just understanding OOP, though you'd pick up some appreciation for things like functional programming along the way. * Java is a fairly clunky, programmer-inefficient language. |
Author: | wtd [ Sun Dec 10, 2006 1:14 pm ] |
Post subject: | |
McKenzie wrote: I think wtd, and those whom hate Turing need to realize that the problems you have with Turing are not unique to Turing. It seems you have a problem with the general "bottom-up" pedagogical approach. There are two basic approaches to teaching how to program.
I think there's a lot of that, in addition to some general averseness to Turing in particular. I also think it doesn't help Turing's case that it is limited purely to formal educational environments (most likely heavily owing to its proprietary, informally standardized nature). This makes Turing the language nearly impossible to separate from Turing the curriculum, and any subpar teachers there may be out there who teach it. Sure, there's the argument that Turing could be separated from that, and learned in a different fashion independently, but the general agreement in IRC last night was that if someone is going to learn independently, there's little reason to choose Turing, which is difficult or costly to obtain, vs. the mountain of programming languages and associated tools which are free, and easily obtainable. Please correct me if I'm mistaken on the agreement part, Gandalf. It was late. With that said, upon further reflection, one of the most glaring issues I see with Turing the language (and associated libraries) is that of special cases. Consider for instance "put" and "get". I don't necessarily have a problem with the names, but they just don't behave like anything else in the language. Further differentiating it from the world of procedures and fucntions in the statically-typed Turing is the fact that it'll work on different data types. You can put and get both strings and numbers. No function or procedure could be made to work in the same way because it would not be type-safe. Most of the I/O "commands" represent similar special cases. Types are in fact another issue I have with Turing. Not so much that it is statically and manifestly-typed. Lots of other languages do this. Rather I take issue with Turing wimping out on types. Consider opening a file. The file stream, once opened, is represented by an int. We know that this int is not used to represent a pointer, as Turing has syntactic support for pointers. Instead you just have an int. There is no ability to determine if, at a later point, the int you're using where a file stream is expected is actually a file, short of a run-time error. This seems terribly half-assed to me. Another obstacle I believe Turing throws up to further learning is the fact that there's no command-line interface. The command-line (be it a proper shell, or just Windows' cmd.exe) is the lingua franca of programming. It is the simplest, most widespread integrated development environment in existence. Short of using a really old version of Turing, this valuable tool is utterly dismissed by Turing. This also serves to setup false expectations of other programming environments when students try to move beyond Turing to other languages. In terms of false expectations, Turing's graphics abilities are often lauded as its strongest advantage, and yet I think they can be detrimental in terms of advancement. Very few other languages have such a closely integrated graphics library, so it is unreasonable for students to be sent on to further languages expecting such an environment. This closely integrated graphics library also has, from my observation, a profound effect on how students view simple text-based I/O. There is a strong inclination to view even simple text-based programs like one would view a video game screen, with the need to wipe out what was there to move on. This is in contrast to the way that text-based I/O is done everywhere else. Anyway, just a few issues I have with Turing the language. |
Author: | md [ Sun Dec 10, 2006 3:00 pm ] |
Post subject: | |
In addition to the problems wtd has mentioned turing also completely messed up on threads. In the rest of the programming world a running application is called a process. Within that process there are threads which are streams of execution, all threads share the same process ID and memory space. In turing however threads are called processes; and while turing's threads are otherwise fairly decent (they implemented monitors even! that's pretty damn cool actually) the fact that students are actually taught to use processes (threads) before they know how to write functions properly is pretty damn horrible. I don't know how many times I've seen former turing users ask how to use processes in another language, but usually I just laugh at them and move on. I'm sure others can think of more horrible things with turing (and/or the way it's taught), but "processes" and the inability for turing to make calls to languages written in other languages are what get me the most. |
Author: | McKenzie [ Sun Dec 10, 2006 5:44 pm ] |
Post subject: | |
Seems like a lot of nit-picking to me. I mean most of your complaints are that Turing is too easy. - get/put is too easy to use because it doesn't care what types you are using. - files, pictures, fonts hide details of their implementation and only give you an integer as a handle. - graphics are too easy to use - threads are called processes instead of threads. - only really used in an IDE. Don't get me wrong, I'm not going to argue that Turing is the best language in the world, or even the best first language but to argue that it is a horrible choice, that it cripples kids minds, or any such nosense, is just plain dishonest. The end result is help make disrepectful kids more disrespectful towards their teachers. No, I'm not worried about my kids, they show an amazing level of respect. You are just speculating on the effects of learning Turing first with no real evidence. I've seen the effects of learning Turing first, but I am unable to compare with learning Ruby, or some other language first, so I can only speculate on the affect. Most of the successfull students I talk to seem to feel Turing was just fine for them. |