This is an old revision of the document!
Table of Contents
Study Questions - Lucy Dip Creation
1. Copy the source of the questions.
2. Run the Lucky Dip Processor.
3. Goto http://tallguyracing.com/wiki/doku.php?id=playground:playground and edit.
4. Paste from the clipboard and save it.
5. Select it (including the RSS XML Feed etc buttons).
6. Open a new document in OpenOffice and paste the contents into it.
7. Set the Zoom to 73% (so that there are two pages per screen).
8. Delete all the crap at the top.
9. Load styles → Lucky Dip, Text + Pages + Overwrite.
10. Right click table → Table… → Text Flow tab → Untick Allow row to break…
11. For each page,
11.1. Put the cursor in the last row of the page.
11.2. Click the Insert Row button lots.
11.3. Copy and paste the all the cells on the first page to the second. Note that this will overwrite the cells, so if there are not some blanks leftover, undo and go back to 17.2.
11.4. Delete the blank cells.
12. Highlight the right columns of odd pages and the left columns of the even pages (inside ones if two pages are displayed at once), change the background colour to black. Also, look for numbered bullet lists in the right column of the even pages and reset the numbering.
13. Print. Set the Input Tray to Tray 1.
Questions To Be Lucky Dipped
C10L4Q8: What industry standard does the WMI use to represent systems, processes, networks, devices and enterprise components?
Answer: Common Information Model
C10L4Q9: The WMI architecture consists of what three tiers?
Answer:
- Client software components.
- The object manager.
- Provider software components.
C10L4Q10: What three things can applications use the WMI for?
Answer:
- Enumerating or retrieving a collection of instance property data.
- Querying for selected instance data.
- Subscribing to events.
C10L4Q11: What can the WMI instrumentation be used for?
Answer: Applications can create their own class and instances with properties and methods that store data about themselves to WMI.
C10L4Q12: What class or classes are used when gathering WMI class information?
Answer: ManagementObject and ManagementClass.
C10L4Q13: What class or classes are used when querying for data with WMI?
Answer: SelectQuery, ManagementObjectSearcher, WqlObjectQuery and ObjectQuery.
C10L4Q14: What class or classes are used when querying for data asynchronously with WMI?
Answer: ManagementObjectCollection and ManagementOperationObserver.
C10L4Q15: What class or classes are used when executing methods with WMI?
Answer: ManagementBaseObject.
C10L4Q16: What class or classes are used when executing methods asynchronously with WMI?
Answer: ManagementOperationObserver.
C10L4Q17: What class or classes are used when receiving events from WMI?
Answer: WqlEventQuery and ManagementEventWatcher.
C10L4Q18: What class or classes are used when receiving events asynchronously from WMI?
Answer: EventArrivedEventArgs, EventArrivedEventHandler, CompletedEventArgs and CompletedEventHandler.
C10L4Q19: What class or classes are used when connecting to a remote computer with WMI?
Answer: ConnectionOptions and ManagementScope.
C10L4Q20: What class or classes are used when creating data providers with WMI instrumentation?
Answer: Instance, InstrumentationClassAttribute and InstrumentedAttribute.
C10L4Q21: What class or classes are used when creating event providers with WMI instrumentation?
Answer: BaseEvent and Instrumentation.
C10L4Q22: What class or classes are used when registering a providers with WMI instrumentation?
Answer: ManagementInstaller.
C10L4Q23: What does the ObjectQuery class do?
Answer: It represents a management query that returns instances or classes.
C10L4Q24: What does the ManagementObjectSearcher class do?
Answer: It retrieved a collection of management objects based on a specifies query.
C10L4Q25: What does the ManagementObjectCollection class do?
Answer: It represents different collections of management objects retrieved through WMI.
C10L4Q26: Objects contained in a ManagementObjectCollection are derived from what type?
Answer: ManagementBaseObject.
C8L3Q8: What are three methods for starting a Windows service?
Answer:
- Server Explorer.
- Services Control Manager.
- Programmatically using the ServiceController class.
C8L3Q9: What exception will a ServiceController object throw if the service name does not exist on the machine?
Answer: InvalidOperationException.
C8L3Q10: What class is used to interact with Window services?
Answer: ServiceController.
C10L1Q3: What should never be done with any event log object?
Answer: It should never be passed to less trusted code.
C10L1Q4: What is required to create an event source and why?
Answer: Administrative privileges is required because all logs, including security, must be searched to determine whether the event source is unique.
C10L1Q5: Which versions of Windows do not support event logs?
Answer: Windows 98 and Windows Me.
Art1P23Q1: What is a package that has three other packages depending on it said to be?
Answer: Responsible to those three other packages.
Art1P23Q2: What is a package that depends on nothing said to be?
Answer: An independent package.
Art1P23Q3: What is a package that has no other packages depending on it said to be?
Answer: An irresponsible package.
Art1P23Q4: What is a package that has three other packages depending on it said to be?
Answer: A dependant package.
Art1P23Q5: What is a package that is independent and responsible to other packages said to be?
Answer: A stable package.
Art1P23Q6: What is an irresponsible, dependant package said to be?
Answer: An instable package.
Art1P24Q2: What is afferent coupling?
Answer: The number of classes outside the package that depend on classes inside the package.
Art1P24Q3: What is efferent coupling?
Answer: The number of classes outside the package that classes inside the package depend on.
Art1P24Q4: What is the formula for determining the instability of a package?
Answer: Instability equals efferent coupling divided by afferent coupling plus efferent coupling.
Art1P26Q1: What is the formula for determining the abstractness of a package?
Answer: Abstractness equals the number of abstract classes in the package divided by the total number of classes.
Art1P26Q2: What type of packages occupy the zone of uselessness?
Answer: Instable, abstract packages.
Art1P26Q3: What type of packages occupy the zone of pain?
Answer: Stable, concrete packages.
Art1P26Q4: What is the formula for determining the distance a package is from the main sequence?
Answer: The absolute value of the abstractness plus instability minus one.
Chapter 5: Bend or Break
PragC5Q1: What is the Law of Demeter?
Answer: Any method of an object should call only methods belonging to:
- itself,
- any parameters that were passed into the method,
- any object it created, or
- any directly held component objects.
PragC5Q2: What is the response set of a class?
Answer: The number of functions directly invoked by methods of the class.
Art1P21Q2: What design pattern should be used when a client type class directly depends on a server type class?
Answer: An Abstract Server.
Art1P21Q3: What is the Abstract Server design pattern and what is its advantage?
Answer: An Abstract Server is an abstract interface between a client and a server. Its advantage is that the abstract interface becomes a “hinge point” that design can flex around.
Art1P29Q1: What design pattern should be used when inserting an abstract interface is not feasible?
Answer: Adapter.
Art1P29Q2: What is the Adapter design pattern?
Answer: The Adapter is an object that implements the abstract interface to delegate to the server. Every method of the adapter simply translates and then delegates.
PragC5Q3: What is Levy's Eighth Law?
Answer:
“No amount of genius can overcome a preoccupation with detail.”
PragC5Q4: What type of diagram can be used to determine temporal coupling?
Answer: A UML activity diagram.
PragC5Q5: What should be analysed to improve concurrency?
Answer: Workflow.
Chapter 6: While You Are Coding
PragC6Q1: What are three examples of programming by coincidence?
Answer:
- Accidents of implementation.
- Accidents of context.
- Implicit assumptions.
PragC6Q2: What should you do if something seems to work?
Answer: Make sure it isn't just a coincidence.
PragC6Q3: What is the problem with the building metaphor of software development?
Answer: Buildings are not normally refactored.
PragC6Q4: What are four reasons for refactoring?
Answer:
- Duplication (violation of the DRY principle).
- Non-orthogonal design.
- Outdated knowledge.
- Performance.
PragC6Q5: What are Martin Fowler's three tips on refactoring?
Answer:
- Don't refactor and add functionality at the same time.
- Make sure there are good tests beforehand.
- Take short, deliberate steps.