Planet Open Ghana

July 05, 2016

Joachim Breitner

HaL deadline extended

There is this long-running workshop series Haskell in Leipzig, which is a meeting of all kinds of Haskell-interested folks (beginners, experts, developers, scientists), and for year’s instance, HaL 2016, I have the honour of being the program committee chair.

The original deadline passed last week, and after looking through the submissions it became clear that although the quality was good, the quantitiy was still lacking. I therefore extended the submission deadline by two weeks, until July 15th.

So if you have something worth talking about, please do submit a proposal1 and come to Leipzig!.

Why should you submit here? Because it gives you a platform to talk about your ideas to an audience that usually does not consist just of your fellow speakers, as it is often with purely academic workshops, but “real” listeners of various kinds. And it is a fun event.

And why should you come to Leipzig? Because of all the interesting talks and tutorials! Of course I cannot say a lot here yet, besides that our invited speaker Alejandro Russo from Chalmers and Gothenburg University will present his work on information-flow control in Haskell (i.e., SecLib, LIO, MAC, HLIO).

  1. And if you want to save me from sleepless nights, submit the first version a few days before the deadline…

by Joachim Breitner ( at July 05, 2016 05:40 PM

July 01, 2016

Joachim Breitner

When to reroll a six

This is a story about counter-intuitive probabilities and how a small bit of doubt turned out to be very justified.

It begins with the game “To Court the King” (German: „Um Krone und Kragen“). It is a nice game with dice and cards, where you start with a few dice, and use your dice rolls to buy additional cards, which give you extra dice or special powers to modify the dice that you rolled. You can actually roll your dice many times, but every time, you have to set aside at least one die, which you can no longer change or reroll, until eventually all dice have been set aside.

A few years ago, I have played this game a lot, both online (on as well as in real life. It soon became apparent that it is almost always better to go for the cards that give you an extra die, instead of those that let you modify the dice. Intuitively, this is because every additional die allows you to re-roll your dice once more.

I concluded that if I have a certain number of dice (say, n), and I want to have a sum as high as possible at the end, then it may make sense to reroll as many dice as possible, setting aside only those showing a 6 (because that is the best you can get) or, if there is no dice showing a 6, then a single die with the best score. Besides for small number of dice (2 or 3), where even a 4 or 5 is worth keeping, this seemed to be a simple, obvious and correct strategy to maximize the expected outcome of this simplified game.

It is definitely simple and obvious. But some doubt that it was correct remained. Having one more die still in the game (i.e. not set aside) definitely improves your expected score, because you can reroll the dice more often. How large is this advantage? What if it ever exceeds 6 – then it would make sense to reroll a 6. The thought was strange, but I could not dismiss it.

So I did what one does these days if one has a question: I posed it on the mathematics site of StackExchange. That was January 2015, and nothing happened.

I tried to answer it myself a month later, or at least work towards at an answer, and did that by brute force. Using a library for probabilistic calculations for Haskell I could write some code that simply calculated the various expected values of n dice for up to n = 9 (beyond that, my unoptimized code would take too long):

1:  3.50000 (+3.50000)
2:  8.23611 (+4.73611)
3: 13.42490 (+5.18879)
4: 18.84364 (+5.41874)
5: 24.43605 (+5.59241)
6: 30.15198 (+5.71592)
7: 35.95216 (+5.80018)
8: 41.80969 (+5.85753)
9: 47.70676 (+5.89707)

Note that this calculation, although printed as floating point numbers, is performed using fractions of unbounded integers, so there are no rounding issues that could skew the result.

The result supported the hypothesis that there is no point in rolling a 6 again: The value of an additional die grows and approaches 6 from beyond, but – judging from these number – is never going to reach it.

Then again nothing happened. Until 14 month later, when some Byron Schmuland came along, found this an interesting puzzle, and set out a 500 point bounty to whoever solved this problem. This attracted a bit attention, and a few not very successful attempts at solving this. Eventually it reached twitter, where Roman Cheplyaka linked to it.

Coincidally a day later some joriki came along, and he had a very good idea: Why not make our life easier and think about dice with less sides, and look at 3 instead of 6. This way, and using a more efficient implementation (but still properly using rationals), he could do a similar calculation for up to 50 dice. And it was very lucky that he went to 50, and not just 25, because up to 27, the results were very much as expected, approaching value of +3 from below. But then it surpassed +3 and became +3.000000008463403.

In other words: If you have roll 28 dice, and you have exactly two dice showing a 3, then it gives you better expected score if you set aside only one 3, and not both of them. The advantage is minuscule, but that does not matter – it is there.

From then on, the results behaved strangely. Between 28 and 34, the additional value was larger than 3. Then, from 35 on again lower than 2. It oscillated. Something similar could be observed when the game is played with coins.

Eventually, joriki improved his code and applied enough tricks so that he could solve it also for the 6-sided die: The difference of the expected value of 198 dice and having 199 dice is larger than 6 (by 10 − 21...)!

The optimizations that allowed him to calculate these numbers in a reasonable amount of time unfortunately was to assume that my original hypothesis (never rerolling a 6 is optimal), which held until n < 199. But this meant that for n > 199, the code did not yield correct results.

What is the rationale of the story? Don’t trust common sense when it comes to statistics; don’t judge a sequence just from a few initial numbers; if you have an interesting question, post it online and wait for 16 months.

by Joachim Breitner ( at July 01, 2016 07:47 PM

May 09, 2016

Joachim Breitner

Doctoral Thesis Published

I have officially published my doctoral thesis “ Lazy Evaluation: From natural semantics to a machine-checked compiler transformation” (DOI: 10.5445/IR/1000054251). The abstract of the 226 page long document that earned me a “summa cum laude” reads

In order to solve a long-standing problem with list fusion, a new compiler transformation, 'Call Arity' is developed and implemented in the Haskell compiler GHC. It is formally proven to not degrade program performance; the proof is machine-checked using the interactive theorem prover Isabelle. To that end, a formalization of Launchbury`s Natural Semantics for Lazy Evaluation is modelled in Isabelle, including a correctness and adequacy proof.

and I assembled all relevant artefacts (the thesis itself, its LaTeX-sources, the Isabelle theories, various patches against GHC, raw benchmark results, errata etc.) at

Other, less retrospective news: My paper on the Incredible Proof Machine got accepted at ITP in Nancy, and I was invited to give a keynote demo about the proof machine at LFMTP in Porto. Exciting!

by Joachim Breitner ( at May 09, 2016 08:48 AM

February 17, 2016

Joachim Breitner

February 09, 2016

Joachim Breitner

GHC performance is rather stable

Johannes Bechberger, while working on his Bachelor’s thesis supervised by my colleague Andreas Zwinkau, has developed a performance benchmark runner and results visualizer called “temci”, and used GHC as a guinea pig. You can read his elaborate analysis on his blog.

This is particularly interesting given recent discussions about GHC itself becoming slower and slower, as for example observed by Johannes Waldmann and Anthony Cowley.

Johannes Bechberger’s take-away is that, at least for the programs at hand (which were taken from the The Computer Language Benchmarks Game, there are hardly any changes worth mentioning, as most of the observed effects are less than a standard deviation and hence insignificant. He tries hard to distill some useful conclusions from the data; the one he finds are:

  • Compile time does not vary significantly.
  • The compiler flag -O2 indeed results in faster code than -O.
  • With -O (but not -O2), GHC 8.0.1 is better than GHC 7.0.1. Maybe some optimizations were promoted to -O?

If you are interested, please head over to Johannes’s post and look at the gory details of the analysis and give him feedback on that. Also, maybe his tool temci is something you want to try out?

Personally, I find it dissatisfying to learn so little from so much work, but as he writes: “It’s so easy to lie with statistics.”, and I might add “lie to yourself”, e.g. by ignoring good advise about standard deviations and significance. I’m sure my tool gipeda (which powers is guilty of that sin.

Maybe a different selection of test programs would yield more insight; the benchmark’s games programs are too small and hand-optimized, the nofib programs are plain old and the fibon collection has bitrotted. I would love to see a curated, collection of real-world programs, bundled with all dependencies and frozen to allow meaningful comparisons, but updated to a new, clearly marked revision, on a maybe bi-yearly basis – maybe Haskell-SPEC-2016 if that were not a trademark infringement.

by Joachim Breitner ( at February 09, 2016 03:17 PM

June 20, 2014

Henry Addo

SMSSync V2.6 beta Released

We are pleased to announce the release of SMSSync v2.6 beta This release includes several fixes to issues with previous versions and minor features . Here’s a breakdown of what has been improved and fixed:


  • Replaced Action Bar Sherlock library with ActionBarCompat support library.
  • Upgraded Google Analytics library to V3.
  • Replaced the dropdown widget which is used for setting the frequencies for the schedulers with a time picker widget. Now you can set any time for the schedulers and not restricted to the predefined ones.
  • Now Task messages appear in the pending tray before they are attempted to be sent as SMS. This makes it possible to automatically or manually processed them when they fail to be sent as SMS.
  • Now sent and delivered SMS status codes are processed. You will know why a message failed to be sent, when a message is successfully sent and when possible, if a messages was delivered.
  • Action Bar Contextual Menu now has ‘selected’ appended to the selection count label. Makes reading the count more meaningful.
  • Added KitKat, Android 4.4.x support. Now you can set SMSSync as your default messaging app.

Bug fixes:

  • Fixed duplicate call to ‘readLogs @Produce’ function which causes the application to crash unexpectedly.
  • Fixed issues with configured secret key not able to match with the one set on the server when it has spaces.
  • Fixed issue with app crashing on some devices when checking for a connection before attempting a sync process after the device has finished booting.

This release wouldn’t have come sooner if it hadn’t be the huge efforts of our community. Special thanks goes out to SolDevelo team for working on  the features and bug fixes for this release and also to the MedicMobile team for putting us in touch with them.

As always, thank you the community for your continued contributions through bug reports, feature request and code contributions

If you’re on earlier version of SMSSync, head on over to the Google play store and get updated to this latest version. You can also scan the QR code below to install it on your Android device.

We welcome feedback, questions, bug reports to this release and suggestions for enhancement to future releases. You can always reach out to us via our github issues page, Forums, dev mailing list or IRC, #ushahidi or our Google+ page

The post SMSSync V2.6 beta Released appeared first on InfoZone.

by Henry Addo at June 20, 2014 06:48 AM

March 06, 2014

Kwasi Kwakwa

We are not supposed to be here

So… today is the 57th anniversary of Ghana’s independence, and as a Ghanaian citizen, it is a day I always approach with very mixed feelings. I’ve been thinking about how to write some version of this piece for a while. I’ve always found some excuse not to write it though, so while it is late this year, here it is.

I’m going to start with the video of Kwame Nkrumah’s speech at midnight on independence day in 1957. Growing up, I saw this on TV and heard it on the radio so many times I can probably quote it by heart. Today is a good day to discuss the wider context of what Nkrumah meant when he spoke about the new African who would show the world that the black man could manage his own affairs. Quite simply, we were not supposed to make it.

The argument against giving African countries their freedom, outside of the blatantly economic ones, started and ended with the idea that we couldn’t run our own countries. We weren’t smart enough. We lacked the strength of character. We would steal from each other. We would descend into some kind of tribal free-for all and massacre each other over the the littlest things. We obviously couldn’t do things like vote peacefully, organize governments, open and run universities, live peacefully with each other and show kindness to our neighbours. We were capable of little more than the worst excesses you would expect from a people who were not quite human. Basically, the entire continent is supposed to be Mad Max meets the worst excesses of all the civil wars on it combined. That’s not quite how things have happened.

I’m not saying that things are perfect. Ghana has gone through waves of spectacular mismanagement and outright thievery, but we’ve also gone from being scared to speak out against our leaders to doing so openly. We still don’t treat each other with the dignity we should more often than not, but there are lots of people who show extraordinary grace and selflessness to each other on a daily basis. Children die who should be alive, but a lot fewer than used to. Adults die who should be alive, but again, a lot fewer than used to. We don’t educate enough of our kids, and too many are stuck in substandard schools, but we do have more schools and we have our own universities. We train our own doctors, even if we then underfund them. We train our own scientists, our own writers, our own lawyers, our own engineers, our own artists. Not enough of them, but more than we would have had otherwise. We are far below our potential, but it is a much greater potential than anyone expected of us. If we judged ourselves by the standards of what was expected of us, we’d already be a success. We don’t though, because under all the self-deprecation and self-loathing, we know we are capable of more.

We aren’t supposed to be here, I’m not supposed to be here. And sometimes it helps to take a step away from all that feels wrong and terrible to appreciate all that is right. The mess will still be there tomorrow.

Happy Birthday Ghana.

by kwasi at March 06, 2014 10:17 PM

February 15, 2014

Henry Addo

Android 4.4+ SMS API Changes

It been a while since KitKat was released to the wild. There have been huge improvements to the Android platform. This means new and broken APIs have been shipped. There have been tremendous changes in the SMS API more so a pain to work with as a developer(the documentation on the changes aren’t good and clear enough) but as a user, security wise, the changes are great. If you’re a developer and you’ve some sort of SMS based app, you surely have to make changes to your code to get your app to behave sanely on KitKat(v4.4) and beyond(v.4.4+).

As the main maintainer of SMSSync (there are volunteer maintainers as well), I have successfully ported it to work on both v4.4+ and pre-v4.4 releases. I’m going to share what I have come to understand with the changes in the SMS API.

Receive and Send SMS

To receive SMS with the API changes, you’ll have to declare in your manifest a broadcast receiver which has the intent-filter android.provider.Telephony.SMS_DELIVER and must also require the BROADCAST_SMS permission. With pre kitkat releases, you don’t need the intent-filter SMS_DELIVER and the BROADCAST_SMS permission. To support both v4.4+ and pre-v4.4 releases, this is what I did. As they say, code speak louder than words.

<!-- Receiver for pre kitkat. This is disabled when it's kitkat and above -->
<receiver android:name="org.addhen.smssync.receivers.SmsReceiver" android:enabled="@bool/is_pre_kitkat" >
       <action android:name="android.provider.Telephony.SMS_RECEIVED" />

<!-- Receiver for kitkat. This is disabled when it's pre-kitkat release -->
<receiver android:name="org.addhen.smssync.receivers.SmsReceiverKitKat"
   android:enabled="@bool/is_kitkat" android:permission="android.permission.BROADCAST_SMS" >
        <action android:name="android.provider.Telephony.SMS_DELIVER" />

Make App Default SMS app

If you want your app to be listed as an SMS app so it can be configured(from system settings) to be the default SMS app on the phone, then you have to implement these in your manifest file. All four actually.

        <!-- BroadcastReceiver that listens for incoming SMS messages -->
        <receiver android:name=".SmsReceiver"
                <action android:name="android.provider.Telephony.SMS_DELIVER" />

        <!-- BroadcastReceiver that listens for incoming MMS messages -->
        <receiver android:name=".MmsReceiver"
                <action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
                <data android:mimeType="application/vnd.wap.mms-message" />

        <!-- Activity that allows the user to send new SMS/MMS messages -->
        <activity android:name=".ComposeSmsActivity" >
                <action android:name="android.intent.action.SEND" />                
                <action android:name="android.intent.action.SENDTO" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="sms" />
                <data android:scheme="smsto" />
                <data android:scheme="mms" />
                <data android:scheme="mmsto" />

        <!-- Service that delivers messages from the phone "quick response" -->
        <service android:name=".HeadlessSmsSendService"
                 android:exported="true" >
                <action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:scheme="sms" />
                <data android:scheme="smsto" />
                <data android:scheme="mms" />
                <data android:scheme="mmsto" />

If your app say doesn’t support MMS you still have to declare dummy broadcast receiver class( the classs shouldn’t necessarily have to exist ) for it otherwise the app will not show up in the default SMS app list. The reason behind this is, Android expect your SMS app to implement all of these features if you’re asking your users to switch from the stock Messaging app to your SMS app. You should consider warning your users about missing features when they attempt to switch your app to be the default SMS app. This way they don’t expect all the core features from the stock Messaging app.

Making your app the default SMS app gives it access to the SMS Provider so you can write to it.

Also the limit for sending SMS has been reduced from 100 SMS per 1 hour to 30 SMS per 30 minutes on Android 4.x devices.

The post Android 4.4+ SMS API Changes appeared first on InfoZone.

by Henry Addo at February 15, 2014 07:35 AM

February 13, 2014

Henry Addo

OPSEC — You Can Care All About Security But…

Some OPSEC points lifted from the book REMOTE. You can care all about security but if you don’t apply some of these basic OPSEC points you will still be exposed.

  • All computers must use hard drive encryption.
  • Disable automatic login, require a password when waking from sleep and set the computer to automatically lock after ten inactive minutes.
  • Turn on encryption for all sites you visit aka HTTPS.
  • Make sure all smartphones and tablets use lock codes and can be wiped remotely.
  • Use a unique, generated, long-form password for each site you visit. Don’t use the same password for every login.
  • Turn on two-factor authentication whenever it’s available.

The post OPSEC — You Can Care All About Security But… appeared first on InfoZone.

by Henry Addo at February 13, 2014 08:57 AM

January 15, 2014

Henry Addo

Email From ‘Customer Care’

The email below just landed in my work inbox. Literally right in my inbox. I was hoping Gmail will flag it as spam with no trouble but that didn’t happen. It’s so easy for the naive and less tech savvy people like my mom to fall for this kind of message.

Subject: Customer Care

From email: <>

This message comes from your (EMAIL SERVICE PROVIDER) messaging admin center to All E-mail Account owners. We are currently improving our Database and E-mail Account Center and creating more certainty for our Legal Service clients. At this moment we are upgrading our data base so that there will be more space for new customers and increasing the surf on the Internet. To prevent your Email address not to be de-activated and to enable it upgraded, you need to assist us by sending the information below to enable us upgrade it, so that your email account status were flect in our database as a very active, useful and legal email account.Do send to us the below information to enable us upgrade your Account, else your email account will lost in a short time.
First Name:..
Last Name: ..
Date of Birth:..
Email Address:  ..
E-mail pass word:..
Alternative Email:..
Alternative  E-mail pass word:..
WARNING!!! E-MAIL OWNERS who refuses to upgrade his or her account within Five days after notification of this update will permanently be deleted from our data base and can also lead to malfunctioning of the client or user’s account and we will not be responsible for loosing our account.
Thanks for your understanding as it is geared towards serving you better.
Webmail Support Team
Warning Code: ID67565434.

How does providing you with these kind of information provide you more space for your customers and how does it even make you surf the web faster…

I have gone ahead and reported it as spam. Hopefully Gmail’s spam bot captures it the next time.

If you’re new or getting familiar with the internet, ignore anyone you don’t know or service that ask for confidential info such as username, email address, password, credit card or ask you to click on a link. Don’t fall for it. Most of these messages sound so legitimate that it’s easy to give what they ask for . If you’re not sure, always ask someone if it’s okay to provide such information.


The post Email From ‘Customer Care’ appeared first on InfoZone.

by Henry Addo at January 15, 2014 09:46 AM

December 08, 2013

Kwasi Kwakwa

On: Madiba

I’ve been having a really hard time writing about this. Because, well, what could I possibly say that would to the man justice?

What do you say when a giant of that stature dies? How can you possibly describe the man he was in a way that doesn’t fall short of who he really was and what he really did? Not saying there aren’t people who can do it, but I know better than to imagine I am one of them.

I will say this. While being a man, and therefore flawed, he was a better person under more trying circumstances than we has the right to demand of any human being. And I’d like to think that in being so he made the rest of us slightly better people too.

For that I thank him. And I hope we will someday be worthy of his example.

by kwasi at December 08, 2013 12:14 AM

November 14, 2013

Henry Addo

SMSSync v2.5 Released

Happy to announce the immediate availability of SMSSync v2.5 on the Google Playstore. If you haven’t upgraded already please consider doing as this release come with exciting new features and bug fixes. Read more here

Huge thanks goes to our kind contributors.


The post SMSSync v2.5 Released appeared first on InfoZone.

by Henry Addo at November 14, 2013 02:42 PM

November 12, 2013

Kwasi Kwakwa

I’m back….. For real this time. I promise…..

So… yeah, I’ve been a little absent for the last… *checks date on last post* 4 years it seems! Sorry about that. I’d claim the PhD as an excuse, but I could probably have found a way to keep writing regardless. I guess I just got tired of it and needed a break for a while. That said, I’m back for real this time people. I considered moving on from this place, but we kinda have history. And I’m stubborn.

So… what have I been up to since I last blogged? Well, I’m finally done with the PhD!


I graduated in July of this year with a doctorate in Physics from King’s College London and most of my family were around for what was a great moment in my life. The picture above is of me and the parents, who I owe immeasurable amounts to, even if I do a bad job of showing it from time to time.

Besides that, I did actually do other things. I didn’t read as much as I would have liked because of work, but I’m back to devouring books again, and it feels good, so expect more book reviews from me. I also kept up with judo. I would probably already have my black belt except for the fact that I’ve spent the vast majority of the last 2 years being massively inconsistent in my training. I did train quite a bit before that though, and compete too. The picture below is of my crowning achievement to date, a bronze medal in the kyu grade division (all grades below black belt) of the British University Games.


I’m not done with the sport by a long shot though, so I still want more on that front.

Otherwise, I spent a lot of time in labs, analysing data, drawing graphs, giving presentations, writing papers, writing a thesis, defending it and looking for a job. There may have been some beer in there too. And I got a DSLR for christmas a year ago, so there may have been some terrible attempts at amateur photography too.

As for what I’m doing now, I somehow managed to convince a professor in one of the most prestigious research universities in the world that I know my stuff enough to work for him doing cool science(TM) so, barring British immigration deciding they don’t really like me, I’ll be working as a postdoc for the next 4 years. That means playing with microscopes, lasers, optical equipment, fast computers and squishy bits of biology. It should be all sorts of great.

As for what I’ll be talking about here… as usual it’ll be a mix of whatever comes to mind. I have some book reviews on tap, there’s a movie or two I want to talk about, there will be a lot more science (and an embarrassing amount of Neil Degrasse Tyson love) science fiction, technology, race, politics, sports…. Whatever makes me happy.

If you are still reading this after 4 years of silence, then thank you by the way. That was substantially more attention than I deserve. I’ll try to make it worth your while this time.

by kwasi at November 12, 2013 10:52 PM

October 30, 2011

Odzangba Dake

Iotop Crashes When Not Run As Root

Welcome to another an-update-broke-me-box post. Iotop now requires root access:

:~$ iotop -o
Traceback (most recent call last):
File "/usr/bin/iotop", line 16, in <module>
File "/usr/lib/pymodules/python2.6/iotop/", line 229, in recv
raise err
OSError: Netlink error: Operation not permitted (1)

To fix it, run iotop as root:

sudo iotop -o

There’s a lively debate here between the iotop author, Guillaume Chazarain, and Linus Torvalds  on the pros and cons of requiring root access for throughput statistics. It’s another linux developer classic with Linus using words like abortion, castration, disaster, utter crap… makes for a few laughs if you can spare a couple of minutes.

by Odzangba at October 30, 2011 06:01 PM

October 18, 2011

Odzangba Dake

How To Download Flash Videos On Ubuntu 11.04

It seems Adobe is on a mission to make downloading Flash videos as difficult as possible for those of us used to grabbing them from /tmp. A few weeks ago, I noticed Flash videos were no longer being saved in the /tmp directory. Instead, they were being placed in the browser’s cache folder… minor inconvenience, life goes on. After a recent update however, the files  are no longer being saved in the cache folder. A quick

lsof | grep -i flash

gave me:

plugin-co 26044          o   17u      REG        8,1  2020248     393786 /tmp/FlashXXxaK1Jq (deleted)

You guessed it… there is no file called FlashXXxaK1Jq in the /tmp directory. I see what you did there Adobe, nice one. I’ll spare you most of the technical details but the output indicates that the file is somewhere in the /proc directory. Using the process id 26044 (the second field in the output of the lsof command), we can hunt down the file FlashXXxaK1Jq in the /proc directory. So:

cd /proc/26044/fd ; ls -l | grep FlashXXxaK1Jq

will give you something like:

lrwx------ 1 o o 64 2011-10-18 10:30 17 -> /tmp/FlashXXxaK1Jq (deleted)

So the flash video is named 17 and being symlinked in a sneaky manner to /tmp/FlashXXxaK1Jq (deleted). Now do something like:

cp 17 ~/Videos/funny-youtube-video.flv

and you’re done. Go back to your Videos folder and watch that cat playing the piano to your heart’s content.

And now, I must cover my tuchis so here goes… downloading copyrighted material may be illegal where you live.

by Odzangba at October 18, 2011 12:11 PM

May 15, 2011

Odzangba Dake

How To Ping NETBIOS Names On Ubuntu

I make heavy use of the ping utility on a daily basis and it absolutely galls me that Ubuntu cannot ping hostnames by default. I need to use the nmblookup utility to find the ip address of the machine I want to ping and then ping that ip address… primitive, silly, unnecessarily complex… I feel a rant about idiotic default settings and legal gymnastics surrounding the universe repository coming up so I’ll just get on with the post.😀

1) Back up and edit the /etc/nsswitch.conf file by copying and pasting the following commands:

sudo cp /etc/nsswitch.conf /etc/nsswitch.conf.original

gksu gedit /etc/nsswitch.conf

2) Add wins to the hosts directive:

hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4

3) Install WINBIND:

sudo apt-get install winbind

4) Ping away.:)

by Odzangba at May 15, 2011 12:40 AM

May 14, 2011

Odzangba Dake

How To Restore GRUB On Ubuntu 11.04

Since version 9.10, Ubuntu uses the GRUB2 boot loader and manager on clean installs. This means my earlier post on how to restore GRUB will not work properly. To restore the boot loader on these versions of Ubuntu (and possibly any debian-based linux distribution that uses GRUB2), you need an Ubuntu 11.04 live disk. The 10.10 live disks will work too… any ubuntu live disk that uses GRUB2 will work. Fire up a terminal once the live disk finishes loading and enter the following commands:

I) Let’s find where Ubuntu is installed on your hard disk:

sudo fdisk -l

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20972826 83 Linux
/dev/sda2 2612 60279 463218210 83 Linux
/dev/sda3 60280 60801 4192965 82 Linux swap / Solaris

My ubuntu partition is /dev/sda1 (it has the asterisk under Boot).

II) Armed with this information, mount the Ubuntu partition:

sudo mount /dev/sda1 /mnt

III) Install the GRUB2 boot loader:

sudo grub-install --root-directory=/mnt /dev/sda

That’s /dev/sda — the hard disk itself, not the ubuntu partition – /dev/sda1.

IV) Unmount the Ubuntu partition and restart the computer like so:

sudo umount /dev/sda1 ; sudo reboot

V) If you have more than one OS installed, re-detect OSes like so:

sudo update-grub

That’s it.

by Odzangba at May 14, 2011 11:37 PM

January 11, 2011

Odzangba Dake

Manage Multiple Computers With Synergy

It’s lightweight, cross-platform and allows me to share one keyboard and mouse among several networked computers…

Synergy Desktop

and it’s called Synergy. Visit the download page and grab the appropriate installers. Click here for instructions on how to configure your dekstops. Ubuntu users can avoid a text configuration file by installing a GUI configuration app like so:

sudo apt-get install quicksynergy

Have fun.:)

by Odzangba at January 11, 2011 05:02 PM

June 29, 2010

Kofi Boakye

I love my country

It had to take the on going world cup to really bring the fact home to me …but i really love my country, mother land and land of my birth , the black star of Africa…GHANA…GHANA (GH) totally rocks…Go Black Stars and make the whole Africa proud

by kdex at June 29, 2010 02:21 PM

November 16, 2009

George Gyau

Is been a long time

Is been like ages since i blogged. Is been crazy for me since i got back to Ghana, land of my birth. but i am finally in control and want to start blogging seriously. expect more now.

Currently moved this BLOG to

by egoleo at November 16, 2009 10:58 AM

October 06, 2009

Kofi Boakye

The Global Village

If the world is now a global village, then I guess Aunt Araba can go and spy on what Mrs Obama is cooking for supper nd we the village elders sit and drink some pito with Osama and Gordon Brown while the German chancellor plays ampe with Sirleaf Johnson.Now where r the power chaskele boys , Mugabe and Wen Jiabao??

ah these boy paa !!

(Memoirs of a global village elder)

by kdex at October 06, 2009 02:19 PM

Karmic Kaola Goodness !!


Just spent over three hours downloading the Karmic Kaola beta  over a crappy wireless connection.

And I just got to shout “Wow!!”. Beta saf be this. Man, they really put some good work into this stuff.Little touches here and there . And I think my screen display just increased or something cuz there seems to be more space on the desktop. No kidding !! It is really worth the long wait , short fevered naps and the ever present angelically annoying mosquitoes buzzing and taking painful dives at my body…Karmic Kaola rocks , though there’s still more work to be done..And this time I hope to be part of it contributing my quota to it!!


by kdex at October 06, 2009 06:50 AM

September 19, 2009

Kofi Boakye

From Gnome to KDE and back again

First cut is the deepest as they say and its really

I tried KDE 4.3 over the week and I must admit they got some bling,bling. Wow!! Great work, guys and ladies.. The panel looked more spacious and the various effects and widgets/ plasmoids were just amazing !! And the preview effects in Dolphin were just over the top. (Top that if u can, Windows 7)

But then ,bam, without any warning stuff just started to mess up .First it was my Intel graphics cards not agreeing with compiz.(though KDE still looked good and handled ok without the bling,bling) Then KPackage Kit just made me boil with its interface. I mean, if I want to go through the list of available and installed software I d**n well want to see it all without typing keywords to get a list. sheesh!! Of course it just made me love Synaptic all the more)

Finally I just gave up and guiltily run back to Gnome. So simple!

Of course I’m waiting with huge anticipation for the final version of Karmic Kaola. Even the Alpha releases do show some serious improvements that  make me swell extra extra with pride at being a linux user. Go Karmic Kaola team!! All the best !!

After Karmic , I’m definitely gonna become a full time evangelist for Linux Usage in Ghana….

by kdex at September 19, 2009 10:05 PM

July 01, 2009

Kofi Boakye

Back Again !!

Hello World

Its sure been a while since i last posted on this blog.

However i’m back and this time i hope to put up new stuff everyday about what i’m currently doing .Hoping to start releasing some serious apps for the linux world soon.

Adios amigos

by kdex at July 01, 2009 05:47 PM

March 05, 2009

Kwasi Kwakwa

What else I’ve been watching

I started this post when I was talking about The Wire, I figured I’d put out a list of what else has been keeping my attention TV wise these days. Its late, but I already wrote most of it so I figured why not. I’m not really a huge TV person, never have been. I tend to time-shift my shows and then watch them when I’m not doing anything else, which usually ends up being late at night.

  • Battlestar Galactica: This has been one of my favourite television shows of the last few years and is now heading towards an ending. If you haven’t seen any of it, you should have. Its really, really good. Basically its a rimagining of on old science fiction show in which the human race is wiped out my a race of machines we’ve created and the survivors are forced to run for their lives while being hunted by the same machines. Along the way thugh it becomes a great meditation on the nature of humanity, morality, religion etc. Its science fiction at its upper end. I recommend highly.
  • Big Bang Theory: This I was determined not to like. Its a sitcom about a pair of socially awkward physicists and their friends. I pretty much expected that the writers would settle for the dumbest possible nerd stereotypes, add no real depth and screw the story up. Instead, they kept the stereotypes but managed to add enough depth and authenticity to make them real people. Interestingly enough, there are quire a few scientists I know who are followers of the show because of how well its written and the inside jokes it throws our way. Also recommended
  • The Unit: Dennis Haysbert shooting people and looking cool in the process. Need I say more? Its a bit on heavy handed in its stance at times,but its great pulp action and good acting. All things I’m partial to.

Other stuff I’m watching but not so keen on writing a short paragraph about, Mobile Suit Gundam 00 and  the new season of Hajime No Ippo (yes, I like anime. It doesn’t say geek up there because I couldn’t come up with another name)

I was also watching Dr. Who and Torchwood until both seasons ended. I’m really, really waiting for them to start back up again, even though they shall no longer be servicing my Freema Agyeman crush. Again, if you are a science fiction fan and not watching these, your loss. Majorly.

by kwasi at March 05, 2009 11:00 PM

March 04, 2009

Kwasi Kwakwa

In which the absentee host returns. Again

A very belated happy new year to you people. Apologies for the long absences. Again. At this point I’m pretty sure I’m down to just the people who forgot to remove me from their feed readers.

Quick Updates on what I’ve been up to:

I was officially awarded my Masters by Research in Physics. My parents and big sister were in town for my graduation and that will easily pass for my best day this year. Since then I’ve gotten accepted into a physics PhD program with the same advisor at the same university. 3 more years of this and I get to walk across a stage again in a gown with a hood on it and put ‘Doctor’ on my business cards.

On the Physical side. I persist with my judo and have now logged hundreds of hours of being thrown around, pinned, choked and armlocked. On good days I get to do the same to other people. In a little under 2 weeks I get to compete in the BUCS(British Universities and Colleges Sport) kyu grade competition. Hopefully all that work will end up in me getting a few good throws. Either way there will be pictures and maybe even video. At some point before I get the PhD I want to get my first dan(black belt)

Otherwise, I live in London, I study, I train, I hang out with friends, I still read too much, I watch the odd movie and life continues.

There’s a bit of a backlog of topics I was planning to write about but never got around to. Some will make it out in the coming weeks, some won’t. Either way, keep me in your readers people. If nothing else I need the touch typing practice

by kwasi at March 04, 2009 11:43 PM

September 08, 2008

George Gyau

How do I disable the ping response?

Usually a ping is used to check if a machine is up and to check the network status.

It is a small network packet sent to the machine. If the machine is up, an answer will be sent. The time needed to get the answer is called ping time or round-trip time.

The ping response from an IP indicates the machine is up.

Unfortunately this can be used to quickly scan an IP-range for reachable hosts.

This can be used to find potential hackable machines. If your machine doesn’t answer to pings, your chance to be seen is reduced. (That doesn’t mean your machine is more secure, the machine is just not that easy to be seen from the internet. Nothing more.)

Add the following line to your init script for the network (the name depends on the distribution you use):

echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all

This disables ping responses.

To reenable, use the following command:

echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all

To make this permanent set the following into /etc/sysctl.conf (if you have such a file)

net.ipv4.conf.icmp_echo_ignore_all = 1

by egoleo at September 08, 2008 03:37 PM

Custom teaser length by View using node.tpl.php

I have been working on this project, which is a news site which focuses on everything african news. This project is been built on the Drupal CMS which is very flexible arguably.

I got into a situation where i have to customise the teaser length by View which happens to be one of the Drupal modules using node.tpl.php.

One way to vary teaser lengths is to check the current View with a modified node.tpl.php modify the output based on this

In this example a teaser of length 75 or 150 will be shown for the Views “frontpage” and “ghana_page” respectively.

I worked on this for Drupal 5 with the help of the good guys in the drupal IRC rooms, my solution is below. But this is a solution for Drupal 6 by friends on the drupal-support channel of IRC.

<div class="node<?php print ($sticky) ? " sticky" : ""; ?>">
<?php if ($page == 0): ?>
<?php else: ?>
<?php print $picture ?>
<em class="info"><?php print $submitted ?></em>
<?php endif; ?>

global $current_view;
$teaser) {
$current_view->name == ‘frontpage’)

<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item[‘view’] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content[‘body’][‘#value’];

if($current_view->name == ‘ghana_page’)
<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item[‘view’] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content[‘body’][‘#value’];

if($current_view->name == ‘africa_page’)
<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item[‘view’] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content[‘body’][‘#value’];
$current_view->name == ‘business_page’)

<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item[‘view’] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print $node->content[‘body’][‘#value’];

if($current_view->name == ‘gh1’ || $current_view->name == ‘gh2’)
<?php foreach ((array)$node->field_news_image as $item) { ?>
<div class=”field-item”><?php print $item[‘view’] ?></div>
<?php } ?>
<h2><a href=”<?php print $node_url ?>” title=”<?php print $title ?>“><?php print $title ?></a></h2>
<?php print substr($node->content[‘body’][‘#value’], 0, 90). ‘&nbsp;’;
<a href=”<?php print $node_url ?>” title=”read more”>read more</a><?php
} else {

by egoleo at September 08, 2008 05:23 AM

September 02, 2008

George Gyau

S Leone president declares assets

President Ernest Bai Koroma has become the first head of state in Sierra Leone to declare his assets to the country’s Anti-Corruption Commission.

As i read this news item, i was wondering when all other African leaders will do follow this. Expecially in Ghana were there is been much talk about such a thing. We always here leaders saying i already had my money or wealth before i came to power.

Koroma, i hope this will not be a nine day wonder, but to go beyond that let things work in S-Leone.

by egoleo at September 02, 2008 05:11 AM

Google launches internet browser

Google is launching an open source web browser to compete with Internet Explorer and Firefox.

The browser is designed to be lightweight and fast, and to cope with the next generation of web applications that rely on graphics and multimedia.

Called Chrome, it will launch as a beta for Windows machines in 100 countries, with Mac and Linux versions to come.

“We realised… we needed to completely rethink the browser,” said Google’s Sundar Pichai in a blog post.

The new browser will help Google take advantage of developments it is pushing online in rich web applications that are challenging traditional desktop programs.

Just waiting to try it out.:)

by egoleo at September 02, 2008 05:00 AM

December 22, 2006

Lorenzo E. Danielsson

Sign this

I finally did the right thing by going here and signing Bruce Perens’ petition against the Novell-Microsoft deal which everybody is talking about. If you value the freedom to write and share software, please read up carefully on the implications of this deal and, if you feel that Novell’s deal with Microsoft is a threat to those freedoms, do sign the petition as well.

by lorenzod at December 22, 2006 09:04 AM

Seasonal greetings

Today is the last work day before the holidays so Happy Yule everybody.

by lorenzod at December 22, 2006 07:32 AM

December 21, 2006

Lorenzo E. Danielsson

Vad i helvete..?


Hur kan någon vara så genomkorkad? Jag är givetvis 100% emot dödstraff, men om det skulle bli infört hoppas jag att “författare” som David Anderson blir de första in i gaskammaren. Men lyckligtvis kommer inte dödstraffet tillbaka så jag rekommenderar instället tjära och fjädrar.

Så vilka brott skulle dödstraff utdömas för? “De allra grövsta brotten”. Terrorism är ett exemples som ges. Okej, det kan jag gå med på att det är ett grovt brott. Och i så fall borde vi omedelbart hänga två superterrorister, nämligen Busken och hans pudel, Tony B. Liar.

För övrigt anser Anderson att landsförräderi och högförädderi är grova brott för vilket dödstraff borde utdömas. Eh, ursäkta mig? Landsförräderi???? Det är ju så idiotiskt att jag saknar ord. När blev det ett grovt brott? Nu när jag kommer att tänka på det, när blev det ett brott över huvudtaget?

Förbannade idiot!

by lorenzod at December 21, 2006 07:57 AM

December 18, 2006

Lorenzo E. Danielsson


Yeah, yeah, so God hates Sweden, so what? Sweden hates God as well.

by lorenzod at December 18, 2006 08:39 AM

December 14, 2006

Lorenzo E. Danielsson

Regn export

Eftersom ni i Sverige har överskott på regn, kan ni inte skicka lite till oss? I Ghana är det hett och torrt. Lite regn skulle verkligen hjälpa.

by lorenzod at December 14, 2006 08:17 AM