Why Use File Trees
Summary
TLDRIn this engaging discussion, the speaker debates the utility of using file trees for navigating codebases, expressing skepticism towards their conventional use. They argue for a more dynamic approach, utilizing Language Server Protocol (LSP) and tools like ripgrep for efficient code exploration. The speaker acknowledges situations where knowing a file's location rather than its name could justify file trees but advocates for fuzzy finders as a more effective solution. Highlighting the challenges of navigating projects with numerous similarly named files (e.g., index.js), they share personal anecdotes to underscore their preference for content over structure, culminating in a humorous embrace of their unconventional terminology and stance.
Takeaways
- 😕 He doesn't understand why people use file trees to explore codebases
- 💡 He prefers using LSP and search tools over file trees for code exploration
- 🤔 Finds it odd when people keep file trees open all the time
- 😠 Believes searching by content is better than by file names
- 🧐 Does understand issues in huge codebases with many similarly named files
- 🙂 Will sometimes know the folder location but not exact file name
- 😌 Admits folder navigation is a personal skill issue for him
- 😣 The many index.js files in JS projects causes discovery problems
- 😂 Leaning into calling directories 'folders' even if uncool
- 😎 Uses fuzzy finding when he knows which folder a file is in
Q & A
Why does the speaker find using file trees confusing?
-The speaker doesn't understand why people browse file trees when looking for things instead of searching by content. He finds it more intuitive to search for specific things using tools like LSP rather than hoping to stumble upon something by exploring the directory structure.
What approach does the speaker prefer for navigating a codebase?
-The speaker prefers to use tools like LSP and ripgrep to search for specific content instead of browsing through file trees. He'll only look at the file structure if he needs to create or delete a file.
When does the speaker admit to using file trees?
-The speaker admits he will resort to using file trees in huge codebases where there are many identically named files like index.js, since fuzzy finding becomes difficult.
Why can't the speaker break his habit of saying "folders"?
-He explains he was raised using Windows and has called them folders for so long from his early days of using DOS. He has accepted he will likely never be "cool" enough to call them directories.
What is the speaker's perspective on file trees and directories?
-The speaker finds the concept of manually browsing file trees to explore code confusing and unintuitive. He heavily prefers searching by content instead. But he admits directories become more useful on huge projects where fuzzy finding fails.
What tools does the speaker use instead of file trees?
-The speaker prefers to use Language Server Protocol (LSP), ripgrep, and other content search tools to navigate code rather than browsing file trees.
When does the speaker struggle to avoid using folders/directories?
-The speaker struggles with huge Node.js codebases that have many identically named index.js files, making fuzzy finding difficult. Directories help disambiguate in those cases.
Why is the speaker set in his ways about terminology?
-Having used DOS and Windows from early days, he is too stubborn to stop calling them folders now. He accepts he is not "cool" enough for proper modern terms like directories.
What is the tone/mood of the speaker?
-The tone is casual, irreverent, and self-deprecating - he does not take himself too seriously while explaining his contrarian preferences.
How does the speaker use LSP for navigation?
-The speaker uses LSP to show definitions and references/usage when he has found a specific symbol, allowing him to explore related code instead of browsing the file structure.
Outlines
🤔 Why use file trees for code navigation?
The paragraph discusses why the speaker does not understand the usefulness of file tree views for navigating codebases. He prefers using language services and search tools to directly find symbols and usages. He is confused why people browse directory structures to find things instead of searching by content.
Mindmap
Keywords
💡File tree
💡LSP
💡Fuzzy finder
💡Directory
💡Skill issue
💡Index.js
💡Doom
💡Windows 3.1
💡Folders
💡Cool
Highlights
Questioning the utility of file trees for exploring codebases.
Emphasizing the efficiency of Language Server Protocol (LSP) for code navigation.
Critiquing the habit of manually searching through directories.
Advocating for specific search over directory browsing.
Acknowledging the use of file trees for file creation and deletion.
Highlighting the preference for content-based search rather than file name search.
Mentioning the use of command-line tools like 'tree' for visualizing project structure.
Discussing situations where knowing the file's location is easier than recalling its name.
Using fuzzy finders as a workaround for directory familiarity.
Identifying 'skill issue' as a barrier to efficient codebase navigation.
Addressing challenges in large codebases with numerous similarly named files (e.g., index.js).
Expressing frustration with navigating 'index' files in JavaScript projects.
Sharing a personal anecdote about early computing experiences.
Embracing the term 'folders' over 'directories' despite technical conventions.
Concluding with a humorous defiance of changing personal terminology preferences.
Transcripts
I have to know why do you use file trees
I I I see no reason to use a file tree
uh exploring my codebase like even then
I I have such a hard time with this as a
as a concept like exploring your code
base with a file tree is kind of odd let
me hit you why let me hit you with why I
think that's odd let's say I didn't know
anything about this code base in here
right uh let let Vim motion let's jump
in here and I wanted to find out
something about like say this well I
could use I could use my LSP to show me
where everything's at and I'm like oh
okay okay well where's this thing used
now I can go and look at where those
things used okay well where are these
things used right like why why why why
would you use it to go look through like
that's the thing I don't understand is
why people just like walk through their
directory hoping to find something
usually I have something I'm looking for
something specific I'm trying to find
and when I find the thing that's
specific then from there I take that as
a way to jump off with my LSP or with
something like rip grip to go find it
right APM motion and that's when I go in
here and I go in like okay where's all
these different places that it's used
okay right like it just seems odd to use
it for anything else like that's what
I'm confused about right like if I need
to create a file sure if I create a file
then yeah I hit right here and I you
know I create my file and there we go I
have my file right here and I'm like ah
it's look look at my new file it's right
here if I need to delete it of course
I'll delete it but I often don't do
anything else you know what I mean
that's why it's always so confusing when
people have file trees and they have
file trees always open it's like what
what you search by content instead of
file names yeah exactly that's what
that's why I need to know I need to know
why if you want to see a file tree of a
project just use uh tree C I know but
what's the like for me it's the easiest
path to get uh to the thing that I want
to go uh to the tree because I know the
location but I don't know the name or
it's hard to get there with the LSP yeah
I mean if that that happens to me every
now and then where I don't know the file
name but I generally know where it's at
I like let's just say that I know where
it's at well I already know right away
it's called motion right so I'm like oh
it's motion tree there we go right and
so I'll just still use a fuzzy finder
because I know the folders that is in
there that that that felt that is I mean
it's truly just a skill issue is how I
look at it I just have a hard I just I
find it odd right and I I want to
understand this I I do want to
understand this because it just feels
like weird issues in huge code bases
there's like aund emotion trees yeah I
mean okay so I do understand that one
which is when you work with no JS and
you have index.js or index.ts or index.
TSX like
9,000 times like that's difficult I I'm
on I'm on hey I'm on your team uh
obviously you can do something where you
can throw in like you know Vim Lua init
right you can try to like get your way
there I don't know I don't know why I
didn't find that one oh that's because
it's Lua Vim AIT right you can kind of
try to get to the thing you want with a
little bit of uh folder little bit of
foldering but man IND I I do understand
the index.ts problem because right now
in the tvi directory I think there's
like something like a thousand anits and
so it is like it's it's virtually
impossible to search for the thing you
want via fuzzy finder just because of
how many index do whatevers there are
and so I find myself you know I said
folder man damn it dude I can't help it
I was I was born and raised with the
gosh dang Windows environment okay I
played Doom I installed Doom when I on
Windows 3.1 right like it was or
technically it's just Doss I installed
it for dos back then and like I can't
help it we called them F folders okay
and it's just going to stick with me you
know what I'm sick and tired of trying
to change myself and try to make it so
that folders is like still uncool and
just deal with the fact that they're
called directories you know what I'm
leaning in I'm leaning in and I'm just
going to call folders and I I don't I
don't care okay I'm not cool never been
cool never been cool never will be cool
I'm not planning on being cool cool and
you can folder these nuts okay
Browse More Related Video
Taking Notes is a WASTE OF TIME When You're Learning To Code! DO THIS INSTEAD!
Формулы и теоремы, как логические инструменты математики
Golang is BAD for SMART PEOPLE
How An Internship Led To Billion Dollar AI Startup
Addressing Some Questions...(ChatGPT o1-preview + o1-mini video(s) follow up)
Hoarding As A Mental Health Issue | Ceci Garrett | TEDxSpokane
5.0 / 5 (0 votes)