Media Influence On Education

There’s always a lot of debate (and hence opinion) on the “standard of education”. From politicians to parents, teachers and taxpayers, everyone (including Grandma) has something to say about (generally) the decline in the standard of education. Problem is, all this negative media is very public.

If I was a school-going kid today and all I heard on the radio, saw on television and endured at the dinner table was complaints about:
* ill-equipped teachers
* low standards
* education “crisis” after “crisis”
* decay in the moral fibre of the education system at large
* incompetence of the government to execute decent delivery of education

And so on…

Would I be enthusiastic about going to the same place everyday which everyone else drums up as a “hole”? Hell, no. And more- pay attention?

And then we exacerbate the situation when we bemoan the lack of attitude and performance of the learners. Really? We actually expect them to ignore our very public and negatively distorted opinions on education and apply themselves?

What if we told our kids that going to school was:
* fun
* exciting
* filled with opportunities
* a time to create and invent -yourself-
* all-round just plain awesome
?

Because truth be told, it is all of the above.

Share
Continue reading » · Written on: 03-05-11 · No Comments »

Managing A Systems Upgrade

Over the years in which I’ve been involved with IT as a software developer, I’ve been on all sides of a major systems upgrade. As developer, I’ve written systems that were the upgrade for a system being phased out; had to support plug-ins that integrate with the newly upgraded systems; assisted in rolling out upgrades.
As a consumer, I’ve been a customer of a corporate who’s upgraded their systems. As a spectator, I’ve seen companies execute upgrades and read the aftermath. One thing is common: upgrades are a headache. As a colleague and friend I’ve listened to peers regale their experiences with corporate upgrades and been the shoulder to cry on.

Sure, updating your WordPress installation is just a click these days- but this is just one piece of software yet a good analogy. It’s rarely the core system that gives you the hassles- it’s all the integration points. The plug-ins that were dependent on the core. Assumptions would have been made in those integrations that were beyond the documentation, the implementation or vision of the core platform. Or they within scope, but now have to change due to “architectural changes” (or any other all-encompassing label). Trust- it can get messy. If you’ve been there, you will know.

And in all that, nothing has impressed me more than the way CellC recently rolled out their billing systems upgrade. They tweeted, they facebooked they warned everyone. It was like their upgrade was a major party that you had been invited to share in and it was going to be awesome! They kept tweeting hour by hour updates as to progress and where the problems were. They released press statements highlighting their challenges and where they were getting unstuck. And when they solved those problems, they let us know. And when it was all done, they kept us in the loop with more updates.

Was I impacted by their upgrade? Yes. Did it affect me to the point where I couldn’t communicate and do business? Yes. Was it for very long? No. Was I satisfied with the progress and the way they handled it? Absolutely! Would I recommend CellC as a provider? Yes! Am I a fan? You bet. Am I amazed by their execution (knowing what I know an upgrade to be like?). Definitely. Geek respect. They did an awesome job.

Share
Continue reading » · Written on: 02-09-11 · No Comments »

Phishing Is Fraud

Words are powerful, no argument there. Words shape what we see (not just what we look at) and words shape our understanding of the world around us. Some words have been beautifully chosen while others remain questionably in existence only to serve confusion and engender ambiguity. Once such example is the word “hacker”.

In days of old, ok, not that old, a hacker was someone who lived, eat and breathed binary. They were the geeks of the day and relished their 10000 hours on the computer with zeal. They were not necessarily deviant or trying to overthrow governments, banks or universities. They just (mostly) coded. And then somewhere between 1980 and 2000, the meaning of the word changed and now a hacker is largely understood to be a “bad” person. And I use the term “bad” loosely because one man’s terrorist is another man’s freedom fighter. Heck, these days, just participating in a DDoS (even unknowingly- ha!) can get you labelled a “hacker”. Oooo…

Phishing is another one. I have trouble with the word phishing. Just coming up with the term and calling ‘it’ by something else robs the essence of what ‘it’ is. Let’s face it, phishing is fraud- on so many levels.

If someone knocked on your door, dressed as a policeman, claiming to be a policeman, flashed a policeman badge and requested to enter your house on the premise of official police business (but he wasn’t a policeman)- he would be arrested, tried, found guilty and sent to jail for doing only that. He wouldn’t even need to enter your house to make new chums in the block. He just needs to pretend to be someone he’s not in order to gain something that’s not his. He’s a conman. A fraud. A liar. A cheat. A decepticon.

