• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

trivial program definition

 
Antoine Waugh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey there,
despite having my scjp, and using this term commonly, i would like to know other's definition and interpretation of a 'trivial program'
is it one in which we simply see as straight forward, or its methods are consisted of purely set and get functionality?
all comments welcome!
-twans
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a lot of cases saying it's "a trivial program" is "hand waving". Usually because the speaker cannot define the problem even. Even simple problems give rise to non-trivial programs. What's trivial to you may not be trivial to me (and vice versa). Or even trivial to you again 6 months later.
I would perhaps use the term for a "throw-away" program, that is use once, use its result, and forget it:

Could do it in less using Python
[ May 12, 2004: Message edited by: Barry Gaunt ]
 
fred rosenberger
lowercase baba
Bartender
Posts: 12143
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's the thing about trivia - if you know it, it's trivial. if you don't, it's hard, irrelevant, impossible, dumb... I got to a lot of "trivia nights", and hear this sort of thing ofter.
Java is the same way. a "helloWorld" program would not be trivial to my wife, who has no java (or any programming language) skills, but it is to me.
I know a guy who would consider implementing a database transaction manager as trivial, whereas i would have no idea where to start.
I guess my point is that i don't think there is (pardon the pun) a trivial answer to your question.
;-)
 
Antoine Waugh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i completely agree with both your responses;
and i helped a friend doing his Bach Comp. Sci with a java project. It claimed that 1 of 3 classes handed in was 'trivial'; and thus he was unable to acheieve a distinction.
My argument is:
If a class/objects fulfil their criteria, and purpose, then there is no need (even in an acedemic sense) to make things more complicated than they need to be.
Understandibly if a solution is handed in which is 'trivial' for most java programmers, i.e. too simple; then i agree with the criteria limiting that person to a pass mark maximum. However, if the assigned problem is 'trivial' in the first place; there is only a degree to how complex you can make it, before breaking fundamental oop techniques and ideology.
Thanks for your responses, and i am in complete agreement. If only the University of Sydney saw the difference between a working solution and that of a 'trivial' one.
-twans
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Trivial may mean not complex enough to warrant certain levels of design or object quality. Or is that throwaway?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic