IEOR: I have to take one of.. scheme, C++, or JAVA

<p>I have to take this one unit class.
It has to be either C++, Java, or Scheme. </p>

<p>Which should it be?
I am an IEOR major</p>

<p>Definitely take Java and if possible, also C++. Java is certainly becoming the prominent language in the programming industry.</p>

<p>Take Java, as it will give you a good foundation in programming and OO design without bogging you down in details or confusing you too much. Otherwise, take C++. But don’t take Scheme.</p>

<p>take java, although i think it’s not easy but you will be better off with java</p>

<p>I would rather take C++. Java is a decent language, but should you learn C++, you’ll earn about OOP (as you would in Java), but also have a closer relation to C. That way, you’ll be familiar with low-level hardware, though most of it is in Assembly language, you’ll still be familiar with both. </p>

<p>Learning C++ or Java, as far as <em>how to program</em> is the same. You need the basic idea of how to use loops, classes, objects, etc. The syntax will be different. You should focus more on HOW to arrive at the solution (design process, requirements, etc) and not worry if you need a semicolon at the end of your line or not.</p>

<p>The syntax for both is almost similar. Picking between the two really depends on if you want to use programming in your career and for what? Each piece of software will vary, as far as which language to use that will best suit its needs. For example, if you write a program to compute several batches of data, and when done computing it, will free up the RAM, it will be easier to use Java’s garbage collection, rather than C++. There are some implementation for GC under C++, but you’ll need to add them manually.</p>

<p>I would focus more on learning HOW to program, instead of picking a langauge. Once you learn how to program (notice I didn’t say syntax), you’ll be set. You pick up syntax along the way.</p>

<p>Yes, but one should take care in choosing a language. C++ isn’t for everyone, and is generally an awful choice for a first programming language. Let me elaborate.</p>

<p>C++ is too powerful for the beginner, too flexible. It offers too much control, and, as you said, exposes the novice programmer to the low-level hardware. Novice programmers should be insulated from the hardware as best as possible… and Java is infinitely better for this than C++.</p>

<p>Furthermore, Java forces good programming practices whereas C++ allows coders to revert to pre-OO days. This happens all the time, and is rampant to a distressing level; I wager that the majority of people using the OO paradigm are computer science students and professionals, while everybody else - from scientists to engineers to architects - are using C++ as a wrapper for C. Some still use FORTRAN. This should be actively discouraged, and what better way to discourage it than by avoiding the issue entirely? Java enforces OO principles, and lets coders focus on solving the problem rather than implementing the algorithms.</p>

<p>Plus, once they know Java, C++ is easy to pick up anyway. I know the converse is true as well, but Java is the better starting place for true programming education.</p>

<p>And yes, the focus is how to program. However, it is practically a corequisite to be familiar enough with some programming language to express one’s algorithms and test them. Otherwise, you’re not learning programming, you’re learning discrete mathematics beyond the scope of an introductory programming sequence.</p>

<p>OP: sorry that this thread has been sort of hijacked, but I have to talk:</p>

<p>“…but Java is the better starting place for true programming education.”</p>

<p>NOT TRUE!</p>

<ul>
<li><p>A VERY important in programming is pointers. You use them for many applications. Java does not allow you to do this (rather, have references). While you can argue if pointers is essential, in tradeoff with secruity, fine. But, the matter of the fact is, it is important and needs to be learned. Look at any Data Structures course, you need pointers (to make LinkedLists)! Why do you think Google/Microsoft/etc. quiz you on pointers?</p></li>
<li><p>C++ is far more flexible in terms of type conversion. In Java, you have limited options</p></li>
<li><p>Operator overloading. I was asked a few times about this during some internship interviews (even as an EE major). This was for a job in embedded software engineering (where hardware and software are crucial, for military applications)</p></li>
<li><p>And the BIGGEST problem I have with Java is that Java checks your array index limits!!! THIS IS BAD FOR A BEGINNING PROGRAMMER. A novice programmer should be able to sit down and learn this for themselves (out of bounds checking, etc.)! Relying on Java to check for you will only make you a useless programmer. Many languages and technical environments use arrays, for loops, etc, such as Matlab. Matlab does not check your bounds. This can hurt you if you don’t even know the basics on whether or not you’ve allocated enough space for your data or where the data is located and how to reference them.</p></li>
</ul>

<p>“Novice programmers should be insulated from the hardware as best as possible… and Java is infinitely better for this than C++.”</p>

<p>Why do you say this? What’s so bad about hardware? It’s crucial that every engineer know the basics about hardware design, implementation, and usage. Surely, it will NOT hurt you to learn the basics. Oftentimes, it can serve as motivation to actually apply useful knowledge of C++ once that person has mastered the basics. Now, if you were interested in Web application development and networks, Java would be ideal.</p>

