Hacker News new | ask | show | jobs
by ramon156 537 days ago
There are people out there who don't even use an LSP with autocompletion or type handling, just syntax highlights. There's a theory that actively thinking about this will prevent u from making mistakes like forgetting a semicolon.

I do agree that some nvim setups are just IDE's in your shell, but it's also nice to have everything in one place. I don't like vsc's and Jetbrains's terminals at all, as it gets clunky too quick. To each their own though!

4 comments

Syntax highlights were probably the first thing I disabled in vim, though they kept adding features—"that's nice, but how does one turn it off?"—so I'm on vi now. Hella distracting to have bloatware spam you like a pachinko parlor, but some folks will want that whole three ring circus cruise ship with the bearded lady tour, I guess. Color support got itself compiled out of the terminal, to avoid the results of git randomly squeezing the backside of a unicorn. Unix here is the IDE, which is fine, as I'm mostly not a programmer (why programmers keep launching flaming turds into production despite all the increasingly fancy tools is a somewhat entertaining question) and 35,000 lines of code is about the largest thing I deal with (vi, or a custom branch thereof). Plus some tools that I wrote that do exactly what I want them to. Multiple cores pegged because some AI nonesense is busy shoving crayons up its nose? No, thank you!
I don't know if you are trolling or not, but if not, you are an interesting person (In a good way) :-)

I too prefer a much more minimal approach to my text editor. Then what most IDEs provide, but syntax highlighting is luxurious and a must-have for me. In general, I really love colors, especially the simple colors of the terminal. Color can be distracting of course, but it is a phenomenal way to quickly differentiate between related and unrelated parts of the code.

> why programmers keep launching flaming turds into production despite all the increasingly fancy tools is a somewhat entertaining question

haha I love the tone and I feel you, the state of software (and computing in general) keeps surprising me (in a bad way) as years go by. It feels like it's only getting worse. We can talk about their salaries too !

You probably do this already, but setting NO_COLOR=1 to disable colors and syntax highlighting is supported by an increasingly wide range of applications.
> as I'm mostly not a programmer

What’s your type of job?

Thank you sharing your invaluable knowledge with such a precise and accurate language. It demonstrates clearly your deep understanding of the subject.
LSPs visually warns you the instant you forget a semicolon, so that error will only happen when you don't use LSPs.
The best programmer I know very often codes in a simple notepad like text editor with no syntax highlighting or any kind of other help. Purely plain text.

He does this mainly when trying to show/explain something to someone in code and when initially drafting something. Not for full blown projects.

I still find it interesting though, because I personally don't nearly have good enough memory to even do that. I have to look things up constantly and rely on auto completion.

I have normal memory but my interpretation of the worst programmer I've worked with is that he had extraordinary memory and used that to write extremely tangled code but due to remembering every call site and randomly named function he thought the code base was flawless. And the expectation was that efter he explained a piece of code once then I too should have committed that to memory and then be able to recall it days later when it unexpectedly mattered when explaining a new piece of code. Failing to do that would lead to a "sigh, I'll explain it from scratch again". I don't really remember but I think he used intellij, but like a tabbed text editor. Always ctrl-shift-f "startoffunctionname".
> There's a theory that actively thinking about this will prevent u from making mistakes like forgetting a semicolon.

I never want to waste a single brain cycle on a missing semicolon. That is what the editor (or autocomplete or AI or whatever) should be doing for me.

I used to think like this too, but I now categorize this as "making easy things easier" and I try to focus only on things that "make hard things easier". Now the main thing I value is flexibility, and that's mainly achieved by mainly spending my time in a programmable environment (the shell), and a CLI editor like Vim fits the most smoothly into this approach.

To give an example, let's say you want to make pull requests for an API change across several interdependent repos (e.g., an API change in a framework). So you want to you want to do a find and replace in each repo, then push the changes to a branch, and create a pull request for each one. This can be achieved entirely from the command line, making it really easy to repeat across all the repos that need to be updated.

(With all the above said, I do use most LSP features, like live error checking and autocomplete, but if I were forced to choose, I would give that up before I give up the flexibility of a programmable environment.)

Using a powerful IDE does not preclude dropping into the command line for that kind of repetitive, scriptable work, and many of us do use both.
I’m curious to see how you’ll automate this in e.g. IntelliJ, that doesn’t allow you to open multiple projects side by side. No, opening multiple instances of IntelliJ is not the answer.
Open terminal, run the script in the terminal? You don't have to load the IDE to write to files just because you do your manual work in the IDE.
You think you waste brain cycles on semicolons? Do touch typists make a conscious effort to "remember" where all the keys are? When you read, do you go letter by letter to make sense of words and sentences?

Your brain is an incredibly efficient tool. You should trust it more.

Brain cycles are still being used even if you're not conscious of them. So yes, some part of your has to spend cycles to remember to type that semicolon, and to even remember where the semicolon is on the keyboard, and in fact to remember how strong a signal has to be sent to the finger muscles to move the pinky to the right location and press the key.

In principle, this effort should even be measurable in calories (though it may be hard to distinguish from the noise of everything else you're thinking).

I don't think you got my point.

Perhaps I should have originally been clearer, but I have no clue what these "brain cycles" that keep being mentioned are. If it's some kind of CPU analogy, brains and CPUs are nowhere near analogous in how they work. The brain is an extremely complex system, whose mechanisms we're far from understanding fully and whose activities are mostly unconscious and subconscious processes.

In the context of our discussion, energy expenditure is not really the relevant feature. The more useful "index" would be the "perceived (i.e. conscious) cognitive workload". One is addressed with caloric intake, the other has more explicit psychological ramifications.

It may have been presumptuous of me, but cognitive workload is what I thought GP really meant by "brain cycle" and that's what I was addressing.

The point I was trying to convey is that the brain is very good at moving chunks of work away from conscious processes to subconscious ones (i.e. away from perceived load) through various optimizations. Usually, exposing the brain to deliberate and repetitive tasks will tend to develop certain tacit skills (subconscious shortcuts).

Another subtler point, was that an easy mistake when evaluating how much cognitive work a tacit skill actually demands, is to appreciate it from the perspective of someone who lacks said skill.

Ithe computer can reliably tell when you forgot a semicolon, why does the semicolon need to be there in the first place?