Skip to content

Conversation

andy1li
Copy link
Member

@andy1li andy1li commented Aug 14, 2025

@andy1li andy1li requested a review from rohitpaulk August 14, 2025 08:07
@andy1li andy1li self-assigned this Aug 14, 2025
@andy1li
Copy link
Member Author

andy1li commented Aug 14, 2025

Thanks to @itissid for highlighting the issue!

@itissid
Copy link

itissid commented Aug 14, 2025

@andy1li Thanks! I think a general improvement to most exercises would be to add something like:

  1. What you should definitely not use to build the thing.
  2. What elixir language features might be helpful. e.g. recursion with pattern matching or creating as few wasted immutable temporaries. This scopes the pre-reading needed without giving too much away.

Copy link
Member

@rohitpaulk rohitpaulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes added

@@ -8,6 +8,10 @@ For example, if PATH is `/dir1:/dir2:/dir3`, your shell should search in `/dir1`
- If a matching files is found and it has execute permissions, your shell should print the path to the file.
- If no matching files are found, your shell should print `<command>: not found`.

{{#lang_is_elixir}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Let's move this to the notes section
  2. Let's add a fallback case for a generic language
  3. We don't have to say it's not recommended - a shell would usually use this, so it's okay.

For Elixir, you could say something like:

You can either use System.find_executable or implement the PATH traversal logic on your own.

For others, could be something like:

Most programming languages have methods in their standard library that can help with PATH traversal. For example, xyz in Python and in Go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants