This is an old revision of the document!
Study Questions - Lucy Dip Creation
1. Copy the source of the questions and paste into Notepad++.
2. Remove the tag bit at the bottom.
3. In regular expression mode, replace
^====+.+====$
with nothing.
4. In extended mode, replace
/* --== Answer Question separator ==-- */
with
<html>\n </td>\n </tr>\n <tr>\n <td width="50%">\n</html>\n
5. In extended mode, replace
/* --== Question Answer separator ==-- */
with
\n<html>\n </td>\n <td width="50%">\n</html>
6. Replace the first html element with
<html> <table border="1" width="100%"> <tr> <td width="50%"> </html>
7. Add this to end
<html> </td> </tr> </html>
8. Select all and copy to the clipboard.
9. Goto http://tallguyracing.com/wiki/doku.php?id=playground:playground and edit.
10. Paste from the clipboard and save it.
11. Select it (including the RSS XML Feed etc buttons).
12. Open a new document in OpenOffice and paste the contents into it.
13. Set the Zoom to 73% (so that there are two pages per screen).
14. Delete all the crap at the top.
15. Load styles → Lucky Dip, Text + Pages + Overwrite.
16. Right click table → Table… → Text Flow tab → Untick Allow row to break…
17. For each page,
17.1. Put the cursor in the last row of the page.
17.2. Click the Insert Row button lots.
17.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.
17.4. Delete the blank cells.
18. 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.
19. Select everything and paste into the master StudyQuestions file.
Questions To Be Lucky Dipped
C4L5Q3: What are the three non-specialised, non-dictionary, non-generic collections and their generic equivalent?
Answer:
- ArrayList, equivalent to List<>.
- Queue, equivalent to Queue<>.
- Stack, equivalent to Stack<>.
PragC2Q16: What is code that glows in the dark?
Answer: Tracer code.
PragC2Q17: What are the four aspects of code that tracer code should share with production code and what is the one aspect that it should not?
Answer:
Shared: error checking, structuring, documentation and self-checking.
Not shared: Full functionality.
PragC2Q18: What are the five advantages of tracer code?
Answer:
- Users get to see something early.
- Develops a build structure to work in.
- Creates an integration platform.
- Creates something to demonstrate.
- Creates a better feel for progress.
PragC2Q19: What is the difference between tracer code and prototyping?
Answer: Prototyping generates disposable code. Tracer code is lean but complete and forms part of the skeleton of the final system.
C3L1Q2: In a regular expression, what is a lazy quantifier and how is one specified?
Answer: A lazy quantifier will match as little of the searched string as possible. A lazy quantifier is specified by adding a '?' symbol immediately after the quantifier.
C7L1Q11: What should the Thread.ThreadState property be used for?
Answer: Debugging only and not thread synchronisation.
C7L1Q12: Which thread state can a thread not return to once it has left it?
Answer: Unstarted
C7L1Q13: Which thread state can a thread not leave once it has entered it?
Answer: Stopped
C7L1Q14: Which thread state is a newly created thread in?
Answer: Unstarted
C7L1Q15: What happens to a thread's state when another thread calls Thread.Start on it?
Answer: At first, nothing. Then, when the thread responds to the call and actually starts running, it changes to Running.
C7L1Q16: What happens to a thread's state when another thread calls Thread.Suspend on it?
Answer: Thread.Suspend is depreciated and should not be used. But if it is, at first the thread's state changes to SuspendRequested. Then, when the thread responds to the call, it changes to Suspended.
C7L1Q17: What happens to a thread's state when another thread calls Thread.Abort on it?
Answer: At first the thread's state changes to AbortRequested. Then, when the thread responds to the call, it changes to Aborted.
C7L1Q18: What can trigger a thread to change its state to Running?
Answer:
- The thread responds to a Thread.Start call.
- Another thread calls Thread.Resume which is depreciated and should not be used.
- TODO: there may be a third.
C7L1Q19: How can a thread enter the WaitSleepJoin state?
Answer:
- The thread calls Monitor.Wait on another object.
- The thread calls Thread.Sleep.
- The thread calls Thread.Join on another thread.
PragC2Q20: What are seven types of things that are good to prototype?
Answer: Risky, untried, critical, unproven, experimental, doubtful or uncomfortable things.
PragC2Q21: What are six parts of a system that are good to prototype?
Answer:
- The architecture.
- New functionality in an existing system.
- The structure or contents of external data.
- Third-party tools or components.
- Performance issues.
- The user interface.
PragC2Q22: What are four aspects of coding that can, when appropriate, be ignored while prototyping?
Answer: Correctness, completeness, robustness and style.
C13L2Q3: What are the four options for generating a type library for COM?
Answer:
- Type Library Exporter (Tlbexp.exe)
- Using the TypeLibConverter class.
- Assembly Registration Tool (Regasm.exe)
- .NET Services Installation Tool (Regsvcs.exe)