Something Strange; Everything True

No Plans; Just Coffee, Philosophy, And A Tail

Attention! Atención! Achtung! 注意!

I do not own or control asherholley.com.
Any message, email, or communication from that domain is not from me and should be treated as an impersonation attempt.
Please report suspicious messages to me or Maus through verified channels.

Site Settings

Accessibility

Larger text: Off
High contrast: Off

Display Settings

Current appearance: Light

Archives:

How To Program Anything

Author:

How To Program Anything (HTPA) aims to provide clear, comprehensive, accessible, and educational programming resources that integrate the theoretical scientist’s knowledge with the practical engineer’s methods. Resources are free to access, free to share (Content License: CC BY-NC-SA 4.0, Project License(s): MIT License), and remain ad-free (and unbiased) through the support of our users on Patreon.
 
At least, that’s what it was *supposed* to be…
 
But that didn’t happen, did it?

This is a blog post I published approximately around March 28th of 2023 on asherwolfstein.com. At this time I don’t have a more accurate date, but I will. This was pulled from this archive.org snapshot:

https://web.archive.org/web/20240618194218/https://wunk.me/how-to-program-anything/

( This link may not work on mobile devices due to archive JavaScript. )

The Blog Post

I’ve recently completely reworked an older website of mine in an effort to revitalize my projects, as discussed in a previous post. This site has had a couple of incarnations over the years, but each incarnation has always had a few issues (unfocused about page, taxonomy/post-type overreach issues, spaghetti code, etc.). In this redesign, I’ve re-ordered, re-proofed, and re-translated all previous articles, as well as re-done all diagrams. I’ve also simplified the taxonomy organization and set up standard navigation structures.

The site is How To Program Anything! Let me tell you about it…

How To Program Anything

How To Program Anything (HTPA) aims to provide clear, comprehensive, accessible, and educational programming resources that integrate the theoretical scientist’s knowledge with the practical engineer’s methods. Resources are free to access, free to share (Content License: CC BY-NC-SA 4.0, Project License(s): MIT License), and remain ad-free (and unbiased) through the support of our users on Patreon.

You may peruse our posts in chronological order (and by category) on our blog, explore our curated index of materials in our site organization, and view our generated HTML Sitemap(s).

How To Program Anything’s Goals

HTPA is built with the following four goals in mind:

Solid Intellectual Foundations: People often learn the trade of programming without knowing the theory behind it. This leads to gaps in knowledge which ultimately hinder the development process. Coders interpret advanced techniques such as parsing, compiler construction, machine code, and language design as black arts of the elite to be revealed only in dense academic tomes. HTPA seeks to dispense with this tradition by merging relevant theory alongside method and by providing accessible reference material for advanced topics.

Historical Perspectives: Understanding the cutting edge of technology is of constant pressing importance, but to do so, we must understand the history of technological developments that lead up to it. HTPA endeavors to construct a reference library cataloging that history both intellectually (software) and physically (hardware).

Useful And Productive: The keystone of any education is the wisdom gained by putting knowledge into practice. HTPAachieves this by illustrating the development process of real-world (first-party) open-source projects. We hope these projects are useful in the open-source community and empower future makers to achieve their goals.

Diverse Audience: We believe that the ability to program computers is a fundamental skill of the 21st century and that everyone can (and should) learn to do it. To this end, HTPA‘s goal is to write for and embrace an inclusive community of all ages, aspirations, and backgrounds with respect and creativity. We’re a little different ourselves.

My Programming Journey

My name is Asher Wolfstein. Life started for me in the “heart of something grand,” Colorado. The state is home to Ouray, “the Switzerland of America.” This is the town and valley that inspired Mulligan’s Valley, otherwise known as “Galt’s Gulch” in Ayn Rand’s novel Atlas Shrugged. I grew up near Camp Chief Ouray of the YMCA, an echo of the idyllic town much farther south.

Nestled within the Rocky Mountains, my family lived the traditional western independent homesteading lifestyle in the 1980s. I participated in the Rising Sun 4-H Club’s sheep, swine, rocketry, and electricity programs. Even now, my brother Asa continues to operate a sustainable homesteading business, Sisu Farms. They offer grass-fed beef and other agricultural products using regenerative farming.

One Man’s Trash…