Do this online (or via text) and you’re only phishing. Happily, justice departments see through the thin veil that the word phishing tries to hide. They apply existing criminal codes which match the behaviour of the phishing agent(s) and go to trial based on that but we tend to be blasé about the word despite very real consequences. Only when there’s a consequence do we upgrade our language and start calling it for what it is: fraud.

Hopefully, with time, the word phishing will convey a stronger sense of immorality. That way, when we are confronted with phishing emails, sms, phone calls, we take them a little more seriously. Not just, “Oh. Spam. Delete”. If some “policeman” was walking around your neighbourhood knocking on everybody’s door, asking to come in, would you just: “Oh. Fake. Close door.” and carry on as you were? Or would you: “Uh-oh. Call the real cops. There’s a phony on the prowl”?

Continuing with cliche abuse, evil reigns when good men do nothing. With Data Protection Day coming up (28 January 2010), think for a moment about your contribution to the battle against fraud.

Share
Continue reading » · Written on: 01-21-11 · 1 Comment »

Right-Align Text On BlackBerry BasicEditField

It would seem a simple thing to do, no? In fact, positioning/aligning text has become such an abundant demand over the last few years, that the ability to do so in most environments is fairly trivial. And if you’re working predominantly in the web field, it’s a no-brainer. The native Java components for BlackBerry are a little different however.

An exhaustive search on RIMs support forums and in general, “the internet” reveals many a frustrated developer struggling with the right-alignment of text within a field. I’m emphasizing that since there’s also a lot of confusion with right-aligning the field itself; an entirely different and altogether more straightforward task.

The gritty: you need to handle drawing the text yourself.
The algorithm:
* blank out the field entirely (i.e. fill the background with white paint)
* drawText() in your label at 0, 0
* drawText() in your text with DrawStyle.RIGHT
* fillRect() a cursor at the right hand side of the input field

The catch:
maintain a local copy of the text value of the field

The bonus:
Along the way I started stumbling across other ideas for highlighting the input field and making it a little more catchy for the user.

Here’s a screenshot of my custom input field with the focus.

Right Aligned Input Field

Right Aligned vs Default

You’ll notice the default field below it (R120) is the BlackBerry standard BasicEditField. The R1234 field is my custom field, with highlighted background, slightly pronounced text and right-aligned with a dark cursor on the right edge.

Kudos, references and inspiration drawn from:

http://stackoverflow.com/questions/2007975/basiceditfield-customization

http://supportforums.blackberry.com/t5/Java-Development/Cursor-Caret-not-appearing-in-EditField/m-p/553556#M112688

http://supportforums.blackberry.com/t5/Java-Development/Custom-TextBoxfield-cursor-problem-in-9800/m-p/597140

Share
Continue reading » · Written on: 01-10-11 · 1 Comment »

Repair Your Own BlackBerry

It seems to be a bit of a theme at the moment, and this one is hardware related.

The scrolly-wheely-thingy on my Curve 8900 was giving me hassles. Remember the days of the scrolly-wheell mouse? And how it all got tangled with grit and dust and hair… ew! Well, the same thing happens with the BlackBerry after miles of tracking that ball. So what’s a man to do when you can’t scroll down to read that email, tweet or web page? Why, take it apart and clean it, of course!

I double-checked for a step-by-step guide as to the disassembly of my phone here. Turns out, the instructions are very accurate :)

The result?

BlackBerry Curve 8900 Disassembled

If you going to do this yourself a couple tips:
* use the right tools (TX 6)
* everything you detach, put on sticky (or non-slip) surface
* keep all the tiny bits- they really are tiny
* try finish with no left-over bits
* try finish with no missing bits
* be patient

So if next you have a hardware issue with your phone, follow the tradition of fashion apparel and handymen around the world and Just Do It… yourself.

NOTE: you may void the warranty on your phone if you try this. Which is not such an issue unless you end up with an epic fail.

Share
Continue reading » · Written on: 11-11-10 · No Comments »

Not All Divisions Are Equal

If you don’t need to pay attention to a particular detail every day, it can sneakily bite you in the derriere. Division is one of N culprits floating around the programmer’s haven. And this little guy thrives on C# .NET code.

Let’s take something simple like

int a=9, b=0;
return (a/b);

