Ask The Lawyer Wins DevCon Alpha Competition

Ask The Lawyer Wins DevCon Alpha Competition

Nigerian app Ask The Lawyer, which allows users to interact with a vast database of legal content, has won the DevCon Alpha competition organised by Microsoft in conjunction with Mobile Monday Nigeria, Nokia and Verve.

The Ask The Lawyer team – led by Oladipo Olasemo – won NGN750,000 (US$4,600) and US$300,000 marketing support from Nokia after emerging the winner ahead of nine other apps in the competition in which developers created locally relevant, visually appealing and commercially viable apps on either Windows 8 Mobile or Windows Phone platforms.

The app provides access to content records of court judgments, legislation, rules of court and case summaries, while also allowing users to find a lawyer and read articles and newsletters on topics of interest.

Oyeshina Oyetosho, developer and evangelism lead at Microsoft Nigeria, said: “We decided to participate in the project because we noticed there is a gap in the technology ecosystem. It is mainly to create a platform to close the gap. We are giving trainings, offering free access in as many ways as we can to enable developers create applications that are usable, scalable, visually appealing, locally relevant and more importantly, challenge them to monetise their creativity which we trust will make them employers of labour. This way, they can contribute their quota to the growth of the Nigerian economy.”

Tomi Davies, chairman of Mobile Monday Nigeria, said: “Our vision is to see Nigeria become a key player in the technology space and what better way to achieve this than by getting our youth to create apps on the Windows platform that will compete with those of their foreign counterparts. With DevCon Alpha, we have seen that we can begin the development of a new generation of Nigerians that will challenge the domination of foreign players in the Nigerian software market.”

How to Scrape Google Play with Perl

I was faced with a peculiar challenge to find all apps developed by Nigerian developers in the Google play store. It sounded pretty straight forward at first. Easy Peeze.. WRONG!!!!.

I thought all I had to do was just go to Google play, click a link or drop down somewhere and then I will automatically be presented with a list of all the apps in my lovely country, how wrong I was….

By the way, for your information, Google doesn’t provide this information to regular consumers like me :). My next step was to fire up the developer console in Google chrome and do some j-query magic, I noticed that the links to the app name and developer/publisher name were wrapped in hyperlinks decorated with title and subtitle css classes i.e

” class =’title’ and  class=’subtitle’ ”

so I tried to get some apps using jQuery using the scriplet :

$(‘.title’).text();

and $(‘.subtitle’).text()

this was after i searched by a key word “Nigeria”.

I got the following output:

” Apps Android AppsAll pricesUpdatedSizeInstallsCurrent VersionRequires AndroidContent Rating Contact Developer Nigerian Movies Nigerian Movies 2014 Mercy Johnson Nollywood Star Nollywood Movies Nigerian Movies HD Nigerian Movie John Okafor/Mr Ibu Nollywood Nigerian Movies Tube Nollywood Movies and News Nkem Owoh Naija Movies Ghana Movies (Ghallywood) Best HD Movies Nonso Diobi Nollywood Star Afrinolly Full HD Movies on Youtube Nigerian Movies Nigerian Gossip Nigerian News Daily Bible Words Toddlers Telly Full Movies 4 Free Zambian News Just Zambia Nollywood “

Pretty impressive you would say, but then it occured to me I would have to do this for all search keywords like naija, nigerian, eko, etc. and then jQuery didn’t seem so smart after all.

So back to the drawing board again…. then I remembered, perl should be able to hack this one… PERL is after all called the Portable Extraction and Reporting Language.. God bless Larry Wall.. 🙂

After foraging and stack overflowing for a bit, I arrived at a few scripts that got me a list of all the links matching certain keywords I selected for the job.

I called one of them playcurl.pl

$ cat playcurl.pl
#!/usr/bin/perl

my @keywords = qw\nigeria nigerian naija yoruba igbo ibo hausa ng ngn lagos gidi lasgidi africa strika\;

foreach(@keywords){

my $URL = “https://play.google.com/store/search?q=”.$_;

my $content = system “wget $URL”;

open (my $fh, ‘>’, $_) or die “Could not open file $_ !”;

$fh->print(“$content”);

close $fh;

}

