Planet Open Ghana

October 14, 2015

Joachim Breitner

Constructing a list in a monad revisited

Two years ago, I discussed various ways of constructing a list in a Monad (or, more specifically, in IO) in Haskell, and compared their merits in terms of elegance, stack usage, number of traversals of the list and run-time efficiency.

Recently, two blog posts discussed the issue further and proposed new, more daring alternatives. Neil Mitchell breaks through the abstraction provided by IO, duplicates “the world” and traverses the list twice, and obtains a speed-up for long lists.

Twarn van Laarhoven went even further and wrote custom C-- code to destructively update the tail-pointer of the list cell to be able to create the list completely evaluated on the first start. This basically answers my question from two years ago:

I’m still wondering: What would be required from Haskell, GHC or the monads in question to have a fully satisfactory solution here, i.e. one that is as fast as the naive recursion, as stack efficient as the difference list solution, and allocates no thunks, only list cells?

He also has a variant with a slightly nicer interface around “holes”, i.e. explicit objects on the heap that can later be replaced by indirections. Obviously, both approaches are very unsafe.

I took this as an opportunity to redo my benchmark measurements, and include their variants (named escapeIO, hackIO and holeIO). The following table omits the variants with quadratic performance, as I ran it on longer lists now:

Variant 10^0 10^1 10^2 10^3 10^4 10^5 10^6
accumReverse 37ns 153ns 1134ns 12µs 208µs 8540µs 97ms
recursion 29ns 139ns 680ns 6790ns 160µs 6441µs 76ms
replicateM 26ns 126ns 677ns 6785ns 168µs 6314µs 78ms
accumDList 35ns 165ns 995ns 10µs 190µs 9706µs 100ms
streams 27ns 136ns 691ns 6788ns 173µs 5771µs 75ms
unsafeInterleave 60ns 329ns 2804ns 28µs 373µs 5605µs 57ms
listFix 51ns 412ns 4109ns 56µs 2761µs 42ms 445ms
escapeIO 41ns 187ns 1808ns 16µs 234µs 4409µs 45ms
hackIO 30ns 152ns 1199ns 11µs 140µs 3701µs 42ms
holeIO 40ns 222ns 1725ns 17µs 218µs 4446µs 53ms

The following graph shows that around 10000, the naive approaches become much slower and the fancy hacks pay of, with Twarn’s tail-pointer-updating code performing the best:

I would really like to see a package that provides a API like Twarn’s holes, either in this raw unsafe variant (but with the garbage collector related code checked), or with a safe API using type hackery similar to the ST monad that ensures that after “normal” code gets its hands on a term possibly involving holes, the holes may no longer be modified.

I have put the code and results on GitHub.