You’re expecting something similar to a “can’t divide by zero exception”, right? And indeed you do get one. In fact, all good programming courses will teach you the following idiom:

int a=9, b=0;
return (0==b)?0:(a/b);

Which is to say; only divide by ‘b’ if i’t not zero otherwise return 0 (or any other logical value).

Back to the code; what happens if I change the type from int to a floating point (float or double)? Afterall, no self-respecting programmer would do any financial calculations using integers, right?

double a=9, b=0;
return (a/b);

Divide by zero exception?

Nope.

What?

This is not a divide by zero exception condition. In fact, dividing by 0.00000 (or even -0f, yes, that’s a minus floating point zero) is perfectly acceptable and does give you a result.

What?

Yes. As I mentioned above, this is one of those “stickies” that you don’t often pay attention to, but definitely mess with your fundamental assumptions about life and the universe when you not getting the results you expect.

For a little more history on the problem, you can always refer to WikiPedia.

Is all hope lost? No. Just be careful out there because programming _is_ hard (for this and countless other reasons).

Share
Continue reading » · Written on: 11-08-10 · No Comments »

Repair Your X10 Android

Yes, I broke mine. Good and proper. Hey, I’m a mobile dev. If I don’t get to break a phone once in a while, I’m not doing my job properly ;) Problem is, the X10 I have (had?) has only a virtual keyboard :/

So the first thing you need to do is install the PC Suite from Sony Ericsson. And then it’s straightforward: Tools > Phone repair. Simple.

The app will prompt further instructions; follow those (yes, you actually have to read the screen). And remember to press the BACK key while connecting the USB cable to the phone.

Of course, that doesn’t always work or solve ALL your problems. Sometimes you just brick it real good- like mine.

Share
Continue reading » · Written on: 11-08-10 · No Comments »

Manage Cookies with BlackBerry Java

When interacting with [generally and widely interpreted] web services, you may be required to communicate state (usually a login authentication token). This [usually] takes the form of a cookie and in our interconnected wide world of interwebs, browsers handle cookies just fine; custom-built clients not always. On the BlackBerry, if you’re putting together a Java app, and using the HttpConnection class to communicate with said server, you need to manage that cookie (and hence state) by yourself. Fortunately, it’s not rocket science.

The basic workflow is: you connect to the endpoint and POST some data. On the response, you need to read the headers and look for the “Set-Cookie” field. From that value, you can extra the data you need. On all subsequent requests, you set the “Cookie” field on the header. Simple. Time for some code.

NOTE: Exception handling omitted for brevity and readability.

The first request is just a regular POST in this instance. The buffer variable is a byte[].

HttpConnectionFactory factory = new HttpConnectionFactory(endpoint);
HttpConnection connection = factory.getNextConnection();
connection.setRequestProperty("User-Agent", "BlackBerry Client");
connection.setRequestProperty("Accept", "*/*");
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestMethod(HttpConnection.POST);
OutputStream output = connection.openOutputStream();
output.write(buffer);

From that request, we wait for the response and read that. In this example, I am looking for the PHPSESSID field that was set as part of the response in the header.

String cookie = connection.getHeaderField("Set-Cookie");
if(null != cookie) {
  int php = cookie.indexOf("PHPSESSID=");
    if(0 <= php) {
      php += "PHPSESSID=".length();
      int term = cookie.indexOf(";", php);
      if(0 <= term) {
        _session = cookie.substring(php, term);
      }
  }
}

Now I have the token required (cookie) that I can now send on every subsequent request. The code for that is for all intensive purpose, the same as the first code snippet with one additional line:

connection.setRequestProperty("Cookie", "PHPSESSID=" + _session + ";");

The order of the setting of the request properties won’t make a difference, so just use that anywhere before you open the output stream for writing.

Share
Continue reading » · Written on: 11-02-10 · 1 Comment »

Radio Streaming

So of late, I’ve had the opportunity to work with the 2oceansvibe crew and one of the best advantages of the gig has been listening to 2oceansvibe Radio while coding. Major Plus!

So as it is, there’s practically no excuse for not getting in on the coolest radio station this side of the sun.
They have an iPhone app, a BlackBerry app, a web app and now a Facebook app in addition to being able to listen/stream from just about any media player (Real, Winamp, iTunes).

