I had a nightmare last night that my game ran HORRIBLY slow, and I had to overhaul and optimize the entire engine in order to get it to run fast. You guys ever had stuff like that happen when you've been coding a lot?
LOL! Well, I can't say I've ever had a nightmare about programming, but I do often wake up with solutions for programming problems in my head. I guess my subconscious is always thing about this stuff!
I have had dreams where I figured out a solution to something that had been pissing me off coding-wise, but it didn't make sense; some "magic answer" that wouldn't work in real life.
Sometimes I wish I was this guy:
http://youtu.be/DBXZWB_dNsw
Sogona wrote:
I have had dreams where I figured out a solution to something that had been pissing me off coding-wise, but it didn't make sense; some "magic answer" that wouldn't work in real life.
Oh, I've had some of those too!
A personal story I've told occasionally:
Back when I was doing
Apple IIGS demos, there was a portion of I had to write. I spent an entire Saturday (I think) -- specifically I was awake for over 24 hours -- trying to get a graphics routine working and just couldn't (I was having trouble with a kind of "sine-wave fade-in" of some pictures). I ended up passing out at my computer. I woke up Sunday afternoon having forgotten where I'd left off/gotten stuck. I assembled what I had in the editor the results assembled only after one typo fix (variable name was wrong) -- then worked flawlessly. Baffled, I went through the code and found a couple pages (~50-60 lines) which I didn't remember writing. I would've shrugged this off as exhaustion, except for one rub: the opcodes/operands were all in lowercase. At that time I exclusively wrote my mnemonics in uppercase, a habit from my previous Apple II+ days (a system which
only had uppercase letters unless you had an 80-column card installed).
The following weekend when I told my groupmate the story, he thought I was bullshitting until he came over (we'd do this weekly to sync up on our code) and actually saw the section of code in question, remarking something about how it was weird that it was in lowercase and that the general approach taken didn't really fit my style.
Did a ghost write the code? Nah, certainly I did (who else?!), but I sure as hell don't remember writing it. Sleep-coding, apparently...
P.S. -- I started using lowercase mnemonics shortly thereafter.
koitsu wrote:
I started using lowercase mnemonics shortly thereafter.
Maybe your future self went back in time to help you out...
Considering that as a possibility, here's an advice for you if you want to keep the space-time continuum intact: if you ever come across a time machine in your life, the first thing you should do is go back to when you were writing that demo and write that code!
tokumaru wrote:
Maybe your future self went back in time to help you out...
But then who wrote the code in the first iteration of the time loop? (Please don't tell me that it's a stable time loop and that the time travel has always happened, predestination-paradox-like because this is bullshit.)
Being awake for over 24 hours does weird stuff to your brain. That and there's that thing where you get stuck on something and then you take a break and then over the course of your break your brain levels up and you can suddenly do everything. (unless that's just me?)
DRW wrote:
tokumaru wrote:
Maybe your future self went back in time to help you out...
But then who wrote the code in the first iteration of the time loop?
Could be
Hot Tub Morlocks.
That "Hot Tub Time Machine" movie was so stupid: They traveled back in time, but didn't arrive as separate people, but took the place of their younger selves. And in the end, one of them stays back. So, from his point of view: What happened when his friends disappeared? Did their "regular" past versions reappear in an instant? And what did they act like? In a way that they couldn't remember the past day (since they have been replaced by their future selves during this time)?
thenewguy wrote:
I had a nightmare last night that my game ran HORRIBLY slow, and I had to overhaul and optimize the entire engine in order to get it to run fast.
Your nightmare, my life. -_-
Work dreams suck. Work all day, go to bed, work all night, get up, work all day again.
But I imagine that work dreams lead to faster solutions to work problems.
In your dreams, what sort of profiling tools do you have available? Did you find a hotspot, or do you end up with
uniformly slow code?
I have had a couple of times at work being stuck on a problem and actively thinking about it for hours. Then when I finally give up and walk out to go home the solution just pops magically into my head. Even if I didn't try to think about the problem at the time.
Because your brain still keeps thinking on it. I lost the count of times I'm trying to remember something and I can't no matter what, then hours later I suddenly remember it when I'm doing something conpletely different.
tepples wrote:
But I imagine that work dreams lead to faster solutions to work problems.
Not really. Solving something in a dream doesn't mean that solution has anything to do with the real world. It feels like work, but you're not actually doing work.
Ultimately I think it leads to slower solutions, because I go back to work demoralized. It feels like I worked an unpaid shift, and then forgot to save my files at the end so I have to do it all over again.
tepples wrote:
But I imagine that work dreams lead to faster solutions to work problems.
Finishing work faster often only leads to more work being dumped on you sooner, so it's not like there's anything to gain from this unless you're working for yourself.
Or if it's all part of a deadline and your paycheck depends on it...
I actually thought to UNDO an action that I had just taken in real life, and it made me think of this thread.
Not exactly one of my brightest moments.
The only time I've ever felt like I've "coded too much" was when I wrote this:
viewtopic.php?f=12&t=13866I think the real motivation I had in trying to code that in a short time was that I was procrastinating from the science homework that I'm currently procrastinating from now.
Yeah though, I don't really go on coding marathons like a lot of you people seem to do. I just do little things whenever I have nothing better to do.
darryl.revok wrote:
I actually thought to UNDO an action that I had just taken in real life
Me every time I'm drawing on paper.
darryl.revok wrote:
I actually thought to UNDO an action that I had just taken in real life, and it made me think of this thread.
Not exactly one of my brightest moments.
That, or reloading a save-state in real life. This has happened all the time to me in real time, especially after spilling something, or saying something really stupid for example.
Though state saving would be nice, I've never had the reflex to hit F7 in real life. I do miss having an undo button when drawing on paper, but again, I've never reflexively reached for where the undo button on my tablet would be.
I know when I've been coding too much when:
-I am with my friends and I start talking in technical jargon, and my friends don't know what I'm talking about.
-I can't play an old school game without getting distracted by counting the sprites, BG layers, and animation frames.
Reading an exclamatory sentence and thinking the exclamation mark means the sentence is negated.
Even though in programming languages the exclamation mark comes at the beginning, not the end?
Sik wrote:
Even though in programming languages the exclamation mark comes at the beginning, not the end?
Precisely
psycopathicteen wrote:
-I can't play an old school game without getting distracted by counting the sprites, BG layers, and animation frames.
I've definitely done this before...
psycopathicteen wrote:
I know when I've been coding too much when: [...] I can't play an old school game without getting distracted by counting the sprites, BG layers, and animation frames.
Orteil of Cookie Clicker fame agrees with you. As do
the editors of the trope wiki.
Sik wrote:
Even though in programming languages the exclamation mark comes at the beginning, not the end?
Maybe he's spanish. In spanish there is a reverse exclamation mark at the begining, and a normal exclamation point at the end.
Bregalad wrote:
In spanish there is a reverse exclamation mark at the begining
But what does an inverted negation symbol do?!?!
Bregalad wrote:
Sik wrote:
Even though in programming languages the exclamation mark comes at the beginning, not the end?
Maybe he's spanish. In spanish there is a reverse exclamation mark at the begining, and a normal exclamation point at the end.
I took Spanish my Freshman and Sophomore year, and have now forgotten pretty much all of it in the time I've been learning French.
I speak Spanish and would have never thought about mixing ¡ with !, honestly. And ¡ would be a rather blatant syntax error, anyway (although I think DIV can take it as a valid identifier symbol, I should recheck).
tokumaru wrote:
Bregalad wrote:
In spanish there is a reverse exclamation mark at the begining
But what does an inverted negation symbol do?!?!
Indicate where the exclamation or interrogation of the sentence begins
Indicar donde comienza la exclamación o la interrogación de la frase
¡Ay! que dolor.
¿Donde dejé las llaves del coche?
¡Viva mi novia y la madre que la parió?
Ayer bajé un rato al bar a tomar una cerveza ¿donde estuviste tu?
The question is do you need?
If to understand the context of sentences. However, sometimes we tend to avoid writing them just by going faster, although it is a mistake. Doing so can lead to misinterpretation.
La pregunta es ¿es necesario?
Si para entender los contextos de las frases. No obstante, a veces solemos evitar escribirlas solo por ir más rápido, aunque es un error ortográfico. Hacer eso puede llevar a errores de interpretación.
Speaking of languages, the other day I for whatever reason started thinking about how programming languages would relate to actual languages. Here's my totally unbiased list.
- Java - Spanish
- C++ - English
- C - Latin
- Assembly - Chinese
- Python - Esperanto
- C# - French
- Lisp - Russian
- Fortran - German
Diskover wrote:
tokumaru wrote:
But what does an inverted negation symbol do?!?!
Indicate where the exclamation or interrogation of the sentence begins
This is not what I meant... I know what the symbols are for in spanish. The point was that when read as a programming symbol, the inverted exclamation mark is the inverse of an operator that inverts values, and that's the irony.
tokumaru wrote:
inverse of an operator that inverts values
So "clearly" it's the "cast to boolean" operator (!!x)
lidnariq wrote:
tokumaru wrote:
inverse of an operator that inverts values
So "clearly" it's the "cast to boolean" operator (!!x)
Which I
recently explained in detail on Stack Overflow.
But in which language does a postfix
! mean
factorial?