Jim Butterfield of Commodore fame, published in... reddit / bbs ---------------------------------------------------------------------- SqualorTrawler · 2019-03-29 18:05 Volume 3, Number 16 21 April 1986 +---------------------------------------------------------------+ | _ | | / \ | | - FidoNews - /|oo \ | | (_| /_) | | Fido and FidoNet _`@/_ \ _ | | Users Group | | \ \\ | | Newsletter | (*) | \ )) | | ______ |__U__| / \// | | / FIDO \ _//|| _\ / | | (C) Copyright 1986 by IFNA (________) (_/(_|(____/ | | (jm) | +---------------------------------------------------------------+ Editor in Chief: Thom Henderson Chief Procrastinator Emeritus: Tom Jennings FidoNews is the official newsletter of the International FidoNet Association, and is published weekly by SEAdog Leader, node 1/1. You are encouraged to submit articles for publication in FidoNews. Article submission standards are contained in the file FNEWSART.DOC, available from node 1/1. The contents of the articles contained here are not our responsibility, nor do we necessarily agree with them. Everything here is subject to debate. Table of Contents 1. EDITORIAL Spaghetti Coding 2. ARTICLES Information needed on Fidonet compatible clones Automated File Relays Fido lives on a Zenith Z-100 3. COLUMNS Notes from Abroad The World of Computing: Copy protection and book reviews PC Week reviews ARC 4. WANTED Texarkana Regional Coordinator 5. FOR SALE Entertainment Software for your PC! Public Domain Software Library Sale!! Special Offer to FidoNet Sysops 6. NOTICES The Interrupt Stack FidoNet does NOT observe Daylight Savings Time Fidonews Page 2 21 Apr 1986 ================================================================= EDITORIAL ================================================================= Jim Butterfield Spaghetti Coding I recently received a letter from Syd Bolton, who was most enthusiastic about "free-form" programming. You know the sort of thing -- the first step is to turn the computer on. The next is to write a dozen lines or so; after that, decide what you want to do. Under no circumstances is any planning to take place before switching on, and work with pencil and paper is unthinkable. I'm overstating the case, of course. The point is -- and several writers have pointed this out lyrically -- it's great fun to horse around with code and see how (or if) you can get things to come out. I've even been quoted myself as saying that one of the marks of a virtuoso programmer is the ability to convince people that the program you ended up with was really what you intended to do in the first place, more or less. To put it poetically, it's a heck of a hacker who can hook the hawks of hoke code for hicks. Fooling around can be a lot of fun, whether you do it in school, at the beach, or while programming. If your object is to have a good time, go ahead, with my blessing. If your object is to have a good program, well... It's a lot of fun to eat a good meal: it's not so much fun to plan and prepare it beforehand, or to wash the dishes afterward. I suspect it's the same thing with programs. It's more fun to dive in and chop at the code: it's much less fun to plan before and document afterward. When I look at some programs, I sometimes wish that the programmer had worn a bib when writing it. I can see the litter of leftover and patched-up code in there. If you are writing a one-shot program for your own use, go to it. If it slugs away for two minutes and then reports ?SYNTAX ERROR IN LINE 5870, chop in a repair and run it again. And if the repair doesn't work, try another chop. If THAT doesn't work, sit down and think. Sound familiar? That's what you get when you hack at a program, and it can be lots of fun. But be aware that free flight coding does have its problems. Such as: (i) you drag the program out six weeks later and can't read it yourself; (ii) you make a small change and the whole thing collapses for no apparent reason; (iii) you give away or sell copies, and people phone you telling you things that don't work properly; (iv) your program wins a prize in "worst code of the year"; (v) somebody sends you a "cleaned up" rewrite of your program that uses one-third of the lines; (vi) you wrote it for ten provinces, and it turns out that it cannot be converted to fifty states without a total rewrite. Fidonews Page 3 21 Apr 1986 It's okay to write green slime coding. But keep in mind the following thoughts. If you want to publish or sell it, you'll also want to do massive cleaning up. Also, well-shaped coding gives you a good feeling; you feel proud of not just the program, but also the coding it contains. Moreover, if you get into trouble, you can scrap the old program and start over. When you rewrite it you may have nothing written down, but you'll have a plan: the organization of the program as you perceived it on the previous write. If you write "natcheral" code and enjoy it, and if your programs work, good for you! It's hard to knock a working program. But there's another factor: pride of workmanship. Sometimes you just feel good about a program that you have written. You may not know why, but you'd like to show the coding to others because the parts fit together so neatly. When this happens, it's usually a question of style. Often, you've solved a specific program in a general way. For example, you might have calculated the average value of five numbers, but you've done it in such a way that a minor change would perform the same calculation for a hundred values. You've gone from the specific task to a general solution, and that makes you a more powerful programmer. You might have heard a lot of talk about "structured", "goto-less", or "top-down" programming. These are essentially concerned with planning, rather than programming as such (although it's easy to be misled by the mechanics). Their general objective is to encourage you (or shove you) into creating a program that flows in an orderly way, rather than hopping around. A program should be something like a railway line, with main line, spurs, and sidings clearly identified; it shouldn't be like a city map with no clear path from one point to another. I see programs in which the programmer seems to have arrived in a maze of twisting little passages, all the same. You might think that you write only one line at a time, but it's not so. If you write FOR J=1 TO 10 in a program, you're engaged in planning ahead. You plan to repeat the next new statement ten times, and you've committed yourself to eventually writing a NEXT J. There's no such thing as truly barefoot programming -- your mind is always thinking a few lines ahead, and you're always planning. The real danger is to write IF X>10 GOTO 575 hoping that when you get to 575 you will have figured out what to do when X is greater than 10. But whether or not you admit to planning, whether or not you do more of it or less of it, do continue to have fun with your programming. And if you can break the rules and still come up with a neat program that works well, more power to you. Copyright (c) 1985 Jim Butterfield. Permission to reprint is hereby granted, provided this notice is included in the reprinted material. ----------------------------------------------------------------- Fidonews Page 4 21 Apr 1986 ---------------------------------------------------------------------- ezrobotim · 2019-03-29 19:02 What a nice man. Instead of bashing the "spaghetti coders," he gives grandfatherly advice on how to do better. Also, first good explanation on why you are told not to go down the path of "goto” programming. I always got my "why not" questions on this matter (though I always heeded the advice) answered with ambiguous hand-waving. (The curiosity stemmed from the fact that we had moved on to C from a jump&label- dependent Assembly.) Thanks for the post! ---------------------------------------------------------------------- vga256 · 2019-03-30 13:00 Syd Bolton? As in, the Syd Bolton who ran the Personal Computer Museum in Brantford, ON and passed away in 2018? :( If it was, he would have been 14 years old when he wrote this letter to Jim. RIP my friend. ---------------------------------------------------------------------- SqualorTrawler · 2019-03-30 17:30 Wow, I didn't even know who [Syd Bolton](https://en.wikipedia.org/wiki/Personal_Computer_Museum) was, so, possibly doubly interesting. ---------------------------------------------------------------------- vga256 · 2019-03-30 18:04 He was well known in the Canadian retro gaming & computing/collecting scene, and was a programmer for Digital Leisure (Dragon’s Lair) iirc