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)

253

u/rro99 Oct 07 '10

Handwritting pages of code for an exam is serious horseshit. Hated doing it. I spend too much time making perfect curly brackets :(

330

u/Mordalfus Oct 07 '10

:{

FTFY

55

u/[deleted] Oct 07 '10

the first ftfy i've ever seen that made me laugh.

20

u/hopeseekr Oct 07 '10

the first ftfy i've ever seen that made me cry.

37

u/[deleted] Oct 08 '10

} //....and it's closed. We can all sigh in relief.

→ More replies (6)
→ More replies (1)
→ More replies (3)

28

u/mucusplug Oct 07 '10

Or, "Shit, this line is 81 characters."

44

u/hiptobecubic Oct 07 '10

It was great. I loved it. By far the best way to prevent everyone from bullshitting.

31

u/the_truth_hertz Oct 07 '10

While I'm nostalgic about it, I'm not sure it's a bad thing that handwritten CS exams are going extinct. I had a professor mark a handwritten answer wrong on a test just because it wasn't done they way she expected. Had to go to the lab, type it up in vi, compile, execute, print everything out on the ol' line printer. A lot of effort just to get those damn points back.

→ More replies (37)

3

u/pavel_lishin Oct 07 '10

Really? My policy was, fuck you prof, you see that squiggle? That's a curly brace. Or a semi-colon. Or whatever the fuck else it needs to be for an A, and I'll take it up to the dean and fight you all the way for it :)

3

u/[deleted] Oct 08 '10

If you think handwriting pages code is bad, you should try being a Teaching Assistant for an undergrad data structures class. Not only do you have to carefully read through a lot of handwritten code, but you have to actually see how terribly some people grasp programming concepts. I was face-palming, and mouthing 'WTF' every other moment.

The best answer I graded was in relation to a Traveling Salesman problem and the Big-O time associated with it. One kid wrote, "the traveling salesman problem can be solved in O(1) if the salesman books his plane tickets using Orbitz.com!" No points, but he amused me nevertheless.

→ More replies (63)

23

u/vinneh Oct 07 '10

I had to hand write C++, class of 2011. Edit: Though I am a computer engineering major, not a CS.

12

u/muad_dib Oct 07 '10

As did I, class of 2013(ish... co-op fucks up the years...)

6

u/theinternetftw Oct 07 '10

2012 here, did this on a midterm earlier this week.

→ More replies (1)

4

u/[deleted] Oct 08 '10 edited Oct 08 '10

Im a [removed for privacy] major, and one of my professors on an exam had us had write and compile... yes, hand compile assembler. Granted it was only like 15 lines of code, some JSR and pushes and pulls, but still, that was tedious and wrong.
Also, in all the CS courses I have taken, every test has contained at least 3 problems writing out code by hand. Which I think is good, and gets people to think about the code. So don't think you are alone!

edit removed references to my major for privacy since I doubt anyone will read this thread 3 months after the fact...

→ More replies (9)

21

u/cynoclast Oct 07 '10

Our tests on algorithms required only pseudocode because the professor wasn't interested in our abilities as a compiler.

4

u/euicho Oct 07 '10

Eff that's a great retort.

→ More replies (2)

37

u/chmod700 Oct 07 '10

In my day we wrote machine code with orphan blood, uphill both ways.

17

u/[deleted] Oct 07 '10

The good ole' C-x M-c M-OrphanBlood...

→ More replies (3)

6

u/[deleted] Oct 07 '10

They still do.

5

u/Sector_Corrupt Oct 07 '10

Last term I had to handwrite some 68K assembly on an exam. Woo!

14

u/Calvin_the_Bold Oct 07 '10 edited Oct 07 '10

In 7 minutes I have a midterm where I have to hand write ARM7 assembly :\

edit: It went well. I had to write 2 subroutines and figure out what another one did.

→ More replies (5)

4

u/[deleted] Oct 07 '10

I had to write MIPS assembly programs by hand for one class.

I NEVER complained about writing a short program for a C/C++ after that.

→ More replies (3)

3

u/uglybunny Oct 07 '10

In my intro to Comp Sci class at UCSC we had to write programs in assembly and C on our exams. Intro programming was Java based, but the associated lab was C programming. So we'd turn in Java programs for the lecture projects, and code C programs as quizzes during lab. I ended up dropping out of the program because of "paired programming." I hate that teaching methodology.

6

u/twavisdegwet Oct 07 '10

currently sitting in ap computer science in illinois.. it's all java.. all of it. we haven't learned what a pointer is and i don't think we ever will.

→ More replies (12)

2

u/[deleted] Oct 07 '10

I did. Graduated in '06.

2

u/Destroyah Oct 07 '10

My C++ prof still does, and I fucking love it!

2

u/Confucius_says Oct 07 '10

I still can't draw a {, I can do an & though

2

u/aint-no-free-lunch Oct 07 '10

