First Java AP Computer Science Exam Complete
BlindSpy writes "Yesterday, Tuesday May 4th, high-school students all over the U.S. took the first-ever Advanced Placement Computer Science College Board exam based on Java. The exam is given as an opportunity for high-school students to earn college credit in programming. The test is based on whichever language colleges are looking for, which signifies a significant step for Java. In past years, the exam has been based on C++ (1 year) and Pascal (around 10 years)." If you took the exam, what were your impressions?
For C++ you get 3 hours. For the new Java test, you get all day.
The exam takes too long to complete, and requires way too much memory as well. They should go back to Pascal, as it was more efficient.
Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
I don't see how the language should matter in these sorts of exams. Personally I rather have the AP test be questions about algorithms, ideas and concepts. Something like:
1) Write PseudoCode for an AVL Tree
2) Describe the benefits of a hashtable
etc...
No coding, just ideas that a smart student can take to any language, whether its Java or C++ or anything else.
Don't you mean Visual Java?
honestly, i didn't think it was that hard. If it was in C++ i would have spent much more time prepairing, but Java is so straight forward that I flew through the test without a lot of studying. Now, whether or not you have a decent teacher plays a lot into this. The questions weren't too hard or too complicated; even the more complicated ones had anwsers that could be eliminated after looking at it for a little while. I'm glad it was in Java-- C++ would have been a lot harder.
REMINDER
It is against the College Board rules to discuss the multiple choice problems EVER in your life, and you must wait 2 days after the date of the test to discuss the free response questions. Failure to adhere to CollegeBoard rules may result in invalidation of your scores, loss of privilege to take future AP exams, and legal action may be taken against you. (Those who take APs should be familiar with this statement)
Does the College Board have any way to normalize scores between tests given in different languages? Or are they only looking for relative scores among people taking the same tests?
Pretty good.
I took AB, it covered all the topics pretty well, although I wish I had studied big-oh ALOT more, there were like 10 questions on it throughout the whole test.
The difficulty level I thought was well within the grasp of any good student. The Part IIs I thought were particularly simple, I was expecting alot more, especially after what my review book was serving up...Yet the hardest thing was traversing some trees.
What's the story with C++ only being the test language for one year?
I took the test five years ago and it was in C++. Did they switch back to Pascal or not give the test for a couple of years? Or (as seems more likely to me) is the Slashdot summary wrong?
Basically, the entire test was over ArrayList and recursion, the two things we spent perhaps a good ten minutes reviewing the whole year. Screw the college board for switching to Java. In fact, screw the college board in general. Basically, there are two questions I'll tell you (there's a lot of lame laws about not talking about the test, so you didn't see me do this) 1. How many times do you want to punch Leon Schram (author of "Exposure Java" CDROM book series) in the balls? (cirlce one) 1 2 3 4 5 The correct answer to that one is circling all of them. 12,345 times. 2. How many fists do you want to use in the acts described in question one? (free response) Basically write something about "all available limbs and body parts"
It was C++ three or four years ago too. So no, not one year.
The test was converted to C++ in 1999. This means that C++ was the language of the test for a full five years, not just the one mentioned in the posting.
When I was doing CompSci (about 10 years ago), they were just switching from Pascal to C++. Many of the files at my fraternity were in Pascal (so much for those "references"). However, speaking with younger students that have worked for me over the last several years, more and more of them have been taking Java instead of C or C++, and many have never seen Pascal.
Another thing that I have noticed is that a lot of students are also taking VB in college, and some of the windows based scripting languages based on it like ASP. I have also seen a lot of PHP experience. This is especially true of engineering, and compsci related courses (not hardcore compsci).
I am surprised that the AP exam for Java wasn't around several years ago based on what I have seen in a variety of school via 2nd hand knowledge.
Great ideas often receive violent opposition from mediocre minds. - Albert Einstein
I have never used Pascal since, and I felt it taught me some incorrect concepts. A small percent of my class (myself included) then took the course again over the summer in C++. I felt the C++ experience was much more worth my time. I honestly don't know about how I think about teaching kids java first.
I think you should start with C and assembler. Learn the very very basics of computing before you teach OO programing. I personally don't consider my AP experience worth while. Its hard to get a decent computer science professor in a highschool and even harder to teach complex concepts to students who think computer programming is "making video games" and "lots of money". This was especially the case when I took it (during the dot com boom) and even terrible programmers were making lots of money.
I was sure they were going to go with Forth this year.
The more Java programmers the schooling system churns out, the more work for us old-style programmers who know C and assembler.
You'd be surprised how much the industry is sick of Java programmers, and on the lookout for good low-level engineers, or people who can do Forth or COBOL.
It's the current schooling system that allows me to keep a dot-com salary, so don't change anything for me thank you very much.
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
The AP tests are decent, but it's been my experience that taking a CLEP test is easier, faster, less expensive _and_ tends to get your more college credit for the same amount of knowledge.
The next best thing is taking classes to fill up your "full-time" requirements of a certain number of units per semester and then testing out (by taking the final and passing) of the classes you already know. Many on Slashdot could probably get a lot of CS classes passed that way, for example. Those credits count towards "in residence" requirements as well. (The colleges want those tuition bucks, they don't care if you had to go to the class or not as long as you paid them for it.)
AP tests are probably the third best way, but not as useful as the above. I took and passed AP English (5) and AP U.S. History (4) in H.S. and got a lot more credits out of their CLEP counterparts.
Also, if you are good at tests and already fairly knowledgeable, check out Western Governors University, a fully accredited University that does all classes via certified testing. That means if you know your stuff you could pay for one sememster and then test out of a four-year or master's degree. Difficult, but possible.
The party of stupid and the party of evil get together and do something both stupid and evil, then call it bipartisan.
I took it yesterday in the morning, as I think everybody did.
Overall, I think it was relatively easy (not to toot my own horn or anything)
Comparing to what i've seen of C++ and it's AP Exam, I _think_ the ease came mostly from the ease of Java itself, and the APPENDICES!
Most of the good heartly case-study code was included, along with a 'cheat-sheet' with method headers for the ENTIRE case study.
I'll get back to you in a month or two with my score, then we'll see how 'easy' it was
Error 407 - No creative sig found
My graduating class was the last one to take the Pascal AP exam. When I got to college, all of the classes were taught in C++, and I started in a second year class based on the AP credit I got from the exam. I was expecting it to be very difficult, considering I had never had C++ before, and it was...for about a week. Then I realized that a Stack is a Stack and a Linked List is a Linked list and once you learn the syntax of the particular language you're working in, Computer Science is really language-neutral.
Computer Science is not about programming. It's about finding solutions to problems using computers, which is a very different thing. Moving the AP exam to Java seems like a good idea to me, but I doubt it will have any real impact on the curriculums of the schools that make the switch. The principles and concepts taught in any decent Computer Science undergrad program were just as valid and relevant 50 years ago as they are today as, they will be 50 years from now.
Bada-bing-bada-boom. The one day project! Massively parallel programming! Now, if only I can find away to harness the power of bajillions of people sorting playing cards in solitaire to crack encryption codes! Muahahah!!!
[coughs] [takes medicine] Alright, I'm okay now.
The meek shall inherit the earth, in 3 by 6 plots. - Lazerus Long
What the hell is with all this highschool crap on /.? /. become some place for high school loosers to hang out?
Since when did
Oh, since, well let me think...SINCE FOREVER!
I think you should take pride in the fact that as a developer, you're employed at all!
If the intent is to measure a grasp of computer fundamentals, why not use a toy language comprising the programming primitives common to all three? (Such a toy language would would be simple enough to be defined on the spot ...including only, say, assignments, conditionals, loops, and maybe a simple I/O.)
But, if the intent is instead to measure proficiency in a particular language, then why not offer all three?
Seeing bad movies only encourages them. Watch responsibly
The C++ exam was definitely not only one year in the running. It was for many years, probably 5+ or so, Pascal being supplanted in the mid/late 90s. I took the exam years ago and I think it's a good move to bring the AP to Java for a number of reasons.
The biggest reason is the computer science AP when administered using C++ required students to learn the "AP" libraries. That is, they actually developed their own versions of the important data structures that most people use. I think this was mainly due to the fact that most people see the STL as bloated and under-utilized. On the other hand, everyone uses the Java libraries and this cuts out the need to learn additional code (not to mention that the AP code like apvector, apmatrix, etc. wasn't even written that well).Of course, teaching Java does seem to abstract memory management too much, and this is a negative as a result of moving to Java for the AP exam. However, this is outweighed by the consideration above and the fact that I think it's genearally "more fun" for students to learn Java.
By "more fun" I mean that every student will be able to write applications at home or at school and be sure that it will run elsewhere regardless of what system they have. I remember as a TA for a high school programming class that sometimes code wouldn't work going from home to school to other machines at school (e.g. Visual Studio->CodeWarrior->KDevelop) and often, people who wanted to do more advanced things with graphics were limited by the libraries (though I guess we could've done stuff with Allegro or something of the sort). With Java, there's instant gratification in being able to drop in an import for awt and swing and immediately get GUI feedback.
Finally, because it's most important to learn theory in these courses, Java makes for better teaching in comparison to C++. Stronger typecasting, no multiple inheritance, etc. makes Java a language that is "better" in terms of teaching computer science theory (though it's not necessarily better so in practice).
Top reasons I hate it:
Operator overloading - the most abused feature, as it makes coders feel "in control". It's very rarely useful for non-library stuff (container/matrix/numeric code that's already coded), but it manages to screw up projects very easily through abuse.
References. They're simply idiotic. You can't really do useful stuff with them, as they can't be NULL, . Java references are fine, C++ references - a pointless feature meant to save you a "*" or "->", that doesn't really offer any advantage over pointers, but manages to make code unreadable if you use pointers, statics and references at the same time.
Memory management. Either you are a high-level language and you do GC, or you're low level (like C) and you fully control it. C++ manages to get the worst of both worlds here, as object orientation w/o GC is a big mess. (leaks because "ownership contracts" are not respected are very common)
Templates. I do think generic types are a good idea, but what's the f* point of making the template sub-language Turing complete?? (Yes, you can write partial recursive functions to be evaluated at compile time ...). Furthermore, if you allow member functions to be templated individually of the class, things can get really tricky.
Multiple inheritance. Everything's ok, until you get a piece of code that works when you inherit A then B, but fails if you do it the other way around. Happened to me ...
My point - C++ for AP ? Worst idea ever.
The Raven
I took both the A and the AB tests in C++ - and i know it was C++ for alteast 3 years because I took the A test in 2000 and the AB test in 2002
On a sidenote: it should still be in C++ - java = BARF
If you cannot keep politics out of your moderation remove yourself from the Mod Lottery.. NOW!
I took the AP AB Computer Science exam, which covers all that would be covered in the first year of a college level CS class, as opposed to the A exam which just covers just one semester. Most CS classes in high schools are just A level, so taking the AB involved doing stuff on my own (ick).
Before this class, I had been programming for a while, and was self-taught in QBasic, C, C++, Perl, some Java, and Python. So my perspective might be a bit on the 'too easy' side.
That said, I thought the exam was really well done. It covered simple things (giving a 'mystery' method and making you figure out what it does) up to more complicated things (binary trees, recursing through them). Something else they covered, which I think is critically important, and also think wasn't covered under C++, is the efficiency aspect of programs. Some questions would ask which is more efficient, quicksort or insertion sort (easy answer), while others would get a bit harder, giving the runtimes of two unknown sorts on a random array and on a sorted array, and making you figure out which sorts they used. All efficiencies were in 'Big O' notation, not being as in-depth as Art Of Computer Science, but what can you expect from high school students?
Also, there was a marine biology case study which was a larger body of code to deal with and worked our abilities to deal with things that we can't see the source for. This was also present in the C++ version of the AP exam.
:wq
While I mostly agree with this - back in college I took a networking class which was a breeze because I had been doing it for years prior to the class. Regardless of that, the class was taught from protocols such as HTTP, then TCP, then IP, then Ethernet (link layer)... etc....
Similar to taking Java and going to C++ then assembler. Quite frankly I think the class was a lot better as a result because it took familiar concepts, explained them in better detail which lead to questions (ok, so how does HTTP guarantee delivery and integrity of the request? it uses TCP), which then got answered in what seemed a very natural way.
Both approaches have benefits, but just because your picture doesn't look pretty, doesn't mean all paints/ink are going to be so messy.
I took the test the first year it was C++ and got a 5 out of 5 points on it, but when I got to school they gave me 2 credits (i.e. almost nothing) for it. It was a real let down putting all that effort into it and getting so little (scholasticly) in return. Of course knowing C++ while still in high school and being able to explore compsci on my own I think very valuable.
-Benjamin Meyer
Do you changes clothes while making the "chee-chee-cha-cha-choh" transformation sound?
> Note to students that have Physics B or
:)
> Calc AB schools: do yourself a favor and
> study and request to take the Physics C
> tests and the Calc BC. The Physics B is a non
> engineering/science major exam it won't do
> you any good for those programs. Physics C
> will generally translate to your first 2
> semesters of engineering/science physics.
> Calc BC can cover 2 semesters rather than
> the AB 1 semester.
That's good advice. Nobody I asked seemed to know this, so even after taking AP physics in high school and getting a 4 on the B test, I'm now having to take 2 more semesters of physics, which cover the exact same things we covered in high school. From what I hear, the C test isn't even especially harder than the B.
Here's some more advice to Software Engineers:
When you first get in, tell that you're a CS, test out of as many programming classes as you can, and then change your major back to SE. At UW-Platteville, anyway, the tests are pretty easy, but only if you're a CS. SE's gotta do a lot more work. This will do wonders for your credits and amount of free time
Duct tape, XML, democracy: Not doing the job? Use more.
I took the test yesterday, at about 8 AM. Only two other APCS students took the exam from my school, so we were considered "special" and took it in a conference room. I took the AB version (the "harder" of the two available, A and AB).
AB covers things like heaps, queues, stacks, and trees, along with more advanced sorting and searching methods.
The point is, and should be... language does in fact NOT matter. Actually learning the language is very simple. Learning how to *use* the language to accomplish classic and very useful techniques (tree searching/sorting, recursion, etc.) is the real test of knowledge.
Even though College Board switched from C++ to Java (and I prefer C++... well, C, actually) really makes no difference. They provide a supplemental booklet that describes briefly the standard features in Java (Maps, Lists, Strings, etc.), so you can really just focus on solving the PROBLEM.
While we're not allowed to go into specifics, I am going to say, for the benefit of all who may take the exam in years to come, learn the ins and outs of the Marine Biology Case Study!
I was having absolutely no problem with the exam until I hit the problem (with three sub-sections) based on the MBCS. In my APCS class, we hardly ever "played" with the case study. The result was that I spent 30 minutes reading the provided code to the case study in order to familiarize myself with its API so I could write the code necessary to complete the requirements for the problem.
This hangup ultimately cost me 1/4 of my free response section (there were only 4 problems), because I simply ran out of time - and 30 minutes was more than enough time to complete the last problem, and I was more than capable of doing it (it was on binary trees).
The bottom line... 1) the exam does a great job on testing how to solve problems; it does not specifically test your knowledge on Java, so the language switch shouldn't be much of an issue at all. 2) Know the case study! They publish publicly the material that is given as supplemental material on the exam.
Also, I read in a thread that we had "all day" to take the exam compared to only three hours in previous years... this is false. The exam has two parts: a multiple choice section that takes 1:15, and the free response section that takes 1:45. A five minute break was allowed for between sections.
Hope this helps! KNOW THE CASE STUDY!
--Aaron
They're not being tested on their knowledge of Java. They changed from C++ because C++ sucks various reproductive appendages of various mammals with varying descriptors relating to size, shape, and color. For learning, that is. I won't argue that it's useful for production because of its speed.
Anyway, the students are not being tested on their knowledge of Java. They're being tested on actual computer scientific concepts, such as the object-oriented design model, inheritance and polymorphism included, as well as algorithmic design concepts such as big-oh notation and all that. I took it last year in C++ (and got a 5) -- I'm assuming I could ace it again, even though I have never written a java application in my life, simply because it does not test you on Java.
The reason they changed is pretty obvious -- C++ has header files and awkward inheritance and so forth. With a more object-oriented language, you learn more about data structures and less about 'virtual'. You also get interfaces in Java, which is a much better implementation (pun only sort of intended) of multiple inheritance.
The math department head at my high school said I had to take calculus in order to take the C++ class. I said calculus is a bullshit prerequisite for C++ (since, you know, C++ has nothing to do with calculus). She refused to make an exception for me.
At the end of the year I demanded to be allowed to take the test to prove to her that the prerequisites were garbage and that the school was probably too clueless to teach C++ anyway. She couldn't refuse (the AP classes are not mandatory) and so I took the test, although she insisted that I reconsider and that I should take the classes and that I'm otherwise wasting everyone's time.
It turns out that I was the only one in my entire school to show up for the test.
I scored a 5 (the highest score). Came in and stapled that to her forehead.
Spite: it's what's for dinner.
I do not mean to bash Java, but I think it is wrong to push for a closed-source language which does not really compile into direct-to-hardware code. This does on one hand increase software portability, but its an enormous waste to run everything in Java, which is designed only for applications which must be completely portable.
People developing 3D games, drivers or operating systems do not need Java, nor to embedded systems developers. C is considered God's language and is used to compile everything from 8-bit microcontroller TCPIP implementations to GUI toolkits. For its simplicity and ubiquitiousness, it should be taught as the primary language of choice, and C++ comes close to it.
java simply locks everyone into Sun's grip (teaching them C# isnt much better either) and produces programmers who do not have a clear concept of how the source code is being compiled and run. It does make programs cheaper, code reusable and all kinds of hardware hosts for all Java software. However, once in a while you have to completely reimplement the code for a cleaner designs, like the kernel 2.6, like Apache 2.0, like BeOS. This is actually easier with C/C++ than with Java because C forces you to have a bird's eye view of the code.
"Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
I can't say I know if either approach is better, but in my personal opinion, I don't think there's a huge advantage to learning either higher-level or lower-level languages first. Many people started with assembly and now code Java and do just fine. I, on the other hand, started with scripting languages and worked my way down (to C so far, I'll tackle assembly eventually) -- and I do just fine. I think the importance of ability of the individual dwarfs the importance of what order things are learned in. If you have the right mindset to be a programmer, you'll figure it out either way. If you don't have the mindset, you'll probably suck either way.
I took the AP exam when it was C++ and the only credit i ended up getting was a buisness programming class. The CS departments aren't going to give you much credit for the exam unless everyone's required to take an intro to programming freshman year or something like that. The stuff covered in the AP test is pretty much amounts to learn the language and get a broad overview of some important topics. once you get to school they cover everything in a lot more depth. it's definitely good experience but don't think that you're going to be getting out of any useful classes if you're a CS or Computer Engineering major.
I never said I was smart, I just said I was smarter than you
I've been teaching AP Comp Sci for the last few years so I though I'd toss out some info that seems to be lacking around here: First off, the entire aim of the test is to measure how well a student would do in an introductory college course in the subject(1 semester course for the A exam, 1 year for the AB exam). The validity of the scores are tested by giving the exams to college students at selected universities and comparing the score with their grades. Comparing Java scores with C++ scores with Pascal scores is not really an issue, in each case, its simply "Here is how qualified we think you are to be considered having passed 1 term of this subject 5 most qualified to 1 not qualified." Because college Computer Science departments have not been static for the last 10 years(duh!), neither has the AP exam in its effort to reflect that. In 1999, the exam switched to C++ to reflect that C++ was the most often used language for introductory courses - for the 90s it was Pascal, and back in the 80s the exam was in BASIC - this year it changed to Java to reflect the changes in college courses. The test is hand written, so there are no compile time issues(and no issues of unfairness to schools that don't have newish computers. As a teacher, it rather sucks that they only release multiple choice questions after 5 years. Every other subject has books out of 5 years of old exams. And despite a few minor tweaks, Calculus really hasn't changed in... oh... 100 years(note: introductory level). For Comp Sci, that means this year they finally released the first year of the C++ multiple choice questions. Great, that helps my students prepare loads for the exam in Java. Free response questions get released 48 hours after the exam. Btw, my students thought the exam was easy. I have one special ed kid who gets extended time on tests. He finished the free response(supposed to take 1 hour 45 minutes) in under an hour - and that sat laughing with me downstairs at the other kids who were forced to sit in the exam room for the entire duration, twiddling their thumbs. If you are looking to take the AP in the future, definitely take the AB, the A material doesn't have that much too it and really, a fair number of kids should be able to pass that exam just picking up a Barrons book and working on their own.
The huge disconnect here, in my honest opinion, is that the vast majority of Computer Science students are only going after a Computer Science degree because it's the only way to get a job as a computer programmer - but the universities are all treating Computer Science as some form of abstract mathematics. Heck, some universities have Computer Science as a Liberal Arts degree.
Real computer programmers need to understand pointers. Java does not teach you how to effectively use pointers. In fact, it makes it harder to learn pointers, because you learn such bad habits.
Garbage collection is nice, but the majority of computer programmers don't have access to it. Universities should offer Computer Science and (Applied?) Computer Programming degrees, and the AP tests should similarly be targeted for Computer Science (Java, maybe) and Computer Programming (C++, definitely - with exposure to other things as well; Java, Python, Scheme, Lisp, Perl, whatever.)
Education is the silver bullet.
Oh, since, well let me think...SINCE FOREVER
:0
shouldn't that have been:
Oh, since, well let me think...SINCE 4 EVAR!!!
Hmm I'm walking into Stanford this fall with about 20 credits from APsthat count toward my major, including last year's comp sci AB getting me out of a cs101 class, 2 years of calculus testing me into multivar, and cheesy freshmen physics out of the way. It varies wildly from school to school.
when I find myself you'll be the first to know.
Because people sure aren't learning them from Java. C hackers are getting harder to find.
I just had a thought. It seems to me that the old dichotomy of CS, Systems and Theory, have spawned a bastard child: Vocational Programming. It's probably a natural progression as the field matures. This third class of people in the CS world don't understand either end of the old spectrum well enough to fit in. Java might just be the perfect language for Vocational Programmers.
Now the questions are: Do we like this direction? Is it the right direction? What's broken, what would be better?
Start Running Better Polls
Let's not confuse programming -- the practice of using a computer language to do one's bidding -- with computer science -- the more generic, language agnostic study of computers. That's why the exam is called AP COMPUTER SCIENCE and not AP Programming. I wouldn't say that the use of Java on the exam is a great boom for Java per say, just a recognition that it has many features that are useful, and not available with previouis languages in this exam setting.
I think this misconception causes many students to inappropriately major in CS in college because "they like programming", or "they like computers". And some of them, from my experince at engineering school, end up in other majors as a result. Not all though, but enough for me to feel I should comment...
I took the test yesterday. All standardized tests are a joke. People who say pascal should still be used seem to be forgetting that:
1) The test are based on whatever language the majority of colleges are teaching.
2) Java is natively object oriented. Pascal is not. Object oriented concepts need to be tought along with algorithms, they are now almost as important.
A class on CS (as opposed to programming in java) ought to define the laguage in two pages at the front of the test.
Anyone familiar with the concepts of programming out to be able to learn a simple language for the test from that.
I suppose that the language could vary, every few pages. The first one could be like basic, the last like smalltalk.
But I suppose teaching concepts to high-schoolers is a lot harder than teaching very concrete stuff.
When I got there (the test wasn't offered on campus, for low-subscriber tests you had to go to another location) there were no other students there, and the proctor didn't even know that Computer Science was being offered that day. They dug around in the documents, and out pops the one lone copy of the test that the AP folks had mailed out. Turns out I was the first student in all three counties to ever take the test. (This is in a middle-class southern-california area... there'd be dozens and dozens taking it today)
A big shout out to Gary Talbot of TOHS for teaching CS well enough in generalities that I got enough partial credit on the pointer stuff to earn a 3. YOU ROCK MR T!
C, C++, and ASM are low-level languages.
COBOL, Java, and C# are high-level languages.
High-level languages come and go because they are written to solve the problem of the decade. For COBOL it was record management and batch computation. For Java and C#, it's applets, serverlets, processlets, and sandboxed code. What will tomorrow bring?
By contrast, C is still solving the problem of the century -- how to write portable assembly, and assembly is still solving the general problem of computing -- how to get the most processing for the least memory and time. Java and C# can't touch this, nor was this the purpose for which they were designed.
-Hope
I took the test last year in C++ and this year in Java (my school offered no other way for me to learn Java).
The Java test was a lot harder than the C++; while last year's was largely about more general computer science concepts and basic, universal programming practices, this year's (at least the AB exam) was almost entirely on higher data structures like hash maps and binary trees.
Of course, they didn't skimp on the recursion either.
Glog!
I have the benefit of having taken the AP CS test in both JAVA and C++. When I took the C++ test most of the questions centered around coding/analyzing loops and algorithms. In the JAVA test I took this year I only remember a few questions about O(n) and loops. All the questions about algorithms centered on how they functioned and under what circumstances each would be implemented. Most of the questions centered on OO concepts such as the differences between Abstract and Interface classes, and the difference between final and static variables. As a side note, there was a very large section of the test dedicated to all flavors of binary trees. Anyway, just my $0.02
I took the Computer Science AP test in Pascal in 1985. I doubt that was the first year it was offered (although I was the first from my high school ever to take it). So Pascal has been used in this test for much longer than 10 years.
While I agree that those pursuing a CS degree should be more interested in a theory-based test rather than a programming-based one, it is useful for those going into other technical fields who need some programming experience that they can apply.
C++ teaches you more about writing good code, however. People argue with me on that, and say that the sloppy code RUNS, and teaches kids it's okay. But Java doesn't teach people to be any cleaner. I see plenty of comments about how most Java code is bad code around here. In fact, I would say that it does a worse job at teaching good practice because it removes a good deal of responsibility from the coder due to the way it handles memory management. It's fine if you stick with similar languages, but habits that made wonderful Java programs would make you cringe in C++. I've seen a raytracer written in C++ that never used the delete command. I kid you not.
C++ might be more complex, but hey, computers are complex. Programming can become very complex. Kids need to learn to deal with that, as well as learning about pointers and memory deallocation and all the various ways one can screw up. The earlier they learn it the easier for them.
Also, I wouldn't say that interfaces are a better way to do multiple inheritance. It may be safer, but it's less powerful. I speak from experience, having been annoyed by the limitations of interfaces at times.
I came into school with over a full year of credit from my six AP tests. That's a $20k net savings.
Or $30k if I decide to get a MS (which would take four years, instead of the usual five at which point my scholarships would dry up).
I daresay many of the people taking the AP test have no intention of becoming CS majors. Even after 2 years of CS classes in high school, some of them don't know how to sort a list. (I should know, I was one of the people essentially telling them how to write their programming assignments.)
Even when you take a "challenging" AP test, like Physics C (calculus-based), it's graded on such a curve that you can get half of them wrong and still get a 5.
This is my sig. There are many others like it, but this one is mine.
1. Write a function called "swap(x,y) that has the same effect as the pseudocode "t=x; x=y; y=t;".
:-D
2. Define a new data type called "TableIndex" which is a synonym for the "int" basic type. (If your programming language does not support "typedef," a macro is an acceptable substitute.)
3. Illustrate how to parameterize your swap() from #1 so that it will work with any basic type (e.g via function templates or macros).
4. Create an array of integers, and illustrate how to resize the array. (Since dynamic-casting is obviously poor programming practice, feel free to utilize class templates if the language does not natively support resizable arrays.)
5. Write a function that accepts a variable number of floating point arguments and returns their average.
6. Without relying on a compiler from another programming environment, show how to call some simple functions from a C DLL.
7. A mobile robot has 3 states, "roam", "sleep", and "evade". For a collection of 100 robots, demonstrate how an array of function pointers could be used to represent these states.
Uh... hold on a sec! Java doesn't HAVE pointers, typedefs, templates, macros, resizable arrays, ability to call C functions, argument lists, or function pointers!
Cheers,
-Gonz
I've been programming Enterprise Java for 4 years and I'm sure I would fail this test, since I don't know anything specific about either one of those terms.
Perhaps I misinterpreted his comment. The use of the word specific made me think he has some fundamental knowledge of what recursion and ArrayList are but he does not remember the details. I know that I seldom use recursion, so when I do I have to sit down and think about it or just use a book to get a quicker refresher. No, it's not a real difficult concept. I'm sure that I'm not the only one here who doesn't bother remembering the details about what parameters every method takes. That's what books are for.
But, if he doesn't even know what they are then you guys are right to doubt if he is a good programmer as he claims.
All the reasons you dislike C++ are the reasons that I'm a fan. I use many languages, but C++ in particular gives me more leverage overall.
1. Operator overloading - mandatory for best use of templated functions and algorithms. If people make poor decisions with respect to what they overload, that's hardly a problem with the language. I would consider not being able to overload an operator a problem with the language.
2. References are required for any function that returns a "left-hand value." If that phrase does not mean anything to you, then you are not actually discussing C++ references at all, merely glorified pointers. Since left-hand values cannot be NULL by definition, your misunderstanding with regard to their purpose seems likely.
3. Memory mangement is identical to that of C. The addition of the new and delete operators is nothing remarkable - they just call malloc and free. They are also overrideable on a per-class basis if that is not good enough for you. If by "memory management" you mean "takes complete control of object lifetime" than no, C++ thankfully let's you do whatever you want with your objects.
4. Templates are very powerful. They allow with a single declaration the ability to generate code optimized for a given problem. If you are complaining that the mechanism is too powerful, well, some of us like the extra capacity.
5. As for multiple inheritence, I use it frequently. Some types of inheritence are unfeasible, some are unimplementable without substantial performance penalties, and most are simply doable. If you're having trouble, and your inheritance tree is sound, then file a bug report for your C++ compiler.
Genuinely, most of your complaints misrepresent C++ as something it's not, namely a high level language. If C is one step from assembly, then C++ is maybe a step and a half. That's by design.
If I want rapid prototyping, I'll use PHP or Python. I'm not sure what Java gets me other than a sandbox and some friendly exceptions when things go wrong. That's nice, but I don't write weak code, so all that padded insulation does me no good at all.
-Hope
Wow. That is probably the worst idea I have ever heard about AP exams. Right now I'm going into my third year of CS at UIUC and I'll be dammned if any professor wants to waste a whole course on teaching .NET. First of all, in my opinion, it sucks. Second, CS is more math and algorithm oriented than frameworks and language specifics.
AP exams are supposed to measure to a degree (quite bad from what I have seen) how you would do in a first year course at some university. I would really like to know which university will give .NET as a first (or even second) year language... So far I have seen here an Intro to programming with Java, some nasty discrete mathematics course, an Intro to data structures and algorithms with C++, some more nasty computational theory, more and more math, and so forth... Maybe that is what the AP should be aiming for... not just some stupid syntactical questions to be filled out on a scantron sheet.
Because people sure aren't learning them from Java. C hackers are getting harder to find.
Good riddance. I'm getting annoyed by this constant assertion that C is the only real programming. It's just inappropriate for most of what people are doing with it.
For any chunk of C code using malloc() and free(), there's a smaller and faster OCaml equivalent that's garbage collected.
For fun, go to the Great Computer Language shootout and download the java, c, and ocaml fibonacci code (same algorithm). On my machine, the ocaml version is the fastest, followed by the java version, and then the C version. Including startup time, the java version is always faster (user and real CPU time) than the C version.
I write enough C, but OCaml isn't the first language that's produced faster code than I've been able to produce with a C compiler, nor is it the first that's made it easier to write reliable apps than unreliable apps.
What I really don't understand is the way people refer to free() and malloc() as if they're some sort of fundamental elements of programming that are required to be taken seriously. You know they're library routines, right? Should I not take someone seriously who doesn't use sbrk() directly in their code?
-- The world is watching America, and America is watching TV.
Calculus isn't required I'll give you that. However there is a reason you were told to take it: it teaches you a lot more than any other class. Learning that you will need latter in life, but you won't realize it. I never use calc itself in life, I couldn't do a simple derivative anymore. I use the thinking abilities calc gave me every day.
You are wasting everyone's time by not talking calculus. Most of all your own.
How to Design Programs
let rec fib n = if n < 2 then 1 else fib (n - 2) + fib (n - 1)
compared to
unsigned long fib(unsigned long n) {
return( (n < 2) ? 1 : (fib(n-2) + fib(n-1)) );
}
(I have not programmed OCaml, but since it is a functional language I suppose it works a bit like haskell. )
To use this recursive fibonacci-algorithm to compare functional languages and imperative languages is to cheat.
In a imperative language fib(4) calls fib(2) and fib(3). These call fib(0), fib(1) and fib(1) and fib(2). And these calls fib(0) and fib(1). As you can see, a lot of work is done more than once.
In a functional language (at least in haskell) fib(4) calls fib(2) and fib(3). fib(2) calls fib(0) and fib(1). fib(3) calls fib(1) and fib(2) - but since these values are calculated there is no need to calculate them again.
TAKE AP EXAMS!! TAKE A LOT OF EM AND STUDY HARD!
I passed out of about 35 credits for college becaues I had an awesome AP exam showing, and many were offered at my school. 15 credits of math, 5 for computer, 10 for history... then some spanish I got credit for.
Not only will you save money, but you'll be able to skip menial stuff and get into your major courses earlier - and will get yourself a more spread-out schedule so that you don't have to cram a ton of classes in because you "lost" freshman year.
I have it on easy street now for my last year because of AP exams. And the history classes i missed are HARD to get A's in, i hear. So take the time, study it, get a 5, and forget it :)
Berto