Friday, July 28, 2006

Zimbabwe: Zim Ready to Implement Information and Communication Technology (ICT) policy

ZIMBABWE is ready to implement its Information and Communication Technology (ICT) policy to improve the Internet and wireless system, the Minister of Science and Technology Development, Dr Olivia Muchena"

I'm sure it will be a great policy with lots of Opensource content such as Open Document requirements and measures to ensure that Opensource was considered first in any project before spending Billions on stuff that could have been picked up freely on the net.

This is a commendable effort.

Wednesday, July 26, 2006

Java Zimbabwe

One wonders being so far awayyjust what the state of Software development in Zimbabwe is currently.

One would surmise that there are vast oppourtunities for local developers being that there is very little foreign currency. I hope that the resulting effect is that companies are turing to their very own local talent for software. I would love to hear from the local software development community and hear about the types of things that they are doing

I initially made this post to find out particularly about java but I just thought about what the state is overall.

Thursday, July 20, 2006

Zimbabwe high Inflation causing Computer Problems - not enough space for zeroes

This is an interesting problem. And it seems software suppliers are unwilling to make adjustments.

Y2K anyone?

http://www.fingaz.co.zw/story.aspx?stid=464

Friday, May 19, 2006

Wednesday, May 17, 2006

Ubuntu gets Sun seal of approval

Sun Microsystems, like IBM, get on board the Ubuntu express!

Ubuntu is THE linux distro and the coolest thing is its from Africa baby!

http://www.itweek.co.uk/vnunet/news/2156209/sun-support-ubuntu-linux

Monday, April 10, 2006

Opensource ERP

I have not blogged in a while but since my last blog a few trhings have changed for the better. I was saying that enough already Ithink that it is time for ERP to go mainstream through one of the many ERPs going under a foundation. Well guess what ofbiz is in the Apache incubator. Its in the process of becoming an Apache project! This is great.

Comiere should really commit to getting their backend off Oracle otherwise I will pan them each time. It makes no sense running on an opensource stack and then having to run around to get an Oracle license. Compiere seems a little less than interested in moving off Oracle their reason is they do not see a lot of demand for this.  Compiere move off the requirement of needing a proprietary database and let the customer choose to use Oracle or a database of their choosing.


Thursday, December 08, 2005

Is is time for an Opensource ERP?

Oracle is starting from their ERP from scratch - so is Microsoft with their project code name "Project Green", well if the opensource movement is for real can an opensource equivalent be built and delivered before the Oracle or Microsoft's versions are out?

Enterprise Resource Planning systems are the next thing up the stack  for opensource to move to.

Planned obsolescence by vendors has to be controlled where a purchase running into the millions of dollars is deliberately deprecated to forcibly drive repeat sales. The faster you can force customers to upgrade the better your revenue? This is a mantra that seems to be what is causing the shift in the software landscape. The natural tendency is for one to assume lasting ownership for what you buy.

Compiere, ofBiz are examples of opensource variants but how widely they are used and what size businesses they support is still up in the air.

Compiere has the short coming of relying on specific databases namely Oracle and Sybase. A more open choice would be preferable in this case Postgresql, Firebird or Mysql being prefered choices.

Ofbiz feels like it is a framework on which ERP can be built an example of this is the Sequoia ERP which is built on an ofbiz infrastructure.

Can opensource ERP come out on top or should this be structured via a governing body like the Apache Foundation?

Fo one I think business likes things that are structured and a structure opensource ERP much like  the  Apache Foundation or the Eclipse foundation is  necessary.

Wednesday, December 07, 2005

Query by example with hibernate and spring

I did this to get hibernate's query by example to work from spring 

Bibliography - David Carter - http://www.jroller.com/page/ddcarter/20051013

import org.springframework.orm.hibernate3.HibernateCallback;
import org.hibernate.Session;
import org.hibernate.criterion.Example;
import org.hibernate.criterion.MatchMode;
import org.hibernate.HibernateException ;

public
List getCats(final Cat cat) {
if (cat == null) {
return getHibernateTemplate().find("from Cat");
} else {
// filter on properties set in the cat
HibernateCallback callback = new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException {
Example ex = Example.create(cat).ignoreCase()
.enableLike(MatchMode.ANYWHERE)
.excludeZeroes();
return session.createCriteria(Cat.class).add(ex).list();
}
};
return (List) getHibernateTemplate().execute(callback);
}
}