So playcurl was pretty straight forward. All it did was to build a URL of search strings for the store and use wget. [linux utility] to download the content to files matching the search strings to my file system.

$ ls -ltr search*
-rw-rw-r–+ 1 Oladipo None 286981 Mar 17 18:46 search@q=nigeria
-rw-rw-r–+ 1 Oladipo None 285532 Mar 17 18:47 search@q=nigerian
-rw-rw-r–+ 1 Oladipo None 270028 Mar 17 18:47 search@q=naija
-rw-rw-r–+ 1 Oladipo None 289716 Mar 17 18:47 search@q=yoruba
-rw-rw-r–+ 1 Oladipo None 309516 Mar 17 18:47 search@q=igbo
-rw-rw-r–+ 1 Oladipo None 304053 Mar 17 18:47 search@q=ibo
-rw-rw-r–+ 1 Oladipo None 297166 Mar 17 18:47 search@q=hausa
-rw-rw-r–+ 1 Oladipo None 293471 Mar 17 18:47 search@q=ng
-rw-rw-r–+ 1 Oladipo None 362197 Mar 17 18:47 search@q=ngn
-rw-rw-r–+ 1 Oladipo None 299289 Mar 17 18:47 search@q=lagos
-rw-rw-r–+ 1 Oladipo None 330012 Mar 17 18:47 search@q=gidi
-rw-rw-r–+ 1 Oladipo None 45168 Mar 17 18:47 search@q=lasgidi
-rw-rw-r–+ 1 Oladipo None 296523 Mar 17 18:47 search@q=africa
-rw-rw-r–+ 1 Oladipo None 37989 Mar 17 18:47 search@q=strika

lets take a peek into one of the files.

$ cat search@q=nigeria

…..<a href=”/store/apps/details?id=com.comviva.mtnnigeriaselfcare” title=”MTN Nigeria Selfcare App”>   MTN Nigeria Selfcare App  <span></span> </a> </h2>  <div>  <a href=”/store/apps/developer?id=MTN+Nigeria+Communications+Limited” title=”MTN Nigeria Communications Limited”>MTN Nigeria Communications Limited</a>   <span> <span></span> …….

As you can see, this is pure html with all the strings on one line of text…yes you heard me one line of text…. The next thing I asked myself was, how do I get all the hyperlinks from this document containing the app names and developer names? Google, Stack Overflow, Perlmonks… you can guess like another hour went by 🙂

….. and then I created another script to do the job, this time it was a shell script. I call it, the monster! LOL….

Introducing the Monster!

cat search@q=strika | grep -o ‘‘ | sed -e ‘s/<a /\n<a /g’ | sed -e ‘s/> links.out

The monster one of the files created by playcurl.pl and retrieves all the links matching a regular expression from piping of grep and sed and outputs to a file called links.out.

I ran this several times for all the search files and appended the output into links.out. I am sure I could have done all this with another perl script.. but well I am sure there is always time for refactoring 🙂 always….

so now we have with us, all the links containing to apps matching our search criteria.

$ cat links.out

This file can still be cleaned up to get unique URLs.. but i leave that to you guys to sort out 🙂

now to get the emails…

The email bit was  bit tricky though… we have with us links.out, let’s clean it up a bit.

So I ran the following command:

grep -n ‘/store/apps/details’ links.out | sort –unique >> unique.out

This generates another file “unique.out” containing a cleaner version of links.out

So I decided, what to do to get me my emails.. google, stackoverflow, google led me to create another perl script: getapppage.pl to download the app pages to my filesystem with the hope to extract the emails from within.

getapppage.pl
—————-
#!/usr/bin/perl

use strict;
use warnings;
use Email::Address;
use File::Slurp;

my $file = ‘unique.out’;

open my $handle, $file or die “Could not open $file: $!”;

while(my $line = <$handle>){

chomp $line;
system “wget https://play.google.com/$line&#8221;;
print $line.”\n”;
}

close $handle;

these files are saved as ‘details?id=appnamespace’ on the filesystem.

