Live data from Hacker News

Everything I googled in a week as a professional software engineer

localghost.dev

31–40 of 399 posts

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

#31

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.

What came first: the file or the symlink? Of course the real file came first!

Mnemnic that helps me: IN SYMLINKS, REAL FIRST!

ln -s REAL_FILE link_name

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

#32
Nice, I've been there with Django cookies too. One thing, I love about the programming industry is that people aren't afraid to write blog posts to debunk the bullshit expectations that develop every now and then. Not something you really see elsewhere.

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

#34

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.

That's how I memorized it too! Really struggled with it until I started thinking of it that way.

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

#36

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 still couldn't do it on the command line, probably cheating, but Midnight Commander shortcut is CTRL-X-S :)

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

#37

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 remember it as FROM source, TO target, so the real file comes first

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

#38

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'm the same way with scp, I never remember the order and then it changes if you're uploading or downloading.

Also, an obligatory xkcd: https://xkcd.com/1168/

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

#39
My web search activity went up a lot with experience. Back in the day, almost all of my work consisted of cranking out stuff in the main language (PHP or Python), spiced up with SQL and occasional web or db server setup. I needed manuals sometimes, but not web searches so much. After the hipster-programming/devops explosion of the early 2010s and my dive into highly optimized heterogeneous solutions, the work switched to whipping up logic in a handful of different languages with incessant fiddling of couple dozen specialized technologies and trying out new ones constantly. I don't need the manuals for the core languages anymore after all the years, but I'm not gonna learn Maven, Gradle, the Big Pile of Java Options and whatever else to set up another data-crunching daemon, in Java this time.

I also looked into freelance jobs lately, and it's pretty crazy there too, especially with the JS' frantic mutations. You'd mostly need a handful frameworks and a whole load of specialized microsolutions, but still: last year everyone was using Ionic, now React Native is everywhere. Web APIs are also evolving nonstop. Chill out for some months, and you're lagging behind the others.

And that's not even beginning to mention compiling other people's C programs under MacOS. Pretty sure that ‘The voodoo of satisfying the compiler’ would be a book of respectable thickness without ever getting into programming proper.

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

#40

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.

Given the number of things that use different source vs destination with the same type, I just have trained myself to always look it up, even if I am 99% sure I remembered it correctly, because holy shit when you get it wrong sometimes it's bad.

softlink dest file cp src -> dest

std::memcpy dest java arraycopy src -> dest

golang io.Copy dest etc etc

I'm only 80% confident I didn't make an error in the above 5 examples...

Post reply on HN