This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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 ]
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. ;-)
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Jan 24, 2004
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