This is the second post in a series of posts discussing the results of my survey of a three of the well known chatbots engines and my observations while trying to build a conversational sentiment-aware chatbot using them.

Rasa Stack

Rasa is an open-source NLP and Dialog Management library for intent classification and entity extraction for building chatbots. Being open-source Rasa gives the flexibility of deploying the developed chatbot on any platform, in the cloud or on-premises. Using Rasa Stack I built the first version of the chatbot I will call it Labeeb Alpha

Labeeb Rasa Architecture

Labeeb RASA Version Block Diagram

Rasa has two main components:

  1. Rasa NLU: this is the NLP engine of Rasa, basically where model training happens following the selected pipeline. Rasa NLU pipeline is the sequence of processing steps NLU preforms on training examples one by one in order to learn the model.
  2. Rasa Core: this is the dialog management which predicts next action based input from Rasa NLU.

Machine Learning

Rasa NLU uses Support Vector Classifier algorithm for Intents recognition and Entity extraction. The classifier is applied to vector representations of words, where each word is represented by a dense numeric vector. Rasa provides pre-trained models using publicly available training datasets; however, these models are available only in English. Chatbot developer can also update the model with additional examples. The data is provided through a markdown file following the below format:

Sentiment Analysis: No sentiment analysis service is provided out of the box from RASA, I, therefore, used twinword (https://www.twinword.com) which provides open and free API’s.


RASA has the least rich set of tools compared to Wit.ai and DialogFlow. Rasa has an interactive tool built as Node.JS application that chatbot developer can use to generate “stories”, which are examples of conversations, then Rasa Core can be trained on these examples.

Developers Support

Installation of RASA was not straightforward for me, part of the problem is that framework apparently evolves quickly and most of the online materials are already outdated although the ones I checked were released only months ago.

Rasa community is very small compared to DialogFlow, and Wit.ai, however, it is the leading open-source with a community of 2000+ members, 200+ contributor, and 300,000+ downloads from 2016 to 2018 (Rasa Community Update, 2018)


At the time of writing this report, the current version of RASA 0.14 supports integration through webhooks with Slack, Telegram, Twilio and Facebook Messenger. Integration requires running “ngrok” for secure tunneling from public internet endpoint to locally running service.

The coming post, will be tutorial-like post with Rasa custom actions code and other details.


Chatbot in Education

Since 1960 we have progressively moved from computer-based training to conversational tutoring chatbots with NLP capabilities. Those tutoring bots are an exciting application of AI in Education. However, critics have pointed to chatbots mechanical question-answer type of communication and the lack of emotional intelligence as two of the main obstacles hindering the successful application of tutoring bots.

In this blog and possibly in the coming three or four, I am sharing with you the results of my survey of the current state of tools and frameworks that would allow educational technology software designers to build intelligent tutoring systems that are conversational and emotionally intelligent.

The number of chatbot frameworks, engines and tools are huge, I counted more than 28 different chatbot engine during this survey, therefore and for practical reasons I am exploring three different frameworks chosen based on popularity measured by the number of downloads and developer community size and also to represent different types of tools available.

Also, I am not going to try implementing full emotions state synthesis and analysis from facial expression, voice tone…etc, that would be also not very feasible within a reasonable amount of time, instead I will explore only possible ways to sentiment analysis using these chatbot engines.

In addition to that, building full-fledged tutoring system would require a lot of work, so instead, I am testing each framework on building “Labeeb” which is a chatbot that simply interviews students for their feedback after finishing an educational course.

Example Conversation

The following is a conversation example that Labeeb should be able to conduct:

LabeebHi, my name is Labeeb what is your name?
StudentMy name is Yaser
LabeebGlad I am talking to you Yaser 🙂 , I knew that you’re an OMSCS student, if I am right, what was the last course you took?
StudentIt was Machine Learning
LabeebAlright, and how do you briefly describe the difficulty level of this course: Machine Learning?
StudentIt was rather difficult
LabeebOh, I am sorry to hear that 😦 , how do you describe the assignments of this course?
StudentAssignments were long and required a lot of effort
LabeebToo bad 😦 , how do you describe the TA’s and Professors?
StudentTA’s were quite good
LabeebGood, good 🙂 , how do you describe the lectures?
StudentLectures were nice as well
LabeebIt seems that you have some likes and dislikes about this course, OK this is the last question, I promise :), so on a scale from 1 to 5 where 1 is the worst and 5 is the best, how do you rate this course?
LabeebThat was a nice review, good luck in your courses, thanks
LabeebBye, bye

The frameworks I picked for this project are:

Staring next blog, I will discuss Labeeb implementation using these chatbot engines one by one. Keep following.

MOOCS and The Dark Ages

Before MOOCS is my new definition for the dark ages. Dark Ages is used to describe the era of deprived education, stagnating culture and hierarchical elite clergy. Early 2009 Udacity launched its services, before that, in an unprecedented move from such reputable university, MIT opened a lot of its courses and made it available completely free online! It is the time to learn if you have the passion and the patience. I remember the time when I used to travel from Al-Menufeya for almost 100 KM to buy a new book on some new hot programming language. Now with couple of clicks I can attend a course taught by the language inventor himself! For a techie comm moi this is heaven on earth!

Georgia Tech three years ago has launched a massive and now very popular MSc. GT OMSCSprogram completely online, the program which costs a fraction of the on-campus counterpart is a leap step toward democratizing fine education and make it available to the masses.

