top | item 37483100

(no title)

yukinon | 2 years ago

Hot take here, but as someone that doesn't code daily, I prefer those sites over the actual docs in most cases.

If I need to get something done quick, those sites will give me a quick 5 second refresher with clear examples.

Actually, in the doc you described as "obviously the correct hit", all I see is

> str.endswith(suffix[, start[, end]])

> Return True if the string ends with the specified suffix, otherwise return False. suffix can also be a tuple of suffixes to look for. With optional start, test beginning at that position. With optional end, stop comparing at that position.

Meanwhile, the first hit in Google for me is Programiz, which has actual real examples without any additional clicking around or trying to understand how the information is structured.

Besides, I know the docs exist, I don't need a google search for it. I'll click on the content farms every time because they've consistently been the fastest way for me to get what I need.

discuss

order

alexb_|2 years ago

Yeah I enjoy the content farms. Who needs documentation on a simple problems when you can instead have something easy like this:

Many are asking questions about the Python Documentation How To Check Null Python 2023. Here are some solutions to How To Check Null Python 2023:

<ADVERTISEMENT>

Solution 1: Type "if variable is None"

<ADVERTISEMENT>

The first solution out of many is to type "if variable is None". This is the best way to solve Python issues, recommended by experts.

<ADVERTISEMENT>

Solution 2: Download Windows Computer Cleaner

yukinon|2 years ago

That seems a bit disingenuous on your part. I picked the top 3 hits on Google and they are all very helpful and to the point - Programiz, W3Schools, Tutorialspoint. Granted, I have ublock origin, as most people should have anyway.

HaZeust|2 years ago

This got a chuckle out of me, but plenty of content farms for programming are extraordinarily useful. One could make the case W3schools is a content farm, and that's raised a whole generation of programmers for their knowledge.

throwaway154|2 years ago

> "if variable is None"

Is missing :

We all know we should do the following, it's much clearer.

# Example of a dictionary to check None

> # Assign None to a variable

> myvar = None

> # Declare dictionary to check None

> mydictionary = {None: 'None is stored in this variable'}

> print(mydictionary[myvar])

If I expected something, I would try it.

tentacleuno|2 years ago

Well, I for one think it's quite kind for them to offer a free computer cleaner! Just let me install it and... 1250 errors?!

ryneandal|2 years ago

It's really surprising how awful the official Python docs are, considering how much the language has grown of late. If I need to reference core Python docs these days, I almost always go to this version on devdocs.io[1].

Thankfully most of the reference documentation I have to look up are the popular data science libraries like pandas. Their documentation[2] is so much cleaner than core Python.

1: https://devdocs.io/python~3.11/ 2: https://pandas.pydata.org/docs/reference/index.html#api

maven29|2 years ago

Except those farms don't do any original research and just copy off each other. They're littered with mistakes and you will see the same mistake pop up across all of them.

These days for obscure terms, you don't even get the luxury of reading garbage written by people who barely understand the topic at hand, instead you get meaningless fluff generated en masse using LLMs.

Honestly, I'd rather spend time parsing whatever doxygen spits out than try to figure out what the needlessly verbose yet inaccurate LLM output is trying to get at.

f1refly|2 years ago

> Actually, in the doc you described as "obviously the correct hit", all I see is

>> str.endswith(suffix[, start[, end]])

>> Return True if the string ends with the specified suffix, otherwise return False. suffix can also be a tuple of suffixes to look for. With optional start, test beginning at that position. With optional end, stop comparing at that position.

> Meanwhile, the first hit in Google for me is Programiz, which has actual real examples without any additional clicking around or trying to understand how the information is structured.

I'm sorry, but what examples could you possibly want that the official documentation doesn't make clear? It's written as concisely as can be, describing the possible inputs and the expected outputs of the particular function, no? I don't see how sifting through tens of lines explaining what the docs say in two short sentences is preferable.

crayboff|2 years ago

I don't know if you're trolling or not.

When you get good at it, it is much easier to skim through 10 lines of fluff to find the answer (that is usually visually distinguished in a code block) then it is to parse through 4 really dense, terminology filled sentences.

If I need to know exactly how all the options work, sure the docs are the place to go, but 90% of the time I just need a quick example to go off of.

jinushaun|2 years ago

Official python docs are awful. Same with MSDN. Docs should be more than just the auto-generated pydocs which just parrot the function signature—which I can easily infer because I can, you know, read.

For any sufficiently complex function that requires me to actually look up the docs, I want example usage. Not all arguments are obvious. Not all return types are obvious. This is especially bad for overloaded functions. Worse is when docs requires a circular graph traversal of clicking endless links to more documentation.

Needless to say, I prefer content farms and blogs to the official docs.

jamwil|2 years ago

> I'm sorry, but what examples could you possibly want […]?

Any? Any example would do.

couchridr|2 years ago

Humans are much better at inferring rules from examples than at deducing an example from a concisely stated rule. The official python docs are the latter.

rg111|2 years ago

I get your point for vanilla Python docs. Content farm pages can be more helpful for quick look ups here.

But if you use Pandas, Numpy, Scipy, etc., you know how fantastic the official docs are. They are much better than content farm crap. And, yet, in these cases, too, Google ranks those sites higher.

I use DDG a lot more, and it has almost replaced Google for me.

I use Google now only for local uses- gas stations near me, restaurants near me, and so on.

I also highly encourage you to try code.you.com and phind.com. I have been very happy with them.

Tommstein|2 years ago

> Actually, in the doc you described as "obviously the correct hit", all I see is

> > str.endswith(suffix[, start[, end]])

> > Return True if the string ends with the specified suffix, otherwise return False. suffix can also be a tuple of suffixes to look for. With optional start, test beginning at that position. With optional end, stop comparing at that position.

What exactly don't you understand from that concise and official documentation?

ipaddr|2 years ago

Parent wants a real example not a partial syntax definition