by Joachim Breitner ( at October 14, 2015 02:28 PM

October 12, 2015

Joachim Breitner

Incredible Proof Machine put to the test

I’m currently on the way home, returning from a four-day workshop for high school students; ages 13 to 20, grade 9 to 13. My goal was to teach them something about proofs and logic, in a ambitiously formal and abstract way. For this workshop, I created a computer program called “The Incredible Proof Machine” that allows the kids to explore creating a proof, by placing blocks on a canvas and drawing connections between them (see my previous blog post for an introduction).

Subtracting time spent on on breaks, organizational stuff, the time the student needed to prepare a final presentation, I think we were working for a total of 14 hours, during which we covered propositional logic. I generally let the students explore and try to solve the tasks of one session mostly on their own, followed by a common discussion of what they have just done, what it means why it makes sense etc. The sessions were: assumptions and conclusions in general, with conjunction; implication; disjunction; falsum and tertium non datur. We also briefly discussed “paper proofs” with the student: how they look, and how they relate to the Proof Machine proofs. We had some lecture notes that we handed out pice-wise after each session.

The sections were mildly1 password-protected to avoid that the quicker students would work ahead, thus keeping the group together. One or two of the 13 students were doing very well and eventually, I gave them the passwords to the predicate logic section and let them work them on them on their own. The quickest managed to solve almost all of these as well, but (as far I as I can tell) without a deeper understanding of the quantifiers, and more a mechanical intuition.

As expected, the students were able to solve most of the exercises, even when a proper understanding of the logical semantics was not yet fully developed. This was by design: I believe that this way it was more motivating and encouraging, as they could “make it work”, compared to a more traditional approach of first throwing a lot of theory at them and then expecting them to apply it. This was confirmed by their feedback after the workshop.

I was happy with my implementation. The students immediately could work with it with very few hick-ups, and only one minor bug occurred2, which I could fix on the spot. Having everything run on in the browser was a big plus, given that we had no stable internet connection for everyone: Once the Incredible Proof Machine was loaded, the student could continue to work offline.

Personally, I find that the UI is occasionally too sluggish, especially on the weaker laptops, but it seems that the students did not seem to mind. Some students tried to connect outputs with outputs or inputs with inputs and the visualization did make it clearly visible that such a link is not actually connected to the block. The predicate logic part is a bit less convincing, with e.g. scoping of local constants not easily understood. I would say that this part would work better if some explanation is given before the students start working on the more involved rules.

Our room was equipped with a smartboard, and I was delighted when I found out, mostly by accident, that I could actually use my finger to drag the blocks of the proof and to draw connections. This not only gave me a “Minority Report”-like feeling, but also meant that it was much easier for the students to follow my explanations when they could just watch my hand, instead of trying to locate the mouse pointer on a regular projector. I’m generally doubtful whether such fancy technological toys are useful in the class room, but in this case at least I liked it. The ability to scribble anywhere on the screen was occasionally a plus as well.

All in all I believe the Proof Machine was a useful tool, and I am sure that without it, it would have been tricky to have students voluntarily spend 14 hours on such a relatively dry and abstract topic. Given the amount of work that went into the development, I hope that this will not be the last occasion where it is put to good use. So if you have to teach formal logic and natural deduction-style proofs, you are welcome to use the Incredible Proof Machine to get your students excited. It is purely static, i.e. needs no special server-side infrastructure, and you can define your own logic (i.e. proof rules), sessions and tasks.

Also, there are a few interesting way in which the Proof Machine could be extended. In particular, I’d like it to be able to generate a “normal”, natural-language proof from a given proof – even if it will sound a bit mechanical – and then use hover-highlight effects to relate the formulas and sentences in the text proof to the connections and blocks in the graphical proof. Contributions are welcome!

  1. JavaScript based with no crypto or even obfuscation in the code.

  2. Due to differences between the task specification as given in the code, and the task specification when normalizing the syntax of the terms, the proofs that the students created were lost when they re-loaded the page.

by Joachim Breitner ( at October 12, 2015 08:16 PM

September 24, 2015

Joachim Breitner

The Incredible Proof Machine

In a few weeks, I will have the opportunity to offer a weekend workshop to selected and motivated high school students1 to a topic of my choice. My idea is to tell them something about logic, proofs, and the joy of searching and finding proofs, and the gratification of irrevocable truths.

While proving things on paper is already quite nice, it is much more fun to use an interactive theorem prover, such as Isabelle, Coq or Agda: You get immediate feedback, you can experiment and play around if you are stuck, and you get lots of small successes. Someone2 once called interactive theorem proving “the worlds most geekiest videogame”.

Unfortunately, I don’t think one can get high school students without any prior knowledge in logic, or programming, or fancy mathematical symbols, to do something meaningful with a system like Isabelle, so I need something that is (much) easier to use. I always had this idea in the back of my head that proving is not so much about writing text (as in “normally written” proofs) or programs (as in Agda) or labeled statements (as in Hilbert-style proofs), but rather something involving facts that I have proven so far floating around freely, and way to combine these facts to new facts, without the need to name them, or put them in a particular order or sequence. In a way, I’m looking for labVIEW wrestled through the Curry-Horward-isomorphism. Something like this:

A proof of implication currying

A proof of implication currying

So I set out, rounded up a few contributors (Thanks!), implemented this, and now I proudly present: The Incredible Proof Machine3

This interactive theorem prover allows you to do perform proofs purely by dragging blocks (representing proof steps) onto the paper and connecting them properly. There is no need to learn syntax, and hence no frustration about getting that wrong. Furthermore, it comes with a number of example tasks to experiment with, so you can simply see it as a challenging computer came and work through them one by one, learning something about the logical connectives and how they work as you go.

For the actual workshop, my plan is to let the students first try to solve the tasks of one session on their own, let them draw their own conclusions and come up with an idea of what they just did, and then deliver an explanation of the logical meaning of what they did.

The implementation is heavily influenced by Isabelle: The software does not know anything about, say, conjunction (∧) and implication (→). To the core, everything is but an untyped lambda expression, and when two blocks are connected, it does unification4 of the proposition present on either side. This general framework is then instantiated by specifying the basic rules (or axioms) in a descriptive manner. It is quite feasible to implement other logics or formal systems on top of this as well.

Another influence of Isabelle is the non-linear editing: You neither have to create the proof in a particular order nor have to manually manage a “proof focus”. Instead, you can edit any bit of the proof at any time, and the system checks all of it continuously.

As always, I am keen on feedback. Also, if you want to use this for your own teaching or experimenting needs, let me know. We have a mailing list for the project, the code is on GitHub, where you can also file bug reports and feature requests. Contributions are welcome! All aspects of the logic are implemented in Haskell and compiled to JavaScript using GHCJS, the UI is plain hand-written and messy JavaScript code, using JointJS to handle the graph interaction.

Obviously, there is still plenty that can be done to improve the machine. In particular, the ability to create your own proof blocks, such as proof by contradiction, prove them to be valid and then use them in further proofs, is currently being worked on. And while the page will store your current progress, including all proofs you create, in your browser, it needs better ways to save, load and share tasks, blocks and proofs. Also, we’d like to add some gamification, i.e. achievements (“First proof by contradiction”, “50 theorems proven”), statistics, maybe a “share theorem on twitter” button. As the UI becomes more complicated, I’d like to investigating moving more of it into Haskell world and use Functional Reactive Programming, i.e. Ryan Trickle’s reflex, to stay sane.

Customers who liked The Incredible Proof Machine might also like these artifacts, that I found while looking whether something like this exists:

  • Easyprove, an interactive tool to create textual proofs by clicking on rules.
  • Domino On Acid represents natural deduction rules in propositional logic with → and ⊥ as a game of dominoes.
  • Proofscape visualizes the dependencies between proofs as graphs, i.e. it operates on a higher level than The Incredible Proof Machine.
  • Proofmood is a nice interactive interface to conduct proofs in Fitch-style.
  • Proof-Game represents proofs trees in a sequent calculus with boxes with different shapes that have to match.
  • JAPE is an editor for proofs in a number of traditional proof styles. (Thanks to Alfio Martini for the pointer.)
  • Logitext, written by Edward Z. Yang, is an online tool to create proof trees in sequent style, with a slick interface, and is even backed by Coq! (Thanks to Lev Lamberov for the pointer.)
  • Carnap is similar in implementation to The Incredible Proof Machine (logical core in Haskell, generic unification-based solver). It currently lets you edit proof trees, but there are plans to create something more visual.
  • Clickable Proofs is a (non-free) iOS app that incorporates quite a few of the ideas that are behind The Incredible Proof Machine. It came out of a Bachelor’s thesis of Tim Selier and covers propositional logic.
  • Euclid the game by Kasper Peulen is a nice game to play with geometric constructions.

  1. Students with migration background supported by the START scholarship

  2. Does anyone know the reference?

  3. We almost named it “Proofcraft”, which would be a name our current Minecraft-wild youth would appreciate, but it is alreay taken by Gerwin Kleins blog. Also, the irony of a theorem prover being in-credible is worth something.

  4. Luckily, two decades ago, Tobias Nipkow published a nice implementation of higher order pattern unification as ML code, which I transliterated to Haskell for this project.

by Joachim Breitner ( at September 24, 2015 12:14 PM

August 22, 2015

Joachim Breitner

Quickest path to a local apt repository

As I’m writing this, DebConf 15 is coming to an end. I spend most of my time improving the situation of the Haskell Packages in Debian, by improving the tooling and upgrading our packages to match Stackage 3.0 and build against GHC 7.10. But that is mostly of special interest (see this mail for a partial summary), so I’d like to use this post to advertise a very small and simple package I just uploaded to Debian:

During one of the discussion here I noticed that it is rather tricky to make a locally built package available to apt-get. The latest version in unstable allows one to install a debian package simply by running apt-get install on it, but in some cases, e.g. when you want a convenient way to list all packages that you made available for local use, this is insufficient.

So the usual approach is to create a local apt repository with your packages. Which is non-trivial: You can use dpkg-scanpackage, apt-ftparchive or reprepro. You need to create the directories, run the commands, add the repository to your local sources. You need to worry about signing it or setting the right options to make apt-get accept it without signing.

It is precisely this work that my new package local-apt-repository automates for you: Once it is installed, you simply drop the .deb file into /srv/local-apt-repository/ and after the next apt-get update the package can be installed like any other package from the archive.

I chose to use the advanced features that systemd provides – namely activation upon path changes – so works best with systemd as the init system.

If you want to contribute, or test it before it passes the NEW queue, check out the git repository.

by Joachim Breitner ( at August 22, 2015 01:48 PM

June 20, 2015

Joachim Breitner

Running circle-packing in the Browser, now using GHCJS

Quite a while ago, I wrote a small Haskell library called circle-packing to pack circles in a tight arrangement. Back then, I used the Haskell to JavaScript compiler fay to create a pretty online demo of that library, and shortly after, I create the identical demo using haste (another Haskell to JavaScript compiler).

The main competitor of these two compilers, and the most promising one, is GHCJS. Back then, it was too annoying to install. But after two years, things have changed, and it only takes a few simple commands to get GHCJS running, so I finally created the circle packing demo in a GHCJS variant.

Quick summary: Cabal integration is very good (like haste, but unline fay), interfacing JavaScript is nice and easy (like fay, but unlike haste), and a quick check seems to indicate that it is faster than either of these two. I should note that I did not update the other two demos, so they represent the state of fay and haste back then, respectively.

With GHCJS now available at my fingertips, maybe I will produce some more Haskell to be run in your browser. For example, I could port FrakView, a GUI program to render, expore and explain iterated function systems, from GTK to HTML.

by Joachim Breitner ( at June 20, 2015 08:50 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. :D

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