Monday, November 14, 2005

Ubuntu Linux get IBM seal of approval

Yay for Ubuntu Linux!

See story:

http://www.cbronline.com/article_news.asp?guid=99632EF5-C67F-4A53-A69B-FF8F21DE59D4

Friday, October 21, 2005

No Reason for MS Office

One reason Open Office 2.0 is out!

The formulas are translating as they should so it bye bye Excel and
Hello open office 2.0.

http:///www.openoffice.org

Nuff said.

Saturday, October 01, 2005

Fedora Core 4 dependency Issue

Because I had upgraded my version of Fedora from Core 3 to core 4 there
were some dependency problems that I ran into when I ran yum update. The
issue I had wa seventually resolved by uninstalling the hardware
abstrction layer "hal" and reinstalling it by the following

yum remove hal
yum install hal
yum update

Now Fedora Core 4 is happy and I am happy

Red Hat Dependency Hell

Yum update is on my RedHat Fedora Core 4 is returning errors on
missing dependencies. This reminds me of DLL Hell on Windows. I am at
the verge of switching back to FreeBSD :( once I can confirm java is
working fine on FreeBSD I am outta here.

Monday, September 19, 2005

South Africa looking for open source suppliers

The revolution has begun!

South African government is tossing proprietary
software for open source!

http://www.tectonic.co.za/view.php?id=605

Monday, September 12, 2005

Tsuro naGudo CGI animation!

Someone suggested that some of our folk tales that we were tolded as
we were growing up may need to be animated. That sound like a splendid
idea.
We just need to storyboard a simple Tsuro naGudo story and get
cranking on the rendering. Any artists out there?

Blender (http://www.blender.org) and Gimp (http://www.gimp.org) can
help with this big time and they are FREE!

Wednesday, September 07, 2005

Where the hell is opensource in Zimbabwe?

While opensource has provided other developing nations Such as india, Brazil and China unparalleled flexibility and regaining if control of their IT futures. The question still remains to be answered where is the legislation to bring sweeping infrastructure changes to a country that already is strapped for capital?

We need government to give opensource a chance in rebuilding technology infrastructure.

South Africa with Mark Shuttleworth and Ubuntu have made phenomenal strides in this respect http://www.ubuntu.org. This version of Linux really kicks tail, Redhat et al.

The following list delves into replacement options and new software that you may have never heard of that is free. On the left is the package that is proprietary and costs a lot of money in licencing and on the right is the FREE alternative.

MS Office Word, Excel and powerpoint - Open office at http://www.openoffice.org
Web Browser - Firefox http://www.mozilla.org
Mail - Thunderbird or Evolution http://www.mozilla.org
databases - mysql (http://www.mysql.org) or postgresql (http://www.postgresql.org)
Web Servers - Apache (http://www.apache.org)
Graphical editor - photoshop equivalent - The Gimp (http://www.gimp.org)

Blender is a cool animation package that has been used in movies like of Spiderman for some of the graphics
check it out at http://www.blender.org - Get some artists to start producing some Zimbabwean animation for crying out loud!

Open Movie project (http://orange.blender.org/cms/Home.553.0.html)

Check some of these out before you dismiss this opensource, this ain't your grand daddy's opensource. This stuff works!

ENJOY!

CSS Tables

Ran into some cool Cascading Style Sheets table design repository.

http://icant.co.uk/csstablegallery/index.php

Slick!

Thursday, September 01, 2005

Free as in Beer PL/SQL to java converter

I think writing a PL/SQL to java converter makes sense. I can't seem to
find any free ones.

Technology and Zimbabwe book shortage

In Zimbabwe there is a huge shortage of books in schools and i was
thinking about how best that this can be alleviated.

Could all books be converted to a PDF or any internet downloadable
format to allow them to be printed to ordinary paper by ordinary printers?
That way a teacher when he goes to a growth point where they have
internet connectivity can download the latest course material and
teaching guides. Well this is a bit far fetched but I think having books
as open courseware may allow some of the disadvantaged schools to have
access to some of the best material for the best schools like Goromonzi,
Gokomere, Mazowe, St Ignatius, Eaglesvale, Chisipite, Arundel, etc in
the form of simple paper printouts. Would this work?

Saturday, April 23, 2005

Migrating popular Databases to Mysql

No need for convoluted code to migrate to MySql now you can use the Migration tool that they offer. Cool!

http://www.mysql.com/products/migration-suite/

Wednesday, November 17, 2004

Converting from Oracle to Mysql

Below is the code you can cut paste and use for converting Oracle structures and data to mysql.
You need additional libraries

Classes12.zip oracle jdbc driver from oracle freely downloadable,
jakarta-oro.jar from apache.org and
mysql jdbc driver from mysql.com

Enjoy!

/*-----------------------------------------------------------------------------------------------------------------------------------------------------
* Program: oracle2mysql.java
* Author: Sib
* Date : 11/17/2004
* Purpose: Program to move specified schema from Oracle to mysql
* This is a quick and dirty method its not the best way but it works and gives you an idea
* of the steps involved. If you make modifications please advise so I can post them too
* You are free to use this as you please.
----------------------------------------------------------------------------------------------------------------------------------------------------*/
import java.sql.*;
import org.apache.oro.text.perl.Perl5Util;


public class oracle2mysql {

public static void main(String args[])
{
// create oracle connection
Connection OracleConnection = null;
// create mysql connection
Connection MysqlConnection = null;
String stmt = "";
int columnNumber=1;
//String columnDescription = null;
String dataType = null;
String dataScale = null;
//String ColumnString;
boolean isCreateOk;
try {
// Load the JDBC driver
DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver());
// Create a connection to the database
// replace local host with your database server name also change user scott and password tiger to reflect your
// This should be turned to some parameters or something

// You need classes.zip from oracle to establish the connection find it here otn.oracle.com
OracleConnection = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:ORCL","scott","tiger");

// Load the JDBC driver
DriverManager.registerDriver( new org.gjt.mm.mysql.Driver()); // MySQL MM JDBC driver
// Create a connection to the database
// This database should already exist with the particular user and password setup too
MysqlConnection = DriverManager.getConnection("jdbc:mysql://localhost/testdatabase", "test", "test");

System.out.println("Created oracle and mysql connections ...");
//read oracle table structures
System.out.println("Reading Oracle table structures ...");
Statement sql=OracleConnection.createStatement();
Statement columnStmt=OracleConnection.createStatement();
Statement mySql=MysqlConnection.createStatement();

ResultSet rsColumns = null;
ResultSet rsTables = sql.executeQuery("select table_name from user_tables");

while (rsTables.next())
{
// map the column types
System.out.println("Mapping types...");
stmt = "select column_name, data_type, decode(nullable,'N','not null',' ') NULLABLE, data_length,nvl(data_scale,0) DATA_SCALE, DATA_PRECISION from cols where table_name='" + rsTables.getString("TABLE_NAME")+"'";
rsColumns = columnStmt.executeQuery(stmt);
columnNumber=1;

StringBuffer sbCreTable = new StringBuffer();
StringBuffer sbColumnList = new StringBuffer();

sbCreTable.append("CREATE TABLE ")
.append(rsTables.getString("TABLE_NAME"))
.append(" (");

while (rsColumns.next())
{
StringBuffer sbColumnDesc = new StringBuffer();
if (rsColumns.getString("DATA_TYPE").equals("NUMBER") && rsColumns.getInt("DATA_SCALE")<=0) dataType="INTEGER"; else if (rsColumns.getString("DATA_TYPE").equals("NUMBER") && rsColumns.getInt("DATA_SCALE")>0) dataType="FLOAT";
else if (rsColumns.getString("DATA_TYPE").equals("VARCHAR2"))
{
dataType="VARCHAR";
if (dataType=="VARCHAR" && rsColumns.getInt("DATA_LENGTH") > 255) dataType="BLOB";
}
else if (rsColumns.getString("DATA_TYPE").equals("LONG")) dataType="BLOB";
else if (rsColumns.getString("DATA_TYPE").equals("DATE")) dataType="DATETIME";
if (dataType=="DATETIME" || dataType=="BLOB")
sbColumnDesc.append(rsColumns.getString("COLUMN_NAME"))
.append(" ")
.append(dataType)
.append(" ")
.append(rsColumns.getString("NULLABLE"));
else
{
if (rsColumns.getInt("DATA_SCALE")==0)
{
sbColumnDesc.append(rsColumns.getString("COLUMN_NAME"))
.append(" ")
.append(dataType)
.append("(")
.append(rsColumns.getInt("DATA_LENGTH"))
.append(") ")
.append(rsColumns.getString("NULLABLE"));
}
else
sbColumnDesc.append(rsColumns.getString("COLUMN_NAME"))
.append(" ")
.append(dataType)
.append("(")
.append(rsColumns.getString("DATA_PRECISION"))
.append(",")
.append(rsColumns.getInt("DATA_SCALE"))
.append(") ")
.append(rsColumns.getString("NULLABLE"));
}
if (columnNumber == 1)
{
sbCreTable.append(sbColumnDesc);
// get column name
sbColumnList.append(rsColumns.getString("COLUMN_NAME"));
}
else
{
sbCreTable.append(", ")
.append(sbColumnDesc);
// get column name
sbColumnList.append(", ");
sbColumnList.append(rsColumns.getString("COLUMN_NAME"));
}

columnNumber++;
} // while (rsColumns.next())
sbCreTable.append(")");

// drop and create mysql table structure

try {
//isCreateOk =mySql.execute("DROP TABLE "+ rsTables.getString("TABLE_NAME"));
isCreateOk = mySql.execute(sbCreTable.toString());

}
catch (SQLException e)
{
System.out.println(e);
System.out.println(sbCreTable.toString());

}
insertRows(rsTables.getString("TABLE_NAME"),sbColumnList,OracleConnection,MysqlConnection);
// read oracle index structure
System.out.println("going for next table");
// create mysql index structure

} //while (rsTables.next())

rsTables.close();
//close connections

System.out.println("Closing connections ...");
OracleConnection.close();
MysqlConnection.close();
System.out.println("Connections closed - Goodbye!");

} catch (SQLException e) {
// some problem oocured at the database
System.out.println(e.getMessage());
}
}
public static void insertRows(String tableName, StringBuffer sbColumnList, Connection OracleConnection, Connection MysqlConnection)
{
try {
Statement oraStatement=OracleConnection.createStatement();
Statement mySqlStatement=MysqlConnection.createStatement();
Perl5Util regExpression = new Perl5Util();
StringBuffer sbQuery = new StringBuffer();
sbQuery.append("SELECT ")
.append(sbColumnList)
.append(" FROM ")
.append(tableName);

// Copy data
System.out.println("Copying " + tableName +" data from oracle ...");

try {
ResultSet rsRows = oraStatement.executeQuery(sbQuery.toString());
rsRows.setFetchSize(100);
ResultSetMetaData rsRowsMeta = rsRows.getMetaData();
while(rsRows.next())
{
StringBuffer sbInsertLine = new StringBuffer();
sbInsertLine.append("INSERT INTO ")
.append(tableName)
.append(" ( ")
.append(sbColumnList)
.append(" ) values (");
// Extract fields from the recordset
for(int i = 1;i <=rsRowsMeta.getColumnCount(); i++)
{
if (i==1)
{
//Determine whether to put quotation marks around the field
if(rsRows.getObject(i)!=null && (rsRowsMeta.getColumnType(i)==java.sql.Types.VARCHAR
|| rsRowsMeta.getColumnType(i)==java.sql.Types.CHAR
|| rsRowsMeta.getColumnType(i)==java.sql.Types.TIMESTAMP))
{
sbInsertLine.append("'")
// search object content for quotation marks and remove
.append(regExpression.substitute("s/\'//g",rsRows.getString(i)))
.append("'");
}
else
{
sbInsertLine.append(rsRows.getObject(i));
}

}
else
{
if(rsRows.getObject(i)!=null && (rsRowsMeta.getColumnType(i)==java.sql.Types.VARCHAR
|| rsRowsMeta.getColumnType(i)==java.sql.Types.CHAR
|| rsRowsMeta.getColumnType(i)==java.sql.Types.TIMESTAMP))
{
sbInsertLine.append(", ")
.append("'")
//.append(rsRows.getObject(i))
.append(regExpression.substitute("s/\'//g",rsRows.getString(i)))
.append("'");
}
else
{
sbInsertLine.append(", ")
.append(rsRows.getObject(i));
}
}
}
sbInsertLine.append(")");
// Execute the generated string
System.out.println(sbInsertLine.toString());

mySqlStatement.executeUpdate(sbInsertLine.toString());
mySqlStatement.executeUpdate("commit");
}
//close the resultset
rsRows.close();
}
catch (SQLException e)
{
System.out.println(e.getMessage());
}
}
catch (SQLException e)
{
System.out.println(e.getMessage());
}
}
}