r/Python • • Dec 11 '18

We are not alone!

Post image
1.8k Upvotes

58 comments sorted by

403

u/[deleted] Dec 11 '18

I also like this tweet from one of the creators of Django:

I can only write Django apps while closely consulting the documentation, _much of which I wrote!_

Consulting docs/google/etc isn't a failure; it's literally what professional software development actually looks like.

https://twitter.com/jacobian/status/988515858887491584

172

u/grantrules Dec 11 '18

Right? Good luck figuring out how to deploy your app that's been rotting in your GitHub for two years without even minimal documentation.

43

u/[deleted] Dec 11 '18

this hit close to home

18

u/H_Psi Dec 12 '18

The best ones are libraries/packages that do exactly what you want, but whose entire "documentation" are just vague comments in their spaghetti-code

-5

u/Blacklistme Dec 12 '18

Simple, as you go to DockerHub to see if someone created a container for it. Or you go to Ansible Galaxy and look for a matching role.

To be honest. Most of my projects now have a DEVELOPMENT.md and INSTALL.md to explain a lot of the magic as I'm done hacking and refactoring my projects.

9

u/TangibleLight Dec 12 '18

Soo.... You have at least minimal documentation?

29

u/abrazilianinreddit Dec 11 '18

I'm currently developing a Qt application (using PyQt), and this is pretty much my homepage. Qt has thousands of classes, each containing 5 to 100 methods. Of course, I probably only use about 30 of all these classes, but still, there's so much I'm not going to even try to remember how to use them.

It also helps that Qt's documentation and architecture are really, really good.

12

u/mkdz Dec 11 '18

Qt documentation is I think one of the best documented frameworks anywhere.

6

u/HarrisonOwns Dec 11 '18

Much of the time I spent using Qt was spent in the documentation.

I went from zero knowledge of how to create a UI in Python to a functioning UI in about 2 weeks. Was it garbage? Of course.

Did it work? Of course.

3

u/foofaw Dec 12 '18

This makes me feel so much better about myself.

139

u/szechuan_steve Dec 11 '18

Something that made me more comfortable in my own programmer skin was realizing a long time ago that geniuses still have struggles, get frustrated, feel inadequate, forget, learn, and make mistakes. The difference is, a genius keeps going, keeps leaning, admits to - and learns from mistakes. Failure is an opportunity to be used, not feared.

All that hard work and frustration is not for nothing if you keep going when things get hard.

Even geniuses start at nothing.

5

u/strange-humor Dec 12 '18

Often hard work and time spent learning is though of as genius. There are some incredibly smart people that often forego the hard work and accomplish much less than "dumber" folks with a better work ethic.

65

u/saulmessedupman Mmmm spam Dec 11 '18

I call help() on my own API all the time. God bless docstrings.

10

u/SexySlowLoris Dec 12 '18