now to get the emails.. the real fun part. introducing emailparse.pl

#!/usr/bin/perl
 
use File::Slurp;
use File::Find;
 
my $dir = '/home/oladipo/Downloads';
opendir(DIR, $dir);
 
while(my $file = readdir(DIR)){
 
    if($file eq ".." || $file eq ".") {next; }
 
    system("grep -Eio '([[:alnum:]_.]+@[[:alnum:]_]+?\.[[:alpha:].]{2,6})' $file >> /home/oladipo/emails.out");
}
I’ll advise you set your directory name i.e $dir to a location containing only the ‘details?id=’ files . This script reads all the files in the directory specified in $dir and loops through them while running a system command:
    "system("grep -Eio '([[:alnum:]_.]+@[[:alnum:]_]+?\.[[:alpha:].]{2,6})' $file >> /home/oladipo/emails.out");"
this command will filter all the emails found in the current file during the loop iteration and append to emails.out.
THERE WE FINALLY DID IT!!!…

PHP MySQL Training

Register now for PHP/MySQL Training for Basic, Intermediate and Advanced developers http://www.synkronsolutions.com/training.php our classes are 70% hands on and 30% Lecture, students “learn by doing,” with immediate opportunities to apply the material they learn to real-world problems.

All attendees receive comprehensive courseware and a copy of O’Reilly’s PHP Cookbook as well as a copy of Apress’ Beginning PHP and MySQL 5: From Novice to Professional and other related courseware.

MySQL™ and PHP are two of the most popular open source technologies to emerge during the past decade. PHP is a powerful language for writing server-side Web applications. MySQL is the world’s most popular open source database. Together, these two technologies provide you with a powerful platform for building database-driven Web applications.

This hands-on MySQL and PHP training course teaches attendees everything they need to successfully build data-driven Web sites using MySQL and PHP.

==================================================

Dates: October 25th – October 31st 2010.

Venue: After School Graduate Development Centre (AGDC) Learning Centre,
7, Maitama Sule Street, Off Awolowo Rd. SW Ikoyi, Lagos

Register now @ http://www.synkronsolutions.com/training.php

for further details email info@synkronsolutions.com or call us on +234 803 6677 937 , + 234 809 8976 476

Complete course outline :http://www.synkronsolutions.com/uploads/PHP_training_outline_ver1.pdf

Industry wide impacts of Nigeria deploying EMV to fight fraud

As of 1st quarter 2008, more than 730 million EMV payment cards were in use worldwide, two-thirds of the world’s EMV cards and devices are in Europe with nearly 50% of cards and POS and more than two thirds of ATMs enabled.

In the UK after four years of EMV deployment card fraud loss rate declined 48% from 18 to 12 basis points from 2001 to 2008, while overall card spend nearly doubled, overall card fraud increased 48% from 2001 to 2008, at a global level, the Nilson report estimated card fraud of $5.5 Billion on $11.8 Trillion purchases in goods and services and cash advances in 2007. The true cost of fraud, however exceeds the actual monetary amount of losses, financial services companies incur damage to their reputations, higher overall operating costs for increased vigilance, reduced productivity and higher staff expenditures, and they also bear the cost of re-issuing cards after a fraud incident.

Fraud is a global issue, in its broadest sense, it is a deception carried out for personal gain although it has a more specific legal meaning, the exact details varying between jurisdictions. Fraud in manifested in many forms in the banking system some of which are attributable to bank malpractices, corrupt officials, negligence and disgruntled employees to mention a few. The Nigerian payment systems management bill of 2009 is a step in the right direction for combating the multifaceted nature of fraud in the payments system especially as regards the payment card value chain.

Acquirers and Issuers understand that losses emanating from card fraud affect card usage rates, authorization parameters, operational processes and staffing while also decreasing profit margins. Furthermore, these losses can endanger the most valuable asset acquirers and issuers have –their relationships with business partners and consumers. It follows clearly that the industry should pay close attention to new technology and processes that may prove to be effective in combating fraud. EMV an instance of the chip payment technology is an example of one such methods.

