Friday, 29 September 2017

JavaScript Visualization Frameworks Review


This article covers the JavaScript frameworks for the creation of data visualizations. The frameworks covered are:

  1. ProcessingJS
  2. RaphaelJS
  3. D3
It is a great read. The only point of conflict for me was that Snap.svg was not mentioned. Snap.svg is the spiritual successor to RaphaelJS.



Still the article does a great job.

Wednesday, 20 September 2017

Bitcoin Code


If you read the article yesterday, then you will know that Bitcoin is the industry leader among all the cryptocurrencies.

Today I provide the link to the Bitcoin code.

Check it out here.

Tuesday, 19 September 2017

Creative Coding Club


Creative Coding Club is an initiative by Nat Cooper.

It is a community of creative coders who gather online once a month to design and build fun digital things based on a monthly theme.

One week prior to the monthly theme, club members recieve an email reminder and curated inspiration and resources for the upcoming theme.

Each theme starts on the last Sunday of the month. Club members gather online in our Slack channel to share inspiration, resources and progress on our projects.

If you are interested in Creative Coding, check them out.

Monday, 18 September 2017

Comparing Bitcoin, Ethereum, and Other Cryptocurrencies


Without a technical background, it can be pretty hard to understand the cryptocurrency market.

For example, what exactly are the differences between coins like Bitcoin, Ethereum, Dash, Ripple, and Litecoin?

This massive infographic breaks it all down, as well as many other key metrics.

Check it out here.

Tuesday, 12 September 2017

Object-oriented Programming in Python: Create Your Own Adventure Game


FutureLearn in collaboration with Raspberry Pie is offering a 4 weeks free online programming course in Python: Object-oriented Programming in Python: Create Your Own Adventure Game.

This course is intended for those who want to learn object oriented programming in Python and it requires the Python 3 environment.

CodeLagos Trains New Master Trainers


CodeLagos is expanding. The price of that expansion is that new trainers would have to be trained. This link covers this new development.

The easiest way to benefit from the CodeLagos is via the Out of School coding centres. You can click on this link to register.

Saturday, 9 September 2017

CodeLagos Library Initiative


CodeLagos is expanding. As part of its efforts to reach out of school students in Lagos State, CodeLagos would be launching in the libraries across the state.

Below are the list of public libraries in Lagos State that will be a part of this initiative. They are:

  • Herbert Macaulay Library, Yaba
  • Isolo Public Library Isolo, Ikeja
  • Secretariat Library, Ikeja
  • Henry Carr Public Library Agege
  • Borno Library, Mile 2
  • Epe Divisional Library, Epe
  • Ilupeju Public Library, Ilupeju
  • Ikorodu Division Public Library, Ikorodu
  • Ipaja Public Library, Ipaja
  • Tolu Public Library, Ajegunle
  • Meiran Public Library, Meiran
To be a part of this initiative, click this link.


Friday, 8 September 2017

Mobile Web Ghana Excel Training


Mobile Web Ghana is organizing a training program. Find the details below:

Microsoft Excel is a powerful spreadsheet software which allows users to create dynamic tables making workflow easy by simplifying calculations, displaying and managing data. However, there are some advanced features in Excel that are not known and hence rarely used by users.

This advanced course has been meticulously crafted to help trainees acquire knowledge in some of Excel’s powerful features such as:

  • Building management report
  • Writing basic Formulas
  • Data tables
  • Pivot tables
Also learn how to build simple tools such as:
  • Inventory System
  • Client Relationship Management
  • Fixed Asset Management


Medical 3D Printing


In the short story Elsewhen one of the books in the Assignment in Eternity collection, there is the mention of a machine that creates physical artefacts from models.

Today such a device exists with the presence of 3D Printers. The applications of 3D Printing cover the gamut from food to fashion.

This great article covers the applications of 3D Printing in medicine.

If you are wondering about the possibilities of 3D Printing and how it is currently used today, this article will help you in this direction.

Check it out.

Thursday, 7 September 2017

Publishing Choices


This graphic from Reedsy covers the differences between Self Publishing and Traditional Publishing. Reedsy is a marketplace for editors and designers so there opinion differs from my reality.

I agree with most of the graphic apart from the section on Upfront cost. When I wrote my first book, I had no money. Trust me on this if I had £1000 - £3000 extra to spend on a book, I won't be a published author.

