Giter Club home page Giter Club logo

Comments (10)

lexnederbragt avatar lexnederbragt commented on August 25, 2024

Hmmm... It is not straightforward to come up with a dotfile that is relatively easy to explain. The file should be there in the actual folder when they clone/download the repo. I was thinking a .bashrc file with just one command, but it should then be one that doesn't trip the student. Even a simple thing as an alias (alias la='ls -la') would require a few lines to explain. Is there a type of dotfile that makes sense, but has no content, or one that can be easily understandable?

from shell-novice.

wking avatar wking commented on August 25, 2024

On Mon, Feb 02, 2015 at 06:52:35AM -0800, Lex Nederbragt wrote:

The file should be there in the actual folder when they
clone/download the repo.

.gitignore?

from shell-novice.

lexnederbragt avatar lexnederbragt commented on August 25, 2024

On 2 Feb 2015, at 18:13, W. Trevor King wrote:

On Mon, Feb 02, 2015 at 06:52:35AM -0800, Lex Nederbragt wrote:

The file should be there in the actual folder when they
clone/download the repo.

.gitignore?

Maybe. It would mean adding a .git folder as well, with the burden of having to explain these - and why would the entire 'nelle' folder be under version control…

Lex

from shell-novice.

willingc avatar willingc commented on August 25, 2024

@wking's suggestion of .gitignore would be a fine addition since it is in almost every GitHub repo listing that one sees. You do not have to explain .git folder. I don't think that you need to explain why 'nelle' is under version control in this novice lesson (though why wouldn't it be since one could .gitignore any binary/image files).

Alternatively, one could show them a Git repo like this:
screen shot 2015-02-03 at 08 23 20

from shell-novice.

wking avatar wking commented on August 25, 2024

On Tue, Feb 03, 2015 at 01:59:03AM -0800, Lex Nederbragt wrote:

Maybe. It would mean adding a .git folder as well, with the burden
of having to explain these - and why would the entire 'nelle' folder
be under version control…

I'd have the students getting the example files via a Git repository
(either via a ‘git clone …’ or via an archive zip 1). That's going
to come with a .gitignore (and .nojekyll) out of the box. The clone
will also come with a .git. The shell lesson usually lands before the
Git lesson, so I'd just say something like:

The .gitignore file has a leading dot to mark it as a hidden file
(or directory). Dotfiles are just like a regular files, except that
ls doesn't list them by default and the shell doesn't use them
when expanding wildcard globs like * (although it will only use
dotfiles when expanding .*). Programs generally use dotfiles for
configuration and other things that the user only needs to interact
with occasionally; that way they're not cluttering up your working
directory the rest of the time.

Git is a version-control program, which means it tracks how your
files change over time. We'll learn more about it later, but as an
example dotfile, we can peek inside the .gitignore file:

$ cat .gitignore
    *~
    *.pyc

That's telling Git that we don't want it to track files ending with
~ (editors save files like this) or .pyc (Python caches files
like this).

There are likely lots of other dotfiles on your system (for example,
try ls -d ~/.*), so feel free to poke around and see the sort of
thing they're used for.

from shell-novice.

gvwilson avatar gvwilson commented on August 25, 2024

-1 to making the shell lesson depend on use of Git - too many real-world
failure modes.

from shell-novice.

wking avatar wking commented on August 25, 2024

On Tue, Feb 03, 2015 at 10:32:55AM -0800, Greg Wilson wrote:

-1 to making the shell lesson depend on use of Git - too many
real-world failure modes.

I'm not suggesting a Git dependency, I'm suggesting optional use of
Git with a zip-download fallback 1. Students will need to get the
example files somehow, and “try Git, but fall back to a zip download
of the same content (without the history)” seems like a pretty safe
bet to me.

from shell-novice.

ChristinaLK avatar ChristinaLK commented on August 25, 2024

I like @lexnederbragt 's idea of a .bashrc or .bash_profile as a sample dotfile. It doesn't need to be functional - it could live in the nelle user directory - and then people would have something to compare to their own .bash_profile in their home directory.

semi-related question: do we have a convention for how students get the data files for this lesson? (may be relevant to #62). clone this lesson repo? clone something else? zip download?

from shell-novice.

lexnederbragt avatar lexnederbragt commented on August 25, 2024

PR submitted, #63

from shell-novice.

willingc avatar willingc commented on August 25, 2024

@lexnederbragt Thanks for the PR. I like the changes using .bash_profile. I did leave a comment on the PR suggesting a clarification on dotfiles and the -a option for ls.

from shell-novice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.