QUESTIONS AND CORRECT DETAILED ANSWERS WITH
RATIONALES (VERIFIED ANSWERS) |AGRADE
What is a set of in-memory entities called? - ANSWER: Bundle
How to add to writable bundle? - ANSWER: add () method
What is the best practice for querying? - ANSWER: Filter at database, not in memory
Where do you place code required for screen operations? - ANSWER: UI helper class
How many blank lines are added after methods? - ANSWER: 2 blank lines
How many spaces are logical blocks of code indented by? - ANSWER: 2 spaces
gwb gosudoc - ANSWER: What is the command to generate Gosu documentation?
{ } - ANSWER: What surrounds logical blocks of code?
How do you insert comments? - ANSWER: // or /** insert comment here /*
What should you use instead of varchar(xx)? - ANSWER: shorttext, mediumtext, or
longtext
How do you name packages? - ANSWER: short name that will apply in the future that
defines project or customer
How do you name subpackages? - ANSWER: based on feature NOT function (ex:
si.bc.check)
How do you name classes? - ANSWER: upper camel case + single noun / adjective
How do you name Interfaces? - ANSWER: upper camel case + primary thing it
describes
How do you name functions? - ANSWER: lower camel case + noun for most (is +
adjective for Boolean)
How do you name constants? - ANSWER: All caps + an underscore separating words
How do you name enumerations? - ANSWER: upper camel case
How do you name member variables? - ANSWER: underscore followed by name in
lower camel case
, How do you name local variables? - ANSWER: lower camel case + short name
describing purpose
How do you name new display keys? - ANSWER: add _Ext suffix
How do you name custom PCFs? - ANSWER: add _Ext suffix
What is a GUnit test? - ANSWER: fastest, easiest, cheapest way to run repeatable
tests
What types of code can GUnit tests be used on? - ANSWER: any Gosu code: both
configuration and integration
What is the XXServerTestClassBase used for? - ANSWER: tests that require a running
server
What is the XXUnitTestClassBase used for? - ANSWER: tests that do not require
running server
How should tests be organized? - ANSWER: by packages and classes, feature suites
What should test packages be created for? - ANSWER: features
What should test classes be grouped by? - ANSWER: feature
How should classes be named? - ANSWER: to communicate context
How should test classes be named? - ANSWER: When + gerund phrase (verb + ing) +
Test
How should test functions be named? - ANSWER: testThat +
CodeProducesThisBehavior
What are the 3 conceptual sections within a function? - ANSWER: Given, When, Then
What are the assert equals passes and in what order? - ANSWER: 1. failure reason 2.
expected value 3. actual value
What does logging do? - ANSWER: recording application actions and state to a
secondary interface, used for troubleshooting
What events are used for logging? - ANSWER: Success / Failure, recovery,
identification
What is the logging level set to in production? - ANSWER: INFO
What is a logger? - ANSWER: a logical file name that encapsulates a logging category