I'd do that but at my workplace they don't like docstrings and writting documentation on top of code :(

11

u/saulmessedupman Mmmm spam Dec 12 '18

No documentation? I know developers generally don't like documenting...but a rule against it?

4

u/FerretWithASpork Dec 12 '18

Sounded like the rule was against writing documentation directly with the code. I'd imagine (read: really really hope) they still have documentation in a separate repo, or wiki, or something.

5

u/muntoo R_{μν} - 1/2 R g_{μν} + Λ g_{μν} = 8π T_{μν} Dec 12 '18

wot

In case that wasn't clear, let me rephrase:

WOT?

2

u/fedeb95 Dec 11 '18

I have a python module with maybe for functions. I call help every time

50

u/brtt3000 Dec 11 '18

Also important for senior devs: don't solve your juniors problems if it is a documented thing. Asking people is too easy, instead teach how to find things for themselves, how to read documentation and find what you need.

Fish, fishing rod, yadiyada.

0

u/strange-humor Dec 12 '18

It actually is a skill to think about keywords to an issue in a way that will return what you are looking for. I've always intuitively done this and have had a hard time trying to teach how you make a good query.

Many people are already in a mindset when looking and don't think to describe their problem domain to Google when querying.

2

u/brtt3000 Dec 12 '18

I blame lack of meta-cognitive skills, the bad searchers don't think about how they solve their problems or what the essential aspect is of what try to do. For them the problem is a huge spaghetti cloud of things blocking their intention and they can't isolate the actual problem. And they definitely don't take experience from earlier problems or solutions or how they solved those. It takes a bit of coaching to get them through that, although some probably never will.

4

u/blbil Dec 12 '18

Can't tell you how many times somebody has message me saying, "the thing is broken". 90% of the time I can ask them what error message they got, Google it, and the top result solves it completely.

Or even better, is if there is a bunch of setup steps. They report back saying, "its broken". Then I get to spend an hour troubleshooting, before I realize that during the setup, one of the earlier commands did not actually complete successfully (big error message, maybe even a stack trace), but they didn't notice and just kept going along. That root cause analysis is apparently a real skill.

1

u/strange-humor Dec 12 '18

I agree. The biggest part of solving a problem is defining and articulating the problem. Some times that is 90% of it. If that isn't done well, however, solution is almost impossible.

92

u/glen_v Dec 11 '18

I'm pretty sure I read at some point that somebody asked him to rank his Python knowledge on a scale of 1-10 and he said 8.

68

u/tutuca_ not Reinhardt Dec 11 '18

I always like to read [this interview](http://www.dodgycoder.net/2012/09/q-with-nine-great-programmers.html) his responses are so lateral and succinct that I can't help laughing.

> Q 2: What do you think is the most important skill every programmer should posses?
> GvR: Your questions are rather general and hard to answer. :-) I guess being able to cook an egg for breakfast is invaluable.

13

u/throw-it-out Dec 11 '18

He's a real gift to the world.

6

u/Comprehensive_Tone Dec 12 '18

Have to checkout Quicksilver after so much praise for GvR

4

u/[deleted] Dec 12 '18

"For example, I personally believe that "Visual Basic" did more for programming than "Object-Oriented Languages" did. Yet people laugh at VB and say it’s a bad language, and they’ve been talking about OO languages for decades.

And no, Visual Basic wasn’t a great language, but I think the easy DB interfaces in VB were fundmantally more important than object orientation is, for example."

This is cool!

3

u/[deleted] Dec 14 '18

So he was basically saying an important skill is to clearly define your requirements?

37

u/Cyph0n Dec 11 '18

I would wager that Bjarne would probably say 3 if asked to rate his knowledge of C++.

0

u/[deleted] Dec 11 '18

[deleted]

9

u/Cyph0n Dec 11 '18

To be fair, it has become way more difficult to shoot yourself in the foot with modern C++. And you would be surprised how clean and concise C++ can be nowadays!

16

u/muffinsofgreg Dec 11 '18

Not super insane, but I was quite literally looking up re.split() for the same purpose when I started procrastinating and decided to browse r/python when I saw this.

3

u/eacousineau Dec 12 '18

I se what you're trying to do here, Guido...

12

u/LewisTheScot Dec 12 '18

Guido van Rossum?

Pfft...

Sounds like an amateur

15

u/Uwirlbaretrsidma Dec 11 '18

Meanwhile the folks at r/Hacking supposedly can write any complex regex on the fly, and say that any barely decent programmer must know how to write regexes about as fluently as they can write English. Yeah right.

15

u/kashmill Dec 12 '18

You mean for the once or twice a year that I need a regular expression?

6

u/lolmeansilaughed Dec 12 '18

I use regexes every week and have to look that shit up all the time.

This is literally the only programmer reference book I've ever come across that's more useful than online docs/web searches/manpages/help output.

2

u/[deleted] Dec 12 '18

Whenever I need a quick refresher on regex I always go back to https://regexone.com . Such a great resource.

2

u/lolmeansilaughed Dec 12 '18

Looks like a tutorial? All I need is a reference, listing metacharacters, functions etc for each flavor/language.

1

u/HarrisonOwns Dec 11 '18

Hahahahahah

3

u/CaffeinatedPengu1n Python 3 Dec 11 '18

He is my favourite, what an awesome guy.

3

u/revfried zen of python monk & later maintainer Dec 12 '18

I was doing this today in python3 with range. range(4)[-1] == 3

was surprised to discover range objects have a getitem

I think I had been carrying the idea that range returned an iterator since the 2->3 migration years ago. Nope its an Iterable / Sequence

1

u/minorDemocritus Dec 12 '18

You can slice them too

2

u/thirdtimesthecharm Dec 11 '18

Did you know you can pass strings to Fraction and it'll parse them? TIL.

1

u/chickpeaphobic Dec 11 '18

I needed this right now. 😂

1

u/[deleted] Dec 11 '18

This just means that he's also a human that makes mistake just like us. Keep moving forward!!!

1

u/[deleted] Dec 12 '18

Today, on accident while doing a LeetCode problem, I discovered that the Python 'or' keyword can be used in place of a try-catch statement for the assignment I was doing

1

u/[deleted] Dec 12 '18

re.Scanner is awesome. You should look it up. Oh wait, you can't because it has been undocumented since forever!

Seriously: document that shit!

4

u/Hanse00 Dec 12 '18

Why don’t you?

1

u/Overload175 Dec 12 '18

You see, even the Benevolent Dictator For Life needs to consult the docs once in a while

1

u/derpderp3200 An evil person Dec 13 '18

That's not exactly a good thing for a language :-/

-4

u/thunderouschampion Dec 12 '18

The word gee, cringiest of the cringiest word

4

u/[deleted] Dec 12 '18

Golly!

0

u/[deleted] Dec 11 '18

[deleted]

5

u/Erelde Dec 12 '18

I can write a Lisp interpreter. I suck at Lisp.

1

u/solderfog Dec 12 '18

I did something like that back in '90. Because the mega-expensive IVR hardware only spoke COBOL. Sheesh. It was fairly primitive 'compiler' written in Perl. Worked well enough though so we didn't have to touch COBOL much once it was stable.