I proudly would like to add that I am a student in this program, I have finished 5 courses of the total 10, about to finish the sixth and planning to graduate late 2019.

My experience with this program is fantastic so far, in a coming post I am going to share more about that!



A question that I always ask when interviewing candidates applying to software engineering posts goes as the following:

In some programming languages,  you can call static method using the name of the object or the name of the class alike, if you have this choice in your programming language will you call that method using class name or object name knowing that both are syntactically valid ?

Frequently I get answers like “it doesn’t matter”, and more than often I get a strong confirmation “I will use the class name” but then when I ask why, candidates start mumbling with extra-galactic languages!

Amr Noman and me during Sustainable Refactoring workshop

Amr Noman and me during Sustainable Refactoring workshop

What I am expecting as an answer, although I don’t often get it, is: yes, I will use class name because otherwise I will obscure the fact that the method is actually static!

The mere action of using object name, although  syntactically possible, has undermined the readability and impaired the semantic of the code.

In my not very humble opinion, writing code is no different than writing a novel or a poem, in all these good writing style goals of clarity, simplicity and creativity are due.

Earlier this year, I have invited Amr Noman form Agile Academy to run a workshop for
my team about “Sustainable Refactoring”. Amr was discussing different refactoring techniques like method extraction when he said “Your code should read like a story” I couldn’t agree more!

How you choose your methods and classes’ names, how each method name is consistently or inconsistently named, whether your code is extracted into a number of reusable methods or you are just copying and pasting codes everywhere and whether your sequence of method calls can be read in a natural flow that conveys what this code is doing,  this is what adds meaning to your code beyond the basic syntax.

Salam for now,

A Bird’s Wing

In their seminal work “Documenting Software Architectures: Views and BeyondPaul Clements and the rest of the authors chose a bird’s wing picture for their book cover, and they beautifully describe how they use the bird’s wing physiological system as a new and rich metaphor for software and system architectures.

The authors in an introduction brief meant to convey the purpose and attract readers, draw a comparison between a Holism and a Reductionism approaches to describing complex systems such as systems that intensively rely on software components.

I chose to quote rather long passages from this book’s introduction here, I hope authors won’t mind.

They start asking “How would you “document” a bird’s wing for someone who did not know what it was?”

And then continue answering “A bird’s wing, like a software system, can be shown by emphasizing any of a number of structures—feathers, skeleton, circulatory system, musculature”

Here they decide that software system can be looked at from different viewpoints, which is a standard reductionist approach to comprehend any complex system.

Bird's Wing for Renaissance artist Albrecht Durer (1471-1528)

Bird’s Wing for Renaissance artist Albrecht Durer (1471-1528)

In Paul’s and his colleagues opinion the dynamic attributes of the Wing system is what makes it unique, I would even go and say that they think that dynamic quality attributes are superior and more architecture critical than static quality attributes.

They say “The wing exhibits strong quality attributes: lightness in weight, aerodynamic sophistication, outstanding thermal protection. The wing’s reliability, cycling through millions of beats, is unparalleled. Unlike a house, which mostly just sits there, the essence of a wing is in its dynamic behavior. In coarse terms, the wing extends, flaps, and retracts; in finer terms, the bird commands movements almost too subtle to see, controlling pitch, roll, and yaw with exquisite finesse.”

At the end of this amazing piece they chose to introduce their book, they turn into admiring the whole system, where the total of the system is actually more than mechanical sum of the parts.

They say” For millennia, humans have tried to comprehend the wing by examining its parts and from different points of view. But the whole wing is much more than the sum of its elements and structures: It is in the whole that beauty and grace emerge. Mankind’s technology still cannot replicate the wing’s exquisite abilities. The common starling, a merely average flier, can slip through the air at 21 body lengths per second. That’s about what the world’s fastest aircraft—at 2,000 miles per hour—is able to manage.
Structure, substructure, replication with variation, behavior, quality attributes, and emergent properties of the entire system: All these aspects are important to capture when documenting a software architecture.”

Finally they pose a question, it is true that we have our humble trials to capture and understand a complex and beautiful creation of Allah but our tools are far limited from being able to describe its beauty and grace!

They say” We haven’t learned how to document beauty and grace yet, but for that we substitute the documentation of rationale, or what the designer had in mind. For software, we can do this. For the wing of a bird, we can only admire the result.”

Always moved by these last lines, the best book introduction I have read ever!

Early last week, I had the chance to complete an Arabic Translation for Nexus Guide.

Nexus is presented by Ken Schwaber as “the exoskeleton of scaled scrum.”

In Nexus, Scrum is used as the main building block however the focus in Nexus is on integration of work products from different participants to form an integrated product increment at least each sprint.

This would enable Scrum to scale well for large teams handling complex projects.

In this translation, and for consistency, I made sure to stick to the same Arabic translation for Scrum terminologies from my prior translation for Scrum Guide.

Feel free to send me your comments, suggestions or corrections.

The full set of translations along with the original English version of Nexus Guide can be found on this page.


We are now over 10,000 words and almost 80 pages into our book about developing an Enterprise Application frontend in Angular!

Being loyal to Lean principles, we didn’t have much planning in advance, we planned the first two or three articles/tips and we started experimenting with the writing process.. As of today, we have 237 downloads which is better than what we expected!

We are planning the coming chunk of tips, we think that we may need to rearrange the book content in a way that tips build on each other so readers can start from first tip and continue reading.

We also think that we may cover all the materials we want to cover in around 30-40 articles, so at some point the title “101 AngularJS Tips and Tricks” might need to be refactored!