Live data from Hacker News

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

news.ycombinator.com

281–290 of 652 posts

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

#281

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…

I agree on turning it off to find out. I disagree with almost all of your takes though. If you work without it, I would similarly suggest turning it in for a month. > 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. I know where they are. I use them every day. But reaching for them to check every argument if…

>If you work without it, I would similarly suggest turning it in for a month.

In the past when I've tried to use IDEs, I've often given up within minutes because they would keep doing things that disrupt my flow - like popping up an entire menu of autocomplete suggestions in a way that obscures other code I'm trying to read, or autotyping a close bracket that I would have typed anyway by muscle memory, or not making it clear how to move the cursor past something it auto-typed, or interrupting me with warnings that something won't compile when I haven't finished typing it....

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

#282
I used to not use any of those tools. In C, I split my source into logical modules, and added a short module prefix to each function, to make it easy to find.

Later, I found out about ctags and started using it; but it's not that useful for autocomplete. I kept to my old naming conventions: one verb whenever possible, plus any prepositions (is/has/etc.), noun if applicable, and module prefix.

This works well for the programs (not libraries) I write. Libraries have a different set of design considerations.

My function names end up like:

    memalloc (mem module, alloc verb)
    print (no module, print verb)
    gccollect (gc module, collect verb)
    vecappend (vec module/noun, append verb)
    Vec (module/noun)
    render (static function, render verb)
Most functions should end up private (static/not exported) anyway, so exported names can be short and still unambiguous.

In languages that have namespaces like Go or Python, I use their own namespace facility. I like to avoid the need for underscores or capitals in names so I don't have to press shift to type them, but some languages (Go) make this unnecessarily hard.

Eventually, when I started working in large Python and Java codebases written by others, I had to get an LSP plugin so it would take me to the correct definition. Ctags doesn't know about overloads. And some people don't care if they put a function in a logical place or not.

My editor's plugin doesn't have autocomplete, but giving functions a reasonably-sized name (and having two code windows open side-by-side) solves that problem.

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

#283
> autocomplete

is rarely useful to me, I just type things out.

I'm just quicker this way. By that I mean that my stream of thought just flows, when thinking about autocompletion is like in another "brain space" which makes my mind stutter.

I don't know if I'm wall-clock quicker for real, especially as I'm not that fast a typer (certainly not as fast as I want to be) but the mental exercise is annoying enough that I prefer the smooth tarmac of typing it all vs the pebbled trail of jumping back and forth between thinking about the output of typing and autocompleting.

If some autocomplete produces a dropdown list the thing it does help me is a quick feedback as to whether I made a typo, but I basically never tab the autocompletion out.

Only time I do tab out autocompletions is on the shell, and mostly only for paths.

> language servers

I do kind of see the appeal e.g VScode's invoking this inline view of a method implementation right at the call site. In practice I never use it.

Another one is inlay hints in Vim, e.g with type information for dynamic languages (e.g Ruby when using RBS) or to correctly feed autocompletion.

What I don't like is how heavyweight LSPs "feel".

> and recently copilot

I tried Copilot a few times and it was a) slow and b) mediocre.

Slow is stupendously because it feels like I'm driving an autobahn, except littered with 10kph roadbumps.

Mediocre as it sometimes produces code that works, but most of the time is either wrong or flat out doesn't work; even for boilerplate its output is bad/inconsistent with the codebase/outright incorrect. So every time I have to enter a "review mode" state of mind and fix the damn thing, which ends up being slower than just fully typing the thing out in the first place.

> go-to-definition

:sp p lib/whatevs (backed by fzf) then /thething because codebases I work on are typically organised sensibly.

Or I just open a new tab and rg thething then vim thepath +:42

Unix as IDE is stupidly fast and powerfully flexible for me.

> Do you just remember every type and field in a codebase

Mostly, not everything but I do have a mental map to find things quickly with the above.

Rereading the above, I realise that maybe the takeaway is that I'm a "fixes radios by thinking" type of person, which means huge mental models and map of everything fit in my mind, then I reason it out and come up with a solution in my mind, and I just need to type it out as a final step in a sort of stream of thought way, so anything that gets between the mind and the characters appearing on screen is a major drag.

I don't think it is any worse or better than an IDE, it's just the way I work, and I've seen some people do crazy stuff crazy fast with IDEs/LSPs/LLMs just as well. It's just not my way of operation.

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

#284
post #247

Earlier quoted context omitted.

I greatly enjoyed this comment of yours daltonpinto. Thank you. I do not rejoice with code bases where every file has no logic or code in it but there are hundreds of methods and files with everything spread out. I have no idea how those projects fit together because the actual logic is spread out. For my personal side project hobby work it's all in one file.