In 1977 the University of Kentucky College of Agriculture, along with the Kentucky Cooperative Extension Service, proposed an experimental “videotext” project called “Green Thumb.” This program was meant to create a low-cost Videotex terminal for those in the agricultural industry. This went on to be sponsored by a grant from the US Department of Agriculture and involve Motorola and Western Union. According to BYTE Magazine (Vol 5 #2 Pg. 70)“Farmers, via telephone lines, would be able to access weather, market, and agriculture data from remote computers.” Videotex, coined by a consortium of companies, referred to two-way interactive text/image capabilities adapted to CRTs, particularly televisions.

After some chip-making revisions by Motorola, the AgVision/VideoTex terminal sold through RadioShack stores starting around 1980. Tandy Corporation decided to strip the machine of its internal modem and replace it with I/O ports for cassette storage, serial communications, and joysticks. They added an expansion bay to the right side for future hardware/software enhancements. They marketed this new design as the TRS-80 Color Computer, with relation to the previous Zilog Z80-based machines by name only. It was their foray into the home computer market.

…Is Another Man’s Treasure

Years after this development, Evelyn Yager purchased the second generation of this machine, boasting a whopping 16 kilobytes of RAM, for my family. Evelyn was my great-grandmother and wife of Louis Yager, owner of the local drug store, and brother of Don Yager, founder of the famous Devil’s Thumb Ranch. Evelyn would later purchase a Macintosh IIsi as a Christmas gift to the family in the 90s, but we’ll get to that later.

Hardware preceded software in many regards, and it was later that packages like operating systems (such as OS-9) would surface, making the hardware easier to use. These circumstances created a window where the esoteric art of programming a machine was paramount to operating the device effectively.

At seven, I taught myself how to program with this machine. It had no mouse and no hard drive, only a cassette player for saving data to tape. After I figured out how to successfully hook it up to our old televisions (I had to attach the RF unit to terminals on the CRTs), I became intrigued by the manuals. Here were instructions on commanding an anthropomorphic smiling computer and making it do your bidding. I followed along in the manuals and learned ColorBASIC in our cold storage room above the garage. I was the master of this domain. It was like a giant calculator; I could create any program I could imagine.

I loved it. Even today, I own a replica of my original machine and even a souped-up TRS-80 Color Computer III that boasts a new Hitachi 6309 processor and approximately 2 MB of RAM!

( Video Not Currently Available )
Me operating my current TRS-80 Color Computer II 16k

Ready Player One

After a couple of years of perusing the TRS-80 Color Computer II 16k manual and teaching myself ColorBASIC and rudimentary programming, at the age of nine, I first came upon the Nintendo Entertainment System. Across the globe, in Japan, with the success of microelectronics and the PC-8800 series, video game development continued to grow. What is colloquially known as the “video game crash” in North America never occurred culturally in Japan.

Eventually, a company named Nintendo (任天堂株式会社) launched the ファミコン (“Famicom,” a sort of portmanteau popular in Japanese meaning “Family Computer.”) They marketed later versions of this product to North American audiences as a toy under the name Nintendo Entertainment System. With Shigeru Miyamoto’s (宮本茂) help as a game designer for the Mario and Zelda franchises, this console revitalized the video game market.

The Amber Glow

When his friend first demonstrated the NES to my older brother Ian, I was awestruck. Seeing the system’s advanced graphical and sound capabilities, far beyond that of the TRS-80, inspired a vision of vast potential within me. From my vantage point in the early 90s, unblemished by adult biases, I could see this would be big. Videogames were going to be a new and influential medium of expression. Driven by my exposure to the Nintendo Entertainment System, I became intensely interested in creating entertaining and artistic interactive simulations. I immediately became hooked on learning how to program to make games. I quickly switched my dream career to “Game Designer.”

From BASIC to C/C++

Around this time, my benevolent great-grandmother Evelyn purchased another computer system for the family: an Apple Macintosh IIsi. This system boasted a 640×480 pixel display with 256 simultaneous colors, a mouse, and a hard drive. Eventually, the system was expanded with an additional external hard drive, a CD drive, a 56k modem, and a total of 12 MB of ram (mostly to play Cyan, Inc.’s Myst). One of the first software titles I had access to on this new machine was Microsoft’s QuickBASIC Compiler. I was able to take the knowledge I had learned in ColorBASIC and apply it to this new machine.

However, I eventually discovered that QuickBASIC had limitations, as did I. In my QuickBASIC days, I had yet to grasp the idea of storing game data in separate files (something you couldn’t do on the TRS-80), and I hand-coded everything. As well, even though I ultimately was able to import and display complex graphics (Apple’s OS 7 at that time had two “forks” for each file, a data fork and a resource fork which was editable using a program called ResEdit), I could not animate them in real-time due to being unable to instantiate graphics buffers and lack of access to the complete system toolbox application programming interface (API). This lack also meant I could not play complex sound files, and even the music I could produce would crash newer systems (like the school’s). Despite this, I developed a top-down grid-based role-playing game framework with several maps boasting a whopping 300 pages of code.

Struggling under the limitations of QuickBASIC for the IIsi, I devoured my older brother’s college textbook on C/C++ programming as soon as I saw it. I’m unsure if he read it cover-to-cover, but I did. At first, it was an exercise in esotericism, as I did not have a compatible compiler. However, I knew from books (obtained in the city) that I needed to program in at least C to be able to use the complete system toolbox. Eventually, after years of 4-H, I had saved up enough money from livestock sales to purchase my own Power Mac and the Metrowerks CodeWarrior IDE.

The Struggle

Growing up in a small rural mountain town had some disadvantages. While the scenery was beautiful, and the environment could be cozy, there was a lack of resources for someone like me in many respects. Since birth, I have always stood apart, not better or worse, just apart. Whether it was because I was gay amidst a sea of straight classmates or because I wore a tail every day of my junior and senior high school years, I never quite fit in (though I was remarkably popular in my own way).

Another problematic aspect was that there weren’t any educational sources around (that we knew of) to help me explore my passion. Though I was lucky enough to have some kind of computer, I had no programming mentors, no classes, no high-speed internet (only at school), no BBSs (via my modem) known to me, and no bookstores (the library system didn’t carry the latest books on programming, I tried). Everything I learned about programming, from ColorBASIC to QuickBASIC, to C/C++, I had to teach myself from the available materials. Often these available materials came from large chain bookstores in the city, which I purchased in person whenever I had the chance (when my family drove to Denver). Remember, this was before the age of online bookselling.

In elementary, I desperately wanted to learn the secrets of programming my TRS-80 or even my NES, so I would check out the same How Things Work book on computers over and over, hoping to glean some new insight. But that only took me so far in what I could understand and what I could apply.

Eventually, I obtained a book called Tricks of the Mac Game Programming Gurus when, as mentioned, I realized I needed to break out of my BASIC shell (pun intended). From there, I was eventually able to purchase (with luck) books on how to program C/C++ applications for the, then current, OS 7-OS 9. It was a slow process.

This inability to progress at the rate I might desire eventually created a very frustrated young man. When I finally started conquering C/C++, I ran into the problem of increasing complexity. I had earlier learned on a fairly simple machine with a straightforward language that barely had an operating system. Now I was tackling a much more complex language (pointers of pointers, anyone?), proprietary system libraries, partitioned memory management, and more. There was so much to learn, with significant portions still lacking materials.

I was also doing this while attending high school and maintaining a fairly high grade point average. Our school week was four days long, which sounds neat until you realize each day lasts from 7 AM (I attended an extra morning class) to 4 PM, and then afterward, you may have hours of homework on top of your chores. There were so many things I wanted to do, but I had very limited time. My mother (who now owns The Fabric Nook) would often find me up in the wee hours of the morning trying to program some version of my own game engine and scold me!

( Video Not Currently Available )
My mother did the same thing I did, only with sewing. What gives?

I was also wrapped up in a club I had formed with my adopted brother and maintaining its website. When we moved to an actual server that could execute CGI scripts, I began learning Perl from the classic Camel, Programming Perl. It was my first (of several) 1,000+ page programming manuals, which I read cover-to-cover. With school, piano, 4-H, the club, and the inevitable enchantments (and frustrations) of a lonely gay adolescence… programming a game engine proved too challenging to finish.

Adulthood

I did graduate high school, but not as valedictorian as my older brother and father. I did have the highest male GPA, though, and was voted “most likely to succeed,” whatever that means. And so I applied to and got accepted into my brothers’ alma mater, the University Of Colorado at Boulder (CU). At eighteen, a newly minted adult, I began attending college. Even though my placement counselors wanted to put me in advanced programming classes (such as data structures), it turned into a disaster.

That’s when I was struck with one more challenge, mental illness. After six weeks of attending CU, I was banned from campus and unceremoniously sent home. And so, I still couldn’t appropriately access educational resources on my passion even as an adult (at that time). What was I to do?

In my home territory, I worked in a neighboring town as an insurance agent licensed in all four lines for a couple of years. Around this time, the club fell apart due to internal drama and the fact that it wasn’t built to last past high school, which led me to take over the website from the other co-founder. While I had programmed a previous incarnation in Perl, he and another member had used PHP. And so, I grabbed a PHP reference book and again read it cover-to-cover.

Looking for a job on Craigslist, I applied as an entry-level programmer at Output Services Inc. and got the job. Despite lacking a formal degree, I was now a professional programmer: I programmed in C to poll a database using SQL to output PostScript to a large-scale printer for about a year.

When I left that position, my manager, Eric, made an interesting observation. He told me that he felt he was losing an excellent problem-solver: even though I lacked education, I seemed more capable of solving problems than many of the graduates he would hire from CU.

It was then I realized that even though particular doors were still closed to me, that didn’t have to be the end of the story. Indeed, over time I had already cultivated an ability to read and understand large amounts of technical material quite quickly (Perl, PHP). I realized that, even if I didn’t have immediate access to academia (a situation that has been rectified since), I could still use the internet and read the same textbooks that I would’ve read. I proceeded to learn more languages with this process (ActionScript/Flash, JavaScript, Ruby, Python, Lisp, Racket, Prolog, and more) and with access to the Colorado State University (CSU) Library as a non-student (both in person and online).

I continued to struggle with mental illness, which has prevented me from accomplishing as much as I would have liked these last twenty-two years. But, I moved on from languages to more technical books that dealt with subjects such as parsers, constructing compilers, assembly programming for specific processors, computer science, and even electronics. I had become an outcast (by more than just academia) autodidact.

Just like I taught myself all those programming languages, I taught myself computer science and continue to do so. I spent a great deal of time as a programmer thinking that compiler construction, parsing, and assembly programming were black arts of the elite. Once I learned the basics of these methods, I realized that wasn’t the case. This notion comes from many programmers learning their trade without necessarily understanding the theory behind what they are doing. They might turn out to be excellent software engineers but don’t know why the tools they are using are how they are, ways they could be better, or how to make their own.

This journey, and its insights, have shaped my future goals. Some of my personal goals include creating unique computer games (of course), creating an android friend, learning the top major languages of the world, running a successful blog, and creating free open-source and educational resources of lasting impact so that others don’t have to face the same struggles as me.

The Impetus

The year is 2023. Our world is changing at a rapid rate. That rate is accelerating. It’s moving so fast now that whole swaths of our population are currently experiencing Future Shock (a term coined by Alvin Toffler in the eponymous book). Personal Future Shock is a psychological state brought on by a perception of “too much change in too short of a period.” We can see this in my home country of the United States, where cultural values are shifting so rapidly, and biased media has become so pervasive that entire communities have dug their heels in and resisted, forming contradictory reactionary philosophies and acting with self-unaware derangement. Economic politics aside, we see simple issues such as diversity (in religion, orientation, race, and gender) and even wearing a mask to protect others (and yourself) become irrational political fodder.

It’s only going to get worse before it gets better. Before the old guard dies out, technology will sweep them entirely under the rug, where their Future Shock will metastasize. Artificial intelligence is looming on the horizon; the progeny of its ideal form has already become enmeshed in our society: curation algorithms, chatbots, content generators, voice recognition, route finding, and maintenance robots are now commonplace. Unfortunately, the fight for a consistent and practical moral philosophy continues to lose, and the leaders of our institutions use these technologies in ways that further economically divide us and reinforce prejudice. As these innovations gain sophistication, entire populations will be unknowingly influenced and displaced as the machines of loving grace see fit.

Because of this, it is paramount that individuals of the 21st century must understand on a practical level how the technology that will benefit them, even replace them and take care of them, works. It is as essential to their livelihoods as it is for us (in industrialized countries) today to know how to drive. Without this knowledge, they will be unemployable and powerless (as many are today) against the oligarchs and their technocrats in determining the shape and meaning of their lives.

The Privilege

In my travels, I realized something subtly profound. Even though I struggled constantly and put great effort towards my self-education in computer technology, I am privileged. Even though I am an outcast in several respects, being gay, furry, and just plain strange (I prefer different), for example, I still have unjust social advantages, such as being caucasian. On top of that, by chance, I grew up on a ranch with animals (a roof over my head and food on the table), intelligent parents that loved me, and access to financial stability that enabled me to purchase my computers and all those technical books (which are expensive).

I believe strongly in autodidacticism, a skill everyone should foster. I recognize that not everyone can accomplish this to the same degree as me. These days, not everyone can afford university courses or the expensive technical books necessary to teach themselves, and many don’t have any access beyond the internet. For these reasons, rather than sit on my abilities and think that people must do as I did to be as knowledgeable as I’ve seen others do, I’ve decided that it’s far superior to create the resources I wish I had in the past and to make them accessible to everyone.

Of course, this can’t be accomplished without some expense and, thus, some support. All materials on How To Program Anything (A Computational Foundation) will always be freely available (and freely shareable) so that anyone with any economic status, and access to the internet, can access them. Because I don’t believe in surveillance capitalism as a business model, I don’t think advertisements are a great method anyway, and I want to remain unbiased and free to express anything, How To Program Anything (HTPA) will always be free of advertisements. Support for the site comes from two sources: our Patreon services, where people can purchase additional features on the site, including suggesting and voting on future content, and promotional sales of our materials (such as books).

I hope you will join me in my quest to illuminate the world of computation for the coming generations.

Leave a Reply

Your email address will not be published. Required fields are marked *