Follow

Me, every time I want to do a symlink.

Every. Single. Time.

QT n0x13: I have been in the IT industry for almost 2 decades and it has been 0 days since the last time I had to look up the order of some function call. If you’re starting out in tech and feel bad for looking everything up: don’t. Everybody googles everything

@neil I agree entirely with the sentiment, but thought I would share my mnemonic for the symlink.

The number of things you want to set to point at the target is variable, so you put the target first, and then can list as many things as you like to point to it.

That's at least one thing I don't have to look up.

Now Time Functions in Python ... I even made a diagram for them:

solipsys.co.uk/new/TimeFunctio

@ColinTheMathmo @neil that’s a cool mnemonic

Mine is; which argument could be optional? The source could not, so it goes first

@jmtd Very similar, in some ways equivalent (of course, because it's answering the same question).

It doesn't work for the case of "mv" where the destination is a directory, though. I'd've hoped/expected "ln" would be the same. But it's not. Which is annoying.

CC: @neil

@ColinTheMathmo @neil You could add clock_gettime to that - the advantage generally is it always returns the same format struct timespec (with ns) for all clock types.

@neil It always matches copying, whether it's ln vs cp; or symlink() vs memcpy().

@neil thank god for language servers and type hints and such... your editor simply tells you as soon as you hit ( what the expected arguments are 🙂
@neil so true. I only recently figures out how to remember symlinks. Its been 14 years...

For me, it helps to remember that its like the cp command. cp <from> <to> and that <to> is the place where the filesystem is modified, and <from> is the place where it isn't. that helps me :ablobderpy:

ln -s <from(unmodified file )> <to(modified file)>

@neil
I'm with you, Neil. It means that your memory is being used with far more complex things.
Correction: Not completely with you because I don't google, I searx everything.

@neil every time. Remembering which is source and which is the link is impossible. No one does.
I look it up every time.

@neil
Used to be me, until I switched to Fish shell, which now hints me into the right order based on past executions.

Sign in to participate in the conversation
mastodon.neilzone.co.uk

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!