[Techie Tuesdays] How Kenneth Reitz impacted the programming world in two hours

In many ways, it’s a dull language, borrowing solid old concepts from many other languages & styles: boring syntax, unsurprising semantics, few automatic coercions, etc etc. But that’s one of the things I like about Python.
— Tim Peters

 

Over 18 million downloads. More than 300 contributors. And helping almost every python programmer connect to web services via HTTP. All this with a few lines code written within a mere two hours.

Take one look at the past and it seems like all the innovation is already out there, done by people who are now in their 40s and 50s. But for a driven mind inventing something is not much different than solving a problem which has been ignored by others.  At the age of 22, Kenneth Reitz wrote the most popular module in python, ‘Requests – HTTP for humans’. Three years later, today his module is used by Python programmers around the world to interact with web services.

Like all of us Kenneth wanted to make an impact on the world. He entered the world of coding and wanted to be like the bigwigs of the coding fraternity. He says, “I started working on open source project, I was spending a lot of time on Github. I wanted to become famous in open source, I wanted to have most liked library in Python world. That was my dream. ”

Kenneth Reitz, Developer 'Requests - HTTP for Humans'

Kenneth Reitz, Developer ‘Requests – HTTP for Humans’

Unlike most, he didn’t limit his dream to the recesses of the darkness and kept on trying with variable degree of successes and failures. His first library in Python was called Tablib, a format-agnostic tabular dataset library, which helps programmers interact with data in different formats like csv, json, yaml, xlsx among others. It was a huge success and is presently being used by companies like Digg, Discovery channel, National Geographic and others.

“My company NetApp tried to take it from me. They told me that it belonged to them and I said that’s not true. It belongs to me, it is the most important thing in my life. It had 200 stars on Github (at that point in time.) They handed me a document to sign telling me that all my code belongs to them. I said no I am not going to sign that and I left the company.”

For someone who is a proponent of open source, there cannot be a worse thing than to exercise proprietary rights over his work.

Going to college was a very critical decision for Kenneth and  choosing which subject to major in couldn’t have been more difficult. He was just another programming enthusiast but at the same time there were other things which caught his attention. He wanted to learn about music, he wanted to be a photographer.

Kenneth recounts a few memories from those days.

“I was torn between many career paths. I could have been a photographer or a musician. I could have been a sociologist or a computer science guy. I sat down and thought hard about it. I decided that computer science was the best career option for me because if I went down that path I could always do these other things on the side. And that’s exactly what happened.

I dropped out from school after an year. But it was really great for me. My parents wouldn’t let me on the internet on my own till I was 18. I had access to it but never had my own access to it. I had to ask them to download even a Wikipedia article. But when I went to college I had my own internet connection, so I didn’t go to class at all. I spent all the time fully absorbing everything.

I dropped out of school because I met some people who had graduated from school and had no idea what they were doing. The more I talked to people, the more I realized that it was just a big waste of time for me.  For a lot of people it is very valuable but I am kind of a firm believer that it’s not a good use of time unless you are actually going to work in an organization which requires that.

It was the best decision I ever made.”

Be it any part of the world, dropping out is not something which is appreciated by society. Kenneth had to face stiff resistance due to it. Everyone thought he was making a huge mistake and Kenneth wanted to prove them wrong, and eventually he did.

The ignorance and the pressure to conform to the norms of society is endemic not only to India.

“Almost everyone I know in India has a degree. Many people in the US don’t have degrees. I have friends who are over $150,000 of debt and they work at Starbucks and book shops. I think the reason they go to college is because society wants them to. They don’t  actually know what they want themselves, so they feel pressured to do it.

But I think you have to learn to question everything and once you do, you give yourself a lot more freedom to be yourself. I think you should always do something that you have decided to do and not something that is expected of you. ”

Before Kenneth had his tryst with Python and the web, he had already dabbled in different technologies. He was more of a PHP guy who played around with WordPress. He used to make a decent living building products for others. Python was just another scripting and automation tool for him. It took him quite some time before he could let go of PHP, and decided to jump into Python full time. By that time he had already tried out Java, Groovy and other technologies.

“While I was working at NetApp,  I realized I was working on a single language. I realized how much I loved Python, I spent every waking hour working in Python,” Kenneth recalls.

It was this love for Python which led him to write the ‘Requests – HTTP for Humans’ module. It was during this time that Kenneth started spending a lot of time in chatrooms designated for Python on Convore, a realtime web chat application.