The adoption of EMV has been coupled with the Personal Identification Number (PIN) stored on the chip, the PIN replaces the card holder signature, significantly improving protecting against loss and theft. ATM skimming fraud losses have also decreased by up to 55% with the deployment of EMV compliant ATM machines. While EMV has helped reduce payment card fraud, e-commerce web based fraud is still a cause of concern, the payment industry will need to build on the progress with EMV to combat fraud via this channel; however VISA and master card have recorded some progress with the Dynamic Passcode Authentication and Chip Authentication Program respectively.

It is very difficult to prevent the data on a magnetic stripe from being copied and used for unauthorized transactions as the card security code is static and does not change for every transaction, chip cards provide a new security feature called Dynamic Data Authentication (DDA), DDA generates an encrypted value for every transaction, these encrypted tokens are very difficult to replicate and presents a better security model over static magnetic stripe security tokens.

Initial investment in EMV is future proofing the payment system for security in long term. Benefits to issuers in this case the banks include increased profit from fewer loses due to fraud, merchants will profit from fewer charge backs and consumers or card holders will profit from improved service delivery and security levels. It is important to note that EMV is not the proverbial heaven of smart card payment systems; stakeholders should understand that security measures are to be updated regularly to remain a step ahead of fraudsters. Another added advantage of the chip model is the fact that security can be incrementally increased over time which supports the need to update security mechanisms on an ongoing basis.

References
1. “Top 10 reasons US should consider EMV”; Smart Card Alliance Webinar, January 2010. –Randy Vandehoof, Deborah Baxley, Nick Holland, Simon Hurry, Dave Metcalfe.
2. “Fraud in the US Payments industry: Fraud mitigation and prevention measures in use and chip card technology impact on fraud”; Smart Card Alliance white paper, October 2009 CMPC-09004.
3. The Nilson Report, issue 915; November 2008.
4. The Nigerian Payments System Management Bill, 2009.

What is this EMV sef?

EMV is a standard for interoperation of IC cards (“chip cards”) and IC capable POS terminals and ATMs, for authenticating credit and debit card transactions. The name EMV comes from the initial letters of Europay, MasterCard and VISA, the three companies that originally cooperated to develop the standard.

The first version of EMV standard was published in 1995. Now the standard is defined and managed by the public corporation EMVCo LLC. The current members of EMVCo are JCB International, American Express, MasterCard Worldwide, and Visa, Inc. Each of these organizations owns one quarter of EMVCo and has representatives in the EMVCo organization and EMVCo working groups.

The EMV 4.2 specifications has four (4) books namely (a) Book 1 – Application Independent ICC to Terminal Interface Requirements (b) Book 2 – Security and Key Management (c) Book 3 – Application Specification (d) Book 4 – Cardholder, Attendant, and Acquirer Interface Requirements.

Membership of the EMVco spans a variety of categories from the recently launched EMVco Associate Programme which comprises (a) Business Associates and (b) Technical Associate. EMVco subscribers typically are abreast of happenings in the working group before the general public but are required to pay an annual subscription, they also have the added advantage of direct access with EMVco to solicit support or receive guidelines with technical issues.

How to achieve EMV compliance
Recognition of compliance with the EMV standard (i.e. device certification) is issued by EMVCo following submission of results of testing performed by an accredited testing house some of which are Radio Frequency Investigation Limited, RFI (United Kingdom), TUV Product Service Limited (United Kingdom), Beijing Unionpay Card technology Co, amongst other companies/laboratories world-wide.

EMV Compliance testing has two levels: EMV Level 1, which covers physical, electrical and transport level interfaces, andEMV Level 2, which covers payment application selection and credit financial transaction processing.

After passing common EMVCo tests, the software must be certified by payment brands to comply with proprietary EMV implementations such as VISA VSDC, American Express AEIPS, MasterCard MChip, JCB JSmart, or EMV-compliant implementations of non-EMVCo members such as LINK in the UK, or Interac in Canada.

The EMVCo standards have been integrated into the broader electronic payment security standards being developed by the Secure POS Vendor Alliance, with a specific effort to develop a common interpretation of EMVCo’s place relative to, and interactions with, other existing security standards, such as PCI-DSS.