<p>Pointers are not related to algorithmic thinking, but to the implementation aspects of algorithms. Pointers are not fundamental in computer science. Pointers are useful constructs in C++ and assembler, and other languages, but they are not necessary, and are in fact an advanced, low-level concept for novice programmers. The same thing can be accomplished more safely in Java by using references and wrapper classes. It’s not that big of a deal.</p>

<p>Linked Lists can be and are implemented all the time in Java. This is accomplished by using references.</p>

<p>Type conversions? What sort of type conversions? Specifically, name a few types that C++ allows conversion between that cannot be handled in Java. Java may not allow some conversions, but those conversions will most likely be the less type-safe and less frequently used conversions anyway. Beginners will need to convert between numbers and strings and maybe do a bit of parsing. This can all be done in Java.</p>

<p>Operator overloading is not that big a deal. The same basic thing can be accomplished by methods in Java, and an operator is really just a function anyway. It’s a convenient shorthand, but it’s still just a shorthand.</p>

<p>So what if Java checks your array index limits? That’s great for a novice programmer because it helps to keep them from making careless and potentially fatal mistakes. Java eliminates many of the pitfalls present in C++: pointers, automatic integer/boolean conversion, run-on cases in switch statements, array bounds checking, garbage collection, etc. This is ideal for beginners because it allows them to focus on the CS topics and the programming, rather than learning how to do intricate pointer algebra, use fancy integer/boolean conversion tricks, elaborate switch statements, or other such nonsense.</p>

<p>There’s nothing wrong with hardware, but its place is not in a computer science sequence. Its place is in a computer engineering sequence. The two overlap but are not the same.</p>

<p>Java is actually ideal for anything a beginner would be able to do. C++ is like the manual transmission; it’s got a little more mpph but it’ll take a bit more learning. Java is like an automatic; just steer and apply the gas and you’re in business. Unless you’re doing work which requires C++, there’s little reason to insist on its use.</p>

<p>I can’t believe you’re serious with the statement: “So what if Java checks your array index limits? That’s great for a novice programmer because it helps to keep them from making careless and potentially fatal mistakes.”</p>

<p>It seems like you’re intelligent enough to know about programming, but are you serious?</p>

<p>I am very serious. It’s not as though the programs written with these problems simply run without problems. The coder is informed that an exception occurred and the errorr must be corrected. In fact, I would say it makes the learning easier and more explicit. I could write a bad C++ program with array bounds errors, run it, and it might even work fine. That’s bad in my view. Then students might not ever know they made a mistake.</p>

<p>BTW, what authority do you have to act like such a grand authority on programming, anyway?</p>

<p>Well, first off - a student would have a guide while learning (in this case the professor). If he makes this mistake, he will be more careful with arrays, in ANY and ALL languages/technical environments. He will take the proper precautions to make sure it works. As I said before, what if he wants to use Matlab, Mathematica, or Maple? What’s he going to do then? Assume it will check it for him? NO! You can enter data into Matlab and have it spit out the answer… are you going to assume it’s right? Are you going to assume everything your computer tells you is right? Perhaps you entered the values into the array incorrectly? How are you going to know? You may think I’m BS*ing with this example, but this happens all the time (especially in DSP).</p>

<p>And no one has given me authority on the issue. It seems obvious to me and the world that knowing when your array will work or will not work is key, without relying on the computer telling you whether it will work or not. You learn from <strong>making mistakes</strong> and <strong>fixing those bugs</strong>. That’s how you become a better programmer. You don’t want everything spoon fed to you. If he isn’t exposed to the finer details of programming from the start, it will lead to bad programming practices later on.</p>

<p>And since when is learning engineering/computer science, or ANYTHING TECHNICAL easy, or supposed to be easy? If you take the approach “Java will make my life easier because I have less thing to worry about”, then you’re headed the wrong direction. Something this trivial should be able to be recognized and learned by the programmer. I’m sure the OP has been through a situation where he hasn’t understood something and sat there for a while until he figured the problem out. If he gives up on a simple thing like this, than he won’t succeed. (OP: just using you as an example).</p>

<p>Just answer this question: Will he not be a better programmer if he can realize how an array works, inside out? It’s not like he’s learning the ins and outs of a scalable proxy architecture derived from a high-level programmable work cluster… :)</p>

<p>i got another question. will an ieor graduate likely find himself using JAVA at all at his job? seems unlikely too me. but then again, i don’t know much about java’s usage. all i know is that JAVA is commonly used in web applets.</p>

<p>“Just answer this question: Will he not be a better programmer if he can realize how an array works, inside out?”</p>

