Hacker News new | ask | show | jobs
by homami 1136 days ago
We had a CS undergrad intern that didn’t know what i++; means in JavaScript for loops.
3 comments

Did they know what it meant within seconds of you you explaining it to them, though? That's the only important thing.
How come a CS bachelor never wrote a for loop?
In recent years it's very possible they either don't use a language where that syntax is ever required (python) or just use one of the foreach variants in pretty much every language.
I can only think of Python, but are people learning that alone these days? In every other popular language, I can't imagine not ever encountering a situation where you also need to know the index of the iteration.
But also in every language there's syntax sugar to get the index.

In reality it's honestly just better in 99% of situations.

They could just write loops and remember that repeating the variable name with ++ is part of loop syntax without knowing what it means. Almost like text-generating AI would do it (ducks).
I don't know, but I also don't care much because it doesn't matter.

Again, can they quickly understand and apply the knowledge once it is explained to them is all that matters.

It also matter that they apparently wrote a for loop a number of times without wondering what each of those symbols actually does and just treated it as magic incantation.

Edit: assuming they didn't use a language where such idiom doesn't exist or is not common, as another commented pointed out.

Maybe cheated, maybe third world country diploma mill, maybe sports scholarship
not every language uses i++.

increment operators are a language design antipattern anyway, not some fundamental knowledge.

I made it as far as my first internship before I learned what `!val` meant. Don't ding people (especially interns or juniors) for not knowing specifics or notation, or things that can be answered in a single google. What matters is what they do when they learn what `i++` is - does it ever come up again, and do they understand it.
They didn't know what it means or what it does or that it's important.

I'm not sure it matters for most practical uses what i++ means so long as you know it is required.

Much as with {} being used for scoping.

Though I agree it is jarring how little many in Gen Z know about how anything works.

> Though I agree it is jarring how little many in Gen Z know about how anything works.

I've worked with GenX'ers and Millenials (I'm a millenial), and this isn't unique to GenZ at all. A large number of people don't understand, and are just getting by. Anecdotally, I've seen people at very senior engineering positions who just don't understand the basics of what they're doing. Does that mean that it's jarring how many GenX'ers don't understand?

Yeah, we see this a lot with younger people because they are just starting in the world. Also, they're the predominate generation right now that's video taping and posting every even possibly interesting moment of their lives, irrespective of whether some 30 year old thinks it's embarrassing. If 60 year olds were posting every strange thought or funny moment we'd have some opinions about them too (Facebook, anyone?) They're just thinking about and misunderstanding a different set of things. But i think the kids are somewhat closer to a humility that might be hard to find elsewhere.
> If 60 year olds were posting every strange thought or funny moment we'd have some opinions about them too (Facebook, anyone?)

My older relatives pore out the most excruciating details of their personal lives on people's Facebook profiles, not understanding that it's not a private message. These people grew up and we're the ones who warned us "never use your real name online", etc.

Unfortunately this person graduating from a Western European uni, could not even grasp the algorithm for creating a count down timer.

They asked me for career advice. I wonder whether the jobs that require only this level of copy and pasting skills would thrive or die in the AI era.

Except it's not required :-P