A Question About Coding...

pardzhpardzh Join Date: 2002-10-25 Member: 1601Members
<div class="IPBDescription">and whether or not to skip this.</div> Okay.

So I'm taking Computer Science this year. We're starting off with C++ for the first half of the year, then moving on to Java for the second half of the year. There's another AP class that does Java all year. I'm really liking the C++ class, but I'm <i>way</i> ahead of everyone else.

As in, I'm 6 labs past what everyone is doing at the moment. To help you get a picture of this, a lab is supposed to take two class periods of one hour. We've been in school two weeks. <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->

Here's my question. Should I skip this C++ and get bumped up to the AP course, or should I stay with it and learn C++ for at least half a year? This is the first language I've taken, but I've got a good grasp on it already. One of my friends just started CS this year and skipped the regular class for AP, so I know it can be done. Then again, I'm leery about skipping C++, as it's a major language used in a lot of software today, no? I mean, I can always go back and take another course on it in college...

Meh, what're your suggestions?

Comments

  • FamFam Diaper-Wearing Dog On A Ball Join Date: 2002-02-17 Member: 222Members, NS1 Playtester, Contributor
    Have you ever programmed before, in any language? Learn the basics thoroughly, the language doesnt really matter too much.
  • pardzhpardzh Join Date: 2002-10-25 Member: 1601Members
    No, I've never <i>really</i> programmed in any language before.

    While the rest of my class is fiddling around with variables, I'm done with switch statements, if's, else-if's, etc... does that qualify as the basics? I've got the weekend to think about this, but as it stands right now, I'm leaning towards joining the AP class.

    I guess if the language itself doesn't really matter all that much, I'll probably join it. <!--emo&:0--><img src='http://www.unknownworlds.com/forums/html/emoticons/wow.gif' border='0' style='vertical-align:middle' alt='wow.gif'><!--endemo-->
  • NecroNecro &lt;insert non-birthday-related title here&gt; Join Date: 2002-08-09 Member: 1118Members
    yea i got the same thing i learned basic c at home so its ez :\
  • Crazy_MonkeyCrazy_Monkey Join Date: 2002-11-13 Member: 8453Members
    Java is a really shoddy language, I have yet to see an excellent use of it. I may be wrong. Though, everyone seems to want C/++ programmers, not Java.
  • NumbersNotFoundNumbersNotFound Join Date: 2002-11-07 Member: 7556Members
    <!--QuoteBegin--Necro-+Sep 26 2003, 03:46 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Necro- @ Sep 26 2003, 03:46 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> yea i got the same thing i learned basic c at home so its ez :\ <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Then you haven't learned it fully..

    C++ is a VERY VERY VERY UBER VERY POWERFUL language, and if used to it's full extent it can do almost anything.. I took a whole year of the AP course before it went Java and I still have very much to learn.


    I'd stick with C... As of now it seems more standard than Java and incorporates lower-level understanding to accomplish more complex tasks... Like GUIs, etc.
  • FamFam Diaper-Wearing Dog On A Ball Join Date: 2002-02-17 Member: 222Members, NS1 Playtester, Contributor
    Stick with the course youre doing at the moment. The language isnt important. At the end of the day, a programmer should know how to use the basic constructs of a language (if/else, switch, loops, arrays, objects, functions, etc). I learnt programming through a few C+ books and playing with the HLSDK. Once I knew that, jumping onto other languages (My primary is Actionscript, a Java syntax language) is easy.
  • GeminosityGeminosity :3 Join Date: 2003-09-08 Member: 20667Members
    I like java's object orientated way of doing stuff and that there's no pointers but for some reason it just isn't as gameworthy as C++.
    Try as people might you still won't get a java fps with the complexity of todays games that'll run at a decent framerate.
    I don't have a scooby why it's so difficult but it's that that pretty much puts me off learning java properly =/

    C++ is the easy part... it's trying to choose between directX and OpenGL then learning them that starts the troublesome times and don't even get me started on windows programming, I'm not a fan -.-
  • Marik_SteeleMarik_Steele To rule in hell... Join Date: 2002-11-20 Member: 9466Members
    edited September 2003
    /me took Computer Science A AP in C++ last year, is currently taking Computer Science AB AP in Java
    Fam is correct, the language you learn at this stage isn't as important as learning how to program. There is a difference.

    Even if you stuck with C++ for the half year, the apparent slow pace of the rest of the class means you wouldn't get far enough to learn about dynamic memory usage (pointers, linked lists, etc.), so you wouldn't be able to do things like mod HL2 unless you learned that on your own. We're talking about things required for serious modding that my class never touched after doing C++ for all of last year.

    Learning the <i>syntax</i> of a language is a heck of a lot easier to do on your own than learning how to be a better <i>programmer</i> in the first place. It's why publishers sell those "Learn <language name here> in 24 hours!" books -- if you already know "the theory," learning the syntax is quite possible in such a short period of time.

    You need to be in the class that gets your mind working like a programmer, and from the sound of it, the AP course is it. Not only that, but the AP exam at the end of the year is surprizingly easy if you like the course and have a teacher who knows what he/she is doing. Out of the 9 people in my class who took the exam last year, 8 got 5 out of 5, and the last got a 2 for marking "a" down almost the whole line of multiple choice answers and writing a story about "the little computer that could" in the written section.
  • NumbersNotFoundNumbersNotFound Join Date: 2002-11-07 Member: 7556Members
    I could have gotten a 5 on that AP test... had my class done classes for more than two days.

    HALF THE TEST was on classes, but this stupid little fatarse in my class complained so much that the teacher just skipped them.. ARGH..!

    I want that extra point <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo--> (i got a 4)
  • pardzhpardzh Join Date: 2002-10-25 Member: 1601Members
    Gee, sort of seeing some conflicting advice here.

    Another thing I might want to add is I'm not sure what I want to do as a career, but it most likely involves computers. I doubt I want to just sit down and code for a company, but being able to mod games with C++ would be pretty fun. The AP class only has six kids in it at the moment, that I know of, so it'd likely move a bit faster.

    I'm not so sure anymore. <!--emo&???--><img src='http://www.unknownworlds.com/forums/html/emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif'><!--endemo-->
  • GeminosityGeminosity :3 Join Date: 2003-09-08 Member: 20667Members
    well for modding most games almost have their own language though they're often very <b>very</b> similar to c++/java.
    The unreal engine uses unrealscript which is a lot like java and is pretty flexible to use ^^
    Half-life/Half-life2 uses dll files which are pretty much straight C++
    The great thing in both cases is that you don't really need to know any API code (OpenGL/DirectX) unless you feel like modifying the graphics part of the game drastically (like building a volumetric particle engine of your own for it =s )

    At the end of the day though java and c++ is pretty similar so it doesn't matter too much which one you learn.
    Personally I'd advise C++ because it means you'll have to deal with knowing what a pointer is and other 'fun' memory allocation stuff... better to know the more complex side so you can use the easy stuff than to know the easy stuff and be unable to play with the complex stuff =3
  • ElvenThiefElvenThief aka Elven Thief (ex. NS Programmer) Join Date: 2002-11-15 Member: 8754Members, Retired Developer, NS1 Playtester, Constellation
    I'm forced to take a intro to programming course at University because it's a prerequisite for my major, and so on...
    But we're learning Java, as is become quite popular. Given the fact that I've already learned C++ very well and have a strong grasp on object oriented programming, it's going cool.
    But the thing with my current Java course is, it's not Lesson 1 "Hello World"
    Lesson 2 variables
    Lesson 3 If/Then/Else/Switch
    Lesson 4 Loops
    ......
    Lesson 30... Functions
    Lesson 31... Classes

    My Java course STARTS with classes and giving you a basic understanding of proper object orientation when it comes to programming. The C++ and Pascal courses I had in high school taught me how to use the language, and really didn't teach me how to program. After reading a lot of source code and even messing a bit with Half-Life modding, I can say I'm secure in my knowledge of how to program now.

    Personnally, if the Java Course offered is just like the C++ course and is just lessons advancing in the usage of the language, and not the art of programming, I wouldn't touch it. On the other hand, it's AP and those credits help a lot in college, and there's the possibility you're learning "how to program" and not "how to use a language".

    <!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->I could have gotten a 5 on that AP test... had my class done classes for more than two days.<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    If you only did classes for 2 days, especially in Java, that teacher really screwed you over.

    My personal feeling is, if the Java class will teach you programming concepts, as opposed to just the language, that's what you should go for.
  • NumbersNotFoundNumbersNotFound Join Date: 2002-11-07 Member: 7556Members
    My teacher had to ship out for the army and the sub succumbed to my classes petty complaints... leaving me out in the cold on the test, with only a mild understanding of classes due to his poorly taught two day crash course on them.
  • GreyPawsGreyPaws Join Date: 2002-11-15 Member: 8659Members
    <!--QuoteBegin--Fam+Sep 26 2003, 03:27 PM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Fam @ Sep 26 2003, 03:27 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Have you ever programmed before, in any language? Learn the basics thoroughly, the language doesnt really matter too much. <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    Yeah, I agree, if you study Logic and understand it well, the rest is just syntax, which is easy to learn. C++ is a good base, learn it, it will help you with most other languages C# (c-sharp) and VB. I never took Java or Javascript but I think C++ helps in both.
  • p4Samwisep4Samwise Join Date: 2002-12-15 Member: 10831Members
    Java itself is absolutely worthless. However, if the class will introduce you to more advanced programming concepts, go for it. As many have pointed out, learning a language is easy. Learning to program is difficult.

    My first formal CS class was taught using Lisp. The focus of the course was abstraction layers, with brief passes over data structures, OOP, and parsing. After that, I took a data structures class, which was taught in Java, and took us from linked lists to decision trees. And after THAT, machine structures, which covered memory allocation in C, assembly language conventions, and a bit of hardware design.

    The point is, all of these classes taught you about programming in general - the actual language used didn't really matter. Almost nobody programs in Lisp, and almost nobody successful programs in Java. But all of the concepts I learned in those three classes have carried across to my C++ work (which I never really learned until I started work on my HL mod).

    Any class in which you "learn a language" is a waste of time. (I say this from experience - I took a couple of those classes just for the units, and they were worthless.) You can learn a language in a couple of days with a book. Learning to program, though - that's something that many people get all the way through a CS degree without really getting a handle on.
  • BigDBigD [OldF] Join Date: 2002-10-25 Member: 1596Members
    First off, I am a 4th year computer science major. (Taking third year classes, but that's beside the point! <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif'><!--endemo-->) The CS program here at my school is heavily based on C++, though I've learned a little bit of Java, and Ada in a couple of courses.

    C++ is an extremely flexible language. Java is close, but still not as flexible. Java is purely class based, and which is a good thing, because good C++ is pretty much all classes anyway.

    Why is Java slower than C++? This actually has nothing to do with the language as you write it. You see, Java is the single most portable language around. You can take it from one computer to another. A game written in Java on a UNIX box will work just the same on a Windows box. This is because Java doesn't compile straight down to machine code, but instead it goes to it's own little pseudo-machine code (don't quite remember what its called) and this code is then read through an interpreter on the end-users machine. This interpreting of the code (to put it into that particular machines machine code) is what makes Java slow. But, this fantastic portability has made it very popular on the internet. The code only has to be done once.
    Whereas, in C++, you may have to go right through your code again (redoing much of it in many cases) to make it move from your linux machine to a windows machine.
    It really depends what you want to do later on. Fortunately, I'd say Java and C++ are similar enough that you can't really go wrong. But like has been said, there is alot more to programming than just the language syntax. There are data structures, algorithms, and all kinds of methods to make "good code". Just using the wrong sorting algorithm on a list of elements can literally mean the difference between a 10 second and a 10 minute wait. There is also readability of your code, so that other people (who may be working on a project with you) can follow what you have done.

    That's the jist. Generally speaking I guess. I hope it made sense.

    Personally, I think the best language to learn first is Ada95, because it kind of forces you to get into the habit of making "good" code. (C++ is easy to just hack along in comparison. Brute force programming I like to call it.)
    That's just me though. <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • SoulSkorpionSoulSkorpion Join Date: 2002-04-12 Member: 423Members
    edited September 2003
    <!--QuoteBegin--Duff-Man+Sep 27 2003, 04:31 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Duff-Man @ Sep 27 2003, 04:31 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> No, I've never <i>really</i> programmed in any language before.

    While the rest of my class is fiddling around with variables, I'm done with switch statements, if's, else-if's, etc... does that qualify as the basics? <!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
    No. It doesn't. Those are the absolute basics of programming, yes, but they're the tip of the iceberg of C++. C++ also includes object orientation, pointers, operator overloading, templates, the STL... and if you're doing Java second it's likely that you'll be taught object orientation while doing C++ in preparation.

    Stick with it. If it seems really easy, more power to you. I'm a first year CS myself, and I'd done a year of C++ (and many more years of qbasic) before coming to uni, so I found the Java ludicrously easy and I don't even bother to turn up to the C++ lectures. But I'm sticking around just in case there's something important.

    ...

    Guys, this is not the forum to have holy wars on C++ vs Java. It's been argued more times than chamber order, it will never STOP being argued, and the answer will always be: "in the real world, which language to choose is based more on politics and business considerations than the merits of the languages themselves."

    ...

    [edit]By the way, it's completely incorrect to use the terms "C" and "C++" interchangeably. They represent two different methodologies. C++ is not C with fancy comments. <a href='http://www.parashift.com/c++-faq-lite/' target='_blank'>The C++ FAQ Lite</a> has some excellent examples of how to do things the C++ way.[/edit]
  • SkulkBaitSkulkBait Join Date: 2003-02-11 Member: 13423Members
    To clear up all the confusion about java.

    1) Java is not useless. As stated above, it can be compiled into cross platform "bytecode" that is later run on an abstraction layer (the Java platform). However, Java can also be compiled into native executables.
    2) Java is not as slow as you think. Current benchmark tests with natively compiled (as opposed to bytecode) java are about as fast, or faster than their C++ counterparts. Bytecode Java is getting faster and faster and doesn't show nearly as much preformance degredation as it used to.
    3) Java does use pointers, you just don't ever see them. Unlike C++ which gives you control over declaring variables and objects statically or by reference (using a pointer), Java forces all primitives (variables such as int, bool, char, ect.) to be static, and all objects to be referenced. This can lead to some confusion as demonstrated below:
    <!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    //Lets declare an intefer variable, and an instance of the Integer class
    int x = 3;
    Integer objX = new Integer(3);

    //now lets declare some more
    int y;
    Integer objY;

    //Now lets set them equal to their conterparts
    y = x;
    objY = objX;

    //now lets change the values of the originals
    y = 2;
    objY.setValue(2);     //this method doesn't actually exist in the real class, im just using it to make a point

    //So now x=3, y=2, objY=2, and objX =..... 2? yep, since objX is a pointer to the same object that objY points to.
    <!--c2--></td></tr></table><span class='postcolor'><!--ec2-->

    Alright, I've gone off and posted more information than most of you really wanted to know so I may as well post on topic now.

    If your going to take a class with Java in it, you had better learn a thing or two about pointers and classes in addition to the basic C stuff to avoid confusion.... Unless you expect to be taught that in the AP course, then you'd better hurry before you get too far behind. As for getting a job programming, I would reccomend against it, just look what it did to MonsE <jk MonsE. please don't ban me>. I like to program as a hobby, I am currently pursuing networking as a carrer, though that may change.
  • GeminosityGeminosity :3 Join Date: 2003-09-08 Member: 20667Members
    I never said java didn't use pointers, it's just that you don't really learn the major difference between them and standard variable use in java because... well... they're all pointers lol

    oh and I think the translation thingy is called the Java Virtual Machine, though I didn't realise it ran with the programs, I thought it was more like compilation and stuff o.O
  • SoulSkorpionSoulSkorpion Join Date: 2002-04-12 Member: 423Members
    The standard procedure is that instead of being compiled into binary language native to the target machine, Java is compiled into the binary language of the Java Virtual Machine. The JVM is not an actual machine, but instead is a piece of software that interprets JVM code into real machine instructions. The idea is that instead of having to compile different versions for different platforms you "write once, run anywhere" (or "write once, crawl anywhere" as I like to call it <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo--> ).

    The thing is, there's nothing technically stopping you from writing a compiler that compiles C++ to JVM, except that (aparently) the JVM is specifically optomised for Java (which kind of makes sense <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo--> ). There's also nothing stopping you from writing compilers to compile Java directly into a certain machine language (which, of course, would completely defeat the purpose of using Java in the first place).

    As for whether it's a good language or not... as I said earlier, it's a pointless argument as it is too heavily based on personal taste and is ultimately meaningless <i>anyway</i>. Personally, I can't stand Java because I love C++. That doesn't change the fact that I have to use Java at uni, and if I someday get a job writing stuff in Visual Basic (*shudder*) I won't have a choice then either.
  • HawkeyeHawkeye Join Date: 2002-10-31 Member: 1855Members
    Heh pointers.. you either get them or you don't.
    It took me a little time for it to soak in, but I got it.

    As for what you should do, well take it from a guy who went through all of that already. I am about to graduate from college right now as a computer science major. I went through exactly the same thing.
    My advice to you is to stay in the course as long as you can take the AP eventually. I know there is nothing to do, but you can make up little side projects. This is what I did anyway. I tried making stupid little games and stuff with C++. The AP is important to take, but don't be in any rush to take it. If it is like my high school, AP is as close to challenging as it ever got (which wasn't bad at all). You might as well take your time and enjoy the view. When you get to college, it won't be so slow.

    I think the real challenge with college is being able to do all the assignments they give you, and STILL want to program. lol
    So many people drop out of computer science, not because they can't do it, but because the work is too boring. That's a challenge you don't expect. If you can overcome that, then you can become a programmer.
  • GeminosityGeminosity :3 Join Date: 2003-09-08 Member: 20667Members
    lol... Visual Basic... that brings back memories ^^

    Hawk's basically got it covered =P
    The course will have it's useful points and whatnot but much of the point in academics is that you should try and learn stuff outside of the classroom on your own time too; in the last year the gap between the people who did that and those who just worked within the curriculum is huuuuuuuuge ^^;

    There's plenty of good books and stuff out there and some web tutorials can be super handy too.
    If you're bored and want to try some neat stuff or just look at something that'll help you get to grips with some of the stuff through example check out <a href='http://www.gametutorials.com' target='_blank'>http://www.gametutorials.com</a>
    I only found out about it in my last year of the course but it helped my programming immensely <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html/emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'><!--endemo-->
  • RueRue Join Date: 2002-10-21 Member: 1564Members
    so far iv learned
    true basic
    pascal
    cobalt
    c
    c++
    java
    VB 6
    and VB.net

    C++ is the best to learn , gets u right into the OO design process. to be fair anyone that has learned the basics of any other program lanuge shouldnt find C that hard , C++ is the most powerfull one out there so i sugest learning it first.
  • SkulkBaitSkulkBait Join Date: 2003-02-11 Member: 13423Members
    edited September 2003
    ooh, good chance for me to list all my programming experience....

    ASM - teh pwn.
    BASIC - bleh.
    Visual Basic - eeewww.
    VB.NET - double eeeewww.
    COBOL - proof that there is no God.
    C/C++
    D - wish it had caught on...
    Java - teh crossplatform pwn

    Which reminds me, in your studies avoid COBOL like the plaugue. In fact, actively seek out the plauge if it will allow you to avaoid COBOL.
    <!--emo&::siege::--><img src='http://www.unknownworlds.com/forums/html/emoticons/siege.gif' border='0' style='vertical-align:middle' alt='siege.gif'><!--endemo--> <!--emo&::sentry::--><img src='http://www.unknownworlds.com/forums/html/emoticons/turret.gif' border='0' style='vertical-align:middle' alt='turret.gif'><!--endemo--> <!--emo&::asrifle::--><img src='http://www.unknownworlds.com/forums/html/emoticons/asrifle.gif' border='0' style='vertical-align:middle' alt='asrifle.gif'><!--endemo--> <!--emo&::skulk::--><img src='http://www.unknownworlds.com/forums/html/emoticons/skulk.gif' border='0' style='vertical-align:middle' alt='skulk.gif'><!--endemo--> <!--emo&::fade::--><img src='http://www.unknownworlds.com/forums/html/emoticons/fade.gif' border='0' style='vertical-align:middle' alt='fade.gif'><!--endemo--><span style='color:RED'>---></span> COBOL <span style='color:RED'><---</span><!--emo&::lerk::--><img src='http://www.unknownworlds.com/forums/html/emoticons/lerk.gif' border='0' style='vertical-align:middle' alt='lerk.gif'><!--endemo--> <!--emo&::gorge::--><img src='http://www.unknownworlds.com/forums/html/emoticons/pudgy.gif' border='0' style='vertical-align:middle' alt='pudgy.gif'><!--endemo--> <!--emo&::onos::--><img src='http://www.unknownworlds.com/forums/html/emoticons/tiny.gif' border='0' style='vertical-align:middle' alt='tiny.gif'><!--endemo-->
  • SoulSkorpionSoulSkorpion Join Date: 2002-04-12 Member: 423Members
    <!--QuoteBegin--Rue+Sep 28 2003, 02:05 AM--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Rue @ Sep 28 2003, 02:05 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> cobalt <!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
    You sure about that? <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Sign In or Register to comment.