Mpumelelo Msimanga's blog

Marikana in numbers and why you shouldn't be a miner

One of the main aims of data visualisations is to represent information or data in a graphical format. A picture can tell the story of a thousand words with a single glance and speak the same language to all people looking at the picture. It is hence always interesting to represent stories with a social and political side in terms of a single graph. In mid 2012 a tragic incident happened in South Africa, 45 people lost their lives during a strike by by miners working for Lonmin mine in Marikana1 2.. The miners were striking for a 22% increase in their wages. 22% is just one of the numbers that tell the story of Marikana. This post collects some of the numbers and represents them in a graph.


There are many opinions on the Marikana tragedy. The unions have blamed the mining company for the manner in which they handled the strike. The workers say the union leaders, particularly those belonging to the National Union of Mineworkers (NUM) have lost touch with the miners.

Social commentators point to the fact that South Africa is one of the highest ranked countries when it comes to the gap between the rich and the poor. It is not for me to say who is right or wrong but perhaps looking at the numbers will give some perspective state of salaries and expenditure surrounding the Marikana tragedy.

It will take a Lonmin rock driller – who earns on average R10 500 in a total-cost-to-company monthly package (working 8 hours a day underground) – almost a decade to earn what the company’s chief executive earns in a month3. The commission established to investigate Marikana will reportedly cost 75 million Rands 4. Its safe to say the lawyers and judges involved will make much more out of Marikana than the miners.

Two very useful open source SQL editors

Working in Business Intelligence (BI), I write and execute SQL statements every day. Actually it is more like every other minute. The SQL tool I use is thus very important to me. Over the years I have mainly stuck to SQuirreL SQL Client and wandered off every once in a while to check out different tools. One thing is for sure, no one tool will every have everything you need. At some point in time you have to make a choice based on the features most important to you.

Different database vendors will each have their own frontend specifically developed for their database. Oracle has SQL Developer and Sybase has Interactive SQL and so on. I would advise any budding BI practitioner to probably start with the tool supplied by the vendor. In most cases you will have less compatibility issues and the user can start writing and executing statements from the onset.

For those who use more than one database at a time and want to use the same SQL frontend I would recommend SQuirreL SQL Client or my current favourite tool of choice SQL Workbench\J not MySQL Workbench as these are two totally different products.

Over the next few weeks I will do some blog posts to highlight features I find useful when using SQL Workbench\J and SQuirreL SQL Client. Here are some features technical and not technical that both tools have in common that have led me to use these two tools.

    None technical reasons:
  • Open Source Software, both are free for commercial use and with the source code available are open to developers to debug or contribute features.
  • At the time of writing both are under active development with regular builds being released. Probably about a build (new version) a month apiece. I use the latest testing builds and don't stick to the stable versions. For the faint at heart stick to the stable release versions.
  • Active forums, where I was able to get a response to some questions I had on the applications.
  • Both applications run on different platforms due to the fact that both are written in Java. This allowed me to use both applications on Windows and Linux
  • Technical Reasons:

  • JDBC as connectivity means it is probably likely that you will be able to connect to any database. Most databases provide a JDBC driver.
  • Data explorer component from both products are quite customisable. It is possible to customise the schema's that display, customise the SQL statements generated such as the INSERT, UPDATE or DDL statements created.
  • Data import and export wizards for data in various formats including CSV, Microsoft Excel formats XLS and XLSX and OpenOffice formats ODF is possible using both tools. You are likely going to have to experiment here most specifically with date and null fields imports.
  • Both tools provide for customisations of how SQL history is handled, frequently used SQL statement, syntax highlighting, connection settings and session customisation to name a few.

Both SQL frontends are very capable and the learning curve for both is pretty steep. This can be expected given the complex nature of working with SQL and working on different databases. Most decent SQL tools have some complexity and instead of learning many different tools I decided to invest time into learning how to effectively use SQL Workbench\J and SQuirreL SQL Client.

I would urge you too to take a serious look at these two tools because you will not get much better generic SQL tools. The alternative which I trailed for a couple of years is using different tools for different databases. For MySQL one could use a tool like HeidiSQL that runs on Windows. For Oracle one could use as TOra which is an OSS frontend primarily focused on Oracle. This would mean learning a different tool for each database once uses. This is okay if you don't change databases often but I find myself using different databases regularly.

Don't be fooled by the dated screen shots on both web pages, these tools look much better. Here are the home pages of the two tools:

  • http://www.squirrelsql.org
  • http://www.sql-workbench.net

Over the next year I will be writing some blog posts with in-depth step by step instructions on how to use some use functions in both tools. Do I have a favourite out of these two, not really. SQuirreL SQL Client is the one I have been using the longest and I really like what I see with SQL Workbench\J.

Distraction free writing

