Bas Floyd 166ae031 Jul 2013
I have heard it claimed more than once that I am the inventor of the code library known as Floyd. Despite my best efforts over the years to correct this misapprehension, the common knowledge seems to be that I created and released Floyd when I was working at —– in the mid 2000s. Friends have asked me to tell the true story of Floyd’s creation, but I had hoped to remain in the background, to help keep the story from becoming more legendary than it already is.
Those who do know parts of the story — no one knows the whole of it — have accused me of trying to take the credit for the accomplishment, or of attempting to avoid blame for the disaster that happened afterwards. I vehemently deny it all. I have tried time and time again to correct the facts on the Floyd Wikipedia page and on my own, only to have my corrections be repeatedly reverted by shadowy, unnamed editors who arrogantly believe they know the story better than I do.
I hope that by telling this story now and placing it openly on the web, as we used to do in the past, I can put to rest all the erroneous assumptions that have been made about Floyd, and ensure that its real author, may his soul be at peace, gets the credit that he deserves.
* * * *
There comes a time in every programmer’s career when the race to keep ahead of changing technology becomes too quick. Our brains harden just the slightest bit; we lose the flexibility of our thoughts and the code does not come as easily to us as it did in the past. The best of us may still be able to run with the younger and fitter competition for a number of years, to keep up, even if we no longer win the race. But eventually we stumble; we lag, and then we are left behind.
I wrote code for thirty-five years, code since I was a boy, code that seems so trivial today — 10 PRINT “Hello, Butthead”; 20 GOTO 10 — but at the time, it opened my mind with a thrill and a challenge that I found nowhere else. I wrote code in the basement instead of doing my homework at school. I wrote code on Friday nights when all my friends were out with girls. As an adult I wrote code at work and I went home and wrote code into the night for my own projects, for the itches I had to scratch, and I put my code out on the Internet for others to use. None of these projects are anything you would recognize, now. The code we write, the projects we create: they are all as ephemeral as snow. If we are truly lucky we learn from the code that came before, and we create new and better code, and we pass our lessons onto others, so the technology can evolve and progress and change. We sow the seeds of our own obsolescence in every line of code we write.
And so it was that after many long years at my company spending my days and nights in the code, my body and mind laid against the machines, that my management moved me onto a new project, a project where I would be lead and architect, and where I would direct the work of others. The idea, as I understood it, was to give me a role where there would be little code for me to write and fewer chances for me to humiliate myself. I protested. Of course I protested. I complained, I fought bitterly, to no avail. Perhaps there was a germ of a thought even as I fought that perhaps they were right, and that perhaps my time in the code had passed by.
On my new project I worked with a team of programmers twenty years younger than I, young programmers barely out of school. Despite many different races and nationalities they seemed all remarkably the same. Young, smart, eager, arrogant, and naturally talented at languages and concepts and systems I did not fully understand. They could have dismissed me as just another old guy, a relic of the past, but to my surprise and pleasure they took my designs without complaint and came to my cube to enlist my help with the thornier implementation problems. They called me “boss” and politely invited me out to their drinking nights, but I always refused. I was their lead so I was not their friend, but surprisingly they still seemed to want to consider me one of their tribe. I believe it helped that I could trounce every single one of their asses at Super Mario Bros.
* * * *
It has been long forgotten that the full name of the Floyd library is Bas Floyd 166ae0. Bas for its creator; Floyd for the name he gave it; and 166ae0 for the commit to our repo that escaped.
Bas was a programmer on my team. Bartholomew Allan Swerdlow was the name on his badge and on his paycheck. He would answer to Bart, but he was bas in email and on IRC, bas on Skype and on Xbox Live and on twitter, and a week after he arrived everyone in the group just called him Bas.
Bas was young, terribly young, I was never sure precisely how young because all of the young look alike to me, but I heard he had dropped out of university to come work for us. If I had been his father I would have insisted he stop fooling around and return to school at once, but as his lead I was glad to have him. Bas was one of those rare programmers who seemed to speak computer as his native language. If you asked him a question he would pause for a few seconds, his eyes cast downwards, as if he were translating your sentences into code in his head before he replied, compiling it into something he could understand.
He generated code at breathtaking speed, far faster than any of the rest of the team, and all of it was clear and documented and virtually bug-free. The other programmers whispered about Bas behind his back, envious whispers that he was completely oblivious to. They thought he was inhuman.
Bas did not believe in the kludgy hack, in the bit of stupidity and laziness every programmer sometimes resorts to to get the code done in time for the deadline. He was offended by kludgy hacks. “That’s not good code,” he would state bluntly in our regular code reviews. Everyone in the group strived to avoid Not Good Code, to work harder and more elegantly, not the least reason of which was that it was humiliating to present your work to review and have Bas offer an alternative solution on the spot that was not only better, but often simpler and faster as well.
I did not manage Bas. The thought was laughable. I just tried to make sure that he had everything he needed, and tried to keep him focused on the task at hand. When he was focused, he was unstoppable. All I had to do was remove the obstacles, stand back, and let him run.
If Bas had a weakness, it was for games. But not modern games, not the cinematic wonders they have now, with dragons and portal guns. Not even the retro games, the running and jumping games that all the other kids played. Bas liked text adventures. Text adventures! Of all the video game classics he could have picked, he played the ones with the least amount of visual interest, the games that required silently reading blocks of text on the screen and then typing commands to solve puzzles and progress through the story.
Text adventure quotes and catch phrases littered his conversation, baffling his co-workers. Once in a meeting I asked him how things were going. “It is pitch black,” he replied, seriously. “I am likely to be eaten by a grue.” If his co-workers thought he was odd and inhuman before, this didn’t help. For a long while he talked about nothing except babel fish and dispenser buttons. “Bas,” I called to him over the wall of my cubicle after overhearing him mutter about it for the fifteenth time before lunch. “Play the game after work, please.”
“Right, boss,” he replied. “Floyd here now.”
And then Bas died.
* * * *
I got the call from HR at home early that terrible morning. His roommate had found Bas dead at his desk. No foul play; they suspected some sort of stroke, or a brain hemorrhage. Something sudden, probably painless, but still shocking for someone so young. We will tell your group, they said to me, warning me. We will send an announcement. I sat by the phone for an hour, numb, and then I went into work.
By the time I arrived on my floor the announcement had already gone out in email, and all the kids knew what had happened. There was a stunned pall on the floor, and they gathered in twos and threes in the hallways and whispered about it. When whispers increased in intensity a few hours later, I got up to inquire what the problem was.
Bas, it seemed, had committed some code just before he died. From home he had logged in and committed a handful of files with a single cryptic message:
commit 166ae0c4d3f420721acbb115cc33848dfcc2121a Author: Bart A Swerdlow <bas> Date: Sun Feb 8 02:50:43 2006 -0800 floyd here now
“Who’s Floyd?” One of the kids asked me as I looked over his shoulder at the log.
“It’s from a game,” I said. “An old game.”
“Oh,” the kid replied. It meant nothing to him. At that time it meant very little to me, some tiny bit of nostalgia from my youth, something Bas used to say.
I had asked Bas what he had been working on the week before he died, and he said it was something important. He had pointed to a few tasks on the backlog, all of them related to performance. “It’s going to be epic,” he had said, with a faint smile of pride. I had not checked in with him after that, because I knew he would come through, and if he thought it was good it was probably spectacular. Was this it? Was this the epic code he had been working on?
I didn’t have time to find out right then; even with a death in the group there were meetings to attend, tasks to organize, email to answer.
“Boss,” Nihal came uneasily into view in the doorway of my cube later that morning. Nihal, who was the designated spokesman for the group whenever there was bad news to be told. Paul and Oscar were hovering just behind Nihal and to one side, both looking nervous. “There’s something we have to tell you.”
“By all means,” I replied. I had an inbox of a hundred-odd email messages I needed to get through by lunch, and I could type as Nihal talked. There was a long silence. “Go on,” I said, motioning to Nihal with my hand to get on with it.
“Um,” Nihal started. “About Floyd.”
“Floyd,” I repeated, remembering the commit. Floyd here now. “Yes?”
“Well, it’s kind of escaped.”
I stopped typing. Moments passed. I turned away from the computer and gave the group a long stare I had learned from the management above me. Nihal and his cohort all took a step back, as if they half-expected me to turn into the Hulk and smash them. “Explain.”
“Well, um,” Nihal started. “Bas checked in the code late last night, and normally new commits go into code review –”
“Yes, I am aware of the process.”
“It appears that Bas did his own code review, and approved it.”
I stared at Nihal. “I thought with our system it was not possible to do your own code review.”
“Normally it wouldn’t be, but Bas had admin privs on CR. Amie gave them to him a month ago in exchange for admin on this game server he runs, it’s a long story–”
“That is not important,” I interrupted. “If Bas approved his own commit does that mean he also merged it into mainline?”
“Yeah, and from there the integration server pulled the commit and it replicated onto the network. It’s out there, it’s running on the production servers. It’s online right now.”
I was aghast. I spun back to my computer and pulled up our system monitor, drilling down into the logs. Yes, there it was, commit 166ae0, pulled and copied to every server node on our network. I said an obscene word out loud. “How soon can we revert it?”
“Well, here’s the thing –” Nihal started.
“That was not an answer,” I broke in. Letting unreviewed and untested code out onto the public servers was a crisis, an immense breakdown in all of our processes. We didn’t even know what the code did! Unless we could fix the problem immediately, all of our jobs would be forfeit. It was unquestionable; the problem had to be fixed, and fast. “How soon can we–”
“All the nodes are running at 9500 ops.” Paul spoke up, a querulous disembodied voice from behind my cube wall.
“How soon–” I repeated again, louder and more urgently, but then the words died in my throat. “Did you say 9500 ops? Nine five zero zero?”
Nihal turned to Paul who peeked nervously over the top of my cube. “9500, yes, and it’s independent of load. We sampled it three times.”
I stood up, and felt weak and dizzy. I sat down again, and I put my hand on my chin. Just in the previous week we had done performance tuning on the servers and had managed to get the ops up to 375. Even in the dead of night when there was no load on the network we had never seen anything higher than 400. Untested, unreviewed code that increased our throughput twenty fold? I said another obscene word.
“Yeah,” Paul agreed. “Yeah.”
“How is that possible? How can one piece of code do that?”
“We don’t know,” Oscar stepped forward. Skinny, shy, pale Oscar, who dressed poorly and went months between haircuts. “We’ve looked at the code, and there isn’t much there, but, um,” he blushed, and swallowed, and I could see his adam’s apple dip down below his collar. “We, um, we don’t understand it.”
I crossed my arms and stared my management stare. I looked from Nihal to Paul to Oscar and back to Nihal. “You don’t understand it? How is it that with your shiny new CS degrees from top-tier technical schools you cannot read other people’s code?”
Oscar flushed a deep red and stared down at his shoes. Paul stared back at me, his mouth hanging open. I was being needlessly cruel, but I was flustered, and angry, and I could not blame a dead man for the crisis. Nihal spoke up. “The thing is, Bas wrote it in C, and in a way that makes no sense to us. It’s all jumbled up, there are no classes, there are barely variables.”
“There aren’t even ifs or whiles,” Oscar protested, in his own defense. “It forks, but we don’t know what the threads do or where they go.”
“We traced it in GDB,” Paul chimed in. “It’s putting data into parts of the system it shouldn’t even have access to. And it appears to be rewriting itself as it runs.”
A little bell went off in my head, and I remembered a programming contest I used to follow on Usenet, years ago, a contest that I had once or twice tried my hand at. Obfuscated C. Bas had written Floyd in obfuscated C. I laughed out loud. Bas, brilliant, brilliant Bas, who raised the bar for all of us, who tried things the rest of us could only imagine.
“So we were thinking,” Nihal continued as I typed commands in an Xterm and pulled commit 166ae0 from mainline into my local repo. “We heard you did a bunch of hardcore C stuff back in the day, Wikipedia says you wrote some memory thing on your own before anyone had valgrind –”
“Yes,” I said absently as I typed, exploring the directory structure, looking for the changes Bas had made. “That was a long time ago.”
“So we were hoping you could take a look at it, and maybe explain it to us.”
And there it was. The code my team called Floyd. It took up less than a single screen on an Xterm. No preprocessor. No includes. It looked like an unending series of completely random characters, of line noise, a smear of ASCII on the screen. And it was carefully formatted in the shape of a robot, one arm raised cheerily over its head as if it were waving. “Floyd here now,” I murmured, tapping the keys lightly with my fingertips, my mouth turning up into a smile. Bas, you lunatic genius, what the hell have you done?
I took a deep breath and started at the top of the screen, compiling and executing the code in my head, character by character, command by command, my mental muscles for the code creaking as they stretched out, stiff from disuse. Nihal said something in the background, but I didn’t hear it. No preprocessor. No includes. It was probably dependent on the actual compiler version, and maybe even on the specifics of the system on which it was running. Hardware dependencies? Perhaps. I looked over the other files in the directory. There was a makefile, and a bunch of compiler and linker options I hadn’t used for ten years or more. I couldn’t even remember what most of them did. Man pages. I was going to need man pages. Voices murmured distantly at me from a long ways away, and I waved my hand at the group to dismiss them. “Let me take a look,” I muttered. “Go back to work. I’ll let you know what I find, and we’ll revert if we have to. I’ll let you know.”
* * * *
I was in a maze of twisty passages, all alike.
They call it the zone, or flow, that deep meditative state where a task so consumes you that you are completely unaware of the needs of your own body or of time passing around you. I’ve heard it said that runners get it, and writers, and artists, and video game players. Nearly all the best programmers get it, of course, and understand that magical feeling of being so immersed in the code that it feels as if you and the machine have become the same thing, that you have circuits and gates in your brain and that the machine breathes and cries and bleeds as you work.
That first day I thought I had only been working on Floyd for a few minutes when I heard a knocking and looked up from the screen, startled. The janitor woman was emptying my wastebasket; she gave me a faint smile as she moved to the next cube in the row. It was dark outside the windows. The building was silent all around me, except for the hum from the machines in adjacent cubicles. I looked up at the time.
I had been working for ten hours. My body was a wreck; my knees were stiff and my eyes stung. My hands were cramped and hot, my knuckles swollen. I realized I was hungry, and I needed to use the facilities. But I felt more like myself than I had in months.
Hastily I copied Floyd onto a thumb drive and stuffed it into my pocket. It would be quieter at home, away from my team, and I had a system there that was a mirror of my system at work. The group would run without me; they had tasks in the backlog and a clear direction in which to go. I had to work on the code. I had to spend more time with Floyd.
* * * *
It took me a week to crack it, a week in which I did not leave my desk except once, reluctantly, to lay in supplies: potato chips and frozen burritos and beer. I slept at my computer and more than once woke up with the imprint of a keyboard on my cheek. I didn’t shower or shave, and once in a while I got a whiff of my own stink in the stale air. I didn’t care. Floyd and I were locked in battle. I was out of practice, but I rapidly regained my skills with the code as I worked. It was as if my entire life as a programmer, all the code I had generated on a dozen different systems had all been in preparation for this moment, that I had been leveling up all this time solely in preparation to meet Floyd, to defeat Floyd, and to force him to tell me his secrets.
Floyd was bewilderingly complex, for a program that was just a handful of kilobytes. He twisted and turned as I tracked him, a sinister, lurking presence, and sometimes I thought he knew I was there, and he turned and evaded me as I came close. I drew diagrams and flow charts on the paper scattered on my desk, and then later when I ran out of paper, I drew my charts and my theories onto the desk and the walls and my own skin, onto my hands and arms. I found the hidden process that disguised itself as a USB driver. I found the tiny OS it ran, the virtual machine that wrote itself all over memory, scribbles of data that impossibly did not interfere with any other part of the system or cause it to crash. That data was retrieved later on by another secret process, and it formed a decryption routine for still more data. Layers upon layers of secrets and puzzles, petals of a flower bud, and one by one I peeled them apart.
And then just after 6AM on the seventh day I folded back the last petal and I found Floyd’s very center, the algorithm at its core. Astonished, I stared at the screen in wonder. A handful of lines, in pieces, split across processes and files. I traced the algorithm, whispering the commands aloud into the shadowy twilight, one at a time, and as I did I heard a thrumming noise in my ears and my mind opened up into what seemed to be an impossibly bright light, a light that consumed me with admiration and terror in equal parts.
I was humbled and exhausted and rapturous and feverish. My body felt weak and numb, as if I had just run a long race, and barely, only barely, finished ahead of the competition. As I breathlessly, elatedly spoke the last of the code aloud, as the commands faded away in the air, my head fell into my hands and I wept.
* * * *
How could Bas, at his age, have written this? How could anyone have written this, without being touched somehow by some divine, insane inspiration? It seemed impossible. It was so far beyond my own skills that I felt as if I had spent 35 years coding nothing but “Hello, Butthead” over and over again. I wished with all my soul that I could have gone to Bas, to go to his cube and kneel at his feet, to beg him to teach me what he knew.
But Bas was dead. Of course he was dead. How could any programmer write this glorious algorithm, this magnificent code, and expect to just go back to a normal life, to spend each day writing common code for common projects, to review other people’s work that he knew instantly was not good code. It was wrong. It was more than wrong, it was obscene. Bas had understood this. I’m sure of it. He had known that the code was perfect, that he would never improve on this work. This was the ultimate, final code he was capable of. Bas had given us Floyd, his only child, and it had destroyed him. His kernel had panicked, and his system had halted.
* * * *
“Boss,” Nihal, the speaker for the group, the constant bearer of the bad news, greeted me in the hall as I returned to work. “It’s good to have you back.” I had been gone for almost two weeks, unable to bring the shreds of my mind back together again after gazing on the heart of Floyd. I must have looked terrible, as if I hadn’t slept or that I had gone through a great illness, both of which were true. How was I supposed to read email, to organize tasks on the backlog, when I had seen what I had seen? “Um,” Nihal said, “about Floyd.”
“Yes,” I turned to look at the young man standing before me. “Go on.”
“We had to revert it,” Nihal said.
“Revert it?” My mouth went dry, and my hands shook. “But — you can’t — you said –” I stuttered. “You said it was running at 9500 ops.”
“It was,” Nihal agreed. “It was epic. For a while. But after it ran for a few days it chewed through storage and started forking threads uncontrollably. The admin guys said they saw whole racks of servers pitching themselves from side to side as if they were convulsing, pulling the screws right out of the floor. One of them even caught fire and they shut down the entire data center to get it under control.”
“You reverted it,” I said again, still having trouble conceiving what had happened. Reverted. Gone. As if it had never existed.
“We had to,” Nihal insisted. “We had to. It’s fast, but it’s not stable. And it can’t be stabilized if no one understands it. We don’t have Bas to fix it. We can’t use it. It’s not good code, boss. It’s not good code.”
Not good code. I shuddered at that, a cold chill on my back. I closed my hands into fists to keep myself from trembling. Not good code? Of course it was good code. It was perfect code, the most perfect code I had ever seen. Bas had died in writing it, and I would never be the same man after merely debugging it. I shook my head in disbelief. They didn’t understand. They hadn’t seen the golden core, the algorithm so beautifully constructed I still felt a wrench in my belly when I thought of it. They couldn’t possibly understand.
“Are you OK?” Nihal asked me, nervously “Boss?” I had already turned and walked numbly away to my desk. I turned on my monitor. Floyd was still there on my screen where I had left him after that first night. Looking at the code now the paths through its execution were closed to me, the petals of the flower had closed behind me as I had emerged from my own madness, as I had left Floyd behind. I closed the Xterm with stiff fingers.
That morning I paced the hall, muttering to myself, unable to sit still, unable to think, and the members of my team watched me curiously from behind their cube walls. I knew they were whispering about me, I knew they were frightened of me, of what I had become. They didn’t understand. After a few hours I returned to my own cube. Slowly I pieced together the files, I isolated commit 166ae0, I wrote some minimal instructions for its hardware and software requirements. And then I uploaded the code to the anonymous public server I sometimes used for my own projects.
I called the project bas-floyd-166ae0.
I committed it with the single line “floyd here now.”
I set it free.
* * * *
I am not the inventor of the code called Floyd. I am not its father, its creator. To Bas goes that credit, may his soul find peace. Bas is the speaker and the prophet and I regret that I knew him only for a few short months and then only truly through his work. I only regret I did not recognize his talent before it destroyed him.
I do bear the considerable responsibility for sending Floyd out into the world, and for that I am ashamed. I had hoped that others would stumble across it and be drawn into it as I had and discover its beauty, and so they did, again and again. But those who touched Floyd were irrevocably changed by it. Some managed to dig in only a few layers and complained of nightmares, of sudden chills in a warm room, of headaches. Some found the core as I did and were reduced to gibbering madness. And many, so many, were found as Bas was, dead at their desks, the code still up on their screens. I do not know why I was spared this madness, this utter destruction. I do not know why I was able to travel to the heart of the code and emerge with my sanity intact. But there are times even now, so many years later, that I dream of it and wake in the night, the sweat cold on my body, the memory fading as quickly as snow on a spring day.
For a while there was a movement to remove Floyd, as if it were polio or smallpox, a horrible disease that could be eliminated through hard work and technology. My original project was shut down years ago. A complex virus crawled the Internet, searched for copies and deleted the code when it was found. But nothing can ever be entirely removed from the Internet once it has escaped. Floyd still exists in its darker corners. Programmers still seek it out, programmers still try their minds against it, programmers still go mad, and programmers still die. Floyd can never be eradicated. Floyd is here now. Floyd will always, always be here.Posted on 31 Jul 2013 • in fiction •