Re:Ask HN: Working with large code base for the first time
by larsrc on Wednesday December 22, 2021 @05:27AM
(#29647542)
As someone who has worked for years on a UI consuming such information: it's bloody difficult. Each language has its own weirdnesses, you almost always have to build the code to figure out the cross references, and what's correct to the compiler is often non-intuitive to the user. Prime example: C++ code mixing macros and templates. There isn't even a good definition of what the definition is!
Re:Ask HN: Working with large code base for the first time
by OJFord on Wednesday December 22, 2021 @12:22PM
(#29652290)
I probably do underestimate its difficulty, but certainly appreciate it's bloody difficult. Hence I'd love someone else to do it! I don't have the appetite for it, but it would be fantastic to use.
Re:Ask HN: Working with large code base for the first time
by ui4jd73bdj on Wednesday December 22, 2021 @07:55AM
(#29648640)
That is such an annoying thing in codebases. It's the same issue the other way around, I want to see all places in frontend that calls /v1/resource but then some people go and abstract the url into multiple variables.
If it was up to me the constant part of the relative url would never be abstracted away in the codebase. Just a simple grep would instantly get you everything you are looking for.
E.g. from `axios.get(`/users/${currentUserId}`) in frontend code jump to `class UserSingleView: def get(self, user_id):` in the backend, and vice versa.