This is an old revision of the document!
Table of Contents
Study Questions - Audio Creation
CDEx Settings
Bitrate = 80 kbps
Mono
Quality = Very high (q = 0)
Questions To Be Recorded
Lesson 4: Detecting Management Events
C10L4Q1: What are the four most important members of the System.Management namespace?
Answer: ManagementQuery, EventQuery, ObjectQuery and ManagementObjectQuery.
C10L4Q2: What does WMI stand for?
Answer: Windows Management Instrumentation.
C10L4Q3: What are the two steps to retrieve information from the WMI?
Answer:
- Create a ManagementObjectSearcher object and pass the query into the constructor.
- Obtain a ManagementObjectCollection object by calling the ManagementObjectSearcher's Get method.
C10L4Q4: What needs to be selected from to enumerate the logical drives?
Answer: Win32_LogicalDisk
C10L4Q5: What needs to be selected from to enumerate the network adapters?
Answer: Win32_NetworkAdapterConfiguration
C10L4Q6: What needs to be selected from to enumerate the Windows Services?
Answer: Win32_Service
C10L4Q7: What class would be used to respond a change in the WMI?
Answer: ManagementEventWatcher
Lesson 1: Understanding Code Access Security
C11L1Q1: What does CAS stand for?
Answer: Code Access Security.
C11L1Q2: What is the relationship between evidence, code groups and permission sets?
Answer: The evidence that an assembly has determines what code group or groups it belongs to. The code group or groups determines what permission set or sets it gets.
C11L1Q3: What are the two types of evidence?
Answer: Host evidence and assembly evidence.
C11L1Q4: What are the three CAS policy levels and which one would you most commonly use?
Answer: Enterprise, machine and user. Machine policy is the most commonly used.
C11L1Q5: What must an assembly have to increase its trust?
Answer: A strong name.
C11L1Q6: As a developer, the permission set assigned to the My_Computer_Zone should be changed from what to what?
Follow up question: Why should it be changed?
Answer: From “Full Trust” to “Everything”.
Follow up answer: Full Trust completely skips all CAS statements in code. The Everything permission set has similar permissions, but it does not skip CAS statements.
C11L1Q7: What is the command line utility for maintaining CAS settings?
Answer: Caspol.exe - Code Access Security POLicy tool.
Lesson 2: Using Declarative Security to Protect Assemblies
C11L2Q5: What are the three SecurityActions?
Answer: RequestMinimum, RequestOptional and RequestRefuse.
C11L2Q6: CAS declarations are in what type of assemblies?
Answer: Fully trusted assemblies (or assemblies with the Full Trust permission set).
Pragmatic Programming
PragC2Q5: What is Meyer's Uniform Access principle?
Answer:
“All services offered by a module should be available through a uniform notation, which does not betray whether they are implemented through storage or through computation.”
or
“Class properties are good.”
PragC2Q6: What are two techniques for avoiding or reducing inadvertent duplication?
Answer: Normalise the data and don't store what can be calculated.
PragC2Q7: What should be done if the DRY principle needs to be violated for performance reasons?
Answer: Ensure the violation is not exposed to the outside world by keeping it contained with in the class.
PragC2Q8: How do you avoid impatient duplication?
Answer: Discipline.
PragC2Q9: What adage relates to impatient duplication?
Answer:
“Short cuts make for long delays.”
PragC2Q10: What is orthogonality?
Answer: Independence or decoupling.
PragC2Q11: What are the two major benefits of orthogonality?
Answer: Increased productivity and reduced risk.
PragC2Q12: How can you get an informal measurement of how orthogonal a team is?
Answer: Determine how many people need to be involved in discussing each change that is requested. The less people, the more orthogonal and better off the team is.
PragC2Q13: How can low orthogonality affect a team?
Answer: Confusion over responsibilities leading to bickering.
Life Questions
LifeQ3: What is the effect / affect usage mnemonic?
Answer: VANE - Verb Affect Noun Effect
Article 1: Design Principles and Design Patterns, Robert C. Martin
Art1P4Q3: What is the Open Closed Principle and who came up with it?
Answer:
“A module should be open for extension, but closed for modification.” - Bertrand Meyer
Art1P5Q1: What is the key to the OCP?
Answer: Abstraction.
Art1P8Q1: What is the Liskov Substitution Principle and who came up with it?
Answer:
“Subclasses should be substitutable for their base classes.” - Barbara Liskov
Art1P8Q2: What is the canonical example of the subtleties of the LSP?
Answer: The Circle / Ellipse dilemma.
Art1P12Q1: Violations of the LSP are also what?
Answer: Violations of the OCP.
Art1P12Q2: What is the Dependency Inversion Principle?
Answer:
“Depend on abstractions. Do not depend on concretions.”