Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best Way To Turn In Java Homework?  RSS feed

 
Dr. Jim Anderson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Team,

So I'm getting ready to teach a class on Java programming. I'm wondering what the best way for me to have my students send me their completed homework code. My guess is that they should send me the .jar file that Netbeans creates. However, I've not been able to figure out how to load a .jar file into Netbeans so that I can take a look at it's source code.

Got any suggestions as to the best way to go about doing this?

Thanks!
 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you shouldn't be teaching students IDEs. NetBeans is only one of several Java IDEs in common use. I tend to prefer Eclipse, I worked in a die-hard IntelliJ shop, except for one guy who was hung up on Oracle jDeveloper. Knowing NetBeans will only get you so far in the so-called "Real World".

What they should be learning is Java, and as many here will assert, Windows Notepad is a better editor for beginning programmers, because it doesn't make them look more competent than they are and it doesn't teach them to walk on crutches.

More importantly, students shouldn't be handing in binary files. They should be handing in Java source code that you can then compile and run (or not, depending on how good a job they did). If a JAR is a requirement, then you've cut off people who had some idea of how to code a solution, but not enough of one to code clean-compiling code. It's also much more difficult to ensure that a jar actually came from the proper student instead of being lifted from someone else. A JAR does not normally contain any source code.

Finally, binary code isn't the be-all and end-all of a good programmer. Both myself and my own professors were as interested in how readable the code was and how well-commented it was. Again, a stock JAR won't contain such things.

So my recommendation is that they send you source code (presumably via email), and if it's going to consist of multiple files, put it in a ZIP file. If they don't have the basic skills to handle that, then they're not yet ready to begin programming in any language.
 
salvin francis
Bartender
Posts: 1605
36
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Windows Notepad is a better editor for beginning programmers

Or simply Notepad++ (Saves a lot of hassles with pressing tabs)

Rest, I agree 100% with what Tim said.
 
Campbell Ritchie
Marshal
Posts: 55751
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instruct them to zip all their .java files along with NAME and README files and either send you it by e-mail or use an electronic submission facility. The README file should contain a list of files they are submitting and copies of how they compile and execute their code (e.g. javac MyFile.java java MyFile). If they are using packages they should include a package tree in the README file. The NAME file should contain their name (surprise, surprise) and you don't read it until after you have finished marking the rest of the work.
 
Winston Gutkowski
Bartender
Posts: 10573
65
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:So my recommendation is that they send you source code (presumably via email), and if it's going to consist of multiple files, put it in a ZIP file. If they don't have the basic skills to handle that, then they're not yet ready to begin programming in any language.

I completely agree with you (and gave you a cow) up to a point.

At some point, students will need to learn how to create and use packages; and at that point, they probably should learn how to use the jar and java -jar commands, and how things like CLASSPATH work; so I think it's reasonable to then require them to submit jars - and they should get extra gold stars if you can run their submitted jar from anywhere on your machine.

However, the jar should be in addition to their source code, not an alternative to it.

My 2¢.

Winston
 
salvin francis
Bartender
Posts: 1605
36
Eclipse IDE Google Web Toolkit Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bringing in a practical aspect into picture... I once had a very hard time emailing a jar to someone since the email client was consistently treating the email as if it had a virus
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!