Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Wednesday, March 04, 2026

Featured Links - March 4, 2026

Links to things I found interesting but didn't want to do a full blog post about.

Tuesday, October 14, 2025

Featured Links - October 14, 2025

Links to things I found interesting but didn't want to do a full blog post about.

Lake Ontario with a rocky shore and grey waves glinting in a patch of sunlight
A grey Lake Ontario

Monday, April 07, 2025

Featured Links - April 7, 2025

Links to things I found interesting but didn't want to do a full blog post about.

A floor-cleaning robot
A floor-cleaning robot

Monday, March 10, 2025

Featured Links - March 10, 2025

Links to things I found interesting but didn't want to do a full blog post about.

Interior of Koerner Hall from the balcony behind the stage
Koerner Hall

Monday, November 18, 2024

Featured Links - November 18, 2024

Links to things I found interesting but didn't want to do a full blog post about.

The marina waiting for winter

  • How to Stay Covid Safe When in Hospital. "A guide to navigating the risk of hospital acquired Covid - as well as how to manage overall risk of nosocomial infections and hospital derived complications." Reading this article may save your life.
  • Civil rights icon Ruby Bridges Hall discusses Norman Rockwell's famous painting. "Ruby Bridges became a civil rights icon when she was 6. Yet she didn't realize it for decades. The world knows her as the little girl in Norman Rockwell's famous 1963 painting, The Problem We All Live With, a black child being escorted to a white New Orleans school by federal marshals."
  • What Is RSS? If you aren't using an RSS reader, you're online life is a lot more complicated than it needs to be. I use Feedly and would have a hard time living without it.
  • In Memoriam: Thomas E. Kurtz, 1928–2024. Kurtz was the co-inventor of BASIC, arguably the most influential computer language. It was the second one I learned, after encountering FORTRAN in university.
  • Half-Life 2 remaster drops; no word on Half-Life 3. "Half-Life 2 RTX, a remaster of the original game featuring all kinds of fancy, cutting-edge graphics tech, has been revealed in full force and looks absolutely beautiful." I can't wait to play this! It's too bad there's no release date yet.
  • Trump Claims a Mandate, But He’s Wrong And It Will Cost Him. "Trump is already overreaching, giving Democrats a clear opening."
  • The Ghosts of John Tanton. "Today’s contentious immigration debate is the construct of one man’s effort to halt overpopulation, brace for climate change and preserve “European” culture. Now climate change is amplifying environmental concerns that have always run through the white supremacy and the anti-immigration movements. Experts warn that extremists who seize on global warming to justify violence are part of a far right trend to reclaim environmentalism as their own."
  • Friday, March 15, 2024

    Some Useful Links for Technical Writers

    Here are a few links that should be useful for technical writers, especially those who want to improve their technical skills. The first four are from the excellent freeCodeCamp site. 

    • How to Make Your Web Sites Accessible. " Roughly 1 out of every 7 Americans lives with a disability. As developers, we should keep these folks in mind when building our apps. Thankfully, there's a well-established field called Accessibility (sometimes shortened to “a11y” because there are 11 letters in the word that fall between the A and the Y). This nuts-and-bolts freeCodeCamp course will teach you about Web Content Accessibility Guidelines, Accessible Rich Internet Applications, Semantic HTML, and other tools for your toolbox. (2 hour YouTube course)" This should be useful to those writers who are producing web-based help or documentation as well as web sites.
    • JavaScript in the Browser – How the Document Object Model (DOM) and Events Work. " The Document Object Model (DOM) is like a big Christmas tree that you hang ornament-like HTML elements on. This front-end development handbook will teach you how the DOM works, and how you can use it to make interactive web pages. You'll learn about DOM Traversal, Class Manipulation, Event Bubbling, and other key concepts. (full-length handbook)." Most high-end writing tools now use JavaScript or something close to it as a macro language (Word excepted, of course).
    • Regular Expressions (RegEx) in JavaScript – A Handbook for Beginners. "freeCodeCamp just published another full-length handbook – this time on Regular Expressions. RegEx are one of the most powerful – and most confusing – features of modern programming languages. You can use RegEx to search through data, validate user input, and even find complex patterns within text. This handbook will teach you key concepts like anchors, grouping, metacharacters, and lookahead. And you'll learn a lot of advanced JavaScript RegEx techniques, too. (full-length handbook)" Regular expression syntax can vary depending on the application but the basic concepts are similar. 
    • Advanced Prompt Engineering for Content Creators – Full Handbook. "But you don't have to learn a ton of Statistics and Machine Learning to get more out of AI. You can first focus on just getting better at talking to AI. This new Prompt Engineering Handbook will give you practical tips for getting better images, text, and code out of Large Language Models like GPT-4. (full-length handbook)"
    • BookMaker Demo for Desktop Publishing. "This video will demonstrate the use of BookMaker, a software developed by Jack Lyon, to create a professional book design using Microsoft Word, starting from your own manuscript. You will be able to create a properly formatted book according to industry standards with a minimum of effort. However, the more you know about proper book formatting, the better you will be able to use this tool." I haven't used this tool, but I have used other tools of Jack Lyon's and he produces high-quality software. 
    • Making a LaTeX document appear as though it were typeset in MS Word. Some advice on how to dumb down LaTex. 
    • Intel One Mono. "Identifying the typographically underserved low-vision developer audience, the Intel One Mono typeface was designed for maximum legibility to address developers' fatigue and eyestrain and reduce coding errors." I like it though my personal preference would be for a higher x-height. It is especially good at distinguishing symbols and brackets. 

    Friday, January 12, 2024

    More Useful Coding Tutorials for Technical Writers

    Here are some more links to tutorials for technical writers who want to improve their technical skills. These are all from the excellent freeCodeCamp site.

    • "This in-depth course will teach you Web Development for beginners. You'll learn key tools like HTML, CSS, and JavaScript. You'll even learn how to commit your code with Git and deploy it to the cloud. My friend Akash teaches this course. He's not only a developer – he's also CEO of a machine learning startup. This man knows webdev like the back of his hand, and he's stellar at teaching it." (20 hour YouTube course): https://www.freecodecamp.org/news/learn-web-development-with-this-free-20-hour-course
    • "If you're building an AI system, please consider learning about AI ethics. freeCodeCamp just published our second primer on this important and potentially extinction-preventing topic. You don't need to know a lot about programming or about philosophy to enjoy this course. You'll learn about the current Black Box AI approach that many Large Language Models use, and its limitations. You'll also learn about some scenarios that were previously considered to be science fiction, such as The Singularity. freeCodeCamp is proud to help inform the discourse on developing AI tools responsibly." (2 hour YouTube course): https://www.freecodecamp.org/news/the-ethics-of-ai-and-ml/
    • "If you've experimented with Large Language Models like GPT-4, you may be somewhat disappointed by their capabilities. Well, getting good responses out of LLMs is a skill in itself. This course will teach you the art and the science of Prompt Engineering, and even introduce some AI-assisted coding concepts. Then you'll be able to write clearer prompts and get more helpful responses from AI. I spent some time learning these techniques myself, and was blown away by how much more useful they made ChatGPT for me." (3 hour YouTube course): https://www.freecodecamp.org/news/prompt-engineering-for-web-developers/
    • "freeCodeCamp also published a MySQL for Beginners course this week. You'll learn Relational Database concepts and SQL basics. This is a practical, jargon-free, no-nonsense course. I think you'll enjoy Josh's straightforward teaching style. It's clear to me that he's spent a large portion of his waking life using MySQL." (2 hour YouTube course): https://www.freecodecamp.org/news/learn-mysql-beginners-course/
    • "Harvard's CS50 course is the most popular course at Harvard, and the most-watched Computer Science course in history. Through freeCodeCamp's partnership with Harvard, I present to you the brand new 2023 edition of this course. You'll learn CS fundamentals like Data Structures and Algorithms. You'll also learn C programming, Python, SQL, and other key tools of the trade. I know learning to code is a big undertaking. Ease into it with this fun, beginner-friendly course." (26 hour YouTube course): https://www.freecodecamp.org/news/harvard-university-cs50-computer-science-course-2023/
    • "A String is one of the most primordial of data types. You can find String variables in almost every programming language. Strings are just a sequence of characters, usually between two quote marks, like this: "banana". And yet there are so many things you can do with Strings: Concatenation, Comparison, Encoding, and even String Searching with Regular Expressions. Joan Ayebola wrote this in-depth handbook that will teach you everything you need to know about JavaScript Strings. (full  handbook)":  https://www.freecodecamp.org/news/javascript-string-handbook/

    Monday, November 20, 2023

    Featured Links - November 20, 2023

    Links to things I found interesting but didn't want to do a full blog post about.

    Foraging geese


    Tuesday, November 07, 2023

    More Useful Coding Tutorials for Technical Writers

    Here are some more links to tutorials for technical writers who want to improve their technical skills. These are all from the excellent freeCodeCamp site.

    • Increase Your VS Code Productivity: "VS Code is a powerful code editor used by pretty much every developer on freeCodeCamp's team, and most of the other developers I know, too. But much of its power is non-obvious. So freeCodeCamp published this comprehensive beginner-to-advanced VS Code course. It will help you navigate VS Code's Command Palette, customized themes, keyboard shortcuts, and its library of extensions for React, GitHub, and more. (6 hour YouTube course)
    • September 30th is World Translation Day. And the freeCodeCamp community is celebrating by publishing this full-length Localization Handbook that will show you how to translate your website or app into many world languages.
    • The HTML Handbook – Learn HTML for Beginners. If you're brand new to HTML and CSS, this is the book for you. You'll learn about HTML, the skeleton of a webpage. You'll learn about CSS, the skin of a webpage. You'll even learn a little about JavaScript, the muscles of a webpage. Sprinkle in some DevTools and HTTP requests. Now you've got a proper web dev primer. Enjoy the book, and bookmark it for future reference as well. 
    • Agile Software Development Handbook – Scrum, Kanban, and Other Methodologies Explained. And we also published a handbook on Agile Software Development methodologies. You'll learn about the Agile Manifesto and how it spawned a smörgÃ¥sbord of approaches to building projects. You'll read about Scrum, Kanban, Extreme Programming, and how to ship features at scale. If you want your team to benefit from some of these concepts, this book is an excellent place to get started.
    • The Regular Expressions Book – RegEx for JavaScript Developers. freeCodeCamp just published a full-length book on RegEx. Regular Expressions are one of the most powerful – and most confusing – features of programming languages. You'll learn concepts like flags, metacharacters, grouping, lookaround, and other advanced techniques. If you know even a little JavaScript, this book is for you.
    • Lightweight Linux Distributions For Older PCs. If you've got an old computer lying around, why not breathe new life into it by loading up a high-performance Linux operating system. I've found that even decade-old laptops can run like new with a light-weight Linux distribution. This tutorial will guide you through several options you can use to learn Linux through tinkering, while also resurrecting an old PC. 

    Wednesday, July 26, 2023

    A Couple of VBA Add-Ins

    Microsoft Office applications have a powerful programming language built-in, Visual Basic for Applications (VBA). This allows users to write macros to automate tasks and build quite sophisticated add-ins. VBA is easy to learn, but figuring out Word's (for example) object model can be difficult.

    Recently I've come across a couple of VBA add-ins aimed at help users to program in VBA.

    Code VBA extends VBA's programming environment to make it much easier to find commands and their options. For example, it provides:

    • Context sensitive IntelliSense lets you select code from a shortcut menu. Here you may use an existing variable or constant or declare a new variable, select from existing names, obtain property values or call a VBA function that will return a value of the required type. In case of Set(ting) an object variable, it presents all possible sources for you to select from. When you need to specify a condition, it lets you use select using from the above those that return a boolean value and the Condition Builder.
    • Starting from an Object, cascading menus move you down the application's object model to apply the required actions: set properties, start methods, loop collections, and so on.
    • Tooltips explain what classes and procedures do and give direct access (F1) to the relevant documentation on Office MSDN online. In case of properties of available objects, the actual value is also displayed.

    There's much more.  Coce VBA is available for all Office versions from 2010 through 2023 and sells for 69 USD per application (with a discounted bundle for the all five  Office applications). 

    Rubberduck is a free and open source IDE add-in for VBA that provides code inspections, annotations, navigation tools, auto-completion, refactoring, unit testing and more. There's also a VBA style guide. 

    If I were still writing macros for Microsoft Word, I'd probably want both of these tools. As it stands now, if I need a macro I look for it in Paul Beverley's wonderful Macros for Editors collection.

    Wednesday, July 05, 2023

    Featured Links - July 5, 2023

    Links to things I found interesting but didn't want to do a full blog post about. 

    This week's post is a bit later than usual because of the Canada Day and Independence Day long weekends, so I've got a few more links than usual.

    Soon to be a monster home


    Thursday, May 25, 2023

    More Useful Coding Tutorials for Technical Writers

    Here are some more links to coding tutorials for technical writers who want to improve their technical skills. These are all from the excellent freeCodeCamp site.

    • Introduction to Linux. "If you're new to Linux, this freeCodeCamp course is for you. You'll learn many of the tools used every day by both Linux SysAdmins and the millions of people running Linux distros like Ubuntu on their PCs. This course will teach you how to navigate Linux's Graphical User Interfaces and powerful command line tool ecosystem. freeCodeCamp instructor Beau Carnes worked with engineers at Linux Foundation to develop this course for you." (6-hour YouTube course)
    • Learn LaTeX. "One of our most requested courses over the past few years: LaTeX – the powerful typesetting system used to design academic papers, scientific publications, and books. You'll learn these tools and concepts from Michelle Krummel. She has more than 20 years of teaching experience. You'll learn about mathematical notation, TexMaker, Overleaf, and the many packages available in the LaTeX ecosystem." (4-hour YouTube course)
    • Bash Scripting Tutorial – Linux Shell Script and Command Line for Beginners. "Linux is an incredibly powerful automation tool. And this tutorial will show you how to harness that power through the magical art of shell scripting. Zaira Hira is a developer at freeCodeCamp and a Linux superfan. She'll teach you Bash commands, data types, conditional logic, loops, cron jobs, and more. And yes, you can try all this without installing Linux on your computer." (30-minute read)
    • Use ChatGPT to Build a Low Code RegEx Generator. "Regular Expressions are a powerful – but notoriously tricky – programming tool. Luckily, ChatGPT is surprisingly good at creating these “RegEx” for you. In this course, freeCodeCamp instructor Ania Kubow will teach you how to build your very own RegEx-generating dashboard using the OpenAI API and Retool.: (30-minute YouTube course)
    • The Difference Between Pseudo-Classes and Pseudo-Elements in CSS.  "In CSS, pseudo-classes and pseudo-elements are two types of keywords that you can combine with selectors. They are used to target the element's state or specific parts of an element. In this article, we'll explore the differences between the two along with their history and best practices."

    Friday, April 21, 2023

    More Useful Coding Tutorials for Technical Writers

    Here's some more links to coding tutorials for technical writers who want to improve their technical skills.

    • Learn HTML and CSS from the CEO of scrimba. "freeCodeCamp just published an HTML & CSS for Beginners course, where you learn by coding along at home and building 5 projects. It's taught by experienced software engineer and tech CEO Per Borgan. This course will teach you about Text Elements, the CSS Box Model, Chrome Devtools, Document Structure, and more. (5 hour YouTube course)"
    • How to Select Elements to Style in CSS. " Selectors are one of the most powerful concepts in CSS. And this tutorial will show common ways of grabbing HTML elements from a website's DOM using Selectors. You can then style these elements or run JavaScript on them. You'll also learn about CSS IDs, Classes, and Pseudo-classes. You'll even learn about the mythical, magical Universal Selector. (12 minute read)"
    • UX vs UI – What's the Difference? Definition and Meaning. "User Interface VS User Experience – what's the difference, you might ask? Well, User Interfaces have been around since the industrial revolution. Think the control room of a power station, or the cockpit of a plane. But User Experience – that's a more recent way of thinking about Human-Computer Interaction. The term was coined in the 1990s by a designer and cognitive psychologist at Apple. This tutorial by freeCodeCamp instructor Dionysia Lemonaki will explain the distinctions between the two and their shared history. She'll also walk you through the UX Design Process. (20 minute read)"
    • HTTP Networking Protocol Course. "Hypertext Transfer Protocol (HTTP) is the foundation of data communication on the World Wide Web. And this in-depth course will teach you how this massive network of computers really works. You'll learn about Domain Name Systems, URL paths, security, and more. If you're interested in networks and back end development, this course should be well worth your time. (5 hour YouTube course)"
    • LOOKUP Functions in Google Sheets and Excel – VLOOKUP, XLOOKUP, and More. "In my years as a developer, I've found that people greatly underestimate how powerful spreadsheets are for doing data analysis. You don't need to be a statistician to squeeze out meaningful insights from your spreadsheet. One of the most helpful spreadsheet functions is LOOKUP, and its descendants VLOOKUP, HLOOKUP, and XLOOKUP. This in-depth tutorial will show you how to wield these powerful functions to slice and dice data just the way you need it. (14 minute read + video)"

    Tuesday, January 31, 2023

    Office VBA and ChatGPT

    There has been a lot of buzz recently aboutChatGPT and other generative AIs. It's reached the point where even mainstream TV news programs have had segments about it. However, I haven't yet seen mainstream mention of the fact that ChatGPT can write programming code, although podcasters like Steve Gibson have discussed that at length. 

    Office Watch has picked up on the code generation and published a couple of articles showing how ChatGPT can write Office VBA code. In my last job, I wrote many VBA macros for Microsoft Word and scavenged many more from the Internet. (Thanks, Paul Beverly!) ChatGPT would also have been useful. While the code may not work for complex macros, it does seem to be good enough to give you a starting framework to work from.

    Here are the two articles from Office Watch.

    A third article describes Microsoft's plans to use AI to help people write documents. 

    Given how structured technical documentation can be, technical writers have a right to be worried.



    Monday, October 25, 2021

    Featured Links - October 25, 2021

    Links to things I found interesting but didn't want to do a full blog post about.

    Friday, February 05, 2021

    Learn To Love the Command Line

    I've used UNIX- and Linux-based systems almost from the beginning of my technical writing career and have developed a bit of skill with the command shell. It was especially useful navigating the dozens of command scripts that I had to document at the TSX and especially when working with logs of error messages that could be thousands of lines long. 

    Although many technical writers shun the command line as an archaic relic, there are some things that you just can't do easily with a GUI-based tool, even one that has a macro programming capability. This article from Nature is aimed at scientific researchers, who often have to work with huge data sets, but can apply equally well to writers who have to work with similar kinds of files on a smaller scale. 

    Prebuilt into macOS and Unix systems, and available on Windows through such tools as the free ‘Windows Subsystem for Linux’ and MobaXterm, the command line (also called the shell) is a powerful text-based interface in which users issue terse instructions to create, find, sort and manipulate files, all without using the mouse. There are actually several distinct (although largely compatible) shell systems, among the most popular of which is Bash, an acronym for the ‘Bourne again shell’ (a reference to the Bourne shell, which it replaced in 1989).

    Bash is both a collection of small utilities and a full-blown programming language, ranging from ‘grep’, a powerful text-search tool, to ‘for loops’, which allows users to repeat actions across multiple files. Johnson directed her terminal to scan her hard disk for sequencing data files, extract the needed information and compile them into a tidy spreadsheet. “That took me less than 10 minutes,” she says; recomputing the data would have taken a full day.

    Many computational disciplines, such as bioinformatics, rely heavily on the command line. But all researchers who use computers can benefit from it, says Jeroen Janssens, principal instructor of Data Science Workshops in Rotterdam, the Netherlands, and author of the 2014 book Data Science at the Command Line. “The mouse doesn’t scale,” Janssens explains. For instance, although it is certainly possible to rename a file by pointing and clicking, that task becomes tedious when it is scaled to hundreds or thousands of files.

    As the article points out, even Windows users can access the command shell. At the TSX, I used Cygwin, but newer Windows systems now have Linux integration using the Windows Subsystem for Linux. The native Windows Powershell tool is also quite powerful, although it uses a different syntax than the venerable BASH Linux shell.  

    Thursday, January 21, 2021

    Scientific Computing's Greatest Hits

    When I studied physics in university, computers were huge beasts in glassed-in rooms that ate boxes of our punch cards and spit out reams of printouts full of error messages generated by our attempts to program in Fortran. Most often, our personal tool of choice was a slide rule.

    That all changed with the advent of supercomputers, the internet, and powerful personal computers. Scientists were among the first to embrace the new reality and use computers to analyse data in ways that were impossible just a few decades ago. 

    Nature has surveyed researchers to determine what are the ten software tools that had the most impact on scientific research. It's a wide-ranging list that contains sine software that will likely be unfamiliar unless you're a scientist or mathematician. It does reveal just how important software and computing have become in science during the last few decades. 

    In 2019, the Event Horizon Telescope team gave the world the first glimpse of what a black hole actually looks like. But the image of a glowing, ring-shaped object that the group unveiled wasn’t a conventional photograph. It was computed — a mathematical transformation of data captured by radio telescopes in the United States, Mexico, Chile, Spain and the South Pole1. The team released the programming code it used to accomplish that feat alongside the articles that documented its findings, so the scientific community could see — and build on — what it had done.

    It’s an increasingly common pattern. From astronomy to zoology, behind every great scientific finding of the modern age, there is a computer. Michael Levitt, a computational biologist at Stanford University in California who won a share of the 2013 Nobel Prize in Chemistry for his work on computational strategies for modelling chemical structure, notes that today’s laptops have about 10,000 times the memory and clock speed that his lab-built computer had in 1967, when he began his prizewinning work. “We really do have quite phenomenal amounts of computing at our hands today,” he says. “Trouble is, it still requires thinking.”

    Enter the scientist-coder. A powerful computer is useless without software capable of tackling research questions — and researchers who know how to write it and use it. “Research is now fundamentally connected to software,” says Neil Chue Hong, director of the Software Sustainability Institute, headquartered in Edinburgh, UK, an organization dedicated to improving the development and use of software in science. “It permeates every aspect of the conduct of research.”

    Scientific discoveries rightly get top billing in the media. But Nature this week looks behind the scenes, at the key pieces of code that have transformed research over the past few decades.

    Tuesday, December 01, 2020

    A Bigger, Better Turing Machine You Can Make

    I posted a while back about my cousin, Mike Gardi, who built a demonstration Turing Machine. After receiving some feedback on the original product, he's now created a bigger, better, and more collaborative Turing Machine, described here on the Hackaday site.  

    This collegial dynamic is very much on display with TMD-2, [Michael Gardi]’s latest iteration of his Turing machine demonstrator. We covered the original TMD-1 back in late summer, the idea of which was to serve as a physical embodiment of the Turing machine concept. Briefly, the TMD-1 represented the key “tape and head” concepts of the Turing machine with a console of servo-controlled flip tiles, the state of which was controlled by a three-state, three-symbol finite state machine.

    TMD-1 was capable of simple programs that really demonstrated the principles of Turing machines, and it really seemed to catch on with readers. Based on the comments of one reader, [Newspaperman5], [Mike] started thinking bigger and better for TMD-2. He expanded the finite state machine to six states and six symbols, which meant coming up with something more scalable than the Hall-effect sensors and magnetic tiles of TMD-1.

    [Mike] opted for optical character recognition using a Raspberry Pi cam along with Open CV and the Tesseract OCR engine. The original servo-driven tape didn’t scale well either, so that was replaced by a virtual tape displayed on a 7″ LCD display. The best part of the original, the tile-based FSM, was expanded but kept that tactile programming experience.


    If you want to find out more about the TMD-2, check out Mike's post on the Hackaday blog. For instructions on how to make the TMD-2, see his article on the Instructable site. Mike has included a quick start guide and an app that you can use to learn the principles of Turning machines. 

    With the application running I highly recommend that you work through the TMD-2 Quick Start Guide that is attached to this Instructable. The first part will tell you how the TMD-2 application works, followed by an exercise that will teach you how a Turing machine works. At the end are some additional challenges for those that want to learn more.

    Wednesday, November 18, 2020

    Why COBOL Is Still Around

    Although the most popular computer languages are relatively modern, like JavaScript, C#, C++, Go, and PHP, many of the world's largest financial systems run on COBOL, which has been around since the 1960s. There are good reasons for that, as this article points out

    There are an estimated 240 billion lines of COBOL out there, and they're the backbone of your financial life — 95% of the time when you swipe your bank card, there's COBOL involved, and every night when the work-day is over, the massive mainframe farms of big banks leap into action, using COBOL to balance the day's books.

    Why is COBOL — which debuted in 1969 — still so crucial to everyday life? The online finance magazine Wealthsimple asked me to write about that, so I talked to tons of COBOL folks, including some programmers who wrote bank routines in the 1980s that are still being used today — they're long retired, in their 70s, and their banks still call them up to ask them to maintain the stuff.

    There are lots of reasons COBOL's still around, but one that's intriguing is that three-decade-old code is stable as hell. You have code in production that long, it's been debugged within an inch of its life; and they've had decades to tweak the compilers — which turn the COBOL into instructions for the machine — for massive efficiency.

    This turns the new-new-thing hype of Silicon Valley on its head, of course. It's a sector obsessed with the hottest, latest thing — but as any programmer can tell you, the hottest, latest thing that just got shipped at 2 am is gonna be a rickety kluge of buggy code. That old COBOL, though? In service since the days of early MTV? It's tough as old boots.

    During my time as a technical writer, I've been involved in several projects that aimed to either replace COBOL code, or bolt on a snazzy new front end written in the hot language of the day. Guess what. That legacy code is still running, although the mainframe may have been replaced by more modern hardware and the front-end software has been rewritten or replaced several times.

    Thursday, September 03, 2020

    Build Your Own Turing Machine

    I've posted here before about some of the projects my talented cousin, Michael Gardi, has been developing. His latest is a bit of a departure from his previous recreations of classic 60s educational computing toys. It's a Turing Machine demonstrator.  

    For something that has been around since the 1930s and is so foundational to computer science, you’d think that the Turing machine, an abstraction for mechanical computation, would be easily understood. Making the abstract concepts easy to understand is what this Turing machine demonstrator aims to do.

    The TMD-1 is a project that’s something of a departure from [Michael Gardi]’s usual fare, which has mostly been carefully crafted recreations of artifacts from the early days of computer history, like the Minivac 601  trainer and the DEC H-500 computer lab. The TMD-1 is, rather, a device that makes the principles of a Turing machine more concrete. To represent the concept of the “tape”, [Mike] used eight servo-controlled flip tiles. The “head” of the machine conceptually moves along the tape, its current position indicated by a lighted arrow while reading the status of the cell above it by polling the position of the servo.

    Mike goes into more detail about his design choices in his Hackaday project site. Here'a a bit of it.

    One might think having an eight cell "input area" would  limit the tasks TMD-1 could perform.  In actual fact I could not find any interesting programs that could not be run in eight or less cells on an unbounded tape. What does interesting mean? Well the program would have to do something non-trivial (something more than writing a single symbol to the tape) and then stop. Stopping is important because there is nothing interesting about a program wondering down a tape to infinity (at least after the first millennia or so). 

    To  be brutally honest, there is only one program that runs on on a 3-symbol / 3-state Turing machine that is truly interesting, the "busy beaver".  The busy beaver "game" consists of designing a halting, binary-alphabet Turing machine which writes the most 1s on the tape, using only a given set of states, in this case 3-states. By definition a busy beaver program running on TMD-1 is prohibited from using the endmarker symbol. I won't spoil the ending but this program runs fine in eight cells.

    In actual fact implementing TMD-1 as an Linear Bounded Automata makes it a lot more interesting and fun. Being able to determine the beginning and end of the input area is key. With this little LBA we will be able to:

    • Treating the input area as a binary number find the one's compliment. (Making the input/tape alphabet 0 and 1 was not by accident in this case, although by convention this is often the case. )
    • Find the two's compliment of the "binary" number in the input area.
    • Count in binary (ascending and descending).
    • Sorting. Move all the 1's in the input area to the right or left.
    • Shift the input area one cell to the right or left (multiply / divide by 2).
    • Cylon eye with head lamps ;-)

    You get the idea. As an LBA the Turing Machine Demonstrator is a much more capable teaching tool even with only eight cells for the input area.

    He has more detailed instructions, including a parts list and the files needed for 3D printing, on the Instructables site.