News for hackers. Stuff that matters.
Re:I don't know how CPUs work so I simulated one in code by spchampion2 on Tuesday May 21, 2019 @12:53PM (#19971950)
I had a very similar experience, including a very late night trying to fix a weird integration problem along with my project team. We had spent hours trying to find the issue, but nobody was thinking effectively and we were making stupid decisions. Everyone wanted to keep going, but I insisted that we were not thinking clearly and that sleep would help us better solve the problem. I even promised I would come back first thing in the morning to start debugging again on my own. The team begrudgingly agreed and we walked away for the night.

I slept, came back in the morning, and had the problem fixed in like 15 minutes. I learned so much about CPU design from that class, but I also learned how important sleep is to thinking clearly.

Re:I don't know how CPUs work so I simulated one in code by sixothree on Tuesday May 21, 2019 @01:13PM (#19972161)
I woke up one day recently and "knew" what a co-worker had done wrong. He pasted steps of his issue with screenshots. Having slept on it I realized he had misspelled a server name. I have no idea how I discovered that or realized that while I was sleeping. But there it was.
Re:I don't know how CPUs work so I simulated one in code by 52-6F-62 on Tuesday May 21, 2019 @02:13PM (#19973005)
I've commented on a similar thing previously—

I worked for a while with some older Vietnamese refugees who were largely self-taught electrical engineers. They used to tell me how they'd dream about the circuits in these high-watt lighting ballasts they were fixing. One tale specifically had them trying to find a fix over the course of a week, only to dream up the solution and come in the next morning to repair the gear in minutes.

I've definitely dreamed up solutions to software bugs and architecture problems myself.

I've never really dug deeply into why, but it's fascinating.

Re:I don't know how CPUs work so I simulated one in code by BonesJustice on Tuesday May 21, 2019 @03:24PM (#19973885)
Once you’ve solved your first programming issue in your sleep, you’re officially a Real Programmer(TM).

Or at least you can feel confident that you’ve picked a good career path.

Re:I don't know how CPUs work so I simulated one in code by jussij on Tuesday May 21, 2019 @08:17PM (#19976494)
The mind is an amazing bit of kit.

On several occasion during my IT career I have faced situations where the problem at hand has taken days/weeks to solve.

What is most amazing is that on some occasions the solution literally just pops into my head.

It's almost like there is some background thread of the mind working subconsciously on the problem, only to rise to a conscious level when a solution is found.

Re:I don't know how CPUs work so I simulated one in code by ishiz on Wednesday May 22, 2019 @04:35AM (#19979126)
There certainly seems to be something to it. This isn't a new phenomenon: there is a story that Archimedes around 250 BC couldn't solve a problem until he stopped working on it and took a bath. While this story may not be true, it does show that these "eureka moments" were common not just today but also thousands of years ago.

I'm not a psychologist but from what I understand, "dual process theories" state that humans have two distinct thought processes. System 1 is fast, instinctive, and unconscious; it answers questions like "2+2=?" System 2 is conscious, deep thought; it answers questions like "if 2x+3=17, x=?". System 1 is the default thought process, but it can be suppressed by system 2. I would love if anyone who knows more knows how this might be connected.

Re:I don't know how CPUs work so I simulated one in code by Angostura on Wednesday May 22, 2019 @07:39AM (#19980035)
To be fair, the problem Archimedes was stuck on was how to measure the volume of an irregular body. Immersing his irregular body in the bath kinda gave him a clue.
Re:I don't know how CPUs work so I simulated one in code by tkxxx7 on Thursday May 23, 2019 @12:52PM (#19993438)
Many meditation practices focus on how to objectively detach from and observe system 1 so that we can maintain control over 2
Re:I don't know how CPUs work so I simulated one in code by sly010 on Tuesday May 21, 2019 @07:51PM (#19976328)
I once asked a question from a potential airbnb host through the contact form. The host answered something totally unrelated like "Hi, good question. We have 3 kitchen towels, 4 spoons, 7 chopsticks 5 plates 5 bathroom towels etc". It was strange. I woke up in the middle of the night when I understood it in my dream.
Re:I don't know how CPUs work so I simulated one in code by b_tterc_p on Tuesday May 21, 2019 @08:05PM (#19976420)
and what did this mean?
Re:I don't know how CPUs work so I simulated one in code by sly010 on Tuesday May 21, 2019 @08:18PM (#19976502)
He wanted me to call him.
Re:I don't know how CPUs work so I simulated one in code by b_tterc_p on Tuesday May 21, 2019 @08:56PM (#19976751)
I don’t think I would have gotten that. Good job.
Re:I don't know how CPUs work so I simulated one in code by J-dawg on Wednesday May 22, 2019 @05:48AM (#19979482)
Took me a moment to get this, but the part I still don't understand is why he needed to encode the phone number like that?

Does Airbnb strip contact details out of messages to prevent hosts and visitors from getting in contact directly?

Re:I don't know how CPUs work so I simulated one in code by irrational on Wednesday May 22, 2019 @08:35AM (#19980446)
Oh yes. They want all contact to go through them. They charge huge fees and they want to make sure that the hosts and clients don't try to make arrangements on their own without AirBnb getting their cut.
Re:I don't know how CPUs work so I simulated one in code by onei on Tuesday May 21, 2019 @05:33PM (#19975291)
Sometimes you can't see the wood for the trees.

I once spent more time than I want to admit trying to fix a broken import in python that I knew existed but wouldn't import. The morning after I realised I was trying to import "connnector" and couldn't see the extra "n".

Re:I don't know how CPUs work so I simulated one in code by HeWhoLurksLate on Tuesday May 21, 2019 @01:30PM (#19972393)
related Studio C sketch: https://www.youtube.com/watch?v=CxV0Nh10h5s

I've done that in my high school Visual Basic class- I woke up around 2 AM, knew exactly where I was going wrong, fixed it, and kept going until I'd finished my program. By the time my dad woke up at six, I had written over six hundred lines of code, had about twelve new features, and I was so exhausted I got sick for two days. I'm still proud of that sprint.

Re:I don't know how CPUs work so I simulated one in code by adrianhel on Tuesday May 21, 2019 @03:48PM (#19974134)
My most absurdly productive episodes have been when I've worked through the night. I love the amount of focus I get when there is nothing to distract me!
Re:I don't know how CPUs work so I simulated one in code by larzang on Wednesday May 22, 2019 @08:08AM (#19980236)
The absolute best coding I get done every day is during my morning shower. Letting your brain indirectly work on something is often the best approach to our kind of work.
Re:I don't know how CPUs work so I simulated one in code by agrippanux on Wednesday May 22, 2019 @10:36AM (#19981619)
You might want to read "Why We Sleep" by Matt Walker. It's quite fascinating what sleep actually does and how it affects memories and thinking. There is a large section devoted to debunking myths about pulling all-nighters; the super broad stroke is that the short term memory area of the brain needs sleep to offload data to the long term memory area and a lack of sleep causes the short term memories to just bounce off. Once sleep is achieved the brain can resume normal functioning which seems like "a-ha" moments but really is just your short term memory functioning with a fresh cache again.
Re:I don't know how CPUs work so I simulated one in code by hbhakhra on Wednesday May 22, 2019 @10:23AM (#19981489)
This reminds me of a time I pulled a near all nighter for a final. I came into the final on too little sleep and even though I knew the material, I couldn't think during the test. I took a 20 minute nap during the two hour final, woke up and aced the final.