Just how did the writers of old manage to churn out so much material given that they did not have:

  • Word processors,
  • the Internet and
  • Google for all research?

My take and I am probably not the first person to say this is we may have made technological improvements to make writing much "easier" but along the line we created more things to distract us. For someone working in IT, I have always regarded writing as unimportant and have always done it using a normal word processor such as MS Word or LibreOffice Writer. It never occured to me to use anything else. It was after an extended period of non-productivity I realised the reason I was not writing as much as I would have wanted to was because I was just too easily distracted.


Distraction Free

Here is what typically happens, I start writing a piece of documentation, pause to look up a word or term I want to write about and before I know it I am immersed in a WikiPedia article on the history of Linux.

I am trying out two writers for now. I urge you to try them out, you will not turn regret it. After not being able to write a blog post for over a year suddenly I have managed to write two posts in a week and have finished countless work documents. Here are the ones I am trying out:

I have been able to use both applications concurrently without any difficulty. The main feature both provide is a blank screen with just you and your text. They both do have spell checkers and a few more nifty tools like pattern replacement.

Some articles to read with references to other distraction free editors are:

Do try out a distraction free editor, all your writing tasks will become much easier.

Good bye paper books hello ebooks

I might be an early adopter when it comes to software but I am old fashioned away from my computer. I like reading but in recent years I have not been able to read too many books. There just is not enough time in a day and some of the books I would like to read are just too bulky to carry around. I travel light so I will either carry a book around or my smart phone, I mostly chose the latter. At least with the smart phone I can read blogs online.

Enter the Kindle, I was given a Kindle as present by my lovely wife. After a couple of months using the Kindle I have to admit I don't care too much for good old fashioned paper books any more. They take up too much space, are cumbersome to carry around, can take days to be delivered when ordered online. I love the convenience of the Kindle. The Kindle is light, simple, understated but it reads exactly as a book would with no glare from the screen. I can read from it for hours on end.

Most people who ask to have a look at my Kindle initially try use it as a touch screen. I put the blame squarely on hype around the iPad for that :-). No the Kindle (at the time of writing) does not have a touch screen, it does not even have a colour screen and yet it does the job of replacing books well. I am able to load PDFs, MS Word Documents and saved web pages to the Kindle. I am able to read software manuals sitting on the bus without having to carry the printed the paper around, if I get tired of the Linux manual I switch to reading another book.

Yes there are disadvantages to ebook readers. The inability to share your books, if you are stuck in a desert and do not have a power outlet to recharge the reader (by the way I charge my Kindle once every 2 to 3 weeks, I turn WiFi off when I am not using it). I can live with the disadvantages. I putting all my paper books up for sale.

The Kindle is not the only ebook reader available. Just to name a few:

NamePriceMemory
KindleUS$139.004GB
Barnes & Noble NookUS$139.002GB

Ubuntu Linux Experiment

My parents have a desktop PC that is not connected to the Internet. They have had this PC for close to 4 years and 50% of that time the PC has been unusable. The PC runs Windows XP and viruses collected from memory sticks and cameras have constantly rendered it unusable.

I have now decided to install Ubuntu 10.10 on the PC. This is the experiment and several questions come to mind. Will my parents be able to use software packaged with Ubuntu? Will the software available cater for all their needs and will my life be much easier? Easier as in will I have less maintenance to perform on the home PC and less questions to answer about how to do certain things.

I will be making updates to this page about the experiences. The first update is I managed to buy a PC without any operating system and I have already saved some money not buying Windows. To be correct I have kept within the law by not pirating Windows.

EDIT: Apart from a document that "disappeared" as it was accidentally moved to another desktop I am happy to report that there have been no problems with the Ubuntu installation at home. The news is made even better by the fact that I am getting reports of people coming over to my parents' place to type documents as their computer is virus free.

E-Commerce with Paypal in South Africa

A momentous event occured in South African e-commerce when First National Bank (FNB) made an announcement that it was now possible for FNB account holders to receive payments from people using Paypal. Why is this a big deal for the cost conscious business or budding entrepreneur:

  • One of the biggest costs to getting started with an online business was the amount of banking costs one had to incur in SA. Using the big four banks you needed to open a merchant account. As we all know banking fees are not cheap in SA, what more a specialised account.
  • The other alternative was to use a third party payment gateway. The SA based gateways on the main have a monthly fee which is a big deal if you are not making money from your web site
  • Paypal is a division of eBay and has over 200 million users. That means you have over 200 million clients who will find it pretty easy to purchase from your site.
  • Paypal charges a commission for actual sales you make. From the FNB web site this is 1.5%. When you are not making any sales you do not pay anything. This is perfect for the small player as it reduces the start up costs.

For more information visit the FNB web site: https://www.fnb.co.za/online-banking/pay-pal.html

Blogging Software