Unlike IRC, a lot of functionalities were provided in Convore. You could have your avatars and star links. It had an API and Kenneth wanted to play around with that API. So he started out by building a wrapper and this was when he realized the difficulty in making HTTP requests over Python. This frustration led him to stop working on the wrapper and start working on Requests instead.

I asked Kenneth how long did it take him before the first prototype of Requests was out. I don’t know probably two hours.

Two hours to make an impact on the world!

He was taken aback by the feedback from the community when he released Requests. He says it was surprising. “I thought I was just going to use it for myself, but it seems a lot of people wanted it too. I learnt how to maintain it because people would request ridiculous things. Everyone was using it and that’s when I really learnt a lot about how to make correct decisions when it comes to those kind of things. And  I guess the rest is history.”

Convore was funded by YCombinator in 2011 and eventually died out. The founders have since come up with a similar product known as Grove.

Take a look at Kenneth’s website and you will see that he is more of a design person than anything else and this is what majorly contributed to the success of Requests module too. Kenneth believes that functionality without design is useless. He wrote the readme for Requests even before he started coding.

How to use the code before it is written? I pretended this way, if I can have any HTTP library in the world for Python, what would it look like? It didn’t take long to make that happen.

Once the module was out, there were a lot of feature requests.  To figure out which one to pay heed to is not an easy task. We normally get overwhelmed trying to satisfy every user and figure out what is the best way to go about it.

This was the same dilemma faced by Kenneth as feature requests started coming in.

“It was really important for me to fit the 90% use case, instead of the 100% use case. Just because one person wants some feature added doesn’t mean it should be there. ”

Kenneth initially named the module ‘Requests – HTTP that doesn’t suck’.

“I did believe that my module was the ‘HTTP that doesn’t suck’, but I didn’t want to convey that negativity. There is a lot of negativity in the tech world and I didn’t want to contribute to that. As a matter of fact I wanted to counter it. Hence to make the connotation positive, I changed the name to ‘HTTP for Humans’. Ubuntu has a very similar thing, but I didn’t think about it when I was naming it.”

Expanding on the positivity he also talks about India, which he says was the best thing to have happened to him. But it also brought along the hardest time in his life.

“A year ago I went to speak at PyCon India. India was very hard for me. I had never experienced anything like that in my life. I was in a cab and I was crying. The things I saw were so overwhelming. I would see these buildings under-construction and people living in them. I saw these people, and everyone was as happy as they could be, even with so little. They had a big smile on their face which made me feel terrible about myself.

I felt upset because I had to be in that hotel to be happy. India gave me a lot to think about. I went home and I took a month off from work. When I started working, I started developing a migraine. I get migraines all the time and generally  I take some tablet and lie down, and two hours later it is gone. I did that with this one and it stayed. It was still there for the next day. And I had a migraine constantly for 242 days. Not a single day of relief and I think it was from India (laughs).

That headache is the best thing that has ever happened to me. I was in severe pain. I could just sit around and do nothing or learn how to deal with it. It happens with a lot of people. It is called NDPH (New Daily  Persistent Headache). The first time it feels like loud sounds, bright lights.

So the first thing I had to do was not let people bother me at all. I unfollowed people on twitter. I started eating healthy and doing yoga. My entire life has been completely transformed because of this migraine. It is great because the migraine forces me to be who I am, and if I am not who I am then it comes back. So, right now I can have a migraine if I don’t follow my heart. It is the craziest thing. I don’t have a headache right now. I am not taking medicines anymore. Whenever I feel it, I am thankful, for it is showing me something and I have learnt from it. The six months with the headache were definitely the worst six months of my life, but it was also the best six months of my life. It was preparing me for whatever I got to do next.”

It is not easy to have accomplished so much in life at such a young age. One is not used to the limelight and it is difficult to keep your head down once people start looking up to you. There are moments when Kenneth has to keep himself quiet despite wanting to say something because his words will now be under scrutiny by thousands of people who are all across the world.

No one said life would be easy when you set out to change the world and achieve your dreams.

Aditya Bhushan Dwivedi

Aditya Bhushan Dwivedi

A Software Engineer by education, Aditya has been a Workshop Consultant with The Times of India and later on was a Cloud developer with CSC India Pvt. Ltd. Apart from coding, he has a keen interest in analyzing stock market movements and often forgets the outer world once he starts reading. You can follow him on Google+ and Twitter at @adi_bhushan. You can reach out to him at aditya@yourstory.com".