During one of my college projects, I had this recurring dream where I was trying to debug a console-based program, but the output kept scrolling by faster than I could read it. I just kept running the test over and over, but I could never hit the Pause key fast enough to catch the output I needed. This dream recurred every morning for about a week. It always happened as I was awakening (in a "pre-lucid" state). Anyone else have dreams or nightmares about programming? -- KrisJohnson ---- Not exactly a dream, but: In the first few weeks of a very rushed ecommerce site redesign, I was the technical lead and working top speed for 50 or so hours a week. I think a full workweek affects me more than it affects many others, since I'm an intense, focused worker: Very few cigarette breaks, coffee breaks, Web-surfing breaks, etc. Much of this work in the first week involved designing the data model. Friday night after the first week, I went dancing at a club. It was a big DJ who I liked, lots of cute people, and I had procured access to one of my favorite (ahem) substances. I hadn't been dancing for a while, and I was having a great time. There was one problem. I couldn't stop thinking about data models. And not the e-commerce data model, either: Data models about what was around me, about the people and the lights and the music. I imagined a Bar table, with Bartenders and Liquors and BeersOnTap. I imagined a Person table to represent the people around me, mapping to a PersonMusicGenrePreference table, so each Person could like 0-to-infinity genres of music. The really strange part was that it was worse when I closed my eyes. When I was looking at the DJ, or the lights, or maybe some cute girl, the data model thinking subsided. But if I closed my eyes and danced, all these Visio charts of db tables popped up inside my eyelids. MarshallMcLuhan wrote about how the visual part of the mind is tightly coupled with the ability to organize and sort. My experience that night jibes well with M''''''cLuhan's conjecture. It felt like the visual/semantic-ordering part of my brain didn't want to shut off, but I could distract it by looking at things. ''I call this "free modeling" (analogous to "free association"), and find myself doing it subconsciously in many non-programming circumstances. -- KrisJohnson'' ---- When I was in college, I dropped acid and became a PDP-11. All sensory input was executable. All incoming nerve signals could be interpreted as data or code (16-bit octal values). I spent 4 hours stepping through the code for "bathwater against skin". Kids these days take Ecstasy and see Visio tables? That must be what's wrong with the world. ---- Also not a dream, but... I awoke one morning after spending a week relearning C++ following a hiatus from programming. As I lay in bed, not quite awake, the thought "I need to call my constructor" wandered into my mind. As soon as I realized what I'd just thought, I was instantly wide awake (and mildly concerned). Upon confiding this story to a C++ guru, he replied that what I really needed to do was run my initializer, not construct a new object. Thus we see the difference between novices and gurus. ''Back when I was developing ActiveX controls and containers, I would have pre-awakening thoughts about the need to "activate" myself or to restore my state from a persistence stream.'' ---- I often dream about code or poetry; whatever is on my mind during the day. I once dreamt that I was trapped inside a race condition. Needless to say, I was writing the core of a multithreaded application at the time. -- SunirShah ----- I took a summer session in assembly programming between my junior and senior years in college. After spending late nights working on my class project, I would often dream that I was a CPU endlessly executing machine. Over, and over, and over. Not exactly a nightmare, but rather disturbing. -- JimWeirich ''I worked at a place that felt like that because they didn't want to automate anything because they were afraid nobody would be able to maintain the code if I left. I ''did'' leave: because they wouldn't let me automate anything.'' ---- I dreamt that I came into work, and saw half of my development team screaming at a computer at the top of their lungs. "AAAAAAAAAAHHHHHHHHH" "What are you doing?" "Look, if we yell loud enough, it breaks the system!" They pointed to a big Smalltalk RedScreenOfDeath. I said, "Don't do that." -- JamesCollins ''Hmm, maybe not so strange after all: http://www.youtube.com/watch?v=tDacjrSCeq4'' Now ''that'' is impressive! ---- One of my friends was trying to go to sleep after some heavy drinking. He spent a long time trying to figure out "which register must be set" before it would be possible to sleep. Of course, he had been doing a lot of assembly programming at the time. Later that year I heard an almost identical story from another person, who also was into assembly programming. For some reason, low-level programming seems to work its way into your dreams and hallucinations more than high-level. ---- Playing Tetris for long periods of time is a good way to reduce the world to just blocks. Then you have dreams that are about your life but all the people are just strangely shaped blocks and you're trying to rotate them to fit better. ''I had that happen back in college when I played Tetris on the GameBoy. Music never got out of my head either. Long years later, I thought that would never happen again. Then I got KatamariDamacy ... I might '''''never''''' get that infernal game out of my head!'' In college the whole floor had been up way too late playing Doom, or maybe it was just my suite, and I spent a good five minutes of Data Structures and algorithims invisoning an oponent running along the oppisite wall of the giant chasm level with the little elevators. The whole thing, I think, was triggered by another suite mate who had dreamed that he'd been sweeping up shotgun shells from around his computer. - JoshuaDrake ---- A dream that recurs once in a while consists of a bunch of line segments moving around and connecting/disconnecting. I think it has something to do with graph theory, and I think I'm trying to optimize some sort of algorithm, but I never remember enough when I wake up to make any sense of it. ---- I used to play chess a lot. When driving, I would find myself thinking "with a knight's move, I could capture that Ford". Not a good way to think. In chess, you move onto the same square as a piece to capture it. In cars, that's not a good move at all. -- RonJeffries ''Reminds me of Nabokov's 'The Luzhin Defense'.'' ''I used to hack LambdaMoo (my private copy) quite a lot. I often dreamt then of debugging the code for circumstances in the real world, or to the algorithms for certain social interactions, that were unsatisfactory to me for a variety of reasons. -- LaurentBossavit'' ---- My first real full-time job was attending high-speed web offset presses (yes, I was into the web back in 1970, so what?). The entry-level job consisted of stacking tabloids as they come off the press. When the presses are running at top speed, they're spinning out tens of thousands of copies per hour. They have to be jogged into neat bundles, and the bundles stacked like bricks on a skid for shipment. Stacking was the hard job nobody wanted, so I did it. Picture this. You have about three seconds to grap a bundle and place it on the stack (one try is all you get), which has to be built about seven feet high and the bricks are slippery piles of folded paper. Keeping up with the presses could be a real challenge. In addition, I took the midnight-to-eight-am shift, so I had to sleep in the day. Unfortunately, my bed became that stack of paper once I was asleep, and it had to be moved. Or was I building it? Don't remember the specifics, just the ominous sense of "must do". To this day, my stomach feels a little queasy around real-time systems. -- WaldenMathews ---- I once had a dream where my arms and legs were contorted at strange, painful angles. I think at the time I was involved in some way with some skeletal animation code, and in the dream I had an 'aha!' moment where I realized that someone had stamped on the memory containing the matrices that described the orientation of my bones. I can also remember driving to work one foggy morning (thankfully I wasn't asleep at that point...) and thinking 'wow... neat fog... I wonder how God does it... is it Z-buffered, per-vertex or what...?'. Definitely one of those 'you need to get out more' moments! -- JayBell ---- My example is also about fog, although the fog is more metaphorical than practical. I've had a dream several times which I refer to as my "debugging dream". It starts with me driving down a wide, straight, clear road, then some fog arises. Somewhere in the fog, I lose the main road, and when I come out into the sunshine again I am still driving, but along an unfeasibly narrow, windy path or goat-track. If the dream is semi-lucid, I can try to go back into the fog and find the route back onto the highway, but it almost always seems to lead back to the narrow path again. If I continue along the path, I usually come to a river, crossable only with stepping-stones. In the manner of dream logic, this seems only a minor hindrance to the car, although on the other side is just a small wooded island, which leads nowhere. One interesting thing about this is that I only get this kind of dream when I'm working with C and C++. The much clearer stack-traces generated when Java faults seem to leave my mind in a saner state at the end of the day. -- FrankCarver ---- I had dreams in which I was thinking ObjectOriented. Once when I tried to simulate a loop construct, I caught myself [thinking? dreaming?] that I'm looping. And how to make a loop without making a loop? -- GirtsKalnins ---- At one time, I was pretty heavily into Windows COM component programming. One night, after an argument with my wife (about working late, if I recall correctly) I had a dream that we were still awake, and if I just talked to her everything would be better. But for some reason, she couldn't hear me. I started calling to her, but as I said her name, I knew it wasn't the right one. So I tried another name. And another. And another. As I woke up, I had the awful realization that I was calling IUnknown::QueryInterface() on her. -- TimLesher ''AAAUUUUGGGHHH'' -- (serious COM expert) PhlIp ---- I frequently find myself in a state somewhere between half-awake and dreaming, where I try to solve whatever coding problems I was working on that day. Often I "write" quite a lot of code in this state, or refactor existing code. These sessions typically end when I realize that I have no CVS access in bed! -- JohnWebber ---- Kekule's dream (see http://www.wikipedia.org/wiki/Friedrich_August_Kekul%E9_von_Stradonitz) probably qualifies. Kekule discovered the ring structure of benzene after dreaming of a snake biting its own tail. ---- It would be interesting to compare ArtificialStoryTelling to dreams. What is the algorithm the unconcious mind uses to produce them, and could this be simulated to produce interesting stories from a base of facts, CommonSenseKnowledge, and perhaps some problem to be solved? Dreams seem to aim at problem solving, or at least stress reduction. One algorithm seems to be to take small a event that happened a few days before and make it a theme, or times and places long ago. Often things you are concentrating on are not in the dream at all, or morphed in a way that presents the situation from a different angle. Last night I dreamt of being in a convoy of some cars and trucks in my local area. One girl was driving a bus, attached to which were several other trailers about four deep. I was trying to drive up to her and tell her not to tow so many. Then I ended up in this park riding a bicycle over rough terrain (I have not ridden one in ages). Now I recall I saw this massive tour bus three days ago and dwelled on it for a few minutes, but had completely forgotten it. My Dream''''''Weaver had used it as a seed for the dream. ---- Back when I was working in a skateshop, I kept dreaming about my girlfriend (now wife) being available in different sizes. Now that I'm hacking PL/SQL, well, let's say it's a ''relational'' database. -- AalbertTorsius ---- While first learning about monads, I dreamed I had completely restructured my brain into monadic combinator form, and was using unsafePerformIO to see five seconds into the future. -- ShaeErisson ''That dream earned this page its category.'' See also ReportFutureEmacsBug ---- According to an ex-girlfriend of mine, I woke from a nightmare one night into one of those very confused half-asleep states, and started quizzing her about whether or not she supported linux. -- MichaelSparks * Is that why she's ex? Or because she said no? Or both? ;-) ---- Not so much a dream as a real happening; while driving home, I was trying to explain the point of gpl. "The point is to keep people from preventing people [pause while I consider what is being prevented] from preventing people [similar pause] from preventing people..." this went on for a good 30 seconds before the futility of the approach dawned on me... ---- Last night, I dreamt that I was in a house somewhere in a forest, with my wife, my children (which we don't have) and some unspecified WikiZens (not that I've met any of you in person), when we had to evacuate because of a forest fire. To round up everyone, I yelled "Let's do the simplest thing we possibly can and get out of here!" -- AalbertTorsius ''Did you yell, "Leave your luggage here, if you die in the fire trying to save it, YagNi!'' ---- Recently I had a dream where everything was a C++ template, including the tram I was on. Then another template was applied to my cat somehow, and the cat became a little kitten. Weird. ---- I had to recode the budgie cage. I was going to port it to another language. It made sense at the time, but I don't think the budgie would have approved. ---- Found this little gem over at UserFriendly -- http://ars.userfriendly.org/cartoons/read.cgi?id=20050822&tid=1762904 to be precise. Perhaps not a developer dream per se, but a beautiful recursing dream nonetheless. -- AalbertTorsius ''I know I'm awake, & I know I fall asleep. Then, in the dream, I wake up a few minutes later, and, in the dream, can't sleep. I spend a few hours wandering around the house until I get tired again, and in the dream, fall asleep again. Then, still in the dream, my alarm goes off. I wake up, and start to go about my day, which feels like an extension of the bad dream I'd "just had" in the bad dream I *AM* having.'' ''Recurse this about five times, so that by the time my REAL alarm goes off, and I really AM awake, I'm so F4'd up I can't tell if I'm awake, asleep, if I ever WENT to sleep, if I've gotten ANY rest what-so-ever, and subsequently spend the rest of the day feeling emotionally & physically drained.'' ''Then I go home that night, hit the couch, and sleep for nine hours straight.'' ''This is not an uncommon occurrence, unfortunately.'' ---- Once, about six months ago, I was almost waken up by my parents, and then I decided to go back to sleep for an hour. The next thought was about the ACPI sleep state in which I should spend that hour. Could it be S1 or S2? Should I hibernate myself or is standby enough? -- Kovács Zoltán ---- One night I woke up my wife because I had started to type on her stomach in my sleep. The world's most ergonomic keyboard! ''No, you'll find such is about a foot lower and/or higher. And ask her about her joy-stick dream.'' ---- I've had dreams where I'm writing code in a Python-like language that has some kind of equational, declarative ability where I could write math equations (that are actually non-sense in the dream) directly rather than assignment statements and somehow the compiler would make sense of it. ---- I once dreamt that I debugged my girlfriend (who was a computer scientist too) - she had segfaulted and filled the screen with blinking, colored ASCII. When I recounted the dream to her, she was less than flattered. ''Women are spehgetti code. They have Goto's, Come-from's, and self-modifying code. Don't even try to debug them. The Romance Controls:'' http://blog.destination-fun.com/control_panel.jpg ---- Unfortunately, all the dreams I've ever had involve either martial arts, etheric entities, sometimes a premonition now and again, or any combination thereof. Nothing, ''nothing'', as entertaining as some of the stuff here. Definitely one of my favorite C2 pages of all time. ---- I once had this dream after creating java string filters from scratch... the strings and regexes were mutating into jagged shapes... the shapes were being joined and if the edges fitted together the regex got matched... then mountains of shapes were falling all around neatly into piles.. it felt strangely like i was looking at proteins in action... RohitKulkarni ''Regex Tetris?'' ---- See also ProgrammingDejaVu ---- CategoryWikiFavorites