It's an Internet web-site

Introducing Giving Counts

So, it’s been a while since I posted that I was back and starting a business. I’ve got a name for it, Interactive Interactive, and a business plan which is still stuck in the system with the New Enterprise Allowance people, though my advisor liked it. Should be happening soon.

Since then, I’ve been building my programming skills back up and learning what’s current in software development. But more than that, I had as much time as I wanted to work on whatever I wanted, and that wound up being Giving Counts, a site for tracking charitable donations and what effects they have. I hope it will help people give, and encourage them to give more.

As I saw in Malawi, there’s a lot of people struggling in the developing world, and I’d love to find some way my coding skills can help. I may not know anything about building hospitals or improving sanitation, but perhaps I can make a website that people can use as they find their own way to make a difference.

Have a play with it and leave some feedback, or read the FAQ to get a better idea what it’s about.

Testing helpers in MeteorJS

Note: If the CoffeeScript here throws you, I’ve compiled it to JavaScript and put it in one big supergist for your perusal.

Update: obviously the way you write the actual test assertions is entirely up to you, but I’m realising I’ve done it in a rather dumb way here. I’ll probably write it up later, but I’m thinking it would make way more sense to wrap my Handlebars helper outputs in a <span class=”helperName”>, rather than hardcoding tests with some magic selector combination to get the <td> that contains them. With this new way, changing the layout of the template won’t break the tests.

I’ve been trying to play with MeteorJS to build a full dynamic website exclusively in JavaScript. My repo is of course at GitHub. I say trying to play – my mind has been bending in unpleasant shapes over using a TDD approach. It’s really hard to write unit tests when the underlying framework isn’t well documented, its own test code baffling to read, and you just don’t know how and where your tests can fit in.

I’ve been trying to write tests for the Handlebars helpers that you invoke like this (with CoffeeScript):

Now, how do I test that it is indeed displaying the right name and not an id (every time)? Well, first I should quickly mention I’m using Mocha and Chai as my unit testing tools, thanks to mad-eye’s GitHub project meteor-mocha-web. The way I found to get a working test of the helper is below:

In the test, we use the Meteor.render function, passing in the appropriate template, to get an HTML fragment that contains just the template including our data. You don’t need to pass in any data, it will use its usual collections etc, which hopefully you will have already swapped out for a dummy and populated with some test data. My test now uses the querySelector function (part of JavaScript and similar to $(‘selector’) in jQuery) to get the first <td> element and check it has the expected contents from the test fixture.

Using the same technique, it’s possible to go a bit deeper and test a whole table came out as expected:

Hope that all helps, because it took me ages to work out for myself.

Introducing New Things

 

Out of the frying pan and into the freezer

Out of the frying pan and into the freezer

I’m back in the UK! It’s quite fine. Now, onto business. In all fairness, I should put these in separate posts, but I’d hate to give you the impression that this is the sort of blog with a yearly post count in the double digits. You’d be so disappointed, come May.

Anywho, the first thing is Topup, my demo website of how buying topups in Malawi could work. See how I made the link a description of the site? That’s what we in the trade like to call Search Engine Optimization, or SEO. I hope I haven’t jinxed it by saying it out loud. I cooked it up over Christmas (what else is Boxing Day for? I simply don’t have that many boxes) and New Years when we got some time off. You currently can’t buy mobile phone topups in Malawi online, which is annoying for the 80 or so expats in the country who own a credit card. With a nose for potential business like a sphinx with hayfever, I swooped in for the kill with a half-completed website that doesn’t technically work.* The source is online at GitHub in case anyone wants to finish the job.

Second announcement: my final year project site from university. Uninotes is back online. I forked out for the domain again, so that I’d have something to show off on job applications. It’s also now been fully open-sourced, with the code available on GitHub. It’s a collaborative notes site based on the idea of people attending lectures having some shared base of notes that like Wikipedia grows better with each (not messing about) contributor. I realised today that I don’t think I ever actually announced it anywhere, not that I really expected people to use it (then I’d have to support it!), so I don’t think even Google knows it’s there. And they know my shoe size.**

Finally, and most vaguely, I’m starting my own business! I’m, er, in stealth mode. Okay, truth is I don’t have a business plan and I’m not sure what I’ll be doing. I might have a name for it. Had a few job interviews which all went fairly well, but I didn’t seem to gel with any. For now, I just want to work on my own projects for a while, maybe some Windows Store apps, phone apps and/or websites. Maybe some freelance/contracting. I’ll see if I can get a revenue stream going, and take it from there. After Malawi, I know that I may be pretty broke, but things are actually very sweet for me at home, and who knows, I might end up happy doing things this way. Life is a bunch of experiments. I can’t fail, only the experiment can fail!

* To be fair, I was slightly put off by the fact that of 184 countries, Malawi was ranked 141st for starting a business according to the Doing Business project of the World Bank (that fly-by-night organization). It takes 39 days of effort, and costs 83.7% of a typical worker’s annual salary. You can be sent to prison for running an unregistered business, and since I’m European I’d definitely appear to be worth the police leaning on, at least for a very hefty bribe. I decided against pursuing this venture.

** Er, 7 or 8 I think. I’ll Google it later.

This Is A Long Drive For Someone With Nothing To Think About

image

Delivery truck? Shme-shmivery shmuck!

On the road again

I’m sorry, loyal readers. It seems I only write in here when I’m having an unlovely time on cramped minibuses. And I even stole the title of this post from the name of a Modest Mouse album, because it seemed to fit.

