Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think a "so-so programmer" would need to google to figure out how to select random lines from a file.


I would have to Google. You really have the library methods you would need for that memorized? I think the last time I had to select random elements from a list at work was...never. Why would I still know that?

Would it be Random.int()? Or Random.range()? Or maybe there's a better choice that operates directly on a list? Or wait is it gonna return the value or a Generator of the value? Etc. Even if you remember how to do random number generation in your language, this specific use case probably necessitates a Google unless you have a godlike memory, or you don't mind half-assing it.


It doesn't sound like the author had to google for specific library methods (otherwise they wouldn't have had to think about the problem for a few minutes beforehand). It sounds like they genuinely couldn't figure it out (even given those library functions).

I don't think googling for library methods is a sign of a bad developer. On the contrary, googling for specific library functions instead of hacking something together using general library functions is a sign of a good developer.

That said, at least for python, I personally wouldn't have to google. I use random.choices a few times a year.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: