docs/master
view ch03.roff @ 13:9e17ad63f7f1
front: Reordered the text parts.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 21 Apr 2012 11:40:28 +0200 |
parents | dc2bfef4cda7 |
children | 55ec590cfa07 |
line source
1 .H0 "Work Report
2 .P
3 foo
4 .P
5 bar
7 .H1 "Removal of Code Relicts
8 .P
9 The code base of mmh originates in the late 70s, had been extensively
10 worked on in the mid 80s, and had been partly reorganized and extended
11 in the 90s. Relicts of all those times had gathered in the code base.
12 My goal was to remove any ancient code parts. One part of the task was
13 converting obsolete code constructs to standard constructs, the other part
14 was dropping obsolete functions.
15 .P
16 As I'm not even thirty years old and have no more than seven years of
17 Unix experience, I needed to learn about the history in retroperspective.
18 Older people likely have used those ancient constructs themself
19 and have suffered from their incompatiblities and have longed for
20 standardization. Unfortunately, I have only read that others had done so.
21 This put me in a much more difficult positions when working on the old
22 code. I needed to recherche what other would have known by heart from
23 experience. All my programming experience comes from a time past ANSI C
24 and past POSIX. Although I knew about the times before, I took the
25 current state implicitely for granted most of the time.
26 .P
27 Being aware of
28 these facts, I rather let people with more historic experience solve the
29 task of converting the ancient code constructs to standardized ones.
30 Luckily, Lyndon Nerenberg focused on this task at the nmh project.
31 He converted large parts of the code to POSIX constructs, removing
32 the conditionals compilation for now standardized features.
33 I'm thankful for this task being solved. I only pulled the changes into
34 mmh.
35 .P
36 The other task of dropping ancient functionality to remove old code,
37 I did myself, though. My position to strip mmh to the bare minimum of
38 frequently used features is much more revolutional than the nmh community
39 sees it. Without the need to justify my decisions, I was able to quickly
40 remove code I considered ancient. The need to discuss my decisions with
41 peers likely would have slowed this process down. Of course, I did research
42 if a particular feature really should be dropped. Having not had any
43 contact to this feature within my computer life was a first indicator to
44 drop it, but I also asked others and searched the literature for modern
45 usage of the feature. If it appeared to be truly ancient, I dropped it.
46 The reason for dropping is always part of the commit message in the
47 version control system. Thus, it is easy for others to check their
48 view on the topic with mine and possibly to argue for reinclusion.
50 .U2 "MMDF maildrop support
51 .P
52 I did drop any support for the MMDF maildrop format. This type of format
53 is conceptionally similar to the mbox format, but uses four bytes with
54 value 1 (\fL^A^A^A^A\fP) as message delimiter,
55 instead of the string ``\fLFrom\0\fP''.
56 Due to the similarity and mbox being the de-facto standard maildrop
57 format on Unix, but also due to the larger influence of Sendmail than MMDF,
58 the MMDF maildrop format had vanished.
59 .P
60 The simplifications within the code were only moderate. Switches could
61 be removed from tools like
62 .L packf ,
63 which generate packed mailboxes. Only one packed mailbox format remained:
64 mbox.
65 The most important changes affect the equally named mail parsing routine in
66 .L sbr/m_getfld.c .
67 The direct MMDF code had been removed, but as now only one packed mailbox
68 format is left, code structure simplifications are likely possible.
69 The reason why they are still outstanding is the heavily optimized code
70 of \fLm_getfld()\fP. Changes beyond a small local scope \(en
71 which restructuring in its core is \(en cause a high risk of damaging
72 the intricate workings of the optimized code. This problem is know
73 to the developers of nmh, too. They also avoid touching this minefield
74 if possible.
76 .U2 "UUCP Bang Paths
77 .P
78 More questionably than the former topic is the removal of support for the
79 UUCP bang path address style. However, the user may translate the bang
80 paths on retrieval to Internet addresses and the other way on posting
81 messages. The former can be done my an MDA like procmail; the latter
82 by a sendmail wrapper. This would ensure that any address handling would
83 work as expected. However, it might just work well without any
84 such modifications, as mmh does not touch addresses much, in general.
85 But I can't ensure as I have never used an environment with bang paths.
86 Also, the behavior might break at any point in further development.
88 .U2 "Hardcopy terminal support
89 .P
90 More of a funny anecdote is the remaining of a check for printing to a
91 hardcopy terminal until Spring 2012, when I finally removed it.
92 I surely would be very happy to see such a terminal in action, maybe
93 actually being able to work on it, but I fear my chances are null.
94 .P
95 The check only prevented a pager to be placed between the outputting
96 program (\fLmhl\fP) and the terminal. This could have been ensured with
97 the \fL-nomoreproc\fP at the command line statically, too.
99 .U2 "Removed support for header fields
100 .P
101 The `Encrypted' header had been introduced by RFC\^822, but already
102 marked legacy in RFC 2822. It was superseded by FIXME.
103 Mmh does no more support this header.
104 .P
105 `Content-MD5' headers were introduced by RFC\^1864. They provide only
106 a verification of data corruption during the transfer. By no means can
107 they ensure verbatim end-to-end delivery of the contents. This is clearly
108 stated in the RFC. The proper approach to provide verificationability
109 of content in an end-to-end relationship is the use of digital cryptography
110 (RFCs FIXME). On the other hand, transfer protocols should ensure the
111 integrity of the transmission. In combinations these two approaches
112 make the `Content-MD5' header field useless. In consequence, I removed
113 the support for it. By this removal, MD5 computation is not needed
114 anywhere in mmh. Hence, over 500 lines of code were removed by this one
115 change. Even if the `Content-MD5' header field is useful sometimes,
116 I value its usefulnes less than the improvement in maintainability, caused
117 by the removal.
121 .H1 "Paths to ...
122 .P
123 foo
125 .H1 "Path Notations
126 .P
127 foo
129 .H1 "Attachments
130 .P
131 foo
133 .H1 "Blind Carbon Copies
134 .P
135 foo
137 .H1 "Good Defaults
138 .P
139 foo
141 .H1 "Modularization
142 .P
143 foo
145 .H1 "Code style
146 .P
147 foo