How Micropayments can drive the future of the Nigerian economy

One important aspect of micropayments is the fact that its definition varies from person to person. Generally, micropayments are regarded as financial transactions involving very small sums of money. Globally, micropayments refer to transactions of less than 12 USD. According to techtarget.com, a micropayment is an e-commerce transaction involving a very small sum of money in exchange for something made available online, such as an application download, a service or Web-based content.

Micropayments are too small to be feasible for processing through the traditional credit card/debit card system. Amir Herzberg of IBM recounts “Micropayments are for anything that is too inexpensive to pay by credit card”.
The major challenge facing the feasible application of micropayments is the need to keep costs for processing individual transactions low which is impractical when transacting very small sums of money typical of the nature of the micropayment system. Several attempts have been made to make such systems financially feasible to the providers such as the bill to phone model that companies like zong and boku have employed. The bill to phone ensures that consumers are able to charge low value transactions to their mobile phone and are sent a transaction code by SMS to complete the transaction. However, the sharing formula that exists between the providers of the micropayment platform and the Mobile Network Operators (MNOs) is largely not in favour of the providers, this has been the key reason for the slow adoption globally.
Largely, micropayments have been used for online transactions in the social community space on websites like http://www.facebook.com where users can purchase virtual items in games like mobwars, premier football and Farmville to name a few. It’s foray into the print media for pay per view content has been very discouraging as users would simply navigate to another website where they can get the content for free.

Micropayments has had its share of attempts at standardization notable among these attempts is the micropayments per fee specification of the W3C (World Wide Web Consortium) which includes a Common Markup for Micropayment Pay-Per-Fee Links as well as a description of a wallet handler that serves all requests for the per-fee service. However since vendors implement disparate proprietary micropayment infrastructure this has prevented the adoption of W3C’s specification.
As an emerging area, it has undergone some metamorphosis which was clearly described by Robert Parhonyi of the University of Twente in the Netherlands in his paper “Second Generation micropayment systems : Lessons Learned”. He predicted that the market for low value products such as online music and videos and the role of micropayment systems for selling such products are expected to grow substantially. He classified micropayments into 2 generations in which the first generation appeared around 1994, with systems like Millicent, eCash and cybercoin which were unable to gain market share and disappeared slowly in the late 1990s. The 2nd generation appeared around 1999-2000 and are still operational. He believes most of the failure causes have been accounted for in the second generation and have a much better chance to be successful largely because of the way the Micropayment System Operators (MPSO’s) have implemented the technical and non-technical characteristics of micropayment systems such as the use of token or account based platforms as the medium of value exchange, Ease of use, Anonymity, scalability, Validation, security, interoperability, trust, coverage, privacy, pre-paid or post-paid and the range of multicurrency support. Some of the 2nd generation micropayment systems include minitix, Bitpass, Wallie, PaySafe Card, WebCent, MicroMoney and SoftPay.

In Nigeria, online payment has been wrought with several cases of fraud especially with the use of debit cards. Consumers are no longer comfortable with such medium of payment and often ask themselves if it is worth it to expose private information to consummate transaction on the web for low value transactions. Some people argue that billing for small portions of a product or service reduces the need for security. In this context, security is defined here to be the ratio of security cost to protected value of the transaction. The security challenges above beg for a new channel to consummate low value transactions that is radical and innovative enough to provide musicians a platform to sell their music, software developers their small applications, photographers their pictures and all other content providers a medium that is fast, convenient and easy to use without the restrictions of the traditional payment systems.

The revenue potential is huge as it covers both the banked and the unbanked populace. The majority of the revenue is expected to originate from the unbanked according to EFINA there are over 64 million Nigerian adults who have never been banked, and the private sector understands that the Nigerian microfinance industry estimated at NGN 900 million is profitable. The unbanked money in circulation is estimated to be NGN 1.2 Trillion as at May 2009, this figure is growing and would serve to strengthen the financial system if platforms such as micropayments are used as a tool to channel such money into the mainstream economy.