Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>It took a bit, but eventually I came to understand that he is so good at reading code that he just wants it all laid out in front of him as densely as possible. He can effectively run it in his head, as long as he can see it.

In some ways, I also benefit from this. If I am working on the same code every day, I typically have it all loaded in my head anyway. If I am coming to a codebase for the first time, or coming back to it after working on something else for a long time, it is very helpful to have as much of the code as possible fit in one screen.

That said, there are tradeoffs for sure. Whitespace is not much help for me, but clearly named variables (e.g. `area` instead of `a`) are essential. Then again, there are some short variables that are very common and clear to me in specific patterns, for example in `for i, length in enumerate(boards)` I have no problem realizing immediately that `i` is short for `index` where ever I see it in the for loop body.

Three specific pieces of advice here:

1. Use an autoformatter when you need to read code to convert it to your preferred style. Don't enforce that on the team without consensus though.

2. Everyone who can afford it should buy larger monitors. 4k 32" will fit a lot of lines of code, even if it's not quite as dense.

3. Don't stress about style consistency too hard, but do attempt to match the existing style in any given project.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: