News for hackers. Stuff that matters.
Re:I still love PHP and JavaScript by labrador on Tuesday August 02, 2022 @10:03PM (#32326789)
> I feel like PHP documentation is very undervalued

PHP is documentation done right because of the comments, essentially "Stack Overflow" for PHP before stackoverflow.com was a thing.

I've found an example of documentation done wrong recently with Microsoft .NET 6.0. Apparently, Microsoft has decided that code samples are no longer important

Re:I still love PHP and JavaScript by wiennat on Wednesday August 03, 2022 @03:40AM (#32328740)
What's happen to MS these days? I remember the documents during .NET 2.x days were very good, well-organized and useful.
Re:I still love PHP and JavaScript by psalminen on Tuesday August 02, 2022 @10:30PM (#32326957)
I've been migrating to Azure and their SDK documentation is next to nonexistent. The codebase is also uncommented and inconsistent. It's just been a dumpster fire.
Re:I still love PHP and JavaScript by kyriakos on Wednesday August 03, 2022 @12:30AM (#32327669)
Microsofts documentation is horrible. They churn out api after api and never document it correctly.
Re:I still love PHP and JavaScript by zelphirkalt on Wednesday August 03, 2022 @05:53AM (#32329657)
> PHP is documentation done right because of the comments, essentially "Stack Overflow" for PHP before stackoverflow.com was a thing.

It's funny really, for a programming language to rely on comments made by random people, instead of having those aspects covered in the documentation itself. Shows a bit of lack of care. It seems half-assed as many things in the ecosystem seem. What happens, if they ever lose that database of comments? The whole world scratches their heads wondering how to use standard library functions? Ridiculous. I hope they have good backups.

> I've found an example of documentation done wrong recently with Microsoft .NET 6.0. Apparently, Microsoft has decided that code samples are no longer important

And for as long as important documentation resides in comments in PHP docs, the same can happen to PHP docs. Lets say they push out PHP 9 and some things change. Someone thinks "Ah those comments are not actually true any longer. Lets get rid of them." Bam, massive resource lost, because the knowledge has not been integrated into the documentation.

Re:I still love PHP and JavaScript by labrador on Wednesday August 03, 2022 @05:35PM (#32336900)
Here's a sample of a user generated comment on array_map

Assuming they backup the website, how's it going to get lost?

https://www.php.net/manual/en/function.array-map.php#113886

Re:I still love PHP and JavaScript by djxfade on Wednesday August 03, 2022 @03:55AM (#32328845)
This can go both ways. I have seen some very dangerous code examples in the comment section of the PHP docs.
Re:I still love PHP and JavaScript by labrador on Wednesday August 03, 2022 @05:30PM (#32336854)
Usually followed by a comment that says don't do what the last comment said