I think it's extremely important to have students actually be able to write code on an exam. My students had to write pieces of both C and assembly programs on their exams. I generally started them off with basic plumbing that let them focus on the core concept I was testing. Making students write pages and pages of pointless code is absolutely stupid. Any problem that takes more than 10-20 lines of code is simply a poorly written test question.

2

u/[deleted] Oct 08 '10

My Intro to CS (with Java) class had us hand write programs on exams.

→ More replies (29)

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)

6

u/DrHenryRIP Oct 07 '10 edited Oct 07 '10

CS@VT has a lounge now?! Did they renovate McBryde or something...

When I was there the 'lounge' was a cinderblock room full vt100's on tables and no windows.

Good times.

6

u/rmblr Oct 07 '10

Brand new, takes up one side of the 1st floor of McB. Keycard accessible by CS majors. Lots of boards, tables+chairs, and lounge furniture. No snacks or beverage machines.

→ More replies (2)
→ More replies (1)

4

u/vtmeta Oct 07 '10

Wow, really? I'm a CPE at tech about to switch to CS. Are you in the CS program here?

2

u/n3xg3n Oct 07 '10

Yeah. Why not CPE, I was thinking about doing it as a double major?

2

u/vtmeta Oct 07 '10

I have nothing against the program itself, I just don't enjoy the circuit analysis and EE aspect of it. If you're into that sort of stuff you'll like it. My favorite classes are the programming/software based ones.

→ More replies (3)
→ More replies (1)

36

u/cajun_super_coder Oct 07 '10

The guy could have snapped the picture before you walked in.

84

u/LightShadow Oct 07 '10

Two Virginia Tech students walk into the lounge....

414

u/pururin Oct 07 '10

One shoots the other.

→ More replies (21)

5

u/lukeroo Oct 07 '10

I went to VT and all I got was drunk.

And Jimmy Johns.

→ More replies (1)

4

u/AndrewBenton Oct 08 '10

That makes more sense. I thought it was written on a toilet wall. I was like "Who sits and works out matrix algebra while they're on the bog? These people are weird..."

→ More replies (4)

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.

9

u/strife25 Oct 07 '10

The problem with using Java as the primary language in school curriculums, especially mine, is that we are never taught how to use Java beyond writing data structures or basic Swing UI.

I learned how to properly use Java at my job by using it as the backend w/ OSGi to create enterprise web apps. There is no undergrad class at my school that teaches this to my knowledge.

→ More replies (3)

19

u/palparepa Oct 07 '10

The problem is when things are taken too far.

13

u/OMGnotjustlurking Oct 07 '10

Yes but many languages give you a very big gun to shoot yourself in the foot with. Doesn't mean you have to shoot yourself in the foot. You can be an idiot in any language.

→ More replies (2)
→ More replies (3)

3

u/G_Morgan Oct 08 '10

I know that by installing Java I will be able to experience the power of Java!

→ More replies (4)

6

u/Huffers Oct 07 '10 edited Oct 07 '10

That way you understand everything that's going on behind the scenes when you write:

String foo = new String()

Not to mention you should be sure to fully understand assembly before you learn C (otherwise you still don't know what the computer is actually doing)!

Plus you should also have a firm grasp of machine code before you start learning assembly. And you should really know how a cpu can be built from logic gates before you start learning machine code - and of course understand the physics of current flow that make logic gates work. And naturally, a complete understanding of quantum physics is a prerequisite to being able to do any of this.

"Abstracting away the details is something you should do only after you fully understand those details."

12

u/cynoclast Oct 07 '10

Agreed.

I can proudly say that my college education included physical circuits, constructing conditions with logic gates and covered a variety of low level languages and concepts. All of which I consider valuable in hindsight.

→ More replies (5)
→ More replies (4)
→ More replies (36)

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.

4

u/treerex Oct 07 '10

When I started in college the first couple of years were taught in Pascal and Fortran... you started on C your junior year when you started taking a compilers or operating systems course.

Of course then I was the TA for a compiler's course where the professor decided he wanted to teach it in Modula 2. That was "fun".

→ More replies (198)

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."

12

u/epaga Oct 08 '10

aka a "root beer"

19

u/mikemcg Oct 07 '10

I, unfortunately, do not get this one.

79

u/omgitsjo Oct 07 '10

The bartender failed to sanitize his input, leaving himself vulnerable to a textbook buffer overflow attack. It was then exploited to get root privs.

→ More replies (6)

24

u/quill18 Oct 07 '10

The second guy abused a the fact that the bartender (server) wasn't properly escaping the input and/or had a stack buffer overflow vulnerability to gain root access to the server.

→ More replies (2)

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.

16

u/lennort Oct 07 '10

Sounds a lot like Oregon State's curriculum, but we hacked on the linux kernel.

7

u/ElDiablo666 Oct 07 '10

Wow, that's great. Did you contribute any bug fixes or anything?

18

u/bagboyrebel Oct 07 '10

Just took the class he's talking about last year. We didn't do anything that would actually be useful to submit. The assignments we had were things like changing the memory allocation algorithm or the scheduling algorithm. The class was about learning how operating systems work, not Linux kernel hacking in general.

→ More replies (2)
→ More replies (6)

8

u/[deleted] Oct 08 '10

I went to one of the Go8 unis in Australia. The CS department was pretty much a Java school. I graduated not being exposed to the following:

  • C/C++
  • pointers
  • assembler
  • software design principles beyond a simple OO unit. It really just explained OO, it never went into design patterns or anything like that.

My friend was even worse though. He managed to get a CS degree from the same institution without knowing anything about programming. He'd take the units with the least actual code involved (software management, HCI etc) and if he did face doing some code for a project, he'd group up with someone who could actually code and always be that dude who does the write up of the results. I was impressed, I'm guessing he wrote less than 10 lines of code in 3 years.

→ More replies (9)
→ More replies (5)

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."

150

u/IbidtheWriter Oct 07 '10

C++ walks into a bar, slaps a waitress on the ass and demands a drink. C turns to the bartender and says "I can't believe how he treats women like objects"

Weak, I'll admit it, but it's late.

10

u/uglybunny Oct 07 '10

I think its pretty clever actually.

→ More replies (3)

59

u/wassail Oct 07 '10

A Java programmer walks into a bar.

He calls his lawyer and together they create a legal entity (called OrderFactoryFactory) which administers any number of instances of OrderFactory; each prints orders and puts them in filing cabinets. The programmer then writes an Eclipse plugin (with 120 megabytes of dependencies) which sends orders using SOAP to the OrderFactory, which writes the order's location on a slip of paper in invisible ink, so that the location won't be directly used or modified. The slip of paper is received by a friend of the programmer, who (by some means unknown to the programmer) reads the paper, finds the order and turns it into XML to give to the bartender.

31

u/brownb2 Oct 07 '10

He's obviously going to be a fan of the Factory Factory Factory Pattern too. Just in case you think this level of stupidity doesn't make it into real world software (sigh) I'll leave this link right here.

8

u/gigitrix Oct 07 '10

The documentation for that class... the mind boggles...

→ More replies (2)

3

u/[deleted] Oct 07 '10

This joke could just about apply to C#, too...

3

u/[deleted] Oct 08 '10

You forgot to surround your comment in try-catch's.

→ More replies (5)

2

u/G_Morgan Oct 08 '10

A drunk C programmer was searching a car park for his car. He was attempting to compare spaces when he made a mistake and wrote an empty space over his car.

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.

119

u/gmfawcett Oct 07 '10

OK, let me try. Two Haskell programmers walk into a bar. The first one says, "I'll have..." The bartender waits. The second one says, "Don't worry, he'll finish ordering the rum and coke as soon as he starts drinking it."

Two Prolog programmers walk into a bar. The first one says "I'll have a rum and coke." The bartender says "Yes."

I think I'm worse at this than you are, James.

98

u/ladon86 Oct 07 '10

Two PHP programmers walk into a bar. The first one says "A drink please", and the second one says "Please, a drink".

One of them got a drink, and the other was thrown out of the bar, but I can't remember which was which.

9

u/[deleted] Oct 08 '10

I'm ashamed to admit that this is the only joke in here that made me laugh.

7

u/[deleted] Oct 08 '10

Bartender says "If I'm a server, chances are I'm serving you."

14

u/JamesIry Oct 07 '10

I think I'm worse at this than you are, James.

No.

→ More replies (1)

13

u/dagbrown Oct 07 '10

So what the first Haskell programmer actually ordered was a curry?

22

u/eggertm Oct 07 '10

Two Python programmers walk into a bar. The first one says, "I'll have..." The bartender waits. The second one says, "Don't worry, he released the GIL and will finish ordering as soon as he reacquires it."

→ More replies (1)

4

u/wassail Oct 07 '10

These aren't bad, they made me laugh out loud.

Or I have a bad sense of humor.

3

u/[deleted] Oct 07 '10

Two Prolog programmers walk into a bar. The first one says "I'll have a rum and coke." The bartender says "Yes."

Made my day :)

3

u/haberman Oct 08 '10
Two Perl programmers walk into a bar.  The first one
says "I'll have a $_ in a $/ glass, with a twist of $^."
The bartender says

"please, use English" and the second one says "$WHY_DIDNT_YOU_SAY_SO_TO_BEGIN_WITH"?

Aw crap, Reddit markup made it impossible to tell this attempted joke properly.

→ More replies (1)

3

u/abw Oct 08 '10

A bunch of LISP programmers walk into a Chinese restaurant. Bill Gosper says "Split-p soup?" The others chortle.

OK, I'm not very good at this either. But that one's a true story.

→ More replies (8)

176

u/ani625 Oct 07 '10

I am a compiler and what is this?

60

u/JamesIry Oct 07 '10

I need another compiler. This one gave an error because it tried to parse a comment.

14

u/G-Brain Oct 07 '10

That should be a compilation error message.

→ More replies (1)
→ More replies (1)

34

u/knome Oct 07 '10 edited Oct 07 '10

Two CPUs are outside a bar. The second CPU hands the first his share and asks, "Hey, we got enough for a pitcher?" The first shrugs and says "Guess so." The two CPUs walk into the bar. The first CPU orders a pitcher and places their money on the bar. The bartender pours the pitcher and hands it to the CPU. The CPU draws a glass and lifts the it to their lips. The bartender counts the money on the bar. The world turns red. Two CPUs are outside a bar. The second CPU hands the first his share and asks, "Hey we got enough for a pitcher?". "No" says the first. And they continue down the street.

9

u/_Uatu_ Oct 07 '10

Speculative execution is funny.

7

u/wonderbread1908 Oct 08 '10

That was really trippy until I realized what the joke was.

4

u/[deleted] Oct 08 '10

Unfortunately, I think I get this joke.

→ More replies (4)

8

u/Anathem Oct 07 '10 edited Oct 07 '10

Two VB.NET programmers walk into a bar. The first one says, Begin Request Sir Will You Please Provide Me With A Glass Filled With A Mixture Of Rum And Coca Cola End Request

→ More replies (1)

11

u/ggggbabybabybaby Oct 07 '10

No no no, the joke is that Java programmers have no sense of humor.

38

u/Nebu Oct 07 '10

I'm a Java programmer, and I don't find your comments to be very funny.

→ More replies (3)

2

u/munificent Oct 08 '10

A Pascal programmer walks up and says, "\043What seems to be the problem here?"

→ More replies (27)

41

u/zeiben Oct 08 '10

Two smug programmers walk up to a whiteboard. Both of them wonder what boobs feel like.

→ More replies (1)

39

u/heroofhyr Oct 07 '10

A Java programmer decides to invite a few billion of her fellow Java-programming friends to her wedding. Her fiancé asks, "Jesus, how many guests are on this List?" She replies, "I'm not sure. I lost track after 231-1. Not a big deal. Most Java programmers don't get a Long."

7

u/crusoe Oct 08 '10

Should have used BigInteger

51

u/ThePoopsmith Oct 07 '10

Knock knock

Who's there?

<later that day>

Java

10

u/munificent Oct 08 '10

But it's much faster the second time you knock!

4

u/wonderbread1908 Oct 08 '10

Keep asking, it'll speed up after a couple thousand times.

37

u/tabgok Oct 07 '10

Absolutely! It is essential to programming to understand pointers! And C is by far the best language to deal with such things ^ .

(void(*)(void)) (myFunc)(void()(void))

37

u/[deleted] Oct 07 '10

You do not need to understand pointers if you start with assembler. Actually, if you start with assembler many things are much easier to get.

40

u/IHaveScrollLockOn Oct 07 '10

You mean I don't need eight lines of code to increment a variable?!

15

u/[deleted] Oct 07 '10

I don't get, eight lines of asm or C or what?

In x86 asm it's a single line :)

→ More replies (5)
→ More replies (12)

19

u/timmaxw Oct 07 '10

(void(*)(void)) (*myFunc)(void(*)(void))

FTFY

→ More replies (7)
→ More replies (4)

6

u/DaedalusJacobson Oct 07 '10

Are you trying to say null-terminated strings are a good thing?

→ More replies (2)

19

u/FinalSin Oct 07 '10

Hahaha. Ah, snobbery.

16

u/cybercobra Oct 07 '10

"Nerd humor": n. I know something you don't; Hahaha, isn't that hilarious!

→ More replies (2)

5

u/funkybside Oct 07 '10

Today's lecture has been moved to java.lang.nullpointerexception.

4

u/raypoz Oct 07 '10

The Java programmers 'didn't get it' because you don't have to worry about null terminated strings in Java. I'm sure they got it, but 'didn't get it' 'cause they don't have to. At least that's what I get from it. That's a lot of gets

4

u/robreim Oct 08 '10

I'm certainly not advocating java, but having less programmers needing to think about ridiculous bugs resulting from weakly typed languages with semantics lacking in predictability like C is a GOOD thing.

10

u/negativeoxy Oct 07 '10

I am going to a community college that teaches nothing but java. There is even an instructor who wrote one of the text books we use. Luckily i taught myself C++ over two deployments to Iraq and now i enjoy watching my teacher/classmates trying to understand what the compiler is doing when it runs into a "String." Or when they are trying to debug System.out.println(n + n + "blah");
Versus: System.out.println("blah" + n + n); for 2 hours. Its the little things.

6

u/DaedalusJacobson Oct 07 '10

If they can't debug that it means they don't know Java. Why would knowing other languages help?

4

u/quill18 Oct 07 '10

It was a little unintuitive at first, but I've really learned to love languages that use a dot/period/full-stop to concatenate strings instead of the plus sign, because it prevents this very problem.

→ More replies (3)

3

u/[deleted] Oct 07 '10

