definition of AI

At work, there’s a very interesting debate going on what is the correct definition of Artificial Intelligence. The word AI has become more of a cliche these days but I believe there is still merit in having your own good definition of what it means to you and your organisation.

Here’s my 2p worth…

If we take a step back and take a look at the most popular definition of “Intelligence” (from wikipedia), it is:

“the capacity for logic, understanding, self-awareness, learning, emotional knowledge, reasoning, planning, creativity, and problem solving”.

Surely then, Artificial Intelligence should mean:

“anything that is artificial and has the capacity for logic, understanding, self-awareness, learning, emotional knowledge, reasoning, planning, creativity, and problem solving”.

Today, we can build software systems that are capable of “logic“, “learning“, “reasoning“, “planning” and “problem solving“.¬†And I would class them as “Partially Intelligent” (or Narrow AI as some people call it)

But we still haven’t figured out how to make software that is “self aware“, has “emotional knowledge” and more importantly, generalises from past experience and knowledge and applies to new tasks.

We are not there yet, but surely we will one day.

According to Medici Effect,

“Breakthrough innovations happen at the intersection of ideas, concepts, and cultures”.

I will add “hype” to that list of intersections ūüôā

python decorators

Its very important to remember that in Python, everything is an object.

Functions are objects, classes are also objects. By virtue of being objects, they can be passed around. And they are mutable (which means they can be modified).

Think of a situation where you want to measure the time each function takes to execute. Assume you have 20 functions in your module that you want to measure the execution time for.

Continue reading “python decorators”

myths about “big data”

If I could borrow the neuralyzer for just one day, I would erase the phrase “Big Data” from the memories of all people.

Since you are reading this, I assume that you’ve definitely heard of what Big Data is and if you are like most, you have more questions than answers. People selling Big Data solutions make a lot of (false) promises and build a lot of hype around it, so this is an attempt to shed some light on the reality.

Continue reading “myths about “big data””

time is like orange juice!

According to my orange juice theory, a day is like an orange and the amount of time that you have in a day to do your tasks is like orange juice.

With the right tools, techniques and determination, you can always squeeze a little bit more (juice) out of your day.


image credit:


python functions and callables

Python is a good, strong Object Oriented Programming language and it was never designed to be a functional programming language. You can read a bit about the history here.

Having said that, Python does have certain useful functional programming features which we discuss below.

Function as first class citizens

All functions in python are in fact objects and you can do whatever you do normally with objects. Like passing them around. Functions can be passed as parameters into other functions and they can also be returned as return values. Continue reading “python functions and callables”

tips on writing beautiful code in python – part 1

I’ve been programming in Python for over 7 years now and I must say its the most beautiful language I have ever worked with. They say “beauty lies in the eyes of the beholder”, but when it comes to Python, the language itself is designed to look beautiful. Ok, maybe I am a bit biased !!

The following tips are heavily influenced by the various talks I watched, by Raymond Hettinger, the co-author of Python (who I admire) and a few of my own experiences with Python. Since this is a list of things I collected over the years, I am not able to attribute these to the appropriate authors, but please accept my sincere thanks.

# tuple unpacking

When you want to do something like swapping the values of two variables a, b

temp = a
a = b
b = temp

a better (and safer) way of doing this is by using tuples to unpack.

(a, b) = (b, a)

Continue reading “tips on writing beautiful code in python – part 1”

playing with IRIS data – KMeans clustering in python

I was revising my statistics and data analytics notes from my dog eared handwritten notebooks and thought it would be a good idea to transfer the notes online. What better place than the blog.

Here is a quick and simple example of the KMeans Clustering algorithm. And to demonstrate the algo, I am using the infamous IRIS dataset. I do apologise if you are bored at looking at this dataset over and over again, but its probably the most simplest and easily understandable dataset for beginners.

Continue reading “playing with IRIS data – KMeans clustering in python”

life’s too short

Its really too short to worry about a lot of things we unnecessarily worry about.

In the grand scheme of things, our lives are scarily insignificant. Stuff has been around for billions of years and will continue to be around far longer than we can possibly imagine.

Its only wise to enjoy this small life doing what we love doing.