Functions, styles, breaking the rules.

A while back, I developed an obsession with writing styles, while examining narratives and language models. While numerous books have been written about various styles of narration and the development of a unique personal style, my interest stemmed from a computational standpoint. The computational aspect focuses on repeatability, seeking patterns and invariants that can be transformed into algorithms. Ultimately, the question arises: can we impart this knowledge to a computer?

Present-day language models excel at mimicking styles remarkably well. You can ask one to emulate the writing of a renowned figure like Dostoyevsky, and the results are astounding. Essentially, the large language model predicts the next word while considering certain parameters like temperature (variance) and length limitations. Nevertheless, style encompasses more than merely forecasting word sequences or their co-occurrence.

Allow me to provide an example. Some time ago, I heard a Professor elucidate the components of precise technical writing for papers and reports. Technical writing, being the most monotonous and meticulous form of expression, naturally demands a methodical approach. He likened good technical writing to functional programming. Yet, what does this truly signify? Let’s go simple and look at the atomic unit , a function. A function in code appears as follows: It begins with a descriptive name indicating its purpose, followed by a signature that specifies the inputs and outputs. Subsequent lines retrieve data and establish variables, while the final few lines execute the core logic. The last line returns the output.

A well-crafted technical paragraph adheres to a similar structure: an opening sentence introducing the topic, followed by a signature. Then, we delve into the context surrounding the main point. The subsequent lines address the crux of the matter, and the concluding line either concludes the thought or serves as a transition to the next. What then, is a chapter? It is but a composition of these functional paragraphs. According to him, well written technical chapters, essays, and articles are essentially a collection of such functions, presented linearly for reader convenience. It is simple, boring, repeatable , almost lacks art.

Interestingly, I discovered this style permeating across genres: literature, science fiction, drama, and suspense. Authors undoubtedly exercise creative freedom when structuring paragraphs, just as programmers do while writing code. Yet, in writing they can break these rules more playfully and make their own rules as writing doesn’t have to strictly compile. From my analysis, well-known authors who deviate from this rule are not striving for precision; their style flows freely, akin to a stream of consciousness, almost poetic (exemplified by Milan Kundera). However, defying the fundamental principles of writing can render one’s work more challenging to comprehend, potentially defeating the purpose of writing itself. Therefore, true art probably lies in the middle ground , embracing these writing conventions, sometimes intuitively, while venturing beyond them, all while preserving coherence and readability. The art of imitation can be mastered, as ChatGPT aptly demonstrates. Nevertheless, it is this dance between being respectful to the rules and bending them is where your distinctive personal touch lies, possessing the capacity to be both delightful and provocative.