<p>An array is a tool used to develop a solution. Does knowing the exact mechanism by which a power drill operates make a carpenter better at building a house? Does it make an architect better at designing it? Does it make the contractor better at defining the specifications? No. There is certainly much more to all of these activities than knowing hor a power drill operates. Now some people need to know how the power drill works. But that’s not those people. Same with programming at the introductory level.</p>

<p>Array bounds checking is a natural and simple mechanism. The only thing one might hold against it is that it is less efficient. If it were just as efficient to do it as to not do it, all languages would do it. In my view, all should. And Maple, Mathematica, and Matlab aren’t used for programming, but for numerical analysis. Programming is a different activity altogether and transcends such implementation issues as array usage and pointers.</p>

<p>And it’s not supposed to be easy. I’m just saying there are better things for novice programmers to worry about than the details. Let them focus on the big picture, then hone in later if they want.</p>

<p>Something as small as learning how to declare, initialize, and call proper elements in an array will not take much time to learn and will NOT distract him from the bigger picture.</p>

<p>calkid: java and C++ are so similar that it makes little difference which one you learn. They have similar syntax and are both fast. For IEOR you won’t be using specialized hardware which would require low-level operations.</p>

<p>There’s a tradeoff. C++ is probably more widely used, as it is the older language and non-computer industries are slow to adopt new computer technology. However, Java will probably leave you with a better idea of OOP, which is what you should really be going for in an introductory programming sequence anyway. The only possible advantage over Java for C++ is that it might be used more in OR. But you’ll have a plethora of OR classes anyway, and you’ll probably end up learning the dinosaur which is FORTRAN anyway.</p>

<p>From a CS major, stick with Java and then move up to C++.</p>

<p>undefined: since it’s such a small issue, why bother teaching it at all?</p>

<p>Dude, you being a CS major, I figure you would understand why it’s important.</p>

<p>And when I said SMALL, I didn’t mean insignificant, I meant EASY thing to learn. Everyone knows how an array works. Show me one programmer who doesn’t. You won’t find anyone, guaranteed.</p>

<p>Why are you being a little baby about this issue? You know it’s important, I know it’s important, and virtually every programmer knows its important. What did the programmers do BEFORE Java? Explain that to me.</p>

<p>You can know how an array works with automatic bounds checking. Not that big of a deal. All it does it explicitly tell you that your code is wrong. Eventually, budding programmers will learn to avoid index errors altogether. I think the way Java does it makes it more straightforward.</p>

<p>As a CS major, I like to think that there are much more important aspects in programming than knowing how to skillfully handle arrays.</p>

<p>Novice programmers tend to IGNORE warnings, and only be on the lookout for errors. I’ve TA’d several CS classes, even as an EE, and I know that for a fact. All students do that, CS majors, EE majors, or CE majors.</p>

<p>When a student finishes a program and tries to run it, all they are hoping from the second they tell it to run is that it won’t spit out any errors back at them. If it doesn’t spit out an ERROR, they’re fine with it and will continue on like nothing ever happened, even if critical warnings are displayed. This is dependent solely upon the programmer, but most learning programmers do this, especially in a classroom setting. They have other projects/homeworks/classes to worry about that I doubt they’ll sit down and take their full time. If they just sit down for 10 minutes, read how an array works inside out, then they won’t have to waste time with warnings and exceptions.</p>

<p>And yes you’re right, you can know how an array works and not have to worry about index checking all the time. But the way you learn how to program is by <em>doing</em>. I can read about arrays and be like “Oh yeah, I get it, easy.” and not be able to implement it in front of a computer. The OP can initialize an array – int array[50]; – and know there are 50 elements in that array. However, most students have trouble with the fact that arrays start at 0, which throws their indexing off and think the world is over and done with. If I ask them, how do I access the last element of the array?.. they’ll be stumped. With enough practice, they’ll be able to say array[49], otherwise they’re going to think array[50] is the last element in the array.</p>

<p>And what’s your employer going to think of you if you don’t know how an array works? You don’t have to be a CS major to actually do programming. Let’s say you get hired on as an EE and you need to write code to do ___. If they find out you don’t know how an array works, they’re going to be like “wow, I hired this kid? he knows about OOP/OOD, but has no idea that the array goes from 0 to 49, with a total of 50 elements!”</p>

<p>If there is an array bounds problem in a Java program, the program halts and spits out an error. There is no warning involved. At all.</p>

<p>In C++ there is not even a warning. Sometimes it might work fine, sometimes it might work but produce the wrong results. Sometimes it crashes with alien looking messages.</p>

<p>I can’t say I understand what you’re even saying. It sounds like you’re not familiar with how Java handles array bounds problems.</p>