How important do you think documentation is for any library? You seem to have done most of the initial documentation yourself, how do you motivate yourself to do that? I find documentation tedious and boring.
In many of my talks, you'll hear me say that the API is the most important part of a codebase. That is true, because it's the most primary part of the UX of the code itself.
When it comes to the project as a whole though, beyond just the codebase, there are many other places were UX opportunities are surfaced, and one of the biggest ones is documentation.
Documentation is incredibly important for doing a handful of things:
- Communicating with your userbase the expectations and tone of the project
- Explaining how to use it (e.g. a quickstart) in simple terms
- Explaining how to get really deep into it (e.g. an advanced section)
- API reference
As a bonus, it also helps you, as a developer, explain your crazy technical ideas in layman's terms. Sometimes, this may prove to be a difficult task, which may lead you to re-visit the code you are attempting to document.
All of the above things make writing documentation a very important part of writing any library that will have a userbase (which is ideally, all of them), in my opinion. There's tons of motivation there. Why are you writing the code in the first place?
Nice to see you here!
- What sort of work do you do at Heroku?
- What are some of your productivity hacks?
- Why did you create
requestslibrary and how did you come up with the idea?
I call myself the "Python Overlord" at Heroku. Effectively, there is a team of "language owners" — one for each major language that Heroku, as a platform, officially supports. I am the Language Owner of Python. This includes wearing many hats, from software engineering, to community engagement and support, to customer engagement and support, to marketing, etc.
Productivity hacks? Well, I love Things.app—I've been using it for at least 6 years. About once a month or so, I get a flood of new and exciting ideas that I want to work on, but can't possibly come close to approaching them all. So, I just start entering everything into Things.app blindly. Then, when I'm done, I sort them all out into the nice categories and areas of responsibilities that I have, and my next month or two of inspired ideas is nicely organized. :)
Also, some of my best digital creations start away from the computer—on paper. Blog posts, talks for Python conferences, new Python library ideas. I sit down somewhere away from my machine with my favorite notebook and pen and start hashing out the idea. I can think much clearer without the ever-pressing distraction of a computer in front of me sometimes :)
Why did I create Requests? Well, it was originally a little file called
requests.py inside a module that I was working on — an API wrapper for Convore, a hot new chat service that everyone was using at the time. Working the API client, with this submodule called
requests.py that I wanted to be perfect, led me to create a seperate repository just for that. I was planning to make many API clients, so I wanted
requests to be perfect, and do absolutely everything I'd ever want to with HTTP in Python without any bullshit (e.g. with a great API). And, that's what happened! Much to my surprise, Requests really resonated with people on a level that no other project I had created yet had.
In honor of Convore, and the big influence it had on me, I built an archive website this past year, so make the entire contents of the website browsable:
As with everyone, I have come to know about you through Requests. :) I think enough people have thanked you for it now, you might probably be getting tired, haha! But, thanks a lot, anyway! I have a couple of questions for you:
What are the tips that you have for an aspiring developer who also wants to release an awesome open source library. Motivation is a feeble thing, what is your secret sauce?
What is your work setup, all the gadgets that you use, and geek over?
Kenneth Reitz's Tips for Releasing Open Source
- Communicate clearly and concisely. Have a great, useful README.
- Don't waste anyone's time.
- Why should they use your project? It should be immediately obvious.
- How do they use your project? It should be immediately obvious.
- How do they install your project? It should be immediately obvious.
- Be really open about the development, if you're on social media (e.g. Twitter).
- You have to be excited about what you're building, for others to be excited about it.
I use a 5K iMac for almost everything. I love having a single screen and a single computer for almost everything I do. Over the years, I've had a ton of laptops that I used 100% of the time. Nowadays, I'm more sedentary, and enjoy being fastened to my desk. Of course, I have the Macbooks I need to work from anywhere, but I rarely do.
Gadgets? Oh, I have many. I'll just name a few random ones.
- Tivoli Audio Model One: a real analog AM/FM radio that sits on my desk.
- Leica Q: my camera, which I take with me almost everywhere I go.
- Ricoh GR: secondary camera, fits in my pockets, looks like a toy. Is not a toy.
- Pilot Vanishing Point: an absolutely fantastically designed fountain pen.
- Microfiber Cloth: most recent addition. I use it constantly, and keep it in my pocket.
- Synths: Moog Sub37, Arturia MicroBrute, Korg VolcaKeys, Roland TR-8. I used to have many more synths. I have downsized.
- Ableton Push 2: I can't play keyboards (I don't know the scales). I can with this. Well.
- Portable Music Studio: Korg Electribe 2. Google it. It's crazy.
- Dymo Label Maker: shockingly useful. I use it constantly (including to make the Requests stickers for PyCon this year!). $10.
- Tektronix 2213A Analog Oscilloscope: a very useful feedback tool for anything electronic (e.g. audio signals).
Thanks for the great question! ✨🍰✨
- What editor would you recommend to Python developers working on web apps?
- What kind of work atmosphere do you prefer?
- What advice would you give to people from other professions shifting to programming career?
I recommend everyone use Sublime Text. It's really the best editor available for the type of development that I do.
Some people do prefer IDEs, which can be really fantastic tools at times. If so, I highly recommend PyCharm IDE. I have done a significant amount of work with it in the past (including a lot of Requests development!)
I prefer a work atmosphere where I have tons of personal freedom—for me, that means that I work from home, and I don't have a daily standup. Working in an office every day, or even having a remote call at the same time every day with the team really wears me down and gives me a lot of stress. Offices are okay, but I'm just much more efficient (and, more importantly, happy) at home.
My only advice to people wanting to switch from one profession to programming is this: don't try to be a programmer for any reason other than you love it.
Hi Kenneth, I want you to think retrospectively and share a couple advices for learning/polishing the knowledge and skills to us all the aspiring Python Overlords.
For me, I think polishing the "craftsmanship" side of programming Python was all about forming strong opinions — normally influenced by others I respected. I would find people who's code really resonated with me (for example, for me, Armin Ronacher, now a good friend), and I would scan through their codestyle, setup, repo structure, documentation style on GitHub. I'd note what I liked, what I didn't like. Rinse and repeat. Over and over.
Then, of course, while writing code, developing strong informed preferences is equally valuable. There are a lot of Python programmers out there that want everyone to code the exact same way. For example, there's a blog post going around about how
isattr() in Python 2 "misbehaves" and should be avoided. Some people read that blog post and start sending pull requests to their favorite projects, well intentioned, to remove the use of this perfectly non-misbehaving function (this happened with Requests actually). These are the type of people that are either following someone they respect too closely without question, or have no opinion of their own at all, and just hop on board where whoever "above" them says to.
Now, there's nothing wrong with that blog post — I just disagree with its tone of what I consider to be effectively soft fear-mongering. And, there's nothing wrong with following such a blog post.
But you should be the one writing those blog posts. But, only if you're ready. Be ready :)
Hi Kenneth, thanks for hosting this AMA. I love requests, thanks for creating it. What other open source stuff are you working on next, that the world still doesn't know about? :)
Thanks for using it! ✨🍰✨
Honestly, I don't have any explicit plans for new projects at the moment. Maintaining what I have now, even with help, is quite time-consuming, and adding more projects to the mix isn't always the wisest of decisions :)
However, I do have some great ideas for a Datetime for Humans library. Honestly, I don't think I'm going to do it—there are so many corner-cases with dates and times and datetimes—and datimes. I also really value my sanity, and do my best to avoid timezone algebra at all costs.
Ideally that's why I'd write this library, is to solve that problem — but, that's not a problem I personally have often, at all. I've encountered it, and wanted to fix it, but writing the library would have no direct benefit to me, other than helping the community and the benefits of releasing another "for Humans" module :)
And, to be completely honest with you — I have a lot of fear that I'd fuck up writing a datetime module, and having as many eyes on me as I do, I don't want to do that. I know things would be totally fine, if so, but it's a strangely strong reason for why a lot of well-known developers don't do more crazy things than they used to. They're on stage.
Can you type "The quick brown fox jumps over the lazy dog" without looking at the keyboard?
What does your typical day look like at Heroku?
- Wake up whenever.
- Answer support tickets.
- Go for a walk to get lunch and coffee downtown.
- Proceed to work on some of the tasks that I have planned for the week (like improve some component of the Python build process, submit a conference talk, or something like that).
- Engage with community intermittently.
- Engage with company intermittently.
- Email, email, email (intermittently).
- Answer support tickets.
That's your run-of-the-mill day :)
What are your first few memories with Python? What was the result of your first ever written piece of Python code?
The first time I ever saw Python was when I was a young kid, in elementary or middle school, installing random Linux distributions on my machine that I had the CD for. One of them had "Loading Python" or something similar during the bootloader.
For actually writing Python, I started that in 2007. I had done a lot of really amateur toy programming as a kid: C, Pascal, etc. Python was the first language I picked up and learned how to do things beyond a loop and a function.
I have the first piece of Python I attempted to write. Enjoy: https://gist.github.com/kennethreitz/241997
At any time, I have several ideas for various software projects. But due to time constraints I don't get to finish them. What's your advice? How should we manage our time so that we can finish side projects without hampering professional commitments?
I have the same problem, severely. Honestly, if I can't finish something in a single setting, it's never going to get done. So, most of the things I'm most proud of, like Requests, were the result of staying up far too late at night and just getting it done, at least the first version. Then, the next day, make it a little better. Rinse and repeat.
That's what works for me.
As a professional Python developer, what's your take on Node.js and related ecosystem?
Node's community is interesting — it's very greenfield. They have had the opportunity to built everything from the ground up, together, and take a fresh approach to all problems other languages have faced. Unfortunately, that led to a lot of wild-west style ground-staking, and the tremendously large number of silly dependencies (like
mkdir_p) floating around.
They also had to figure out the "we need a foundation to own/protect the IP of the platform", something that Python's had for a very long time withe the PSF.
Generally, I have little respect for most Node developers. There are a lot of great ones out there, and it's the right tool for a lot of jobs. However, most Node developers generally seem to be very new programmers that really have no idea what they're doing, and often have a big chip on their shoulder to go along with it.
Hope that wasn't too negative!
Beside coding, I saw you play the music as musician , take a pictures as photographer. How can you organize the time to do a lot of thing ?
Honestly, I haven't been doing much recreational coding for a while now. I have many hobbies (all the main ones you mentioned), and I seem to rotate them as my interests ebb and flow.
Sometimes, I'm interested in photography and software development, and I do both every day. Sometimes, I'm interested in making music, and software development, and I don't touch my camera for months. At the moment, I'm interested mostly in photography and making music, and haven't touched software development in a while.
I'll switch it up soon — I think :)
Hey Kenneth, where do you see the python landscape in ten years time?
- Everyone using Python 3 (or 4, by then).
- PyPy being far more prevalent, but not the default.
- More serious datascience users. Much more.
- Ideally, the standard library will start to shrink in size.
- PyCon, if it is to somehow remain a single gathering as it is today, will reach the size of 8000+ attendees.
I shamelessly copied these questions from a comment on your Facebook post. :D Anyway I am sure this will be quite interesting!
- Why did you call yourself Kenneth Reitz?
- If requests was an animal, what animal would it be?
- Why did the Pythonista cross the road?
I call myself Kenneth Reitz because that is the name my parents told me I have when I was born. My birth certificate and subsequent documents appears to confirm this. I also like the name :P
If Requests were an animal, it would be a mantis shrimp — for many reasons, especially their eyes.
The Pythonista crossed the road while waiting for a GIL context switch to randomly occur.
Hi Kenneth, thanks for hosting this AMA.
How long did it take for you to be this good in Python and what steps did you take to make yourself better each day. Thanks a lot for the Requests library
I feel like I haven't gotten any better at Python in about 2.5 years. I'm not sure if that's true or not, but it feels that way. It feels like the culture around the code has changed a bit, as least in my circles, which is primarily web development. I build and maintain rock-solid, stable software. I have all the tools I need to do so. There's nothing new or exciting for me to play with to accomplish any of these tasks anymore.
Docker is the only exception that rule that I know of. And, Kafka, if I ever get around to figuring it out :)
As to improving, I just always had a bunch of ideas, and I was always working on them. Working on one idea would teach me something, which would lead me to the next idea, etc etc.
So, build things! You'll keep getting better and better at it.
It's not an academic exercise. It's like carpentry. You get better primarily by.... doing it.
What should my learning path look like if I want to become a DevOps engineer? Any resources, guides or tips you would like to share?
Do you think python-daemon(PEP 3143) would be a good library to overhaul in a similar way as to what you did with http?
I'm not familiar with this API, actually! Looks interesting, will read up on it soon.
But, knowing how many standard library APIs are, it wouldn't surprise me if a third-party wrapper wouldn't be beneficial for many.
Apart from Python, what other languages excite you?
English has a tendency to invoke excitement within me, when used in specific ways :)
Seriously though, no other programming language really interests me much at all. If I did lower-level programming, I'd be pretty excited about Rust — but I don't. Python's pretty great for my needs.
I hope it stays that way.
I've been doing python for about 2 years now, I don't yet feel like i've had that 'ah ha!' moment where i'm good at python. when did you get over that hump?
About 9 months into it. I didn't do anything for it to happen—it just happened on its own. I just woke up one day, and sort of "knew" Python—after struggling with basic things for months and giving up.
I had to experiment a lot with different things of course, but that's what makes Python so great, in my opinion—the ease of experimentation with the interpreter and the object model.
This is the most useful part of the Python documentation, in my opinion: https://docs.python.org/3/reference/datamodel.html#basic-customization
How do you work at Heroku with PMs? If there are any conflicts between development team and product team, what do you do? and do you think it's important for a developer to help build the products with PMs together?
This is a complicated question with a complicated answer. I'll do my best to answer it as simply as possible :)
Basically, I work on a team that has quarterly priorities. External requests can come from external sources (e.g. other teams, sometimes teams of effectively PMs), and we can schedule in advance accordingly. Having things planned out quarterly allows us to communicate to those other groups our available bandwidth to take on new projects from outside the team.
This has change a lot in the 4.5 years that I've worked at Heroku. I think we've struck a great system.
Hope that helps!
If you could pick one Python keyword that you had to replace with an emoji, which would it be and what emoji would you choose?
Being a photographer (ex-pro) myself I wonder what you think about 'the old fashioned, chemical' way versus digital photography.
I think we lost the 'art' the last decades. But we gained a lot also: the claim on reality has become property of the masses. Alongside, photography's claim on reality has become BS because of digital manipulation.
Love your photo's btw: you're having fun, can see that!
I love emulsions. I don't use them often, as they are incredibly inconvenient, but I do shoot them from time to time, and develop b/w myself at home. To me, it's very magic, and far more impressive to me than any digital camera/photo will ever be.
I just cannot believe that we can capture perfect snapshots of light and burn them onto film using only chemicals. That absolutely blows my mind. :)
Vinyl used to be required, now it's a luxury, because it's optional. Same with film.
Your work inspires me because (even in your manuals & documentary) it expresses that you have fun working on libraries and stuff. Please eleborate on that: having fun while writing code is essential for people like me, who do not earn money with coding but just want to make things work. For me that's the fun: imagine some function/ap/whatever and make it work.
Where's the fun for you?
It's very fun to do exactly what you said.
But, I think the main fun part for me is making something beautiful. Like, really putting the absurd amount of polish on every aspect of something (from API consideration, to documentation, to file layout, to fun unnecessary humor in comments) is immensely rewarding for me. I strive, in projects like that, to just set the bar for quality in all aspects.
The only project that actively still does that is Requests, really. I think it did a good job.
Always room for improvement though!
Are there any plans for "The Hitchhiker's Guide to Ableton Push"? :D — How can I get as good as you're at playing The Ableton Push? How did you get started on it?
P.S.: Absolutely in love with your new album, Unmastered Impulses.
Thanks so much! :)
The push was pretty easy to pick up — just takes a lot of practice, like any other instrument. After a while, it becomes second nature.
I don't consider myself to be talented at the Push at all. I'm just very grateful that I can use it to preform music that I cannot on a traditional keyboard.
Thanks for listening to the album! That means a lot to me :)
Have you made any python scripts that work well with ansible? Something that would provision a whole infrastructure with your own programs.
What's your general opinion on Docker?
I didn't like it, and it seemed overhyped.
I've used Docker for Mac now, as well as the Heroku Docker beta registry. This makes the experience of using Docker much pleasant. So much so, that I think I like it — for certain things.
I do still think it's generally overhyped though. Not really sure why your average so developer is excited about it. But, a useful tool, certainly.
What's the story behind ✨🍰✨ ?