So, for kicks, here’s an audio streamer for the Mac, recompiled to default to 2oceansvibe Radio. Download StreamingAudioPlayer. Yes, you can listen through iTunes. And indeed, 90% of the times I would just use what’s already there (i.e. iTunes) but like most projects, it’s sometimes just cool to be able to roll your own, plus it’s a really decent sample codebase for an in-the-wild cocoa app.

NOTE:
All code on this project is originally developed by mattgallager and code can be found here on the project site.

Share
Continue reading » · Written on: 11-01-10 · No Comments »

How to Write A Job Spec

So your company is looking to hire (again). The (dis?)advantage to the online space is that you don’t have to write an ad (carefully and though-provokingly) that needs to be circulated in print. However, it’s only an advantage if it translates into an opportunity to be as creative as need be (pictures! videos! woohoo). Sadly however, it seems that no matter how drunk the opportunity might be, it will never get taken advantage of.
Seriously. When last did you see a job ad that included *at least* one (non-stock) picture- or even some gratuitous colour?

Let’s say you’re looking to hire a developer/marketing guru/insert-job-title-here…
First question: who would be the best possible candidate (within your organisation) to strike a chord with other potential developers/marketing gurus/insert-job-titles-here out there seeking gainful employment?

HR?

Surely not?

I’ll talk from a developer’s perspective to illustrate my point.

Does HR really know how to communicate with another programmer better than a fellow of the realm? (unless of course that HR has had a career change, which is not unlike a sex change apparently)
I’m guessing not.

Does HR (or is this marketing’s influence?) also not realise that phrases like “fresh, dynamic company” apply to 99.99999% of all job ads out there. After all, who would advertise:

Boring, staid company seeks equally dull individual to maintain lack of office vibe.

So you’re effectively writing without really communicating when you drop phrase du jour into your ads.

Now also keep in mind that programmers, like any other jobseeker out there, are accustomed to reading 1000s of job ads. After a while, you can’t help but pick up the patterns, which, evidently is what a programmer is born, trained, paid, skilled and schooled to do. It’s like staring at those hidden pictures…

So the last thing you want to do is sound just like every other ad out there- unless the first thing you want to do is attract anybody who calls themselves a programmer. And in this day and age, it *is* scary at exactly what does flock towards the job title of programmer.

So here’s an approach: distributed problem solving. Get your developers to write the spec. Heck, get as many people in your company to write the spec.

Use HR for editing and to correct the offered renumeration. If your developers come back with…:

come slave away in our luxury offices overlooking the ocean with so much coffee on tap it would kill an elephant (seriously, George (UI) was taken to hospital twice last year with caffeine poisoning).
the pay is “ok” but the pointy-eared bosses don’t have a clue about things technical so you can just BS your time away and put up with the occasional demand.
overtime sux. at least the lan is wicked fast and we have uncapped ADSL with no firewall :)
p.s. my christmas leave just got cancelled thanks to an unreasonable deadline. bastards will pay!

Maybe you need to rethink hiring another head and spend some time “fixing” first?

But wait. You’ve also gained some valuable insight into the current group dynamic. That is an entirely different post altogether, needless to say, you can discern the inherent value therein yourself.
Oh, and one important tip: don’t give the task of writing their own job ad to your programmers with the air of a pointy-eared boss. At best, you’re going to get a copy-paste version. At worst, a one-liner: software developer required. apply within.

Done right, your devs communicating and reaching out to their peers works “better”. it’s more viral, more accessible, more appealing. It’s why the techie companies attract all the “cool” people because they speak the same language. But it doesn’t mean that just because your company doesn’t have a tech focus that it can’t do the same.

So here’s what i would like to see in a job ad:
It’s posted on youtube (for starters). It includes a view of the offices and some insight to the people i’m going to be working with; kinda like a:
“hi. my name is Martin. I’m head of engineering here at insert-company-here. looking forward to meeting you. bye.” and so on with key people.
and please include the receptionist. i’d also like to see footage of the coffee machine (in working order).
i would like to see/feel the buzz/vibe on a normal day. don’t go overboard with editing; candid is good.
and of course, i wanna see hardware. that’s important too. and workspaces, collaboration spaces and chill spaces.
you don’t have to give any secrets away, but if you can capture your ogranisation, it sells itself.

and if you can’t… erm… yes, well.. erm… right. look! ooooh. shiny.

Share
Continue reading » · Written on: 10-13-10 · No Comments »