+254 728 680 519

How do computers play?

The computer is an invention that in my view is the best work of art by man to date. But a computer is just a tool which without other tools like a program won’t be able to do anything much. A computer can do many tasks at an incredible speed and accuracy but it does this by taking instructions from a program. Say you wanted to calculate the BMI (Base to Mass Index), you will have to do several things. The data needed to get this value is the height in meters squared and the weight in kg. Naturally, the computer will be able to compute this, but the computer is not aware of such things as height and weight. Therefore, it is necessary to instruct the computer to:

Read more

Data types and Objects Part 4

We need to finish up on oop so here it goes. We have collected a bunch of attributes from our model you can call it a database, same meaning because that's where we are getting our data from. Also note that this is only the scratch of the surface, in an actual system what we have as engine attribute e.g horsepower would not have been hardcoded as done here. Most likely this data might be fed using an API which leads to the world of REST frameworks which we will start looking at later. So we need to extract that data and do some functions with it to get the stats about the three cars. Let's start with the  ‘acceleration_0_60_mph’ in seconds attribute. Now that we are more used to kilometers than miles, let's convert to something we can relate to.

Read more

Data types and Objects Part 2

Welcome to the second post of this 3 part series discussing data types and objects. Well well! To be honest, trying to squeeze object-oriented programming (from now on I will use oop) to only 3 posts is a hard task because the topic is so wide but the point here is just to get you started. I will give you more links for further reading once we are done. We will start where we left off. I had asked you what changed in our post. (Link)?

Read more