All the bullshit I did as a kid (part 1?)
My first computer, and the first computer I called a server
It’s been a long time since I’ve actually published something! I’ve been sitting here adding a few sentences here and there to my many drafts, like one of those coin pusher games you find in an arcade—sooner or later I’ll build up the executive function juice necessary to give one of these sweet posts a kiss on the forehead and send it off into your inboxes.
For Christmas, I flew my mom and my brother to Raleigh. On one of the evenings, I dug out the Wii and fired up James Bond 007 Nightfire for Gamecube to play with my brother while the rest of the house watched us dodge the bullets shot by polygonal enemies. It took me waaaay back to high school. I was suddenly sitting in my parents’ living room playing the only first person shooter I ever owned after a long day at school, or maybe a Saturday afternoon.
This experience made me think about one of my drafts. The draft is about one of my very first jobs back in high school, but I started remembering all the other stuff that I did. There’s a part of me that often looks back and thinks, “If I’d had a real mentor back then, I’d be a much better engineer,” but there’s another part of me that thinks about some of the projects I took on and…man! Some of them were pretty clever/ambitious/impressive, and I’ve certainly got a collection of hardly-believable stories that go along with some of them. Hell, some of the things I built are things I’d struggle to do in a reasonable amount of time today, with the knowledge and experience I have.
I don’t want this post (these posts?) to sound like I’m bragging, but I think many of us did some interesting stuff as kids, and these stories are hopefully some good entertainment worth sharing. Please enjoy the first (and perhaps last) post of bullshit from a few decades ago. If you have your own stories of stuff you did as a kid, leave a comment.
My first computer
My dad was firmly an early adopter. In 1994, we got our first PC. My dad had it made by a company called Custom Computers1. It was quickly upgraded from Windows 3.1 to Windows 95. When the initial novelty of it wore off, a dialup connection via a 56k modem was added. My dad would read usenet and (slowly) download shareware.
I quickly took to playing on the computer, but my parents really hadn’t thought through what I was and wasn’t allowed to do with it. I think both of my parents were happy to have me doing something educational (especially if I was also keeping my little brother occupied) but neither of them really had a firm grasp on what “educational things” were. The first time I ever got in trouble for using the computer, I had found my way into the screen saver settings, and my brother and I were cheering on the rat in the 3D Maze screen saver.
Sometime in the 90s, my dad got fed up with me using his computer all the time. I don’t remember if I’d saved enough money to afford my own computer or if it was subsidized by my parents (probable), but I got my own PC. It didn’t have an internet connection, but it was mine! And I used it constantly.
At some point, my dad bought me a game to learn to code. When I finished that, he pirated a copy of Visual Basic 6 for me. Later, Visual Basic .NET 2003. I taught myself to program by downloading snippets of code from Planet Source Code, saving them to my very own floppy disk (which my dad had graciously allocated for this purpose)2, and ferrying them up to my computer. I’d pore over the code for a snippet and either delete it (useless!) or copy it into a folder of other carefully curated snippets that I might someday find useful.
Eventually we got broadband, and my dad got tired of me using his computer at all. So he bought a Belkin 802.11b wireless router and a wifi card for my computer, which let me use the internet so long as my mother wasn’t vacuuming or microwaving or using her electric hand mixer. Which, as it turned out, was unfortunately quite often.
I never became a gamer. I don’t even think I knew what World of Warcraft was. I spent my time on Paul Thurott’s WinSuperSite reading about Windows Vista (nee Longhorn and its server companion, Blackcomb). I had a fascination with icons—especially the beautifully smooth and shiny ones from Windows XP and the Oxygen icon pack—and I’d make my own with a copy of Photoshop CS4 that I’d pirated off eDonkey and a shareware copy of Axialis IconWorkshop. I made animations and AS3 games in Macromedia Flash MX (also pirated) that I shared on Newgrounds3.
But my number one hobby was programming. I made useless stuff. I had an obsession with building my own web browser—not like Internet Explorer or Firefox, but a shell like Maxthon. I can place this somewhere between 2001 and 2004 because I spent long hours building the best popup blocker I could come up with, only for Microsoft devastate me by adding a built-in popup blocker to IE6 as part of Windows XP Service Pack 24.
When I rewrote my browser from VB6 to VB.Net ‘03, I got interested in making it skinnable. Obviously the way to do this was with CSS. I had no idea how to make something with CSS in VB.
I don’t know why, as a shitty 12 year old, I decided to spend my free time writing a CSS parser. Ambitiously, I targeted CSS 2. I had no idea what I was doing (which circles back to the “if only I had a mentor at that age” thought that I frequently have), and didn’t even have the basic knowledge to know what to google for. And in hindsight, there weren’t many good resources online at the time for writing your own parser, and certainly not in VB.Net5.
And so I plodded along, writing extremely elaborate regular expressions to parse CSS one ruleset at a time, doing clever and treacherous things to handle, for instance, parsing strings (which could, of course, easily break the regexp). And would you believe, I managed to get a working parser that produced what you might call an AST (though I had no idea what that meant at the time). And I hooked it up to my browser, and got it to a place where you could style the back/forward buttons (and more) with background-image
and friends and use the :hover
pseudo-selector.
You might say, “Wow, it’s wild that you got a CSS selector engine working as a preteen!” And my answer to you is, “I did not.” I got lucky: the number of style-able elements was fixed and finite (maybe a dozen?) and not nested in any way and I just looped over each of them and tested whether they matched based on ID/class/pseudo-selector. It was kind of clever.
The code for this is definitely around somewhere, probably on a dusty Zip 100. If I ever find it, I’ll post it online for posterity’s sake.
I had another fixation with operating system shells. Or at least that’s what I’ll call them, because I don’t really have a better word for it. I would make these programs that would open full screen and pretend to be your operating system. They had their own windows, and I’d build little menus and stuff for opening your programs. There was a media player, a browser (take a guess which one), and all manner of settings and utilities that you could use.
In a lot of ways, I think this was really what later got me into web development, because it was less about building a thing so much as achieving an effect. I would spend hours making pixel-perfect gradients in Photoshop so that I could have completely seamless transitions between UI elements. Having a useful outcome was less important, in hindsight, than getting it looking how I imagined it to look.
Another fascination of mine at the time was text transformation and “encryption.” I spent a lot of time writing a series of functions that did things like convert plain text to things like pig latin, pirate, and Swedish chef, which were just functions that did lots of basic string operations. VB gave you Left
, Mid
, and Right
(analogous to substr
), along with a split and join function. It was satisfying to be able to write an algorithm that did something that had a clearly defined output.
I became increasingly interested in encryption—which I had no understanding of—and wanted to try making my own. What I made wasn’t encryption, it was encoding: there was no secret, the output was just an obfuscated version of the input. The one I remember most clearly (and which I expect was one of the few that actually did anything productive) worked like this:
The input string was split into an array of characters
Each character was converted to its ASCII value
A new array of numbers was allocated equal to the length of the original string plus one.
Value 1 of the output array was set to a random integer between the first and second values of the input array. That is,
rand(min=min(input[0], input[1]), max=max(input[0], input[1]))
.Value 0 of the output array was set to
input[0] + (input[0] - output[1])
Every remaining value of the output array was set such that
output[i] = input[i-1] + (input[i-1] - output[i-1])
.The values of the output array were converted to their base10 string representations and joined on a comma.
A quick demo here: https://codepen.io/mattbasta/pen/eYXvNWy
Decoding this is simple: split the value on comma, parse each value as an integer, and average each pair of adjacent integers to get the ASCII value of the plaintext. In Python:
parsed = [int(i) for i in input.split(',')]
out = ''.join(chr((parsed[i] + parsed[i + 1]) // 2) for i in range(len(parsed) - 1))
I wish I could find the code that I’d written that did this in Visual Basic, because it was kind of pivotal for me. The code was slow. A sentence or two took seconds to run through the function. Pasting any significant amount of text in locked up the application for minutes. My sweet simple child brain thought, “it’s slow because it’s secure!” I learned this wasn’t the case when I made some changes and the result was much faster—for no obvious reason.
I had read online that functions like Left
and Mid
were slow. I was doing lots and lots of manual parsing to process the characters from the string, and used these functions heavily. Through what I remember to be a very frustrating trial and error process, I rewrote my function over and over, eliminating as many usages of these functions. This was the first time I ever did any kind of refactoring for a reason, and definitely the first time I had to think about what the computer was actually doing when my code ran.
I think for a lot of beginner programmers, there’s not really anything to tell you that the functions you call are just someone else’s functions, and those functions call functions, and so on and so forth, until those function calls turn into CPU instructions, which are really just clusters of microcode instructions, which triggers elaborate arrangements of transistors—and then the computer scientists hang up their lab coats and the electrical engineers take over. Discovering that there’s another layer underneath the tools you have available is like discovering that matter is made of molecules, then discovering that those molecules are made of atoms, and then that there’s stuff inside the atoms and so on until the physicists shrug and point at some smug mathematicians. And suddenly the behaviors that you’ve chalked up to “this thing just does stuff sometimes” has a concrete reason.
My first server
My dad eventually replaced his Custom Computers box with a Dell running Windows 98. And then when my first computer running XP was better than his, he upgraded to an even better one so he could also enjoy the wonders of a Windows NT-underpinned operating system. His Windows 98-powered Dell was relocated to the basement, and I claimed it for myself.
The first order of business was internet access. At some point I’d decided wifi for my own PC (at least 802.11b) was too unreliable, and my mom made a lot of mashed potatoes with her electric hand mixer. So my dad and I bonded over the shared experience of running about 300 feet of CAT-5e cable up down from the living room into the basement, up one wall cavity of the house into the attic, under the floor boards to the other side of the house, down the back wall of my bedroom, and out through a hole we made in the wall. My bedroom internet went from bad to pretty amazing, and most importantly, I had a spare 802.11b wifi card to install in an empty PCI slot somewhere.
That somewhere was my dad’s old Dell computer. But Windows 98 wasn’t going to work for any of my purposes (according to my 12-year-old logic). I pirated a cracked copy of Windows Server 20036 from eDonkey. That Dell was decidedly not specced for running Windows Server. It took 45 minutes to boot up, but the moment I saw the XP-style icons on the desktop and a wizard to set up IIS, I was elated.
I installed Visual Studio on the machine (as though it wasn’t taxed enough) and somehow managed to get an ASP.Net application running on localhost
. This was my first “real” website that wasn’t just static files—it actually ran code on the server.
My first order of business was building a blog, which was a very trendy thing to do in the first half of the aughts. The XML spec was released in 1998 and it was all the rage. Everything used RSS. Or Atom. Or both! Microsoft was doubling down hard on XML and RSS7, to the point of adding an RSS client to Internet Explorer 7. Dave Winer was a minor celebrity among technologists of the time, rivaling Steve Ballmer for popularity.
And so when it came to building a blog, the first order of business (after making sure my XHTML Transitional markup was valid) was reading and writing the blog data from the disk. I had no idea how to use a database, so I read and wrote data from XML files using all of the brand new XML classes that Microsoft jammed into .Net 2.0. Everything was XML in flat files! Then came the Atom and RSS feeds, and the XSL stylesheets, and pingback and trackback support, and probably a hundred other little features that I can’t remember that I spent hours on and which ultimately never got used even a single time.
All of this work, however, would have been spiritually for naught if it was just running on localhost
. Getting this blog online was the goal! And so I did treacherously clever things to get the packets into IIS, all of which I started with zero knowledge about and learned along the way:
Port forwarding needed to be set up from the router.
The server needed a static IP on the LAN so that the port forwarding wouldn’t break every time my mom used the electric hand mixer and the wifi reconnected.
I needed a domain name! So I registered a .TK domain.
Our ISP blocked inbound port 80 to prevent you from doing exactly what I was doing. So I had to run things on port 8080 and use the domain name’s URL rewriting (read: putting a big full screen iframe on the page) to forward the request to port 8080.
Our home’s IP address rotated every 12 hours or so. So I had to set up a dynamic DNS client that updated a DNS A-record somewhere.
In the end, the .TK domain loaded an iframe pointing at the CNAME on port 8080 that pointed at our home IP that forwarded the request to the server’s static IP. But it worked. Or at least while my mom wasn’t vacuuming and the computer didn’t crash.
Learning PHP
This setup worked great, until I got FOMO from what seemed like literally everybody in the world writing PHP. I spent a lot of time on Digg and watching Kevin Rose’s many internet videos thinking of how I too could be a Noteworthy Person on Internet if I just learned this one fun-sounding language. Educating myself on the LAMP stack led to me moving to the cloud (MediaTemple, for those of you that remember), and the computer in my basement eventually fell into disuse.
Learning PHP was terrible. I remember one day where I was getting the infamous “PHP expects T_PAAMAYIM_NEKUDOTAYIM” error8 I had to give up so I could play some Gamecube games to calm down (probably 007: Nightfire, actually). PHP made a lot more sense to me in the end, though, because it eliminated the indirection that .Net introduced: ASP.Net at the time was built for people who wrote WinForms code, where you’d draw a pretty UI in one view and then write some functions to handle events for it in another. It was designed to hide the HTML and CSS and JavaScript from you. If you knew the HTML, PHP felt much more comfortable because you could type ?>
and start writing the HTML that gets sent what that bit of code runs. And, each path was a file: adding a new route was just adding a new file. No bullshit XML configuration required!
Unlike VB, writing PHP was freeing. There was a huge community. There was a ton of sample code online for building websites. Every now and then you had to perform some sort of .htaccess
incantation to make your thing work, but by-and-large it was easy to get something built.
I’m going to skip ahead a few years. I became a somewhat better programmer. I built a ton of websites in the meantime, some for fun and some for money. Mostly, though, I was making silly little things.
Sometimes, silly little things turn into silly little trends. A neat app called Konfabulator (bought up by Yahoo!, of course) caused a cascade of “widget frenzy”. Apple added widgets to Mac. Microsoft added a widget sidebar to Vista. Google Desktop became more of a way to distribute widgets (“gadgets”) than what it was originally designed for (desktop search). Opera—my browser of choice at the time—added their own widgets.
Being a loyal Opera user, I decided to build a widget for Opera. My first widget ever was a very half-hearted rebuild of Digg Stacks9. It was really just an iframe to a website I was hosting that called the JSONP endpoint that provided Digg Stacks data, and with a mix of scriptaculous and Prototype, it animated a weird bar chart. It wasn’t good, but I liked it.
I found a company called Widgetbox that let you make widgets for the web. Finally I was able to put my PHP skills to good use! One of the first widgets that I made—and to this day I cannot believe that I was effectively the first person to do this—was to make a YouTube widget.
The YouTube widget was simple: it used Widgetbox’s configuration system to allow a user to give their username or a search query. It would turn that into a HTTP call to YouTube’s various RSS feeds (later, API calls). And then, it applied an XSLT stylesheet to render a nice UI as HTML.
I submitted it, and it quickly entered the top 5 most popular widgets on the site. Here it is in 2007, by the time it was on its second version:
Widgetbox at some point held a competition for the best web widget. The winner would get a free ticket to SXSW that year. I entered the YouTube widget into the contest, and after much waiting, I found out that I’d won! …fifth place. The company sent me a very satisfying prize, though: a Lego Mindstorms NXT kit. I spent so much time playing with this, and honestly wish I knew where it is (probably my mom’s attic).
The year I graduated high school, Widgetbox asked if I’d work for them over the summer. At the end of the summer, they flew me to San Francisco to visit their headquarters. It was my second time flying someplace and my first time traveling unaccompanied. This trip brought so much excitement to my family that my Great Uncle Edward—who I had only ever known as my rich uncle with a mansion on a golf course in Florida—came out of the woodwork to give me TWO HUNDRED DOLLARS10 for my trip.
The following summer, they invited me to SF for three full months for an in-person but unpaid internship. That’s a wild story for another time, but the reason I bring it up is because an exec from the company let slip that I had won the widget contest, but the rules stipulated that I needed to be 18 years old (which I wasn’t at the time). I don’t know if what they said is true, but it was certainly a nice ego boost.
Anyway, sorry if this was a bit all over the place. If you thought this was fun, leave a like. If folks want to hear more, I’ve got stories about how I got suspended for three days in high school, how I won a pizza part for my AP Calculus class through gray hat hacking, and more.
Amazingly, it’s still around.
Later, I would somehow end up with a single Zip 100 disk. And even later, a spindle of CD-Rs.
For whatever reason, I made a series of intricately-animated platformers where you’d play as George W Bush, avoiding Bill Clinton marching back and forth and dodging soft pretzels. I doubt these games would have aged well if they still existed today, but my friends and I thought they were fucking hilarious at the time.
This wasn’t such a surprise, at least; I was a Microsoft beta tester for Windows XP Service Pack 2.
You may be saying, “You should have learned C#!” And I’d agree with you, except a.) VS 2003—practically speaking—was the way you could start learning C#, and that meant that I was coming into .Net with VB language experience at a time when nearly zero people had C# experience and b.) I seem to recall that C# didn’t do certain stuff that I wanted initially. It’s also the case that at this point in my life, I had not written any code with curly braces (not even JavaScript!).
Dear Mr. Gates,
I am sorry for stealing your software. I was too young and too unaffiliated with a university or corporation to be able to get an MSDN subscription. Forgive me, it was good. So sweet and so cold. I promise I’ll never do it again. Good luck eradicating the guinea worm.
With love,
Matt Basta
xoxo
Microsoft’s forthcoming operating system had three “pillars”: WinFS, Project Avalon (today called WPF), and Project Indigo (today called WCF). All three had XML at their core: Avalon let you build your software’s UI with XML (“XAML”), WCF was (is?) based on WSDL and SOAP and RSS, and WinFS was planned to support schematized XML data.
Rasmus Lerdorf can fuck RIGHT off for naming it that. The sheer volume of person-hours that error has wasted is downright immoral.
From Stamen: https://stamen.com/work/digg-labs/
$280 in today’s dollars
These stories brought back so many stories from back when I was a kid. I also had a father who was into new tech and your stories are very relatable.
Thanks for this article!