Live data from Hacker News

Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

news.ycombinator.com

291–300 of 652 posts

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#291

I work with two types of LSP/LLM-averse programmers: 1. The HLSP user This group does use an LSP, it turns out, only via you as the conduit: you are their Human Language Server Protocol. They'll ask, ‘can we pair today?’. From that point, navigating code, looking up method names and signatures, and flagging syntax errors before runtime or compile time is your job. How they find their way around when you're not there…

> This group does use an LSP, it turns out, only via you as the conduit

Oh man, it makes my blood boil when someone asks in which file the function lives, and I know they have a "go to symbol" in their editor of choice, but somehow they never want to learn some features of their tools. I did notice that how you use your tools changes how the project is structured. Neatly organized files and directories are a must if you are not comfortable with quickly jumping to a symbol.

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#292
Find definition of Foo():

  grep -IR "func Foo("
Show uses of Foo():

  grep -IR "Foo("
Hmm, what were the methods in that field again? Open a split pane in Vim and scroll down in the second pane to where the field is defined. Also I pretty much just have the standard libraries of my most commonly used programming languages more or less memorized and keep the docs open in a separate window alongside as well for when I don't. And of course in a sensible language that actually gives you feedback (I'm aware some languages are more or less strict about this and it's not an option for everyone): when I try to build it, it will fail, indicating that I've done something wrong. This is okay, use the build loop and embrace the build errors.

*EDIT:* updating to address "CoPilot" specifically, as I don't think it's the same as the other things on your list. I have reviewed a lot of submissions that were written with various AIs and all of them without fail, this is not hyperboly, all of them were just bad (I'm sure someone will say that if you just use it for a 1 line error tweak it will be fine and what could go wrong there? And sure, probably, but if that's the case you're not getting any benefit from them so that's not what I'm interested in). The code was worse than a human would have written it, there were subtle bugs that no one had noticed because they were trusting the AI, etc. just don't use them. They're not ready, they may be speeding you up, but they're slowing down whomever is reviewing your code. It's a serious disservice.

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#293
Delete these five words.

Imagination, not pagination. Destroy all software. Don't let some tool make you a fool because the safety is off and the training wheels are no longer there. Turn off the defaults, the noise of misinformed conversation, non-existant completion of words lost in translation.

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#295
I use nvim. If I need to look something up, I use Telescope, which pops a modal up in the current buffer. Type the first few characters of whatever you’re looking for, and get a preview of it in the codebase, as well as the path. If I want to, I can then open that file for further investigation.

I personally don’t like the surprise of autocomplete, or of anything popping up on-screen that I didn’t ask for.

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#296
In the case of Xcode, I use it, but carefully.

The new "intelligent" autocomplete is annoying AF.

In some cases, it's great. Gives me a suggested function call that exactly meets my needs.

In other cases, not so much.

Here's a [hypothetical, but not really] example:

Say that I declare a property, like so:

    var userWantsMeToCreateWidgets = false
Then, later on, I want to reference that property in a function:

    func seeIfUserWantsWidgets() {
        if userWantsMeToCreateWidgets {
            .
            .
            .
        }
    }
When I start writing the if line, autocomplete invariably suggests something like:

    func seeIfUserWantsWidgets() {
        if *userDoesntWantWidgets* {
            
Where the heck did that come from?

But wait! That's not all!

If I later reference the function call, autocomplete often does this:

    seeIfUserWantsWidgets(*to: .paint*)
WTF???

It will often hallucinate variants of API calls, as well. I have to be careful, when adding delegate functions, because they are completely legit, as far as the compiler and linker go, but will never be called, because their signature is wrong.

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#297
I use ratpoison tiling wm with custom bindings, it's kind of tmux or screen for Xorg where you stack apps for example firefox, vim, ssh, tmux/screen, terms. Anyway, it's up to you how you search ctags, man, grep, web, etc

This setup is agile but still not as fast as lsp or copilot, but I prefer learning and remembering over speed, personal taste :-)

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#298
post #90

You should try turning off those features yourself for at least a month and see what happens ;) You’ll learn the answers yourself, much better than us trying to explain them. You’ll learn where all the reference docs live for your language, libraries, and frameworks, and along the way you’ll learn more by actually reading the docs. You’ll learn the value of good project organization and file naming, and explicit impo…

Autocomplete is more for discoverability than saving on typed characters, letting you rely less on documentation and more on the actual interface you're interacting with

But imho it does a disservice to new developers because they rely more on the exploratory aspect. At least that's how I remember it from doing C# in Visual Studio many years ago. You have a general idea of what you want, you type object dot and scroll the auto-complete list to find the method you think you need. And even if you can make it work after fiddling with it for ten, fifteen minutes, you can't be sure that's the best way to do it. And then you never want to go read the docs and learn the mental model and the patterns behind the library or framework. I believe it will only get worse with AI-generated completions.

Re: Ask HN: Programmers who don't use autocomplete/LSP, how do you do it?

#299
I think purism is a slippery slope for experienced people, I too suffer from this to a certaint extent. It's natural to fight change as you get older and it's part of the struggle to change your behavior and adapt to the changing times.

Short comment regarding syntax highlighting, unless you have some impairement, I think everyone benefits from this. It's something that helps you recognize patterns much faster and you can skim through the code way faster than without.

Post reply on HN