I'm going to a community college and we barely have any programming classes at all. Intro to Programming (c++), Javscript and then PHP

Yes, It's horrible.

→ More replies (4)
→ More replies (9)

10

u/themarchhare Oct 07 '10

I really like Berkeley's CS curriculum! We start off with Scheme. :)

→ More replies (6)

12

u/[deleted] Oct 07 '10

Meh, languages aren't as important as the concepts. I can learn a new language in less than a day if I really need to. Until then, I'd rather spend my time learning more important things.

29

u/[deleted] Oct 07 '10

You may be able to learn the syntax of a new language in a day, but you won't be fluent and idiomatic for quite some time.

→ More replies (5)

3

u/theZagnut Oct 07 '10

Getting the syntax right doesn't mean you have learned the language. You aren't going to be fluent in hebrew (or arabic, or chinese or whatever) by just learning the particular alphabet.

→ More replies (1)

3

u/[deleted] Oct 07 '10

Was that a regular expression?

ZING!

6

u/kmangold Oct 07 '10

Not sure who to attribute this to, "You have a problem so you turn to regular expressions to help; now, you have two problems."

→ More replies (5)

3

u/[deleted] Oct 07 '10

Having just smashed through a bug where a piece of code was converting binary data into a string and back again:

Fuck null terminated strings. Fuck them up their stupid, stupid asses.

Nothing like trying to figure out why your binary data is truncated halfway through.

3

u/MrSurly Oct 07 '10

The moment you knew 1) binary data 2) C style strings, the answer should have been crystal clear.

→ More replies (1)

3

u/[deleted] Oct 07 '10

I'm actually going to get a CS degree, I see all of these things about CS, and it just seems very hard, I really hope after I start it'll make way more sense to me.

3

u/turtlesallthewaydown Oct 07 '10

Yeah I don't get the Java hate. I've done C/C++ programming but for someone's first programming experience I wouldn't foist that upon them. Start them out by giving them a solid grasp of logic and breaking things down into instructions before throwing pointers and unhelpful template debugging messages at them.

It's more helpful for a beginning programming student to see "ArrayIndexOutOfBoundsException" than to have them step byte by byte through GDB until they find that their array went out of bounds. You don't start out driving lessons by learning about all the gorey innards of a car. You start by driving. The gorey innards come later.

Anyway, would the same complaints be leveled if CS 101 used Python or Ruby or even BASIC? Is our complaint that CS students begin by learning high-level languages or is this just "lol java suxx?"

3

u/jayd16 Oct 08 '10 edited Oct 08 '10

A C++ programmer walks into a bar and orders a a triple shot of scotch.

The memory leak was not at the bottom of this glass, either.

4

u/chimera8990 Oct 07 '10

At least its better than a curriculum that is Python based and focuses on problem solving instead of coding. We have plenty of people who get out of the intro CS sequence without even knowing that these things called pointers exist.

56

u/lightcatcher Oct 07 '10

computer science is supposed to be about solving problems. from a practical perspective, python isn't a great language to teach the implementation of computers, but it is pretty great to teach problem solving.

24

u/killerstorm Oct 07 '10

Um, no.

Computer science or computing science (sometimes abbreviated CS) is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems.

It is not just a practice of programming. After going through CS course person should know how it all works up to hardware level, not just be able to write Python code.

Note that The Art of Computer Programming uses assembly language for theoretical analysis of algorithm performance, not a high-level language -- because high-level language hides to much and analysis becomes impossible.

14

u/ilkkah Oct 07 '10 edited Oct 07 '10

Analysis is possible on high level if (for example) every step is constant time bounded operation and control structure complexity is agreed beforehand. See every modern paper on algorithms.

I believe pseudo-asm is great on pedagogical side.

1

u/rmblr Oct 07 '10

Good point.

Studying CS is much more than studying to be a programmer.

→ More replies (14)

6

u/[deleted] Oct 07 '10

It's not all just solving problems though. There's a lot of technical knowledge that has to be learned that can really only properly be learned through the use of lower level languages.

→ More replies (1)

12

u/alantrick Oct 07 '10 edited Oct 07 '10

You must be confused. You say that Java is better than Python because Python doesn't have pointers. Java doesn't have pointers either.

Edit: Any programming is coding, because you are taking a concept, an idea, and converting it into concrete code that does something specific. There is no requirement that the concrete code should have an obtuse syntax.

13

u/yellowstuff Oct 07 '10

To be fair, both languages obviously make extensive use of pointers, they just don't give direct access to them. It seems like it would be hard to have a very deep understanding of Java or Python without understanding pointers.

6

u/BraveSirRobin Oct 07 '10

Bingo. I've seen many Java memory leaks that would have not existed if the coder had understood the relation between object references (java's closest pointer analogy for the user) and the garbage collector. It's easy enough to explain to someone but without the base knowledge it's not intuitive.

→ More replies (2)

7

u/jptman Oct 07 '10

