Live data from Hacker News

Don't copy paste from a website to a terminal

thejh.net

221–230 of 257 posts

Re: Don't copy paste from a website to a terminal

#221
post #198

Earlier quoted context omitted.

He failed the exam. I assume that "three strikes and you're out" means out of the school. At the schools I went to, I don't think a single plagiarism incident would get a student kicked out. They would fail the assignment or the class.

At my school, it was made very explicit that you'd be immediately expelled for plagiarism (subject to appeal, IIRC, but yes: One strike.)

In a US university I have noticed that some international students (I was one too) took a very liberal attitude towards cheating, I won't name any specific countries (think East though) and noticed students from those countries played fast loose when it came to cheating. Maybe I am being prejudiced or that particular school had a knack for picking cheaters from some countries but not from others. Anyway just my observation.

Re: Don't copy paste from a website to a terminal

#222

Earlier quoted context omitted.

As it should be. The whole system is underpinned by the assumption that no one can cheat. Everyone knows tons of people cheat, but any university who has a "n-strike" policy for academic dishonesty (aka fraud), is purely in it for the money. To students who busted their asses to graduate legitimately, it's a hard slap in the face.

That's way too hardline, surely some people are wrongly accused or some cases are borderline. This sort of "zero tolerance" nonsense always just ends up removing human judgement and common sense from the equation. Also the idea that "the system is underpinned by the notion nobody can cheat" is absurd. Cheating is rampant! Even in the ivy leagues. Especially in the ivy leagues! But people still value college degrees.

Cheating is rampant, but that doesn't mean that we all as a society don't still ignore that fact! It's a beautiful display of cognitive dissonance. There's no way to know if someone truly achieved their degree, so you have to test them, which is one of the reasons the degree was valuable. You shouldn't have to test someone if they had certain credentials. They've passed their rigorous training program.

I'm not really a fan of no tolerance policies; I would rather the system be re-evaluated so that credentialing and training are the goals of the system, not pushing as many credit hours through the administration as possible. :)

Re: Don't copy paste from a website to a terminal

#223
post #215

Earlier quoted context omitted.

I think I know what you're saying. Still I wonder if perhaps the students that worked diligently and honestly gained more in the long run.

I was this kind of student, to the bemusement of people at my year. And I can say we like to tell ourselves that - that by honest learning we somehow gained more. But to be honest, what you do at work is so different than what you learn at university that in retrospect, you may just cheat your way through bullshit exams. If you're an autodidact, it could be even better for you, since you won't waste so much time lear…

I feel much the same way. Especially centered around worthless electives classes when I was studying maths. If I was interested in "Movies & Music," I would be reading about it already, and it's completely unrelated to my subject matter.

Re: Don't copy paste from a website to a terminal

#224
post #221
post #198

Earlier quoted context omitted.

At my school, it was made very explicit that you'd be immediately expelled for plagiarism (subject to appeal, IIRC, but yes: One strike.)

In a US university I have noticed that some international students (I was one too) took a very liberal attitude towards cheating, I won't name any specific countries (think East though) and noticed students from those countries played fast loose when it came to cheating. Maybe I am being prejudiced or that particular school had a knack for picking cheaters from some countries but not from others. Anyway just my obser…

I went to university both in Spain and Canada, and the approach to cheating is very different. In Spain cheating is pretty much acceptable as long as you don't get caught. And even if you do get caught, usually all that happens is that you fail the exam and you have the option to retake it a month later. I don't know about the rest of Europe.

Re: Don't copy paste from a website to a terminal

#225

So, ok. Don't copy and paste from a website to a terminal, I get it and I got it the last time that this kind of thing was posted. But if I look around I put so incredibly much trust in total strangers all the time that compared to say ordering a pizza (where the cook could put anything in the food they wanted), driving on the highway (where anybody could swerve any moment if they wanted) and simply walking down the…

Good point. It is important to realize that being too obsessive about security is possible, and to know a reasonable point at which to draw the line. But there is a difference between the two types of attack you describe that seems to change the rules on the web at least somewhat. The difference is risk to the attacker. If I start punching someone on the bus, getting thrown off is the optimistic outcome. I could reas…

While I agree with you, I also think this line of reasoning is a distraction. If we could prevent people from punching you on the bus by technological means with very little drawback, we would.

