Live data from Hacker News

Ask HN: Does anyone dream of code?

news.ycombinator.com

101–110 of 146 posts

Re: Ask HN: Does anyone dream of code?

#101
post #91

I studied for an interview with Google late last year. I did a lot of algorithm and data structure exercises along with system design work. The study was intense for me, I spent about 3 hours a day working on problems in CLRS for about 5 weeks. I would dream of algorithms a few times a week and think about problems constantly. Unfortunately I didn't get the job but it was really interesting to experience how my mind…

Yeah, next time don't study.

I am convinced that Google interviews are rigged. I got on the phone with an "interviewer" and he sounded like someone strangled his pet in front of him.

I knew I wouldn't get past then because he didn't really seem at all interested in interviewing me.

I wasn't like Homebrew Qualified but I definitely wasn't Fizzbuzz Unqualified.

Re: Ask HN: Does anyone dream of code?

#103

I have plenty of dreams about problems I'm working on. I usually end up dreaming of a way to solve them too. Though I did have this one dream where I was able to open up a virtual console next to anyone I saw and could program them to do whatever I felt like. I could do this with just random objects too, not just people. That'd be an interesting game idea now that I think about it.

elseheartbreak dot com

Re: Ask HN: Does anyone dream of code?

#104
post #69

Earlier quoted context omitted.

More coders ought to try weaning themselves off of syntax highlighting and inverting their terminal colors to dark on light, document-writing style. If you don't need the training wheels and you're not a hacker in a movie, I think you'll discover over time that it is a sweet sweet liberation to be free from the ball and chain of syntax.

I could not disagree more. I often have to write without syntax highlighting at work, and there are zero positives and many significant negatives. It's not there as "training wheels" or to look pretty, it's there to help you avoid trivial mistakes and easily navigate through the code. There was discussion here recently about why we still edit code as text rather than as a tree, and syntax highlighting helps bridge th…

Yes, I've been doing this for at least a couple years. I've been writing various kinds of code for money since 1995, and no change has ever been as helpful to me as this one.

It's just a suggestion. Not everyone will like it or agree to seriously try it. I don't think it would necessarily work well for someone who's forced to use a certain editor or configuration at work, for example (and probably continues to rely on highlighting elsewhere outside of that job, preventing the mode shift from settling in).

But I think a good many developers who haven't considered this might discover as I have that it helps them to be calm and focused on higher problem-solving at the levels that matter to them. It really is liberating to read and write code more broadly as a meaningful language rather than just fitting and stacking bits and pieces together. You might reasonably claim you can just ignore the highlighting at will, but I and others have discovered after making the move (and really giving it time to set in) that we didn't realize how much the highlighting anchored our thinking to syntax.

I've had no more trouble at all preventing or finding bugs without highlighting than I did before. Also, while I've never used one I know that there are syntax-aware editors (or probably plugins for all the usual editors) that will show you broken syntax without drowning your code in syntax color.

Re: Ask HN: Does anyone dream of code?

#106
I write my best code in my head while riding my bike to/from work, in the shower or lying in bed falling asleep. Having extended times of being disconnected enables your brain to chew on things and come up with new things to try.

Re: Ask HN: Does anyone dream of code?

#107
Yes, I call this "terminal brain". Issues that I want to fix, or things that I've been working on whirl in my head in an abstract 2d visual state - flashes of the colors I'm using in iTerm, and random words repeating over and over... vague imagery of tailing a log file... it feels like my mind is creating scenarios and trying to solve many things at the same time.

I think it's both a blessing and a curse. On one hand, some days I wake up and immediately know how to solve problems, or I'll think of new things to try. I've also had many nights where I come to understand concepts from 'exploring' the whirlpool of vagueness. Solidifying the abstraction helps a lot, I guess.

On the other hand, this phenomenon can be very distracting or distressing at times. I have a terrible memory of trying to have sex and all I could think about was Redis.

Re: Ask HN: Does anyone dream of code?

#108
Not uncommonly. The first instance I can remember was during an automata & formal languages class: I dreamt of cars pulling out of parking spaces and going back in, and on waking realized that it had to do with the pumping lemma for regular languages. Last night there was a coding dream, but I don't remember the details.

Re: Ask HN: Does anyone dream of code?

#109
post #43

Try reading fiction before bed. I used to spend time thinking about code before sleep. The long term effects is the larger problem. Not giving your mind time to do something else will eventually lead to burn out. Credits to Tim Ferris for this routine.

I tried reading before bed. Before I knew it, I would become ridiculously tired any time I tried to read (fiction) in the daytime. It was frustrating! So, now I read at lunchtime instead.

Re: Ask HN: Does anyone dream of code?

#110

Just two nights ago, my wife came to join me, which woke me into a half sleep. I immediately grabbed something on my nightstand that reminds me of her and thrust it into the air, then I started to try to explain (somewhat incomprehensibly, apparently) the unit tests that would run against her. That's not a euphemism and the waving the thing in the air, I think, made me believe that her unit tests would run first, so…

Mock the wife
Post reply on HN