Hacker News new | ask | show | jobs
by WJW 881 days ago
Doing anything repetitive with a large amount of data by virtue of knowing about for-loops. There have been so many times where people wanted something done to a million users/objects/whatever and were surprised that I got back in 5 minutes. One of them even muttered the words "I thought that would take you all day", when actually 3 of the 5 minutes were spent getting a cup of coffee.
2 comments

My brother was given lines to write as a punishment in the early 80s. He wrote a for loop in basic and printed the result. The teacher didn’t know any better and was happy to accept the printout. Assuming he’d typed it all from scratch.
Or maybe he knew, but pretended that he didn't. Lines are a waste of time, and serve little purpose besides punishment. Writing code is a much better use of that time.

If I was a teacher, I think that's how I would react. The next punishment would be handwritten though, or something else, you only get one shot with that trick.

I admit that in the early 80s, most teachers were not very savvy with computers, so it is possible that he really believed your brother typed it all. But also keep in mind that teachers are pretty good at smelling bullshit, and it is pretty obvious that when pupils do things in an unusual way, it is not to make it harder on themselves, so he probably knew that there was some trick and just let it pass. I mean, these are just lines, nothing worth persecuting clever kids for.

> Or maybe he knew, but pretended that he didn't.

1980s, before most people had computers.

A teacher. The kind who'd make a kid do repeated writing "to teach them a lesson." That teacher playing "make believe" about anything.

> But also keep in mind that teachers are pretty good at smelling bullshit

Even in the 80s, teachers weren't exactly rocket scientists. Rocket scientists would have been familiar with computers.

Similarly, I was tasked with counting every file in a folder and its subdirectories as a punishment at a job on campus as an undergrad.

I plonked out a Bash oneliner in a couple minutes and gave the result. My disgruntled superior had me do it again by hand.

Ah, you had the knowledge to solve the problem using bash, but had not the wisdom to sit on the answer and surf the web until a plausible amount of time had passed :)
Write one line. Copy and paste it to make two lines. Copy and paste _those_ to get four lines, etc.
I had a colleague at a previous workplace who had studied game design at university unaware of what a for loop was when I showed him. It boggled my mind!
Sadly, I've interviewed enough people that this doesn't surprise me in the least.