• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Hundred (1a) Stupid Question

 
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
should i worry about how long the instructor's code is vs. my solution? i can produce the required output with 10 lines (no blanks, yet) but they say 20 lines...
i cannot see the need for anymore code here, but i do not want to turn it in and get blasted for screwing up such a simple program... i am converting from c++ so maybe that is my problem.
i saw the note that says their length is just a reference, but my code is 1/2 as long... does their length include comments?

[This message has been edited by Greg Harris (edited April 21, 2001).]
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the drive Greg!
I'm currently working on Java-4a Say.
Here's my take based on the nits I've had.
I think the size of the instructor's code is more relevant when your solution is noticeably bigger. The KISS principle is weighted heavily here, so if your solution is bigger you might be able to find a better initial solution.
As for Java-1a Hundred, my solution included 4 lines of comments in the way of the file Header, 4 blank lines, and 11 lines of code.
The goal of assignment Java-1 Hundred is to make you use the style guide. Watch your spacing!

Mike
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
mike,
thanks! i over-analyze everything, so i know i am making this more difficult than it is.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I'm looking for is clean, elegant, easy to understand solutions. Focus on that. Not on line count.

The question is not stupid, and you are not stupid for asking it.


[This message has been edited by Marilyn deQueiroz (edited April 22, 2001).]
 
Ranch Hand
Posts: 3143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A tutor of mine once told me something that I have always held true since
There are no stupid questions, just stupid answers.
So ask away, no matter how stupid you think your question is, you can almost guaruntee that somebody else will also be wondering about the same thing.
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks to all for the replies and encouragement!
by the way, i passed 1a on the first try... so on to 1b.
greg
 
tumbleweed
Posts: 5089
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1st try well done Greg
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic