Morten Søndergaard NET
Den gode digter Morten Søndergaard har for ikke så frygtelig lang tid siden bygget sig et hjem på nettet.
Om Per Aage Brandts poesi
Tilbage i 2004 lavede jeg et udvalg af Per Aage Brandts poesi (Borgens forlag). Her er min efterskrift fra denne udgivelse:
Poesi og programmering
På http://www.indiauncut.com/iublog/article/vs-naipauls-advice-to-writers-rules-for-beginners/ har en vis Amit Varma citeret VS Naipauls skriveregler for begyndere.
De følger nedenfor, og er udmærkede simple tommelfingerregler. Grunden til at jeg opregner dem, er nu ikke at jeg har lyst til at diskutere dem, men at en vis Paul Vick (http://panopticoncentral.net/2011/05/16/seven-rules-for-beginning-programmers/) med simple indgreb har justeret reglerne så de nu handler om programmering.
Som en der har beskæftiget sig professionelt med både programmering og poesi (og anden litteratur), synes jeg det er er sjovt at samle på den slags, jeg mener citater der påpeger eller demonstrerer lighederne imellem disse to domæner.
VS Naipaul’s Rules for Beginners
1. Do not write long sentences. A sentence should not have more than ten or twelve words.
2. Each sentence should make a clear statement. It should add to the statement that went before. A good paragraph is a series of clear, linked statements.
3. Do not use big words. If your computer tells you that your average word is more than five letters long, there is something wrong. The use of small words compels you to think about what you are writing. Even difficult ideas can be broken down into small words.
4. Never use words whose meaning you are not sure of. If you break this rule you should look for other work.
5. The beginner should avoid using adjectives, except those of colour, size and number. Use as few adverbs as possible.
6. Avoid the abstract. Always go for the concrete.
7. Every day, for six months at least, practice writing in this way. Small words; short, clear, concrete sentences. It may be awkward, but it’s training you in the use of language. It may even be getting rid of the bad language habits you picked up at the university. You may go beyond these rules after you have thoroughly understood and mastered them.
Seven Rules for Beginning Programmers
May 16, 2011 by paulv Leave a Comment
A little while ago Phil Wadler posted “VS Naipaul’s Rules for Beginners,” listing the famous author’s seven rules for beginning writers. Upon reading them it occurred to me that, with a little adaptation, they could equally apply to beginning programmers. So, with apologies to Mr. Naipaul, here are my “Rules for Beginners:”
1. Do not write long procedures. A procedure should not have more than ten or twelve lines.
2. Each procedure should have a clear purpose. It should not overlap in purpose with the procedures that went before or come after. A good program is a series of clear, non-overlapping procedures.
3. Do not use fancy language features. If you’re using something more than variable declarations, procedure calls, control flow statements and arithmetic operators, there is something wrong. The use of simple language features compels you to think about what you are writing. Even difficult algorithms can be broken down into simple language features.
4. Never use language features whose meaning you are not sure of. If you break this rule you should look for other work.
5. The beginner should avoid using copy and paste, except when copying code from one program they have written to a new one they are writing. Use as few files as possible.
6. Avoid the abstract. Always go for the concrete. [Ed. note: This one applies unchanged.]
7. Every day, for six months at least, practice programming in this way. Short statements; short, clear, concrete procedures. It may be awkward, but it’s training you in the use of a programming language. It may even be getting rid of the bad programming language habits you picked up at the university. You may go beyond these rules after you have thoroughly understood and mastered them.