Designing Pythonic APIs

Learning from Kenneth Reitz’s Requests When writing a package (library), providing it with a good API, is almost as important as its functionality itself (well, at least if you want some adoption), but what makes a good API? In this post, I’ll try to provide some insights on that question by comparing Requests and Urllib (part of Python’s standard library) in a few typical HTTP usage scenarios and see why Requests has become the de facto standard among Python users. ...

August 5, 2016 · Me

API and Microservices Management with Kong

Hi all, At the last PyWebIL meetup I took the stand and gave a talk about one a very interesting open-source project - Kong. Kong is an API and microservices management layer that serves as a reverse proxy to your API’s while taking care of generic actions such as rate-limiting, authentication, monitoring and much more. One of it’s key benefits is that it is very plugable, hence it is easy to add your own custom logic (I actually enhanced a plugin to fit my needs). ...

March 18, 2016 · Me

Pycubator - Open Source Python Training

Preparing to teach my first Python class, I searched the web for teaching materials I can use and came up almost empty handed. There is a great variety of Python open books like Dive into Python and How to Think Like a Computer Scientist but they are all for autodidactic purposes and not for classroom teaching. Pycubator is my attempt at establishing an open source Python training slides and exercises that the community of Python teachers can use and hopefully contribute to. It utilize RevealJS to create stunning slides, that are actually written in Markdown and hence easy to use with source control, and the exercises uses and the exercises are actually Jupyter notebooks so students can run their code straight away. ...

December 12, 2015 · Me

Project-based learning

Context The Python course I’m instructing at Avratech (see earlier post and CNN story) is advancing and the students are already a month and a half into their group projects. This post is about my personal experience with shifting my class from teacher-led learning to project-based (learning), but first, have a look at the 5 beautiful projects they’re working on (you might want to use Google to translate the websites if your Hebrew reading skills aren’t in shape ☺): ...

September 23, 2015 · Me

Optimization Tale

I was asked to optimize our web API service. This was the first time I ever experienced anything of that sort so I was pretty excited about it. I read a lot of blog posts and Stack Overflow questions about optimization but still wasted some time on optimizing the wrong parts. Following is the lessons I learned, and some pitfalls that you can avoid on your next optimization task. Locust vs Jmeter The first you want to do when optimizing anything is to be able to measure it’s performance. I looked for a Python based (my favorite language) load testing solution and found Locust. Locust is a quick and easy package to run a threaded load testing programs with nothing but Python code. Everything was great until I sadly realized that Locust aggregates the results, meaning: I couldn’t get a raw CSV to store and analyze later on using graph tools of sorts. ...

August 29, 2015 · Me

Teaching Python to Haredim (and a CNN visit)

For the last couple of months I’ve been involved in a great project: getting Haredic (ultra-orthodox jews) man into the software world! Last week, we got an exciting visit from Oren Libermann, a CNN reporter, who published this nice story. My job in the training process is to teach them the Python programing language. Were doing a 3 month course, in which we go from learning the basic features of the language to writing a full blown (but small) software project. ...

July 10, 2015 · Me

Coroutines in Python

In the last Pyweb-IL meetup I gave a short introduction talk about coroutines and their usage in Python. It covers the basic concepts of coroutines and how they can be used in Python. Check it out!

May 10, 2015 · Me

A selfish justification for altruism (poster)

Next week I’m presenting a philosophy paper I wrote about altruism (see previous post) in a conference at Tel-Hai college! Alexandra, my girlfriend, came up with the idea (and executed it on Photoshop). The triangle represent the main 3 concepts in the paper: altruism, autonomy and well-being. Through those triangles (concepts) the image (life) looks sharper. I’d Love to hear you’re opinion on it.

April 26, 2015 · Me

Ideal workplace wishlist

Looking for a job, I wrote down things that I find important so I can narrow my search and be more focused. I got plenty of inspiration from Julia Evans post on the subject, so I thought it will be nice to share my list too. So, in my view, an ideal employer: Is creating software to promote meaningful causes that I can relate to. Has an open and transparent culture that promotes teamwork, creativity and employees initiatives. Has talented people working for it, and a strong technical leader (that guides, but don’t micro manage). Encourages open source, and participation of its employees in pro-social projects. Has interesting problems to solve and uses a wide range of technologies to do so. Has offices in [near-your-home] Tel-Aviv or allows for remote work. Cares about it’s employees work/life balance (because he understands it’s significance to his employees and to the quality of the work they produce). Following questions to ask in interviews: What do you feel about the product? Do you think it is meaningful? Do the employees know the financial status of the company? Are the salaries kept secret? Do you give out team bonuses or personal ones? Do you allow to work on personal, work related project (not part of the official work)? Who is the technical lead? what is his experience? Can I speak with him? Do you contribute to open source? Do you support local social projects? What is the kind of problem you need to solve? what type of tools do you use? What is the latest technology you adopted and why? Where are the offices? Do you allow for remote work? How may hours is in a workweek? in a single day? In which occasions will you expect to work longer hours? That’s what I came up. I try to remember it, since it’s a little embarrassing to take out the phone in the middle of an interview and read from it. ...

April 26, 2015 · Me

A selfish justification for altruism

During college I was lucky enough to get my parents old car. Driving to college was much nicer than using public transportation or hitchhiking. Considering I didn’t buy the car myself, and the fact that I used to hitchhike before I got one, I had an ambivalent feeling towards picking other hitchhikers. On the one hand I totally identified with their need, and on the other, sometimes I just didn’t feel like picking up a stranger. It’s funny but it became a real conflict for me. ...

April 25, 2015 · Me