> For my personal side project hobby work it's all in one file. Ok, so this is work, but: find . -name '*.cs' -type f -print0 | wc --files0-from=- 1035617 3438912 47446211 total Not many editors are comfortable with a million line document that's 47MB. And that doesn't include generated code (which I very rarely need to look at, but is right there under F12 if I do)

A 100G file was ok in those editors even with syntax highlighting. That is an extreme because saving did take some time but there are ways to optimize for that would it ever become popular. IMHO 640K per file is enough for everybody.

  dd if=/dev/urandom bs=1M count=100k| tr -dc 'A-Za-z0-9\n' | fold -w 130 > largefile.c

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

#285
If they are good at what they do, I think they are simply good at keeping things in mind, what everything is called, developing a good mental model.

Personally I often write code without LSP, and use pure text completions with Emacs (words of opened buffers) and cycle through them. I know the language well enough, or I look things up in their documentation until I know them well enough. Occassionally I will also use LSP, if it exists and is easily configured and works well.

Go to definition: If I don't have it, I develop a map of the project in my mind where I find what in a project. I have also observed how projects become not so well organized, when people rely too much on always being able to "navigate through code". One does not need to pay much attention to module naming or class names and the like, if one never na igates the file tree to go to the file. Sometimes I have to rgrep/ripgrep.

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

#286
post #181

Earlier quoted context omitted.

> I work almost exclusively in Emacs without the modern LSP-based tools I'm wondering how many people in the comments would misinterpret it as "Emacs is outdated"/"Emacs does not have modern LSP-based tools"

I was about to switch from Emacs when I found TIDE for Typescript development (which is what I do), and it kept me in Emacs for years longer. Recently though I couldn't resist experimenting with Copilot and I switched to VS code for it, after 32 years. Is there a good Emacs module for it by now?

I've been using copilot-mode in emacs for probably a couple of years.

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

#287
post #63

Earlier quoted context omitted.

>And you’ll learn that the speed of typing, even long method names, is not the limiting factor of your productivity. This is the fundamental truth that those pushing AI as a replacement for programmers miss (intentionally or not).

> This is the fundamental truth that those pushing AI as a replacement for programmers miss (intentionally or not). I think this blend of comment shows a good dose of ignorance discussing the role of AI as a replacement for programmers. It's not like PMs are suddenly seeing engineers vanish from software projects. It's that AI makes developers so much more productive that you only need a subset of them to meet your w…

So, your argument is that AI does not replace programmers, it just... replaces programmers?

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

#288

This question reminds me of the first time I met a blind programmer. I asked him how he managed to code, and he replied with something that stayed with me: a good programmer should organize software in such a way that every piece of code has a clear and logical place. The organization should be so intuitive that anyone could build a mental model of the structure and navigate it easily, even without seeing it. It felt…

This matches my experience as a non-blind programmer. If the code is not well structured, I have issues finding things by intuition. The mental model or map does not work. Then I rely on searches or various kinds. It is annoying, and one can't always change this, when working on a non-restructuring MR. Others relying ore on LSP might not even see this issue.

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

#289
I'm a Rails programmer and recently the Ruby language plugin for VSCode I was using was deprecated so I switched to Shopify's ruby-lsp. On the one hand, it's much much more capable than the old plugin: better syntax highlighting, actually useful inline definitions, style hints, etc. On the other hand, it's also way more annoying: there's a bug that sometimes breaks my projects' dependencies so I have to reinstall them, the code completion actually slows me down more than it helps, and if the LSP can't start for some reason (which happens quite often) I get a stack of error popups in the corner of my screen.

On the whole I think I prefer my old setup. All I really need out of my IDE is decent syntax highlighting. I've got devdocs.io for Ruby and most Rails definitions and I know how to spelunk through the Rails codebase for anything that misses. Go-to-definition is handy for my own code but I generally know where it lives, and if I've forgotten there's always ctrl-shift-f or `method(:blah).source_location`.

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

#290

I hate annoying distractions, be it popups, beeps, notifications, alerts, auto brace/quotes/etc and autocomplete prompts. I turn all of that off in every program because I want to be in total control of the computer. When it comes to autocomplete specifically I initially turned it off because I was mainly a C++ programmer and C++ autocomplete has just never been good enough and a half-working autocomplete is just wor…

> I hate annoying distractions, be it popups, beeps, notifications, alerts, auto brace/quotes/etc and autocomplete prompts.

This was also my first reaction when I saw someone else using an IDE. My way of writing code is to get my ideas written into the editor first. Only after I have written the code, I run the compiler to see where things don't fit. The people who were using the IDEs were really astonished that I could understand the output from the compiler on the command line.

Programming is a lot more fun when you sketch out your ideas first before you make sure that all the details are correct.

Post reply on HN