Difference between `==` and `is` in Python, and when to use each of them

Posted on Sat 26 January 2019 in Python • Tagged with pythonLeave a comment


In Python there are many comparison operators; you always use them to check something in your code and let your code take decision according to the comparison

In this article, I want to go deep with two operators == to check equality, and is to check identity.

Continue reading

I tried Nodejs and I like it

Posted on Mon 31 December 2018 in python, nodejs • Tagged with PythonLeave a comment

The Sign Photo by Austin Chan on Unsplash

I had a chance to try Node.js framework last month; I decided to build REST APIs using Node.js and express.js. Regularly I'm using JavaScript in my daily work besides using Django to build Web Applications, but many times I need to develop a front-end feature, This when I need to use JavaScript. I'm always using JavaScript to write front-end logic, but I never wrote back-end logic using it. I took the challenge to develop a simple REST APIs using express.js.

Continue reading

Thank you Python 🐍 community

Posted on Sun 23 September 2018 in python, community • Tagged with PythonLeave a comment

thank you

November 2015 I left my comfort zone, and I started my journey with Python, it was not an easy start. I was a Windows/Microsoft guy, I was using Microsoft Visual Studio on a daily basis, and Windows was my primary OS. I switched to macOS and Pycharm; I picked these to make my transition easier than using Linux (Ubuntu) and Vim.

After 2 months of figuring out what are virtualenv, pip, python version, and environment variable. I started another milestone of how to write a pythonic code while that I went to DjangoCon, and I saw how awesome this community is. WOW 🤗, this community is very welcoming for newcomers, and since this day I'm in ❤️ with this community.

Like someone said to me "You are staying because of people not because of the language." Indeed, the community is excellent 👍🏻, and it is what makes this language impressive and always adopting the future.

I want to thank all human beings in this community form leaders to the starters (welcome BTW 😉), thank you for being a part of this community and making this community.

Continue reading

Advice to Junior Developers

Posted on Mon 09 April 2018 in career • Tagged with career, developer, programmerLeave a comment


One day I answered What is the best advice you can give to a junior programmer? question on Quora.com. I was shocked that my answer got many upvotes, so I thought to share my answer to this question on my blog.

First, let me acknowledge you that my answers are just my experience, what I missed during my career as software developer, and I wished someone told me this advice.

  1. Be humble be foolish be patient, you have a long journey of learning, so keep learning. Technologies are changing so fast, so fast that you can't master everything, but you need to read about everything in software development, read blogs, news, etc. Invest your learning time in what you'll be master in.

  2. Don’t be afraid to fail. Making mistakes is a part of the learning, so please don’t be afraid to make mistakes, but learn from them. Even great software developers got fired, made mistakes, and they feel down, but what makes them great that they get up and learn from mistakes.

  3. Read about The Ten Commandments of Egoless Programming You will need these commandments during your journey, They helped me in my first job with a …

Continue reading

Let's build it

Posted on Sun 04 March 2018 in project • Tagged with side-project, django, pythonLeave a comment


unsplash-logoJames Pond


After many years of developing web applications, I found my passion is building Web APIs. so why I like it, I like it because I think it's giving your application a power to integrate with other apps (desktop, mobile apps, etc.), other devices (Amazon Dot, Google Home, etc.), sensors (RaspberryPi, Arduino, etc.), and bots (Slack, Telegram, Facebook Messanger, etc.). Can you feel the power that Web API that can add to your apps?

Let's build something

After I found my passion and start to search for a project to ably what I like and keep developing it. I found that there is no Web API for Quran Tafseer/Translation. What can Quran Tafseer API do for developers? If you want to develop an application for Quran and you want to provide a Tafseer/Translation to the application users, you need to gather the information from more than one source. I found most of the existing applications done it and after that work, app developers will keep this information available to their app only, so I thought of doing this work for the community and provide Tafseer/Translation for free as Web API.


Stage I

I …

Continue reading

Being a Team member

Posted on Sat 10 February 2018 in career • Tagged with career, work, netherlandsLeave a comment


unsplash-logoKaren Maes

The Start

In September 2017 I left my job and my life in Kuwait and traveled to the Netherlands to join Veneficus as Software developer, one of the reasons I moved to the Netherlands is to work in a team and I started to feel being a solo developer is bad for my career.

I joined a team of 7 developers mixed between full-time and part-time, and start to fell there are some missing skills I need to develop, and yes I was correct I worked alone for almost 7 years. What is it mean working alone? it means no need for communication, no need for development plans, no need for technical debates, no need to manage your time or other team member's time. In the beginning, I feel so bad and stressed with that change, to be honest, I made many mistakes, but with a growth mindset you need to learn from mistakes and grow and fix them, os what I did?

