Live data from Hacker News

Everything I googled in a week as a professional software engineer

localghost.dev

351–360 of 399 posts

Re: Everything I googled in a week as a professional software engineer

#351

On the list of things I always Google, is how to create a symbolic link under Linux. I just can't figure out a way to remember what comes first; the source or the destination. The man pages add to the confusion by calling the "source" the target. So, the rule of thumb I now follow is cp or mv semantics.

Here's how I finally memorized it: ln has a 1-file-argument invocation, so ln -s ../../a_fine_file will create a symbolic link to that file under the current directory and under the "a_fine_file" file name. The single argument case has to have the file you want to link to as input. That generalizes nicely as the 2-file-argument invocation maintaining the logic.

A guy in the office always remembers it as remembering that wedding saying - something old, something new, something borrowed, something blue. Whenever he did a symlink he would always say out loud something old, something new, ... That has stuck with me as well for all these years so I've never needed to figure out which was which, I always just knew it.

Re: Everything I googled in a week as a professional software engineer

#352

On the list of things I always Google, is how to create a symbolic link under Linux. I just can't figure out a way to remember what comes first; the source or the destination. The man pages add to the confusion by calling the "source" the target. So, the rule of thumb I now follow is cp or mv semantics.

All gnu command line tools are the same in this regard: SOURCE DESTINATION.

    ln -s src dst

Re: Everything I googled in a week as a professional software engineer

#353
post #48

I forget syntaxes of various languages or language features, so it's really handy that emacs can show them to me from stackoverflow with completion: https://i.imgur.com/dDvHfOn.gif

Might want to automate it further: https://github.com/drathier/stack-overflow-import

Re: Everything I googled in a week as a professional software engineer

#355
post #117

Earlier quoted context omitted.

This is used to really confuse me too, but now I can't remember why, because everything's the same: touch $EDITOR mv cp scp mount The place you're putting something is last in each case; we can even include everything that doesn't modify its location. All I can think of that breaks the rule is `rm`, `unlink`, and `umount`. But they're hardly gotchas, and they're not reversing arguments they just don't have a 'destina…

I think "zip" breaks this rule.

Zip is a DOS tool, so I’m not so surprised it’s not following Unix conventions...

Re: Everything I googled in a week as a professional software engineer

#356

On the list of things I always Google, is how to create a symbolic link under Linux. I just can't figure out a way to remember what comes first; the source or the destination. The man pages add to the confusion by calling the "source" the target. So, the rule of thumb I now follow is cp or mv semantics.

I pretend that '-s' stands for "source", not "symbolic"; and source file follows -s(ource) option. IOW `ln -s A B' is `link source A to B'.

Re: Everything I googled in a week as a professional software engineer

#357

Earlier quoted context omitted.

> I don’t know a single developer that thinks “googling stuff means you’re not a proper engineer.” Yes the whole interview process is based on the idea of doing stuff for the company that you wouldn't actually do. Indeed I interview my candidate's ability to find resources, to know what considerations are needed, how to deal with IDEs, collaborative tools, the git protocol. I will fire someone on the spot for impleme…

And I think those “maker” types of roles don’t need a hard C.S. screen. But algorithms aren’t just about reimplementing the classics. There are points even in ordinary “DB front end” type of work where understanding algos will affect how you scale. You may find you’ve just been getting away with brute force approaches because that data sets were small. You can go very far like that but there may come a day when it ma…

...and when that day comes you call a specialist to handle the case and let your "ordinary" worker get back to work on the 99% of the job space she's qualified for?

I find this very ironic: Hiring for suitability to handle edge cases is also a brute force approach that doesn't scale.

A good algorithm optimizes for expe ted inputs and farms out cache misses and unexpected behavior to some other system.

Post reply on HN