Thankfully I have been in tech for a while so I know that its easy to get things for free if you are willing to get your hands dirty.

I wrote, edited and created my book cover design all by myself. In the process, I got better at entire process of digital publishing.

Today, I am writing my 4th book and I have done all the steps myself. Will it be perfect? No.

But for this Nigerian, done is better than perfect.

Wednesday, 6 September 2017

Internship Opportunity


Mobile Web Ghana is offering smart young people internship opportunities to gain practical experience in their chosen fields. We have put together an exciting and educative package for all who would qualify for this internship program. The purpose of the internship is to strengthen the individual’s expertise in his/her chosen field and also to expose them to the experience of working in a corporate environment and in a team of like-minded people.

Specifically, we are looking for smart young people in the following fields:

Graphic Design & Software Development: The person must have the ability to write basic computer programming and have a working language in Content Management systems. He must be very creative to design fliers, publications, banners etc. He / She should have the ability to create concepts and develop them with or little supervision.
Sales and Marketing: The Sales and Marketing intern should be one who has a Marketing and sales background, creative, proactive, and intelligent to help market projects and sell training programs both on and offline. He must be a goal getter, result oriented, excellent interpersonal and communications skills.

Interested persons should send their CVs to info@mobilewebghana.org.

Epa


Epa is the symbol of law and justice, slavery and captivity.

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


This symbol consist only of straight lines. It consists of an intersecting symmetric shape. Once you draw one shape, you can use that to draw the other shape. We will start with the shape on the left hand side.

The plan to draw this shape is as follows:

  1. Lift the turtle
  2. Move the turtle to the position of the center of the left most part of the shape
  3. Set the size of the pen to 4 units of the square
  4. Find the distance to the upper position
  5. Find the angle to the upper position
  6. Place the pen down
  7. Draw a line to the upper position at the angle of the position
  8. Find the distance to the outer final point
  9. Find the angle to the outer final point
  10. Draw a line to the outer final point from the upper position
  11. Lift up the pen
  12. Move it back to the upper position
  13. Find the distance to the inner final point
  14. Find the angle to the inner final point
  15. Place the pen down
  16. Draw a line to the inner final point from the upper position
  17. Lift up the pen
  18. Move the pen back to the starting position in step 2
  19. Find the distance to the lower position
  20. Find the angle to the lower position
  21. Place the pen down
  22. Draw a line to the lower position at the angle of the position
  23. Find the distance to the outer final point
  24. Find the angle to the outer final point
  25. Draw a line to the outer final point from the lower position
  26. Lift up the pen
  27. Move it back to the lower position
  28. Find the distance to the inner final point
  29. Find the angle to the inner final point
  30. Place the pen down
  31. Draw a line to the inner final point from the lower position
  32. Repeat the steps for the shape on the right hand side
Using Turtle Graphics

We will use the grid from the last section. Rename template.py to epa.py. The size of each square on our grid is 10 pixels. We shall use this as our multiplication factor.

From step 1 of our algorithm, we need to lift the pen. The code to do this is shown below:

turtle.penup()

To move the turtle to the position of the center of the left most part of the shape, we need to get its location. This location is at the point where (-170, 0). When we multiply by 10, we know that we have to move the turtle to (-170, 0). The code to do this is shown below:

turtle.setposition(-170, 0)

We set the pensize of the turtle to 4 units. Since our multiplication factor is 10, we will use 40. The code to do this is shown below:

turtle.pensize(40)

The upper position is situated at (-8, 10). Using our multiplication factor, this will be (-80, 100). To find the distance between the two points, we will use a function called coordinateDistance. The function definition is given below:

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

After we define this function in our code, we do the following:

upperLength = coordinateDistance(-170, 0, -80, 100)

Now that we have the length of the distance between the two points, we only need to find the angle. Using the formula to find the angle between two points, our code will now be:

myradians = math.atan2(100 - 0, -80 - (-170))
upperAngle = math.degrees(myradians)
turtle.setheading(upperAngle)

Now we can draw the line to that point. Before we do this, we need to place the pen down. The code to do this is shown below:

turtle.pendown()

Now that the heading is set and our pen is down, all we need to do is to draw the line. The code to do this is given below:

turtle.forward(upperLength)

The generated image is now as shown below:


From this point, we can draw a line to the final point. The final point however comes with some complications. It diverges into two points. The trick then would be to use two positions taking them as the outer and inner points.

We will do for the outer point first. Its coordinates are (8, 0). Using the multiplication factor, this will be (80, 0). Based on step 8 we find the distance to the outer final point the code to do this is shown below:

outerUpperLength = coordinateDistance(-80, 100, 80, 0)

Next we need to find the angle to the outer final point. The code to do this is shown below:

myradians = math.atan2(0 - 100, 80 - (-80))
outerUpperAngle = math.degrees(myradians)
turtle.setheading(outerUpperAngle)

Next we draw a line to the outer final point from the upper position. The code to do this is shown below:

turtle.forward(outerUpperLength)

The generated image is now shown below:


We lift up the pen to go back to the upper position. The code to lift the pen is given below:

turtle.penup()

Next we move the pen back to the upper position. The code to do this is shown below:

turtle.setposition(-80, 100)

The coordinates of the inner final point are (5, 0) multiplication by 10 gives us (50, 0). The code to find the distance to this point is:

innerUpperLength = coordinateDistance(-80, 100, 50, 0)

To find the angle to this point, we use the code shown below:

myradians = math.atan2(0 - 100, 50 - (-80))
innerUpperAngle = math.degrees(myradians)
turtle.setheading(innerUpperAngle)

We need to place the pen down. The code to do this is shown below:

turtle.pendown()

Next we draw a line from the upper point to the inner final point. The code to do this is shown below:

turtle.forward(innerUpperLength)

The generated image is shown below:


Now we can go on to draw the lower portion of the shape. Before we can do that we need to lift up the pen so that it doesn’t draw while we are moving it. The code to do this is shown below:

turtle.penup()

Now we have to move the turtle back to its starting point. The code to do this is shown below:

turtle.setposition(-170, 0)

The location of the lower position is at (-7, -10). Multiplication by 10 gives us the point (-70, -100). The code to find the length is given below:

lowerLength = coordinateDistance(-170, 0, -70, -100)

The next task we have is to find the angle to the lower point. The code to do this is shown below:

myradians = math.atan2(100 - 0, -80 - (-170))
lowerAngle = math.degrees(myradians)
turtle.setheading(360 - lowerAngle)

Before we can draw a line, we must place the turtle down. The code to do this is shown below:

turtle.pendown()

We now draw the line from our starting point to the lower point. The code to do this is shown below:

turtle.forward(lowerLength)

This generates the image shown below:


Now we must find the distance from the lower point to the outer final point. The code to do this is:

outerLowerLength = coordinateDistance(-70, -100, 80, 0)

We must now find the angle from the lower point to the outer final point. The code to do this is:

myradians = math.atan2(0 - (-100), 80 - (-70))
outerLowerAngle = math.degrees(myradians)
turtle.setheading(outerLowerAngle)

Now we draw a line from the lower point to the final outer point. The code to do this is:

turtle.forward(outerLowerLength)

Our generated image now becomes:


Now we lift up the pen. The code to do this is:

turtle.penup()

Now we move it back to the lower position. The code to do this is shown below:

turtle.setposition(-70, -100)

Now we find the length between the lower point and the inner final point. The code to do this is:

innerLowerLength = coordinateDistance(-70, -100, 50, 0)

Now we calculate the angle between the two points and set the heading of our turtle to the angle. The code to do this is:

myradians = math.atan2(0 - (-100), 50 - (-70))
innerLowerAngle = math.degrees(myradians)
turtle.setheading(innerLowerAngle)

We now place the pen down as we are about to draw the line. The code that does this is:

turtle.pendown()

We can move the turtle forward to complete the drawing. The code to do this is shown below:

turtle.forward(innerLowerLength)

The generated image is now shown below:


With this, the left side of our image is complete. We will assume that the right side is symmetrical. So we will create it as a mirror imageof the left hand side.

The first step of the algorithm is to lift up the turtle. The code to do this is shown below:

turtle.penup()

Next we have to lift the pen to the right most part of the shape. The coordinates for this location are (170, 0). The code to move to this position is given below:

turtle.setposition(170, 0)

If you run the code at this point, you will see that it still takes the heading from when it was drawing the previous shape. We will change the heading to make it face the left side. To do this we need to make the heading the value of 180. The code to do this is shown below:

turtle.setheading(180)

Now to draw all that we need to do is to reuse the variables from drawing the other side and draw our shape.
We place the pen down. The code to do this is:

turtle.pendown()

We now set the heading of the turtle using the upperAngle value. We subtract by 180 because of the value we are compensating for.

turtle.setheading(180 - upperAngle)

Now we draw the line to that point. Our code now becomes:

turtle.forward(upperLength)

The image this will generate is now shown below:


Now we draw a line to the outer final point. The code that does that is:

turtle.setheading(180 - outerUpperAngle)
turtle.forward(outerUpperLength)

The image that is generated is shown below:


Now we lift up the pen. The code to do this is:

turtle.penup()

Next we have to move back to the upper right point. Its coordinate is (80, 100). The code to do this is shown below:

turtle.setposition(80, 100)

Now we must set the heading of the turtle to the innerUpperAngle. The code to do this is:

turtle.setheading(180 - innerUpperAngle)

Then we move forward by the innerUpperLength. The code to do this is:

turtle.forward(innerUpperLength)

We lift up the pen. This will prevent it from drawing. The code to do this is:

turtle.penup()

Now we move the turtle back to the righmost point. The code to do this is:

turtle.setposition(170, 0)
turtle.setheading(180)

Now that it is back at this point, we need to draw a line to the lower point. The code that does this is:

turtle.pendown()
turtle.setheading(180 + lowerAngle)
turtle.forward(lowerLength)

The generated image is shown below:


Now we draw the line to the outer final point. The code to do this is given below:

turtle.setheading(180 - outerLowerAngle)
turtle.forward(outerLowerLength)

The generated image now becomes:


To complete this shape, we just need to draw the line from the lower hand back to the inner final point. The code that does this is given below:

turtle.penup()
turtle.setposition(70, -100)
turtle.setheading(180 - innerLowerAngle)
turtle.pendown()
turtle.forward(innerLowerLength)

The generated image is now:



Conclusion

At the end of this post, we have successfully used Python Turtle Graphics to draw the Epa symbol.

I must admit that is was tasking to do because of the way the lines diverge but at the end, we made it happen.

Feel free to experiment with the pensize of the turtle and also the coordinates of the inner and outer final points. On my end, its a wrap.

Monday, 4 September 2017

Summer Open School


On 28 - 30 September 2017, Open Foundation West Africa will hold the first ever Summer Open School in the Sub Sahara African Region in Accra, Ghana at the Lancaster University.

The Summer Open School seeks to bring together open advocates, tech enthusiasts and people with the desire to know more about open resources under one roof, to afford these participants the opportunity to learn about the different open resources and to possibly become contributors  and avid users of such resources.

Again this will help participants and trainers alike to discuss critical issues, network and be abreast with the new trends within the Open movement. There will be different trainers who will lead different trainings, breakout out sessions and talks all aimed at promoting education, culture and heritage information and information and technology in Ghana through the use of free
and accessible open  source softwares.

The Summer Open School will take participants through sessions on Wikipedia and other sister projects (Wikidata, Wikimedia Commons, etc), Creative Commons, Open Street Maps (OSM) and Mozilla. Developers or people desirous of knowing more about developer contributions to the open movement will be introduced to the software that holds various WikiProjects, MediaWiki.

There will also be a session on Cryptocurrency specifically dedicated to PIVX to expose people to trends in cryptocurrencies, how enthusiasts could start mining and will be given a startup booster with a complimentary wallet.

It is heartwarming to know that in pursuance of the mission of the open movement to making knowledge about open resources free and accessible to all, this event is going to be free to participants.

There are however limited seats available and therefore participation is strictly by registration which is also subject to the approval by the organizing Team based on merits.

Register today via www.summeropenschool.eventbrite.com.

Sunday, 3 September 2017

App Inventor 2 Power Users FAQ


Welcome.

I apologize for being away for sometime. I was involved in a summer camp that took most of my time. Thankfully, that is done and your regular programming can continue.

The App Inventor 2 Power Users FAQ is your link to all things App Inventor. It is a collection of tips, tools, tutorials and best practices acquired by the App Inventor community.

This blog is also listed under the Books, Tips, Tutorials on App Inventor 2 section. It is gratifying to have the work you do recognized by your peers.

After you do the basic tutorials in App Inventor, this is the best place to look. It contains all the resources you need to learn and master App Inventor.

So if you are looking for new project ideas or inspiration, give App Inventor 2 Power Users FAQ a look.