It's hard for me to see what is the difference between people who question formalizing best practices in computing and people who disagree with modern car engines and seatbelt laws.

We do these things not because it always makes a difference for one single person all the time but because it the system move in the right direction leading to possibilities we couldn't foresee from the beginning.

Someone who works in "real world" security and always have to weight in the downsides, e.g. the implications of privacy when installing a security camera on a bus, must think we are crazy questioning such low hanging fruit.

Re: Don't copy paste from a website to a terminal

#226
post #139

So, ok. Don't copy and paste from a website to a terminal, I get it and I got it the last time that this kind of thing was posted. But if I look around I put so incredibly much trust in total strangers all the time that compared to say ordering a pizza (where the cook could put anything in the food they wanted), driving on the highway (where anybody could swerve any moment if they wanted) and simply walking down the…

Similarly, running "make" in the directory of a freshly downloaded repo is dangerous too. It's really difficult to check all code running on our behalf and to quantify the risks. If someone take control of a popular git repo and push a malicious build script. How many people will be affected before the fix ? But this doesn't seem to happen very often too.

I think that's well mitigated by using docker, a VM, or any similar solution.

Re: Don't copy paste from a website to a terminal

#227
post #209
post #158

Earlier quoted context omitted.

Isn't the first place you would go to the Oracle manual? I use stack overflow all the time these days (documentation pages before that existed), not quite cutting and pasting but close enough.

The thing is, if you came to me and said "I know everything in this book", I'd say "so let's save money and buy the book instead of hiring you." Interview questions are an opportunity for you to show what you are worth. If you're worth less than a book, it's not a good sign.

Shouldn't interviewers be asking about things that wouldn't be answerable in a book?

Re: Don't copy paste from a website to a terminal

#228
post #148

Earlier quoted context omitted.

I generally find it worth it for the simple risk that you may end up breaking stuff without anything malicious on behalf of the site. E.g. cut and paste a command and get a linebreak in the wrong location and the "rm -rf /var/tmp/foo" turns into "rm -rf /var/". Fun times. These days I'm more and more often just spinning up temporary containers as well. Not so much for security as to avoid making a mess of my environm…

> docker run --rm -t -i ubuntu -v /some/suitable/host/dir:/mnt /bin/bash -l So is it safe to cut-and-paste that line there ;) ? I type very fast but if I see a 100+ character line with a whole bunch of flags and what not the chances of introducing a fatality while re-typing it (was that / var or /var?) are quite large. And of course anything that involves 'rm' or other nice and friendly commands gets an extra eyeball…

If you know any docker, that line is pretty basic, so you shouldn't copy-paste it, just write it from scratch:

docker run -it --rm -v `pwd`:/mnt ubuntu bash

Also, this one works, the other one doesn't ;)

Re: Don't copy paste from a website to a terminal

#229
post #68
post #18

Should I consider my browser betraying me by selecting stuff that's outside the viewport without a hint / warning ? (absolute positioned element, (-100,-100)). It's simply too convenient to copy/paste from the browser. P.S. I have a paranoid habit of pasting copied text into the address bar or a notepad to quickly check for unwanted characters. For once, I don't feel like I'm crazy.

Start programming editors and you will understand. What you see in a rich text editor contains hundreds of debugging flags and formatting tweaks. When copying, you want to copy something clean which will paste nicely in Word or Excel. And you want to add some metadata, so you can trace is source if it's pasted back in one of your editors.

This is an edge case. Most of the time your average user is after the text and not the shitty formatting.

Copy-Paste as WYSIWYG should be default, Copy-Special should be an expert-only option.

Re: Don't copy paste from a website to a terminal

#230
post #202
post #87

Earlier quoted context omitted.

Paste into a text buffer first, which is generally a good idea anyway to deal with formatting issues.

I do not do that. I have copied and pasted git clone commands directly in my terminals many times. The questions is, for those who do it, how often you notice a malicious command and this saves your day.

I've never encountered a malicious command in the wild, but having the commands I execute saved in a "notes.txt" or a wiki page I keep to document whatever I'm doing at any given time, sure has saved my day more than once. Usually several days after, when I can look back at what I did and replicate, fix or enhance whatever procedure.

So if it also protects me against this, I say doubleplusgood.

Post reply on HN