• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

new java college - need feedback

 
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See www.eporkchop.com/college for the beginning stages of my new "java college". I would appreciate feedback on my approach.
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After every Java word you are missing (tm). Hee hee hee.
You may want to offer a tool like http://pfe.iquill.net/pfefiles.htm
It's free and neat.
Assignment 1.0 could be HelloWorld. It gives the person a sense of accomplishement and they have committed to doing the assignments at the same time.
The approach looks pretty good. I will review it more later.
 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, I looked at that page, but I don't get it. What did you have in mind here?
 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. First concept I had: In http://www.eporkchop.com/college/ you said not to use an IDE. Ok. Give them something better than notepad at least. Give them PFE (Programmer's File Editor). At least the Windows people can use that tool. emacs or vi is usually available for the unix people, but the windows people don't have much.
 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Skip the Assignment 1.0 suggestion. It was not an important suggestion.
 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Quick typo "Use a radio button to to..." too many "to"s.
I think you are on the right track. I like it.
 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the PFE suggestion, mind if I say that you suggested it?
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note for assigment 1.6 : there is no primitive type(s) that can hold the result value. May be there is a reason to point out that student should use java.math.* classes ?

------------------
With best of best regards, Pawel S. Veselov ( aka Black Angel )

 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe I should mention something about floating point numbers. I was kinda hoping they would see the list of the first 31 squares and then the program would die. They would then start using "long" and get to 63 squares before the program would die. Then they would probably use "double".
Maybe my hint to them should be to direct them to one of the number formatting classes?
I was thinking about suggesting "a bag of grain has approximately one million grains". So that the last few squares can be done with bags instead of grains - but that kinda ruins the fun of the story.
 
Pawel Veselov
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would vote against using doubles in this assignment, since in my opinion, using doubles when there is only integers involved is bad style. And there is loss of precision: double result is 1.8446744073709552E19 and exact result is 18446744073709551615. From the other side, telling people to use BigInteger or BigDecimal can cause loss of sense of the joke. The king never supposed there is *this* large amount of grains, that he can never pay. So, fun is when user tries int, long, and then tell 'there is no way to do this'
May be it has sense to give a brief introduction to all types that are integer : primitive and java.math.*. And do it around very first assigments for it to be not obvious to realize what type should be used in 1.6.
And, er... what do you mean under 'number formatting classes' ? :-.
------------------
With best of best regards, Pawel S. Veselov ( aka Black Angel )

 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Number formatting classes: I'm away from my references right now, but there are classes that will take a number and spit out a pretty string. My thinking is that if I tell them they have to use it, they can switch over to using floating point. The floats won't have the precision, but the program will run.
Maybe I should say that a cup of grain is about 5000 grains and if when the amount exceeds 5000 grains, all measurements should be done in cups.
Or, maybe I could make a link that says "click here only when you get the integer too big exception".
What do you think?

 
Michael Finney
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't mind if you say I suggest PFE.
 
Pawel Veselov
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm.
Actually, you can divide this assigment for two. Or ask to write two different classes in this assigment. First, convert grain to cups. For example, define cup as 5000 grains, and ask to print number of cups and number grains, that don't make the full cup. And the second task to use just integers with reference to java.math.
One more idea -- ask student to use strings. Let'em do a calculation by theirselves with writing a method String addNum(String, String) that perform characeter addition.

------------------
With best of best regards, Pawel S. Veselov ( aka Black Angel )

 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the String math is a little more than I want this assignment to be at this time.
Breaking it into two assignments won't work either because I would still have to say how I wanted the output.
It seems that the best actual solution to the problem would be to use BigInteger. Maybe the hint I should provide with the assignment is "to complete this assignment, you will need to find a class in the Java standard library that you have not used yet. The search for this class is the real meat of this assignment!"
Kinda has that guy-sitting-on-mountaintop feeling to it, yes?
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I like that. One of the main things a course like this has to teach is how to use the documentation and find your way around other peoples class libraries. Without that a student could finish the course and be no better off in the real world.
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic