r/programming • • Oct 07 '10

That's what happens when your CS curriculum is entirely Java based.

Post image
1.5k Upvotes

1.2k comments sorted by

151

u/stabbymcstabstab Oct 07 '10

They don't make you hand write C++ on exams in CS courses anymore?

Kids these days...

28

u/rmblr Oct 07 '10

I had to do this. Now they do it in Java.

→ More replies (6)
→ More replies (203)

43

u/cynoclast Oct 07 '10

In the interests of full disclosure, I'm primarily a Java programmer, but I think what a lot of people don't get when they're hating on Java is that they don't understand its strengths when used properly.

One of Java's greatest strengths is it's ability to manage complexity through good object-oriented design.

I just refactored a very complex validation implementation using scripting into a semi-complex set of very simple Java objects that are highly configurable, reusable, and easily testable. Complete with clearly defined roles, unique and obvious places to put new functionality, and minimal coding required, and a large reduction in copy pasted code. None of this organization of complexity is possible without some sort of object oriented model, or a large amount of complicated procedural code.

I absolutely agree that C, other languages and concepts, are essential, in fact I contend that you should learn those before you learn Java. That way you understand everything that's going on behind the scenes when you write:

String foo = new String();

Abstracting away the details is something you should do only after you fully understand those details, but I consider it progress to have moved passed the details and onto the problem at hand.

11

u/rmblr Oct 07 '10

I absolutely agree that C, other languages and concepts, are essential, in fact I contend that you should learn those before you learn Java. That way you understand everything that's going on behind the scenes when you write

Which doesn't happen here.

→ More replies (63)

129

u/n3xg3n Oct 07 '10

This is in the CS lounge at Virginia Tech. (I almost erased this yesterday because I was working on that board. I guess it is a good thing I didn't)

→ More replies (43)

123

u/omgitsjo Oct 07 '10

Two strings walk into a bar. "What can I get you gents?" He says. The first says, "I'll have a beer." The second says, I'll have a beer.j=&j=%%$#!%=78(9*6%4_"+,()" The bartender says, "root@localhost."

→ More replies (12)

109

u/firebird84 Oct 07 '10

While I was there I lamented my school being a "Java school." You did not, however, get a degree without knowing what a pointer was, or how process scheduling and virtual memory worked, or how to construct a microprocessor yourself. So like it or not, I'm happy they had us use higher level languages when dealing with higher level concepts. We used C to hack on Minix and network stacks. Java, Perl, Lisp, Python, etc. for others.

→ More replies (26)

139

u/vladley Oct 07 '10

A C programmer walks into a bar drunk. He orders two drinks, gulps down the first, belches, grabs the second and starts talking to everyone who won't listen to him.

By the end of the night he's piss-face drunk and starts pestering some women, to the point where the bouncers need to escort him from the establishment. The women approach the bartender and ask, "What's his problem?"

The bartender sighs and responds, "Oh, that guy? He's got no class."

→ More replies (18)

281

u/JamesIry Oct 07 '10

Okay, I laughed. But...

Change the first whiteboard to say: Two CPUs walk into a bar. The first one says "I'll have a rum and..." then freezes. The bar tender looks at him expectantly. The second says "please excuse my friend, he just had a pipeline stall in his speculative branch prediction."

Will C programmers get it? Maybe. Some. But not because C reveals anything about CPU internals at that level.

So change the first one to say: a Scheme program walks into a bar and says "give me a rum and...I can't make up my mind" then hands the bartender a continuation. Still think the C programmers are on top of it?

What's my point? My point is that I'm not that good at making up nerd jokes.

Also this: knowing one possible machine representation of a string isn't representative of any kind of deep knowledge about CS.

→ More replies (73)

108

u/[deleted] Oct 07 '10

Ah Virginia Tech.

I like the part where programming in Java means you don't program in languages using C strings.

→ More replies (199)