With apologies out of the way, here you can see a washing machine being loaded onto my ride to Salima. I am sitting ipn the front middle seat, so it is now my back rest. I’m not sure where it’s going, or why. You can pay someone to wash your clothes for less than it costs to get the machine to do it, and there are almost daily power cuts, almost everywhere.

I’m not having a great xmas eve, but it could be worse. You know that thing where you wait 30 minutes in line in a really hot place to use the ATM and then it stops working right before you get to use it? That didn’t happen to me, it happened to everyone behind me. It’s an atheist Christmas miracle. I bet the twenty-odd people in the queue were all Christians, too. Must be the devil’s work.

I’m typing this on my phone in my second minibus to Salima in as many hours. The first one broke down before we’d even left Lilongwe, the city where I got on (and also happen to live). I really don’t know why it seemed like a good idea to go to the lake for a few days over xmas. When I get there it will be lovely, I will be able to swim in the hot, hot sun and not lift a finger, as far as cooking and shopping go at least. But I forgot the golden rule of Malawi, never try to do anything, it won’t work. I will be staying for three days, but that’s bookended by two days of travelling, so I’m not sure the net result will be more relaxing than staying home.

Xmas

A couple of years ago when I was in Bangor, I spent xmas completely alone. I didn’t have many vacation days left, and I was saving them for when my girlfriend visited in March  so I even worked on xmas eve (she would later break up with me in late January). It wasn’t great, but I had been pretty sick of The Holidays TM. They might as well call it Spend All Your Money Or You Don’t Love Your Family… Day. Or, more accurately, Month The following year though, I was at home over the student vacation and found the festivities quite pleasant. I even tolerated the cheesiness and bad movies, so I decided I’d do it again in future, but every other year was probably about the right dosage for me.

This year is my year off xmas again. I’m also relatively alone, but it’s about 30 degrees celcius, I’m really starting to doubt there will be a dusting of snow, and though I’m happy to skip most of it, at least I’ll be out of the house and having xmas dinner with other travellers.

Work vs play

One thing I’ve contemplated for a long time, especially when I was in Bangor (which is in North Wales and thus miserable looking for 95% of the year), was that I could basically do my work from anywhere. I’d either be doing coding, or maybe some live support or testing on servers elsewhere in the country using a vpn. So.. Couldn’t I do it on, say, the beach?? Well, I’m going to find out soon!

While I’ve not had the funnest of times here in Malawi, I do have a lot to be grateful for. I don’t like my job as IT Co-ordinator, where I basically am system administrator for a network plus I have a few other things to do, but then I never really thought I would. It’s exactly like a war (exactly) – long stretches of boredom punctuated by moments of absolute pandemonium. You know what I like doing? What I spent all yesterday doing, for my own entertainment? Programming. I actually wish I was doing some more right now.. I completed a tutorial on unit testing and started applying it to my own project and I want to keep going; it might just change the way I do everything. Anyway, my point is, I found something I really like to do, and that I can get paid to do as well. How good is that?

My plan

So my new life plan when I get to the UK is quite simple. It might not sound like much of a plan, but it is because it’s a radical departure from here, and because I intend to do every part of it.

1) I find a job, programming something cool that will try revolutionize… Something.

2) I get paid for it.

3) I use the money to do what I want

You may think, wow George, you probably didn’t have to spend six months in Africa to figure that out. Well, I did, because I’m weird. I have really never accepted received wisdom. I mean, I really didn’t listen to anyone. Not I didn’t listen to the majority, I didn’t believe the fringes either. I’ve been a part of the Occupy Movement AND I’ve sat in a disused pub and told the squatters they were taking a lot out of society and not giving anything back. Okay, materialism isn’t the key to happiness, I can see that. But.. I don’t want to drop out or live off the land either. But maybe I don’t need the internet, I never used used to. Maybe I don’t need fancy food, or tv or anything you can’t get
in a refugee camp. Showers, toilets that are inside and aren’t just holes in the ground, distinct lack of ants. Let’s see how that all works out.

Lessons learned

What I learned is still kinda obvious, but I had to discover it was true the hard way. A big one is that no one chooses to live like a refugee. The refugees certainly don’t want to. Malawians may have simpler tastes in some things, especially food as they mostly only eat about four things, but give them the opportunity to have some more cash, of course there’s loads of stuff they’d like to buy. Though they’d probably just waste it anyway, on things like sending kids to school and buying medicine.

I’ve been reminded since I got here. of the song Common People by Pulp (if you don’t know it, frankly I’d rather you stopped reading my blog until you have. Go.), especially the lines “Watching roaches climb the wall /if you called your daddy he could stop it all”. And not just because I’ve put up with plenty of roaches. Choosing to deny yourself the stuff and activities you really want is just masochism. And it’s not even real. The really weird part is, I always identified with the Jarvis Cocker’s part, and coming here I got to put the tourist in the “cus everybody hates a tourist” lyric. That takes some getting used to.

So am I going back to the UK free of the need for material wealth and comfort, a free spirit with a deep, peaceful soul? Hell no, please line up as much of that fancy stuff as possible and bring it all to the airport when I land. I will take one of everything. Maybe more. I don’t think I deserve it, and I hope to give a lot of it to people who need it more than me in the years to come, but that’s another story for another day. For now, I’m just glad that soon, I’ll be going home.