“Content is king”, and one of the major goals of this site is to have quality up to date information on the latest Free and Open Source Software (FOSS). The question I had was, how to best keep the site updated. Lets face it, typing out articles in text boxes is not the most inspiring activity. While Firefox does have a built in spell checker and Drupal, my choice of blogging web software ,has various Rich Text editors (MS Word like interfaces for typing in content, think web mail interface). I still get distracted by all the things going on in by browser, not to mention all the buttons and other menu interfaces on Drupal. I decided to look around and see how professional content creators go about it. Blogging software seems to be the name of the software the professionals use. Even though I must admit to having seen the odd software release statement I had never paid much attention to this type of software. Yes I am one of those people who has suddenly discovered something that others have known for years, still I do feel rather pleased with myself. I read through some reviews, here are a couple of links:

After reading through these reviews and ensuing comments. I came to the conclusion that Windows Live Writer (WLW) and Scribefire were the two tools to try out first. I was able to install both write some blog and publish the test blog entries … you may see one such test floating around on my blog. WLW makes you feel like you are using MS Word. It has a familiar look and feel to it. The interface is clean and allowed me to concentrate on writing the content. Setting up WLW to publish to my blog was pretty straight forward and in no time I was able to push through some content. I installed two flikr plugins. Installation was straight forward, like installing any application on Windows. I simple chose the default options and after clicking next a couple of time the installation was complete. The first time I uploaded an image to flikr, I was asked for my flikr account login details. From then on including images in my posts was easy enough. Scribefire is a Firefox add which I finally settled upon. The main reason being the intergration with Firefox. At any given point in time I tend to have more than a few applications open at a time and adding another application is not going to make my life easier. I am using Scribefire for this current post. Since I have made the choice, I think will  post a couple of posts before posting a review on Scribefire.

Another Test

This is one more test of the Scribefire integration with Zemmata application to write blogs in an easy to use manner. So far not so bad but having problems with the integration.

An change, lets see if a new blog entry is created or the old one updated.ANother update

[This is an image]

Reblog this post [with Zemanta]

Cost Effective Gmail

The older I get the longer it takes me to latch onto the latest fads. I finally decided to fully investigate the domain specific Gmail offerings. I have been a Gmail user from back in the day when receiving an invite to join Gmail was like winning a prize.

I migrated my email for this domain to Gmail and the process was pretty painless. The main change I had to to was to change the my CNAME entry for mail.mahalasoft.co.za to ghs.google.com. Before the none techies run off, you can ask your web hosting company to do this for you which is what I did. The rest of the setup was simply filling in some forms similar to creating a new account on Gmail. After making the CNAME change you may have to wait for a day or so for the change to reflect across the Internet. To access my mail I simply go to http://mail.mahalasoft.co.za.

Using Gmail Standard Edition, at the time of writing you get 7GB of storage. You also get all the goodies associated with Gmail such as a mobile client, Googletalk for your domain, Google Apps enabling you to share and collaborate on documents. Creating new accounts for other users is easy and straight forward. You can also enable the off line feature for Gmail to access your mail off line. The Standard Edition is free and allows for up to 50 email addresses. The Enterprise Edition priced at US$50. This offers more storage, 25GB, no advertising, some migration tools and allows for up to 250 email addresses.

The biggest con to using Gmail is that your data will reside on Google servers. If you ask me for a small startup this is the best way to handle manage you mail.

Reblog this post [with Zemanta]

Installing Liferay 4.0 with Tomcat 5.5 and MySQL 5

First and foremost I am just a hacker and not really a developer, so this process may work for you but then again it may not!!!

First download the bundled Liferay-Tomcat version from http://www.liferay.com/web/guest/downloads. Simply put, unzip the file, navigate to the bin directory and execute startup.bat. There are instructions for installing this version on the Liferay web site.

Liferay is database agnostic, therefore it shouldn't really care what database you are using.

1. Copy the mysql driver jar file to %/catalina%/common/lib
2. Edit ROOT.xml in %catalina%/conf/catalina/localhost/

substitute this

with this (this is part of the documentation from Liferay, found under the database section, MySQL and Tomcat.)

driverClassName
com.mysql.jdbc.Driver

url
jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8

username
test

password
test

maxActive
20

Make sure to enter the relevant details to connect to your database. Database scripts are available from the Liferay web site.

Restart you application and you should be in business. I have to confess that I got several errors when starting the tomcat again but the portal seemed to work fine. I am not sure what the consequence of the errors is going to be.

If you are really brave the next step would be to install the portal on a current Tomcat installation. Why would you want to do this, if you want to keep all your current applications and if you also want to take advantage of the Tomcat monitor in your system tray to start and stop tomcat.
1. Delete the bin directory from your liferay installation
2. Copy will the remaining folders in your installation to your Tomcat installation.

Like I said, it worked for me but I cannot gaurantee it will work for you.

Feedback