My college switched to Python for the intro class and I noticed that since they were much more productive in Python than a group of students taking the class in C, they came out with a lot more CS concepts, Data Structures, etc.

→ More replies (4)

2

u/[deleted] Oct 07 '10

At least its better than a curriculum that is Python based and focuses on problem solving instead of coding. We have plenty of people who get out of the intro CS sequence without even knowing that these things called pointers exist.

I see no difference between the two. Also, problem solving is a lot more useful for a programmer in the long run than some constant knowledge of pointers.

→ More replies (1)

3

u/[deleted] Oct 07 '10

Yeah, the EECS Committee at MIT is full of n00bs.

→ More replies (9)
→ More replies (1)

5

u/kensuke155 Oct 07 '10

The first joke wasn't even funny. That was a statement, not a punchline.

3

u/cpp_is_king Oct 07 '10

I think you might have gotten whooshed. The first joke was the punchline.

3

u/kensuke155 Oct 07 '10

I get the joke. I guess I was just assuming that it was a C class and they were making fun of students who's curriculum is entirely Java based.

They joke could go both ways I guess. C devs have to worry about null terminated strings (from the Java dev's perspective), and Java devs are stupid (from the C dev's perspective).

→ More replies (2)

9

u/ddelrio Oct 07 '10

You don't need to be a C programmer to understand that the joke isn't funny.

3

u/theZagnut Oct 07 '10 edited Oct 07 '10

That joke is funny because its true

4

u/Massless Oct 07 '10

I liked my curriculum: Java for the first two classes, followed by C, followed by "Design of Large programs" in Java, followed by scheme, followed by Haskell. I even got Prolog in an elective. If only I could use functional programming in every day life, though. Haskell blew my mind in the best kind of way.

11

u/Ziggamorph Oct 07 '10

At my university we learn Haskell first, since it puts people who have programmed before and people who haven't on a level footing (since almost no one knows Haskell before they get here).

7

u/frogking Oct 07 '10

At my university, the professor had written his own language .. first year students had to use that.

6

u/Ziggamorph Oct 07 '10

Funnily enough, Haskell was (at least partially) designed by the guy that taught the course at my university.

→ More replies (1)
→ More replies (2)
→ More replies (4)

2

u/[deleted] Oct 07 '10

Haskell blew my mind in the best kind of way.

Why?

→ More replies (3)

4

u/Tiger337 Oct 08 '10

The Lone Ranger and Tonto were at the bar drinking, when in walks a cowboy who yells, "Who's white horse it that outside?"

The Lone Ranger finishes off his whiskey, slams down the glass, turns around and says, "It's my horse. Why do you want to know?"

The cowboy looks at him and says, "Well, your horse is standing out there in the sun and he don't look too good."

The Lone Ranger and Tonto run outside and they see that Silver is in bad shape, suffering from heat exhaustion. The Loan Ranger moves his horse into the shade and gets a bucket of water. He then pours some of the water over the horse and gives the rest to Silver to drink.It is then he notices that there isn't a breeze so he asks Tonto if he would start running around Silver to get some air flowing and perhaps cool him down.

Being a faithful friend, Tonto starts running around Silver. The Lone Ranger stands there for a bit then realizes there is not much more he can do, so he goes back into the bar and orders another whiskey.

After a bit a cowboy walks in and says, "Who's white horse is that outside?"

Slowly the Lone Ranger turns around and says, "That is my horse, what is wrong with him now?"

"Nothing," replies the cowboy, "I just wanted to let you know that you left your Injun running."

→ More replies (1)

2

u/thedude42 Oct 07 '10

I attribute many of my difficulties in systems work today to the fact that I was introduced to CS education with Java, and thus I have spent the better part of the last 2 years trying to decouple Java convention from my thinking processes.

On the up site, this activity gives me very freeing feelings and epiphanies as a learn more. So possibly Java is my 'church' were I to relate this to an atheist who was raised catholic?

2

u/doppel Oct 07 '10

If your school is aiming to teach you how to design, manage and program software from start to finish in Java, language 2 and language 3, and you never expect nor have any wish to work in low-level languages, is this a problem?

I can see why you should worry if you need to work in C or similar, but if that's nowhere near what they are trying to teach you (and meant as such), does it really matter?

Computer Science as a term is pretty wide, although what I have mentioned is probably more towards Software Development as a genre, than general CS.

3

u/Grimoire Oct 07 '10

Programming languages, especially high level ones, are abstractions. No abstraction is perfect. When the abstraction breaks (compiler/interpreter does something dumb or unexpected), it is extremely difficult to fix or even understand what is going on. If you know what is happening under the hood, it becomes much easier to determine the correct course of action.

→ More replies (1)

2

u/mizuhri Oct 07 '10

Is there anyway to explain this to us that don't know any programming language and it still make sense/be funny?

4

u/m1ss1ontomars2k4 Oct 07 '10

Strings in C must be null terminated (end with a 0 byte). If a string does not have such a thing, some of the memory following the string (or the garbage values in the string) may be printed.

