I learned C by running a MUD — a DikuMUD derivative. I was in high school, in the 90s, and I didn't know any programmers in my town who could teach me how to really code. My high school computer science teacher didn't know.<p>What I loved about the MUD as a learning environment was the players. On a busy night we'd have over a hundred people playing. So, I got to cut my teeth on a real, live production system with actual users. That motivated me. There were mild consequences if I broke things. And, if I made things better for the players, it felt good.<p>For me, this environment was so much better than doing programming problem sets by myself, writing code that no one would ever use.<p><a href="https://tashian.com/articles/how-i-learned-to-program/" rel="nofollow">https://tashian.com/articles/how-i-learned-to-program/</a>
MUDs are how I began programming, about 30 years ago at the age of 16. Now I'm a senior engineer making mobile games. Unsurprisingly I focus on the backend.<p>MUDs taught me C, devops, multiplayer/sockets, security to some extent, databases (I wrote my own MUD that used MySQL). Also HTML/webpages eventually. MUDs taught me the full stack.
I started "real" programming with MUDs, and after a hiatus I'm still helping run a C-based MUD, and it's awesome.<p>Much water has passed under bridges, yet there are dozens of us even creating new ones and doing all sorts of weird things with this great hobby.<p>The Multi User Dungeon discord is nowadays the place to meet like-minded people who like, or code, or balance, or design, or write or use clients for, MUDs. Join us at <a href="https://discord.gg/multi-user-dungeon-279748146316312576" rel="nofollow">https://discord.gg/multi-user-dungeon-279748146316312576</a><p>IAC WILL MUD
Back in like 1996 I tried to write a MUD using Visual Basic when I had no idea how classes and objects work, but I understood arrays and how to use "Redim Preserve" to change the size of an array while keeping its contents. So any time something needed to make a reference to something else, I stored the index of where that thing was in another array. It made code EXTREMELY ugly.<p>No data structures, just lots of arrays. Instead of something like "player.health = 100", it was "playerHealth(playerIndex) = 100".<p>If I wanted to make a player hit a monster, it was like "monsterHealth(playerTarget(playerIndex)) -= playerStrength(playerIndex) + weaponDamage(playerWeapon(playerIndex))"<p>Awful and unmaintainable.
I think this highlights one of the tenets that I try to advocate for when folks ask me how to get started on some sort of computer science journey. Find a thing that interests you, and work to make that. Whether it's working on a game (from scratch, a mod, whatever), building a hosting platform, writing a little utility to make your life easier, making a website, picking a project that has problems you are motivated to solve does wonders to help you through the initial suck of getting started. And as Jake the Dog says, "sucking at something is the first step to being kinda good at something", so anything that helps offset the suck can be essential.
> GET THIS STRAIGHT: 'VAX' IS NOT AN OPERATING SYSTEM. It's the name of a
family of computers from DEC. There are plenty of Vax'es running VMS, and
there are even more Vax'es running Berkeley Unix or Ultrix. The Vax'es
running Unix have a lot more in common with other machines running
Unix than they have with Vax'es running VMS.<p>GET THIS STRAIGHT: 'VAX' IS A CPU ARCHITECTURE AS WELL AS THE NAME OF SOME COMPUTERS CREATED BY DEC. The plural of "Vax" is "Vaxen".<p>(<a href="https://en.wiktionary.org/wiki/VAXen" rel="nofollow">https://en.wiktionary.org/wiki/VAXen</a>
LPMUD taught more people how to code and more effectively than basically any online educational environment I can think of, and it did it without people even realizing that's what they were learning.
<p><pre><code> > === How to Learn in the First Place
>
> (1) Play with something.
> (2) Read the documentation on it.
> (3) Play with it some more.
> (4) Read documentation again.
> (5) Play with it some more.
</code></pre>
(6) You're starting to learn it! Now <i>fix</i> the documentation
I learned C by writing a MUD client around '87-89. This was for VMS, where the telnet client didn't properly handle newlines and carriage returns, which made telnetting into a mud (tinymud at CMU mainly, then chaos and a few others) painful. I recently dug up the code (it was still online somewhere) and had a laugh.
This is how I got started, from a DikuMUD. I had met a couple of other people on Medievia and we decided to give it a go. I knew a tiny bit of C from an old pirated copy of Borland TurboC and just jumped right in.<p>Great stuff -- I remember my proudest moments were adding color to the various system messages (vanilla Diku at the time didn't do that), and adding online level editing with saving; previously you had to create maps offline.<p>Never contributed upstream (I was in high school and didn't even understand what that would mean), and eventually kind of drifted away from the community. But I got a ton of experience in just jumping in and working in C.
Some of my first programming experience was using the language inside of a MUSH (TinyTIM to be specific, based on TinyMUSH but heavily modified). Interactive experiences could be built up using the rudimentary logic afforded.<p>Found this repository of MUSH code if anyone is curious what it looked like: <a href="https://www.mushcode.com/" rel="nofollow">https://www.mushcode.com/</a><p>Modifying Eggdrop (the IRC bot written in C) was another project that contributed to my early understanding.
'vi'
'emacs'
'jove' -- use whatever editor floats your boat
but learn the hell out of it
you should know EVERY command in your editor<p>Those who picked emacs from that list never got the point of writing any code for the MUD. They greatly contributed to OS development all over the world however.
The first production lines of code I wrote was fixing SO_LINGER on diku so that we could restart the server if someone shut down their computer without disconnecting properly.<p>Later I wrote a string intern() function for a highly modified MUD that was having memory issues. But they balked at the complexity of having to use a malloc/free replacement even after I made the arena logic dead simple :/<p>Also the first implementation of a Slab allocator I ever read about, by a wide margin, was in LPMud, which one of my roommates and a friend were into. I wouldn't hear that concept again, unless I brought it up, for a decade or so.
Playing a MUD was the reason I started making websites so my friends could "easily" share equipment stats with each other without needing to scan them in the game.
In terms of "games as an entry into programming": The first-person shooter <i>Starseige:Tribes</i> (1998) had strong scripting support for both server-side gameplay mods and for client-side conveniences.<p>For example, many gameplay mods allowed players to dynamically place new entities (walls, platforms, turrets), and if your team was too competent and you got bored guarding the flag you put on an a client-side script to play Tetris in a custom HUD.
Really curious about this:<p>> If you have access to a program named 'Purify' ... learn how to use it.<p>Anyone know what this was or use it?
I remember reading this guide as a Medievia and small-communitt dikumud player in the early 2000s. It was zipped up with a few other guides, including Beej's socket guide iirc.
Amazing that they wrote this wonderful, detailed rant without mentioning Windows at all. VMS was certainly not the most popular OS or even most popular non-UNIX OS.<p>I mean, this is 1993 and they did mention DOS. But reading this, you would not know that most of those DOS machines were running Windows and that they were far, far more numerous than either UNIX or VMS. And Windows NT was already released when that was written.<p>Not that I am a Microsoft apologist. My main machine was OS/2 back then, I was already using Linux, and ( if I had the money ) NeXTstep would have been my dream platform.