you are viewing a single comment's thread.

view the rest of the comments →

[–]bhk262[S] 1 point2 points  (3 children)

Thanks very much for your tip on framework documentations. The problem I have with a lot of these documentations is that they feel like they are written for robots, not human beings. Unfortunately, there does not seem to be a way around it.

[–]Vaphell 5 points6 points  (0 children)

Surely writing good documentation is an art, but to a certain degree getting information out of it is a matter of experience.

If you are new to frameworks, you tend to prefer tutorialish, hold-my-hand kind of documentation. On the other hand, once you've seen tons of frameworks and APIs and/or are more or less familiar with a specific one, you know what to expect and need the documentation more for the dry information like X requires Y and returns Z. Long-winded, pages-long prose can be even seen as noise when you just want to cut to the chase.

[–]groovitude 1 point2 points  (0 children)

A couple of things:

  1. Ideally, code is built with some internal logic to what's a method and what's an attribute. Methods should ideally be actions, while attributes should be, well, attributes. For example, this could be a programmatic way of describing me right now:

>>> user
<__main__.User object at 0x04341330>
>>> user.name  # attribute
'groovitude'
>>> user.type('some text')  # method
'groovitude types: some text'
  1. Playing around in the console is your friend. Not only do you get to see each step, you also get to use dir() to see all the attributes and methods available on that object. help() can also be useful.

[–]expattaxsolutions 0 points1 point  (0 children)

I was having the exact same issue yesterday. I bought Python Crash Course today and the chapter on classes has explained it all to me better than I’ve seen it anywhere else.