→ More replies (4)

2

u/CaptainItalics Oct 07 '10

Actually, Java programmers should know about null-terminated Strings, because of things like null byte injection.

→ More replies (1)

2

u/[deleted] Oct 07 '10

Imho it's the fault of students who think anything that's not part of the curriculum isn't something worth learning. That attitude seems to be all too common. Makes me sick. When you're studying something, don't expect everything worthwhile being spoon-fed to you. Don't only focus on grades, focus on getting good at what you're doing!

2

u/[deleted] Oct 07 '10

There couldn't possibly be CS degrees that is entirely Java based. They may teach Java as the main language in most CS degrees since 2001/2002, but there is no way people go through CS degrees without coding in other languages.

A CS or CSSE graduate will know what a pointer is.

2

u/movzx Oct 07 '10

I only remember one non-optional non-JS course

→ More replies (7)

2

u/jaxxon Oct 07 '10

I don't get it.

2

u/nerdymark Oct 07 '10

It's the look of disapproval that made me laugh most.

2

u/h_lehmann Oct 08 '10

Two transistors are walking down the street when they come upon a diode, laying in the gutter, drunk as a skunk. One transistor says to the other: "I may be biased, but he seems a little saturated to me".

Thank you, thank you, I'll be here all week.

2

u/SquareWheel Oct 08 '10

I love the cut off ಠ_ಠ.

2

u/nepidae Oct 08 '10

Where does the science part of CS come in to play?

2

u/zoomzoom83 Oct 08 '10

Technically the string was null terminated. The null just happened to be in a random piece of junk memory.

2

u/joesb Oct 08 '10 edited Oct 08 '10

It's funny to see many Pythonistas join in to bash Java here when their language also shares the same characteristic.

The joke applies to any language not C/C++. MIT teaching in Scheme? No pointer.

→ More replies (1)

12

u/[deleted] Oct 07 '10

Java has always been slow to understand jokes... and doing anything else as well.

65

u/ErroneousBee Oct 07 '10

Actually, once it has spun up, and provided it has enough memory, it can understand jokes almost as fast as an optimised C solution.

4

u/[deleted] Oct 07 '10

I'm replying just so that I can mark this place for when I've spun up and actually written a real reply. Don't expect it to be soon.

→ More replies (5)
→ More replies (2)

3

u/zerovox Oct 07 '10

Thank god we start with Haskell. Then move on to java. Hmm...

→ More replies (5)

3

u/[deleted] Oct 07 '10

You do realize that there are very few languages that use the retarded null-byte in a character array to emulate a string, right?

→ More replies (7)

4

u/fenton7 Oct 07 '10

Two C++ programmers walk into a bar. Wait. Who am I kidding? C++ programmers don't hang out with other people and, even if they did, they don't drink. ABORT.

3

u/[deleted] Oct 07 '10

Uh, there are Java based CS curricula? NOW I understand a lot of things!

2

u/[deleted] Oct 07 '10

I had the CTO of the company I work for complain to me that schools still taught "low level languages," instead of exclusively C# and Java. facepalm

→ More replies (2)

2

u/Kayjin Oct 07 '10

Anyone else seriously craving some star craft after seeing that URL?

2

u/CrazyPersonApologist Oct 07 '10

At least it's not entirely based on brainfuck. I don't mean the language, I mean based on trying to permanently fuck your brain up.

2

u/DrBix Oct 07 '10

After reading a large number of these postings, I'd gather that the vast majority of people here know as much about Java as Larry Ellison. Having programmed in many different assembly languages, Basic, Pascal, C, C++, PHP, and Java, I'd generally take Java over any of them (depending on the application, of course). If I was going to write a "thick client" then I'd probably put Java as my last choice. Then again, if I was trying to create a web service or an extremely scalable enterprise class application I'd probably choose Java. Despite the hatred for the language, it has a proven track record in the business world for being extremely scalable and for good reason. Of course ANY application is only as good as the engineers creating it, so if you're hiring a gang of trained monkeys to write your app, then it doesn't really matter what you choose.

3

u/Kowzorz Oct 07 '10

You would probably like C#.

Also:

I don't think anyone hates java

DrBix -1 points

snicker Why the downvotes people? Downvotes are for shitty posts, not dissenting opinion.

→ More replies (1)

1

u/Wylkus Oct 07 '10

At UMD the first two classes are Java. First one is general introduction to programming, second one is more complex stuff like threading.

Next two classes are in C. First one is pretty much pointers, pointers, and more pointers. Also some assembly. Second class is all about low level how the computer is working. Also more assembly.

Then there's a class that's split into Ruby, OCaml, and a bit of Java. Plus the algorithms class.

Then in your last year you pick which 400 level classes you want to suffer through.

1

u/valleyman86 Oct 07 '10

My school starts you off your freshman year learning C/C++ and data structures. I am so glad they did that because it made learning every other language pretty much non-trivial. Now I spend my time learning new design patterns and reading about concepts and then I can just implement them with no issues. I took AI (Jr year) which was amazingly fun and learned about search algorithms and things like fuzzy logic. With that amount of information everything else is just simple.

