]> Lady’s Gitweb - Blog/blob - 2023-12-17/programming_resolutions_24/#entry.rdf
[2023-12-17] programming_resolutions_24
[Blog] / 2023-12-17 / programming_resolutions_24 / #entry.rdf
1 <awol:Entry
2 xml:lang="en"
3 xmlns:awol="http://bblfish.net/work/atom-owl/2006-06-06/"
4 xmlns:dc11="http://purl.org/dc/elements/1.1/"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6 xmlns:sioc="http://rdfs.org/sioc/ns#"
7 >
8 <dc11:title>Programming Resolutions for 2024</dc11:title>
9 <dc11:date>2023-12-17T23:48:33-05:00</dc11:date>
10 <dc11:abstract rdf:parseType="Markdown"><![CDATA[
11 A set of resolutions for the upcoming year which I think are important
12 to ensure that the output of the work that I do is humane, use·ful,
13 and generally in·line with my ethical and esthetic sensibilities.
14 Many of these stand in sharp contrast to current trends within
15 computing, and the resolutions would hardly be meaningful otherwise.
16 ]]></dc11:abstract>
17 <sioc:content rdf:parseType="Markdown"><![CDATA[
18 The following are a set of resolutions for the upcoming year which I
19 think are important to ensure that the output of the work that I do
20 is humane, use·ful, and generally in·line with my ethical and
21 esthetic sensibilities.
22 (I some·times use the spelling <i>prrgrrmmng</i> to distinguish
23 programming of this form from other kinds.)
24 Many of them stand in sharp contrast to current trends within
25 computing, and the resolutions would hardly be meaningful otherwise.
26
27 It is also worth noting that many of these are things that I am already
28 doing, but I’m recording them here in the hopes that others might
29 find them use·ful as well.
30
31 ## Resolution ①: Commit to Unix Philosophy
32
33 This resolution comes first because it is foundational to the approach
34 I take with software projects.
35 Different people have different understandings of what “Unix
36 philosophy” means, so I want to be clear about it here :⁠—
37
38 01. **Programs should be scoped as tightly as possible;** they should
39 do as few things as possible while still providing the necessary
40 flexibility for complex operations.
41
42 02. **Programs should read from `stdin` and write to `stdout`.**
43 How this happens may be adjusted with commandline flags, but the
44 vast majority of information should be provided in‐band through
45 `stdin`/`stdout`/`stderr` and not through some other mechanism.
46
47 03. **The input and output of programs should follow common conventions
48 and standards,** so that both are easy for other programs to
49 replicate and process.
50
51 04. **Programs should be built to combine with other programs** in ways
52 that significantly increase their potential.
53
54 05. **Programs which aren’t broken should not be fixed.**
55 Instead, new programs should be written which provide missing
56 features.
57
58 What Unix philosophy brings to the table, to my eye, is really _a
59 different mindset around dependency management_.
60 In contemporary programming, dependency management is typically thought
61 of in terms of Semver‐versioned package sources and a package manager
62 which resolves them appropriately.
63 These packages are then included in the project which makes use of
64 them.
65
66 Under the Unix philosophy, in contrast, dependencies come not in the
67 form of packages but a·p·i’s.
68 This means :⁠—
69
70 - **The burden is on users to provide programs** which support the
71 necessary a·p·i’s, but in contrast, **any program which supports
72 the necessary a·p·i’s can be used** (e·g Free·B·S·D _or_ F·S·F).
73
74 - **Dependencies are replace·able piece·meal** as new versions come
75 along, and conversely, **dependencies which “just work” can remain
76 in place** for years.
77
78 - **Newer programs and implementations can be easily turned into a
79 replacement for older programs and implementations** by just
80 applying appropriate transforms on the input and output (and,
81 potentially, vice·versa).
82
83 - Instead of needing to manage one dependency tree for programs
84 written in Ruby and another for programs written in Swift, **the
85 same dependency can be used in all applications across languages,**
86 because all languages provide the ability to read from `stdin` and
87 write to `stdout`.
88
89 I don’t want to criticize package managers too harshly, but I don’t
90 think that language‐specific package managers are a good solution for
91 personal computing, and I don’t think learning five different a·p·i’s
92 across five different programming languages is helping any·one.
93 People writing personal scripts or doing highly‐individualized
94 computing cannot afford to constantly be interfacing with package
95 managers to ensure that every one of the dependencies for every one
96 of their scripts is up·to·date.
97 **Make small, reliable programs with common interfaces that any·one can
98 use,** and **depend on existing a·p·i’s with multiple
99 implementations,** not strictly‐versioned, single‐language packages
100 where possible.
101
102 ## Resolution ②: Commit, Also, to the Web
103
104 The Unix philosophy works well for programs being run on one’s own
105 personal computer, but it doesn’t necessarily map well to networked
106 technologies over the internet.
107 For these, thankfully, we have the [philosophy of the
108 Web][WEBARCH] :⁠—
109
110 01. **The Web is a network of _resources_, named via _global
111 identifiers_ and accessible via _U·R·L’s_.**
112
113 - The global identifiers should have the form of I·R·I’s and,
114 ideally, should be persistent and unique across space and time.
115
116 - U·R·L’s and I·R·I’s should be human‐readable and transcribable,
117 but should not encode unnecessary information or information
118 which is liable to change.
119
120 - U·R·L’s should not change unnecessarily.
121 When they do change, having separate, persistent identifiers
122 helps to rediscover the resource at its new location.
123
124 02. **Resources should be retrievable in common formats using common
125 protocols.**
126
127 - Common formats include H·T·M·L, X·M·L, and Json.
128 Specialized forms of resource may allow other formats, for
129 example N·Triples or Turtle for metadata resources, in line
130 with community practice.
131
132 - Plain, stateless H·T·T·P(·S) requests should be used to access
133 resources when·ever possible.
134
135 03. **Resources should be designed in a way so as to maximize their
136 utility to the person accessing it.**
137 They should be readable and processable without any specialized
138 tools.
139 They should conform to community standards for information
140 representation.
141
142 04. **Resources should link to other, related resources by U·R·L.**
143 Put together, linking, common formats and protocols, and U·R·L’s
144 provide a similar level of functionality to that of reading and
145 writing from standard input in Unix.
146 They enable the creation of complex user‐agents which operate by
147 processing and combining a number of simpler resources.
148
149 **Follow web philosophy whenever publishing documents or data.**
150 This is often the easiest, and most boring, solution to online
151 publishing.
152 **[Be boring.][CPM]**
153 **Shift the focus from making interesting protocols to making
154 interesting _tools_** which _use_ those protocols.
155
156 ## Resolution ③: Write for the Future
157
158 If what was popular in technology never changed, it would mean that
159 technology culture had reached a stale·mate, which would probably be
160 a bad thing.
161 Instead, **assume that what is popular today may not be popular
162 tomorrow.**
163 This probably means that popularity is not actually a very good
164 indicator of which technology a person should use, unless that person
165 is very committed to redoing all of their work every five‐or‐so
166 years.
167
168 Popular technologies change, but old data remains, and if one wants
169 that data to remain accessible and useful, that means one needs to
170 construct it in such a way so as to not break in the absence of the
171 current technological fads.
172 **Use formats which can be analysed with tools that are proven to be
173 durable,** and converted from there to more contemporary formats as
174 necessary.
175 **Write programs which can be run in the absence of current
176 technological infrastructure,** for example specific iterations of a
177 particular package manager or versioning scheme.
178
179 If everything new eventually becomes old, then in five years it will
180 not matter whether a program was written using new technologies or
181 not.
182 However, what _will_ matter is whether the program still runs and is
183 useful.
184 **Use that perspective as a baseline** when making decisions regarding
185 program architecture and a·p·i.
186 Contemporary problems will persist for as long as there is
187 contemporaneous data, so **build solutions for contemporary problems
188 and contemporary data which can persist alongside them.**
189
190 ## Resolution ④: Capture the Current Moment
191
192 A good program might remain useful for many years.
193 That makes programs, in a sense, transmitters of history (a fact which
194 any·one who has ever read the phrase <i>for historical reasons</i>
195 knows well).
196 How·ever, programs rarely bother to encode their _social_ history
197 alongside the technical.
198
199 I think this is a loss of radical potential, but also a loss of a
200 chance to invest in programs as a site of human connection and
201 understanding.
202 For all of history, humans have decorated the tools they use with
203 symbols and meaning; tools are in fact, generally, an important part
204 of material culture.
205 But despite this, computer tools have typically only been decorated in
206 the most banal of ways (branding).
207 The _internals_ of programs (their structures, variable names, source
208 code comments) could be records of much more than just a dry series
209 of technical decisions—if we were willing to invest in them as
210 social objects and not merely objects of science.
211
212 **Don’t write “timeless” programs, write programs which can be
213 understood in any time** because they encode the human
214 particularities of living in the world in the year and place in which
215 they were written.
216 **View programs as instances of instrumental culture** which _not only
217 might be decorated_ (the same as one might carve an image into a
218 bench, or embroider a picture onto a pillow) but whose _very
219 construction is social_ (akin to choosing fabric patterns and designs
220 for a quilt).
221 **Recognize these aspects of programs as not merely “esthetic”, but
222 also conveyors of historical, cultural, or political meaning;**
223 endow them with symbols accordingly.
224
225 ## Resolution ⑤: Compute Less, Transform More
226
227 There are times when computers actually need to do computing.
228 But much of the time, computers are used simply to access and present
229 data.
230 If data is accessible in form $A and simply needs to be presented in
231 form $B, this is a problem of _data transformation_ not a problem of
232 _computing_ per·se.
233
234 Json is a good data structure for accessing information for computing
235 but it is a bad data structure for accessing information with the
236 intent to transform it into something human‐readable.
237 X·M·L and s·expressions, on the other hand, are trivially
238 transformable, and X·M·L in particular is home to a variety of
239 human‐friendly destination formats.
240 Consequenty, for data which is intended for human consumption, **use
241 X·M·L, or use a language with a straightforward transformation into
242 X·M·L.**
243 **Do not use bespoke Json syntaxes** which require specialized tools
244 to process or display.
245 **Do not use abbreviated, context‐specific formats** which are easily
246 separated from the contexts needed to interpret them correctly.
247
248 **Assume all data is intended for human consumption** because all
249 programs should be written by humans and for the benefit of humans.
250 **Always have a plan for formatting data** in a human‐readable manner.
251
252 ## Resolution ⑥: Collaborate Socially or Not at All
253
254 Much of the current open‐source tech world is currently focused on the
255 problem of how to drop the social barrier for software collaboration
256 to be as low as possible.
257 Personally, I think that asocial collaboration leads to asocial
258 software.
259 And in my experience, [typically these sorts of “open” projects are in
260 fact entirely closed][TYRANNY] to ideas and contributions which do
261 not align with their pre·existing agendas, because there is no social
262 structure by which needs can be negotiated or meaningful pressure
263 applied.
264
265 **_Require_ social interaction** for collaboration with one’s software.
266 **Make it clear from the outset who is responsible** for addressing
267 public concerns, and **require that the public address _that person_
268 or _those people_** specifically.
269 **Have communication channels** for frequent collaborators, and **put
270 those channels in a place where those collaborators feel welcome**
271 and able to contribute.
272 **Have an onramp** for interested persons to get more involved;
273 **invite people who give a shit** to give a shit formally.
274
275 **Don’t use faceless ticketing platforms** where strangers shout into
276 the void in the hopes that some·one with power will see their post
277 and agree.
278 **Don’t erase power differences** between maintainers, leads,
279 collaborators, and the general public.
280 **Stop participating in spaces** which don’t know how to manage their
281 communities or don’t perceive themselves as having communities _to_
282 manage.
283 **Make a hard exit** when projects respond to suggestions only with
284 opinions, and never questions.
285
286 ## Conclusion
287
288 Obviously, the resolutions in this post are probably impossible to
289 fully implement with every program I work on or every line of code I
290 make—especially when those programs or code are being written within
291 constraints set by somebody else.
292 However, I think they are a useful aspiration and yardstick against
293 which to measure the things I make.
294 These yardsticks are use·ful, of course, as people who make things and
295 want to make things better.
296 If you also write computer programs, I’d be interested in hearing how
297 yours compare.
298
299 [CPM]: <https://www.aaronland.info/weblog/2021/11/12/continuous/> "Continuous Partial Mythologies"
300 [TYRANNY]: <https://www.jofreeman.com/joreen/tyranny.htm> "The Tyranny of Structurelessness"
301 [WEBARCH]: <https://www.w3.org/TR/webarch/> "Architecture of the World Wide Web, Volume One"
302 ]]></sioc:content>
303 <dc11:rights rdf:parseType="Markdown"><![CDATA[
304 Copyright © 2023
305 <a href="https://www.ladys.computer/about/#lady">Lady</a>
306 <small>[Prrgrrmmrr; Grrl]</small>.
307 Some rights reserved.
308
309 This blogpost is licensed under a <a rel="license"
310 href="http://creativecommons.org/licenses/by/4.0/"><cite>Creative
311 Commons Attribution 4.0 International License</cite></a>.
312 ]]></dc11:rights>
313 </awol:Entry>
This page took 0.203085 seconds and 5 git commands to generate.