Community Help!

First, I asked for community help, I went to PythonistaCafe forum and posted my situation and the members gave me great answers regarding my situation, and one member point me to something …

Continue reading

Shinny New Tools

Posted on Mon 10 July 2017 in Community • Tagged with developerLeave a comment

Old Tools

Felix Russell-Saw

One day I realized that Microsoft technologies are not for what I'm looking for. what I'm looking for is working in startup that developing its own product like Instagram, Shopify, or Pinterest. So I've done some research and I found that Microsoft technologies are not made for this purpose, Microsoft technologies made for enterprises, I worked with Microsoft Dynamics AX, Microsoft SharePoint, ASP.NET WebForms, and ASP.NET Web Services you won't find a startup work with these or built their business around these kind of products, so I start to research for another technology to use.

After long time of research and Q&A with my friend Burhan, I switched to Python, I didn't pick Node.js or Ruby on Rails, because I don't like to pick a new shinny tool/framework for sake of it's new, I picked Python and Django one of it's web framework. I found during my research many people recommended Node.js because it's the new thing, again I don't like to pick the new shinny tool, this is common between developer community, developer will be proud if someone ask Which language/framework are you using? and the developer answer is the …

Continue reading

Create Login Page for your Django app

Posted on Tue 09 May 2017 in Django • Tagged with django, python, formsLeave a comment

Create Login Page for your Django app

Why Another Post about this?

I found each time I start new Django project, I need to create Login HTML page, and with that I need to write Django View and Form. Each time I tried to Google how to do it, I found many posts about how to do it from scratch, yep as you read, posts telling you how to build a Django View and Form for login page. And there are already built-in Django login View and Form (please check links). So I decided to write my own recipe on how to create Login page in your Django app using the built-in view and form to save time and stop reinvent the wheel.

How to do it?

Actually it’s an easy one, because we’ll use already built-in View and Form, so we will build the Template for it, that it. We have a Form and View ready, so first thing first, we’ll write a template to show HTML form for login, I'm assuming you have another template called base.html and we’ll just write the container block part only, and we are using Boostrap framework and crispy_form app.


{% extends "base.html …
Continue reading

Custom Client Side Validation for Parsley in Django

Posted on Sun 16 April 2017 in Django • Tagged with django, python, parsley, validationLeave a comment

Custom Validation for Parsley in Django

I wrote a post on how to add client side validation for Django Forms. In this post I’ll show you how to add custom client validation to Django Forms. I mean by custom validation is a validation that isn't available in django-parsley, like username availability, password strength, email duplication, etc.. let’s see how to add custom client side validation to Django Form.

Parsley remote validation

Parsley library has remote validation, it's calling AJAX service (Django view) and check if AJAX call returns 2xx HTTP status codes then it's valid input else it's invalid input and shows error message. Thankfully you can use remote validation in Django Form using django-parsley via parsley-extras attribute.


class UserRegistrationForm(forms.ModelForm):
    class Meta:
        parsley_extras = {
            'password': {
                'remote': reverse_lazy('validate-password-parsley'),
                'remote-message': "Password is invalid"
            'username': {
                'remote': reverse_lazy('validate_username_uniqueness'),
                'remote-message': "User with this username is already exists."
            'email': {
                'remote': reverse_lazy('validate_email_uniqueness'),
                'remote-message': "User with this email is already exists."

In the code above we are adding client custom validation as remote to password, username, and email fields, Did you notice that remote key is holding a URL to Django View? let’s create a complete sample to get our head around it.

Django Password …

Continue reading

Book Review: The Subtle Art of Not Giving a F**k

Posted on Wed 22 March 2017 in Review • Tagged with book, reviewLeave a comment

Book cover

Last month I had small trip to Netherlands, Rotterdam, at night I went to have a dinner with friends at EuroMast, it was windy day, we putted our bags in my friend’s car trunk, but unfortunately someone broken inside the car and took 2 bags and one of them was my bag. My travel backpack is stolen and I lost most of my gadgets (MacBook Pro, iPad, Amazon Kindle, Wallet, etc..)

After a night at the police station to report the incident, I went to hotel to get some sleep before flying back to home, next day I woke up, prepared my bags and headed to airport, but on my way to the airport I was thinking what to do during my long flight, I thought let’s read a book, so once I reached the airport I went to bookstore and bought The Subtle Art of Not Giving a F**k.

So Emad, Why you are telling us these story? Because while I'm reading this book I found this part

We don't always control what happens to us. But we always control how we interpret what happens to us, as well as how er respond.

which is what …

Continue reading