1

u/brianly Oct 07 '10

I know someone in the MCIT program at the University of Pennsylvania. Since September they have been taking a programming intro in Python, and a computer architecture course taught with C (at least initially). They've found it tough but very rewarding. Some of the problem sets are particularly challenging for people with little or no programming background.

1

u/vintageman Oct 07 '10

Can someone tell me why they make IDE's using JAVA? like NetBeans and Eclipse..i admnit they are absolutely awesome IDE's but why the heck not any other non-intermediate language? I just find them darned slow. I also have to say that i have a pretty old computer but VS2008, Dev-CPP, CodeBlocks work very nicely and i love them with all my heart.

2

u/[deleted] Oct 07 '10

Out of curiosity, are you running NetBeans with Java 6? You'll probably get a performance improvement.

In general the Open Source IDEs use Java as the base to move about OSes more easily. You could do it with Qt or something like that, but Java is ubiquitous.

Oddly, I've had more problems with VS running slowly that even IBM RAD, and RAD is a POS, especially when running on a VM half a continent away (as I do daily).

→ More replies (1)

2

u/DrBix Oct 07 '10

Eclipse tries to be everything to every body. I've never thought that Eclipse was terribly slow after an install. But then add a ton of plugins and extensions and it can quickly become quite a pig. Then again, now that I'm on a very fast CPU and a SSD it's practically never slow. The only time I've noticed a slowdown is during Android development and some class has like 20,000 methods to load and Ecilpse was trying to bring up the auto-completion. That can really grind. Of course, you can always turn off auto-completion.

2

u/jyper Oct 08 '10

Because they are written mainly to be used with java(dogfooding, made by developers with lots of jaa experience), java can be easier to write then c++ especially for extreme plugins like eclipse.

1

u/cvirtuoso Oct 07 '10

Please tell me this is in the University of Windsor Java lab.

1

u/Cadoc7 Oct 07 '10

I actually really like how things are structured at my university (CWRU). We focus on the theoretical, trying to keep it as language independent as possible, and force the student to put the pieces together. Anyone who makes it out of the program will know what they are doing.

The structure is like this:

  1. Intro to programming course. It is split into EECS majors and other majors. EECS majors learn in Java everything up to basic object operations. Other learn MatLab.
  2. Introduction to algorithms and data structures. It covers all the major data structures, sorting algorithms, and basic graph theory. This is done in Java, but everything must be built yourself. In-depth knowledge of pointers, generics, and objects is required. Time analysis is present but not emphasized. That is usually taken in conjunction with digital logic design which goes over basic hardware design (logic gates, memory, etc) and assembly.

After that you usually take compiler design using yacc and lex in *UNIX to transform C into assembly, intermediate algorithms and data structures which is done in p-code and focuses on algorithm analysis and synthesis, discrete math, and linear algebra.

After those, you move into operating systems (C), databases (SQL), computer architecture(low-level stuff), networks, Artificial Intelligence(some sort of Object-Oriented language; depends on prof), Software engineering(practical applications), and theoretical(algorithm construction).

Added to that are various tech electives. A fair number of the simulation based electives use C#.

It is brutal but effective. Compilers as the first "real" programming course seems to scare off a lot people, but really impresses employers. I didn't find it too terribly difficult.

→ More replies (1)

1

u/malakai655 Oct 07 '10

Research/develop solutions for your class using MINECRAFT! It was developed in Java...

1

u/Tagard_McStone Oct 07 '10

My professor probably killed his kid, then quit. Catanio was a weird guy.

1

u/TacticalJoke Oct 07 '10

So one of the strings has arbitrary bytes at the end because he's not null terminated. Okay. So, where is the punchline?

3

u/movzx Oct 07 '10

In the box to the right.

1

u/ljcrabs Oct 07 '10

Am I the only one whose Java-based CS curriculum covered stuff like null-terminated Strings (i.e. got the joke)?

1

u/swaroopb Oct 07 '10

Assembly. End of topic.

1

u/[deleted] Oct 07 '10

I think this particular joke is on the C programmers.

1

u/[deleted] Oct 07 '10

Is it wrong that the original joke really makes LOL everytime?

1

u/BlastingKap Oct 08 '10

This Term: x68 Assembly, C, Java

I love UofG :D

1

u/viceroy76 Oct 08 '10

A horse walks into a bar. Bartender says, "Why the long face?" Horse says, "Well I just found out I have AIDS so I suppose I'm feeling a bit sorry for myself." Bartender says, "My god that's awful."

I'm not telling it right, but you see the hilarity in the situation.

  • "Thom Pain", Will Eno

1

u/Forbizzle Oct 08 '10

The joke, as many of you missed it, was that Java developers don't need to worry about that kind of bullshit. Not that the guy that wrote that text actually doesn't know about null-terminated strings.