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

>Last Tuesday, I spent 20 minutes Googling "how to reverse an array in JavaScript" because I couldn't remember if it was .reverse() or .reversed() or .reverseArray().

It is normal to not remember this, I certainly agree do not. It is not normal to use a dev environment, where you need to use Google to answer this question.

Also Google does incredibly poorly on these types of questions, often linking absolute slop instead of the official documentation. Git for example has great documentation, but if you look for it through Google you get AI slop articles which answer your question in 30 paragraphs.



The biggest issue with this is that the developer did not read the documentation on the JavaScript Array prototype from MDN.

If you internet search "mdn array", you get the following as the first result:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Then `⌘F`/`Ctrl-F` "reverse", the first result will be a link to this page:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

The second result will give the non-mutating ES6 version:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Hell, even internet searching "mdn array reverse" will give you `reverse()` as the first result.

---

I genuinely find it concerning that it takes 20 minutes of "Googling" for the "Senior Developer" to work out something that is easily findable in the documentation.

It's especially worrying that they are then advising junior developers to do the exact same thing.

I appreciate that the author is trying to be encouraging. That's valuable, and we need more of it in this industry at the moment. But advising people that it's okay to avoid reading the documentation first is bad advice, in my opinion.




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

Search: