Categories
Make Money Online

Wage Slavery

When you live in the poorest nation in the world, wage slavery is a reality.

You earn peanuts and to add insult to injury, you might be owed your salary for months on end.

That was my life once upon a time before I took the plunge to make money online.

The truth is that I am still figuring this out. I made some money this month through writing so I know that it works. The challenge is to scale the amount of income made.

Yesterday, I discovered that I couldn’t make money using affiliate marketing as this site didn’t have enough traffic.

It is only something you can learn from experience. In Nigeria, we say that a person who used mouth to learn driving won’t get into an accident.

N50,000 is $138 by the current exchange rate. How much can that get you?

That is the reality of living in Nigeria at the moment. There is no end in sight to the suffering.

Were I a candidate who knew Microsoft Excel, I would tempt my fate on Fiverr or Upwork.

Freelancing online is way better than frustrating yourself in traffic especially if you live in Lagos.

Categories
Drawing Adinkra Symbols using Python

Abusua Pa

Abusua Pa means “Good Family”. It is the symbol of the family unit. Typically in Akan culture, Abusua is the name in Akan culture for a group of people that share common maternal ancestry.

The Abusua line is considered to be passed through the mother’s blood. It is a taboo to marry someone from the same Abusua.

We will use the 5-pixel grid to trace out this image. The image of this is shown below:

Abusua Pa Adinkra Symbol on Grid
Abusua Pa Adinkra Symbol on Grid

Analysing the Symbol

The symbol is a composite symbol made up of a hollowed out square. The inner part of the square consists of four sections which are lined like a window pane.

The outer part of the square intersects with 4 semi-circles. The widths of all the component shapes are the same.

The Plan to Draw the Symbol

To draw this symbol, the first task is to increase the pensize to 40 pixels. Next we move the turtle to the position (-100, 100).

We find the distance between (-100, 100) to (100, -100) and use the drawSquare function to draw the outer square.
Next we move to the position (-100, 0) and draw the horizontal centre line. We then move to the position (0, -100) and draw the vertical centre line.

Once we have completed the outer square and its centre lines, we draw the external semi-circles.

Finally, we reduce the pensize to 5 and draw the inner sections of the symbol.

Algorithm to Draw the Symbol

The algorithm to draw the Abusua Pa symbol is shown below:

  1. Lift up the pen
  2. Set the pensize to 40 pixels
  3. Set the position of the pen to the location (-100, 100)
  4. Place the pen down
  5. Find the length of the side of the outer square
  6. Draw the outer square
  7. Draw the inner centre lines
  8. Draw the outer semi-circles
  9. Reduce the pensize to 5
  10. Draw the inner squares

Using Turtle Graphics

We will use the template.py file and rename it to abusuapa.py.

The code for steps 1 to 4 is given below:

turtle.penup()
turtle.pensize(40)
turtle.setposition(-100, 100)
turtle.pendown()

To find the length between the two points, we use the coordinateDistance function which is shown below:

def coordinateDistance(x1, y1, x2, y2):
dx = x1 – x2
dy = y1 – y2
D = math.sqrt((dx * dx) + (dy * dy))
return D

We calculate the length between the two points using the code shown below:

length = coordinateDistance(-100, -100, 100, -100)

We then draw a square using the drawSquare function.

drawSquare(length)

The generated image is shown below:

Outer Square
Outer Square

I realize that since we are using the drawSquare function, we no longer need the setposition code. We can comment it out.

To draw the center lines, we have to move the turtle to the left-hand side and move forward by the length of the side. Next, we move the turtle to the bottom, set its heading to 90 degrees and move up by the length of the side. The code to do this is shown below:

turtle.setposition(-100, 0)
turtle.pendown()
turtle.forward(length)
turtle.penup()
turtle.setheading(90)
turtle.setposition(0, -100)
turtle.pendown()
turtle.forward(length)

The generated image is shown below:

Centre Lines
Centre Lines

To draw the outer circle we will start with the top and move clockwise. To draw the upper circle, we need to move the turtle to the position (50, 120). Then we draw the semi-circle. The code to do this is shown below:

turtle.penup()
turtle.setposition(50, 120)
turtle.pendown()
turtle.circle(50, 180)

The generated image is shown below:

First Semi-Circle
First Semi-Circle

To draw the remaining semi-circles, we move clockwise and also change the heading of our turtle accordingly. The code to do this is shown below:

turtle.penup()
turtle.setposition(120, -50)
turtle.setheading(0)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-50, -120)
turtle.setheading(270)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-120, 50)
turtle.setheading(180)
turtle.pendown()
turtle.circle(50, 180)

The generated image is shown below:

Outer Semi-Circles
Outer Semi-Circles

Completing this shape is easy. All we have to do is draw the lines that are within the squares. To do this we must reduce the pensize to 5 and set the orientation of the turtle appropriately to draw the lines.

The code below will draw all the vertical lines:

turtle.penup()
turtle.pensize(5)
turtle.setposition(-60, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-40, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(40, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(60, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

The generated image is shown below:

Vertical Lines
Vertical Lines

To draw the remaining horizontal lines, I shall start from the bottom of the symbol and work my way up.

The code to do this is shown below:

turtle.penup()
turtle.setposition(-100, -60)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, -40)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 40)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 60)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

The generated image is shown below:

Final Symbol
Final Symbol

Complete Code

"""
Project Name: Drawing Adinkra Symbols using Python
Developer Name: Truston Ailende
Email Address: trustonailende@gmail.com
"""
import turtle
import math

# Square
def drawSquare(length):
    turtle.penup()
    turtle.setposition(-length/2.0, length/2.0)
    turtle.pendown()
    for i in range(0, 4):
        turtle.forward(length)
        turtle.right(90)
    turtle.penup()
    turtle.home()

# Horizontal lines
def drawHorizontalLine(length, division):
    pixelSpace = int(length / division)
    half = int(length / 2)
    for j in range((-half + pixelSpace), half, pixelSpace):
        turtle.penup()
        turtle.setposition(-half, j)
        turtle.pendown()
        turtle.forward(length)
    turtle.penup()
    turtle.home()

# Vertical lines
def drawVerticalLine(length, division):
    pixelSpace = int(length / division)
    half = int(length / 2)
    turtle.right(90)
    for k in range((-half + pixelSpace), half, pixelSpace):
        turtle.penup()
        turtle.setposition(k, half)
        turtle.pendown()
        turtle.forward(length)
    turtle.penup()
    turtle.home()

# Draw the grid
drawSquare(400)
drawHorizontalLine(400, 40)
drawVerticalLine(400, 40)

# Change the colour mode
turtle.colormode(255)

# Change the pencolor to red
turtle.pencolor(255, 0, 0)

# Draw the horizontal centre line
turtle.setposition(-200, 0)
turtle.pendown()
turtle.forward(400)
turtle.penup()

# Draw the vertical centre line
turtle.setposition(0, 200)
turtle.setheading(270)
turtle.pendown()
turtle.forward(400)

# Reset all the properties
turtle.home()
turtle.pencolor(0, 0, 0)

# Place code here
turtle.penup()
turtle.pensize(40)
turtle.setposition(-100, 100)
turtle.pendown()

def coordinateDistance(x1, y1, x2, y2):
    dx = x1 - x2
    dy = y1 - y2
    D = math.sqrt((dx * dx) + (dy * dy))
    return D

length = coordinateDistance(-100, -100, 100, -100)
drawSquare(length)

turtle.setposition(-100, 0)
turtle.pendown()
turtle.forward(length)
turtle.penup()
turtle.setheading(90)
turtle.setposition(0, -100)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(50, 120)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(120, -50)
turtle.setheading(0)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-50, -120)
turtle.setheading(270)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.setposition(-120, 50)
turtle.setheading(180)
turtle.pendown()
turtle.circle(50, 180)

turtle.penup()
turtle.pensize(5)
turtle.setposition(-60, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-40, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(40, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(60, -100)
turtle.setheading(90)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, -60)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, -40)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 40)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

turtle.penup()
turtle.setposition(-100, 60)
turtle.setheading(0)
turtle.pendown()
turtle.forward(length)

# End the program
turtle.done()

Where Can It Be Found?

A brief Google search led to only one significant reference online which is the Abusua Pa Experience.

Abusua Pa Experience is a travel and tour experience company based in Cape Coast, Ghana.

Summary

At the end of this post, we have successfully used the Python Turtle environment to draw the Abusua Pa symbol.

The code for this series is available on GitHub. Please feel free to check it out.

Next time, we will look at the Akoma Ntoaso Adinkra symbol.

Support this Series

Using the Adinkra symbols, I created the Adinkra Notebooks Collection.

You can support this series by buying one of them.

Categories
Uncategorized

Your Days are Numbered

The Nigerian is conditioned to believe that the best will always happen. He’s not conditioned to prepare for the worst, so the worst keeps on happening – and he’s unprepared.

Here we are today.

Onye Nkuzi

The above statement is my feeling towards the entity called Nigeria. While being assaulted on every side, our leaders dilly dally on trivia.

The news from the country is melancholic as usual. Sometimes, I wonder why I even bother.

30 Dead Including Pregnant Woman and Baby in Nigeria Militant Attack

Last week, 30 people were killed in a terrorist attack. The headline says militant to cushion the effect but the attackers were terrorists.

The military in Borno state is not to blame. Were I a commanding officer in the Nigerian army, I would not be able to order my men to fight.

The attack happened the same day 1,400 repentant Boko Haram suspects were released.

Against that backdrop were I a commanding officer, I would order my men to stand down once it was 5 pm.

Northern Nigeria Accounts for 87 Percent of all the Poor People in Nigeria – World Bank

This headline comes despite all the years the South has spent carrying the North.

Despite all the years of quotas and special privileges, the North acts like an anchor dragging the rest of the country down to the abyss.

When those of us from the South express our opinions, we are shouted down.

Well, the truth doesn’t lie.

AU 2020 Summit

The AU 2020 Summit held this week. What is really tragic is the absence of African only spaces where we Africans can talk to ourselves without Asians or Europeans in attendance.

The only interesting thing was the admission by the United Nations that African nations are being sidelined on the Libya issue.

Bishop Kukah: Our Hypocrisy and Duplicity Have Caught up With Us

Bishop Kukah was speaking at the funeral of an 18-year-old Reverend Father in Training.

Residents Boo Buhari Boko Haram attacks Borno Capital

So the President returned from Ethiopia to visit the community where 30 people were killed.

On his way, he was booed. That same day, the capital was attacked. That tells you all you need to know about what the terrorists think about us.

International Flights to Lagos Divert to Ghana Due to Poor Equipment

As proof that bad governance will kill everyone, those Nigerians rich enough to afford flight tickets found out that they could not land in Ghana because the ILS (Instrument Landing System) at the Muritala Muhammed Airport was bad.

As a result, some airlines diverted their flights to Ghana. Proof that we must fix our nation or if we plan to go on exile never return.

Conclusion

Thus ends the sixth week of the year in one of the most dangerous countries in the world.

Have a great week.

Categories
Python Programming

Algorithms

This article was inspired by a problem I met while buying credits for my electricity meter in Lagos, Nigeria.

The printout for the credits comes in 20 characters as shown below:

12345678901234567890

When you want to enter the figure above into the meter, the meter will ask you for PIN 1, 2, 3, 4, 5. As a result of this, the above number has to be broken down into 5 PINs.

To enter the PINs into my meter, I had to manually separate the printout at every 4 numbers and that was when the idea hit me that this was a good candidate for automation.

In why we program, I go over the fact that we program to automate the solution to a problem. So rather than have a human being carry out a task, a program can be written for a computer to do it.

If we had to write a computer program, we would need to first consider how we would perform the above operation by hand and then breakdown the operation into a series of steps.

The series of steps describing how to carry out the task is called an algorithm.

Algorithms are a sequence of steps which when followed exactly in order will produce the same result.

One area where this is found is in cooking. You can create an infinite variety of meals by altering the ingredients and the order in which they are added while preparing a meal.

So for our problem above, how would we solve the problem? To do this by hand, I counted from the left-hand side and at every 4th number, I placed a comma after it.

So the above printout will now be:

1234,5678,9012,3456,7890

But how would we create an algorithm for this? The steps below will create a generic algorithm for separating at every fourth position.

  1. Ask the user to input a string
  2. Find the length of the string
  3. Loop from 0 to 1 less than the length of the string
  4. At every 4th position, print out the string on a new line
  5. When the loop gets to the end, print out the remaining part of the string

Using the algorithm above, can you create a program which when given:

12345678901234567890

Will output:

1234
5678
9012
3456
7890

Let me know how you fared in the comments below.

Categories
Uncategorized

Benin Expedition of 1897 – 123 Years Anniversary

My name is Ailende Truston Oiselenjakhian. I am an Esan man from Edo state Nigeria.

Today marks 123 years since the Benin Expedition of 1897. It effectively ended the reign of the Benin empire.

My ancestors would keep fighting for 9 more years. Until 1906 when they would finally surrender to the British.

My great grandfather would fight in that war his story becoming part of my family’s history.

Ojiemuada -> Iyoha -> Ailende -> Oiselenjakhian

That is my family line. I remember because he was one of the last to surrender.

Ironically, today Edo state is under invasion from the Fulani. It is hoped that the government will intervene to solve the problem.