News for hackers. Stuff that matters.
Re:You Want Modules, Not Microservices by jraph on Tuesday January 03, 2023 @07:57AM (#34230782)
How can I sell your idea?

I easily find my way in messy codes with grep. With modules, I need to know where to search to begin with, and in which version.

Fortunately, I have never had the occasion to deal with microservices.

Re:You Want Modules, Not Microservices by surprisetalk on Tuesday January 03, 2023 @08:05AM (#34230854)
I'm unsure how to "sell" this idea. I don't want to force my view on others until I truly understand the problem that they're trying to solve with modules/microservices.

For searching multiple files, ripgrep works really well in neovim :)

[1] https://github.com/BurntSushi/ripgrep

Re:You Want Modules, Not Microservices by hgsgm on Tuesday January 03, 2023 @08:00AM (#34230812)
grep can search multiple files at once.
Re:You Want Modules, Not Microservices by jraph on Tuesday January 03, 2023 @08:05AM (#34230853)
I actually use ripgrep.

But modules can be in different repositories I haven't cloned yet.

Re:You Want Modules, Not Microservices by dmitriid on Tuesday January 03, 2023 @08:24AM (#34230987)
Just use a proper IDE. It doesn't care about how your code is structured and can easily show you what you look for in context.

(And other tools like symbol search https://www.jetbrains.com/help/idea/searching-everywhere.htm...)

Re:You Want Modules, Not Microservices by jraph on Tuesday January 03, 2023 @08:34AM (#34231078)
and it also does not magically guess what is in modules you haven't fetched yet. (I use LSP when I can)
Re:You Want Modules, Not Microservices by dmitriid on Tuesday January 03, 2023 @12:52PM (#34235003)
Of course it can't know about non-existent sources. But when the sources are there, it's light years ahead of a simple text search that is grep/ripgrep.
Re:You Want Modules, Not Microservices by mypalmike on Tuesday January 03, 2023 @11:16AM (#34233378)
Repo search.
Re:You Want Modules, Not Microservices by nailer on Tuesday January 03, 2023 @07:59AM (#34230791)
> With modules, I need to know where to search to begin with

You can just grep / search all the files.

> in which version.

grep / search doesn't search through time whether you're using one file or many modules. You probably want git bisect if you can't find where something is anymore (or 'git log' if you have good commit messages),