Charl van Niekerk » Blog

Main

Latest

Archives

Powered by Blogger

Roadtripping, again! :P

Image: Teh Eccentric Eggplant

After another month of sweating it out deep into the night in front of the books and the box, I have been studying and computering enough now (well, I have been studying enough, I don't think I can ever computer enough). Still, time for a break.

Wednesday morning, teh_graphix_oubie and I are on our way over to Cape Town again for some fun, relaxation, and the occasional bit of business as well of course. ;)

One of the highlights of our trip will of course be our stop Wednesday evening at the Cape Town Geek Dinner November 2007, also called "Eccentric Eggplant". Although I hate eggs, I do love eating eggplant. Unfortunately it does not seem to be on the menu however. But just the idea is enough to get me all excited. Everybody that ever met me in person will of course know that "Eccentric" is quite my thing as well. Seems like I'll be right at home!!

I will (at least, try) to do a short presentation about the Google Summer of Code and my involvement with Joomla! as well.

I am a little worried about those Jagermeisters however. I have seen, ahem make that "experienced", what they can do back at the 27 Dinner. ;)

We have various coolnesses planned for the rest of our trip as well, including (but not limited to - starting to sound like an advertisement now) Corné & Twakkie. Then of course, there is also the much anticipated Obs Fest that will be taking place over the weekend.

So, all in all, a pretty exciting couple of days lying ahead! Now I'm just se-ri-asly k*kking myself to get all my work done before then. :)

See Jayx's post Geek Dinner and Another Road Trip Brewing… for more info. Also, our local Garden Route "homies" Stii and Bev are going through to the Johannesburg 27 Dinner tomorrow so we wish them luck although we expect a full and detailed report no later than the next day from both of them. Just kidding people, have a great time! See you after we get back to George. :)

Garden Route 2.0

The Garden Route is definitely coming up to speed with Web 2.0 (if anybody even knows what that means any more). This hit the rest of the world "only" about 2 years ago so it's really surprising that it's already hitting here as well. This means that the Garden Route Blogging Gang are having their way in finally getting the area up to scratch. :)

At least now some more people will understand the following:

<a href="http://yo_momma/bakes_nice_cookies">what, you expecting a "yo momma" joke???</a>

Or, maybe not. I don't even understand that.

Anyway, as previously announced, we had our first myXchange meeting in a while on the 14th this month (November 2007). This is the first time we held the meeting over at Office Reliance and I think it went really great. We had a surprisingly good turn-up, although our turn-up in August was actually also quite good, at least relative to George norms.

I did a short presentation about OpenSocial. I think as usual I talked over a lot of people's heads which is why I am frequently gagged and banned from presenting anything. :)

<person name="charlvn" type="technical"/>

We had a few new people there as well so it was lots of fun talking to them and hearing their views, etc. There are also a lot of interesting developments around the web at the moment so more than enough for a few hours of great conversation! Am very much looking forward to the next one.

Many thanks to Office Reliance for hosting this one, you have a really great venue for this kind of stuff!

I doubt it if we will be able to hold another meeting this year as the holiday season is approaching in South Africa and lots of people have braais and other events planned already. We could look at January if there is demand, but then people are typically getting back into work and things are hectic so maybe that isn't a great idea either. We are realistically probably looking at February but if anybody is interested to have a meeting before that please comment or contact me privately.

After that, Bev and Stii held a Blogging Basics Workshop on 20 November 2007. I unfortunately missed the first one but was very glad to be able to make this one.

As I commented on Bev's post, even as a person that blogged for well over 3 years now, I actually found the workshop very interesting.

Personally, I started this blog of mine for fun and fun only, and that will continue to be my main motivation to run this blog for as long as possible. I really don't want to make it commercial and say what I think people want to hear in order to make more $$$ as that's just not what I do. If I have an opinion, doesn't matter how politically incorrect it might be, I'll freely post it here. Keeping it real (TM), not always good for business I know, but hey you have to pull the line somewhere. :)

However, after hearing Bev's presentation, I see that there are indeed a lot of ways to use blogging to make the world out there understand that you do actually know what you're talking about. These days everybody wants to know everything but most of them simply don't. Don't just say you can, prove you can. :)

So, many thanks for that one Bev, Stii and Office Reliance for hosting the workshop. Looking forward to the next one! Also check out the Garden Route Bloggers community blog.

Skyrove and iBurst in George, South Africa

One morning a couple of weeks back, Stii and I were walking down York Street in George. On our way over to Upstairs at Harry's we checked if the Spur was open. In front they had a big sign that Skyrove was available there. We were both quite surprised. Personally I never saw or even heard of any Skyrove hotspots in George before that.

A few days ago I saw an advertisement in the George Herald that iBurst is now available in George as well.

For years now there are tons of WISPs in this area, mostly making use of the ISM band for so-called "radio" links and wifi. However, there were very little available from the "bigger" national WISPs up until now other than the cellphone companies of course with 3G HSDPA and EDGE.

M/S Explorer

This is one for all the web developers out there. From BBC News: Stricken Antarctic ship evacuated:

More than 150 passengers and crew have been rescued from a stricken tourist ship after it hit ice off Antarctica.

The M/S Explorer is now lying on its side close to the South Shetland Islands, in the Antarctic Ocean.

So, here one M/S Explorer bit the dust. I know of another "M/S Explorer" that bit the dust as well soon after Firefox 1.0 was released. And the best news of all is that, right now, it's still at it! :)

A quick word of thanks to jpgeek for the heads-up!

Error Reporting: Help the User

When I tried to upload a photo for a post a bit earlier today, I got the following error page:

Image: Error page after attempted image upload on Blogger

The thing I like about this error is that it is fairly detailed. It's not just something like "An Error occurred. Stuff you."

However, why do they have to ask me to send them mail about their own error? This isn't me that stuffed up here. Why don't they just send an e-mail to the administrator immediately out of the system with all the right info or write something to a log file and save me the trouble? They have the error code and additional information anyway; all that they are asking me to do is return their own info to them.

If they want a description from me of what I was doing, why not include a form on the page that I can fill out immediately? I'm definitely not going to go to the trouble of contacting Blogger support for this manually. I'll just take my chances and try again (which was successful in this case). Maybe the average luser is a bit more lenient but this kind of thing frustrates me somewhat to be honest, although that might just be because I'm a developer myself.

So Google is fast indeed!

In an update to an earlier post of mine Google: Speed & PageRank, approximately 30 minutes after publishing my previous post Serious Rains Hitting the South African Garden Route, it was already listed on Google:

Image: Screenshot of the Google Results Page

However, only the homepage has been re-indexed, not yet the November 2007 archives page or the actual post item page (permalink page linked to above, although it seems like the term "permalink" has fallen out of popularity). The post before that, MySQL: Unicode Text Fields in Keys I posted less than 24 hours ago, has been found in both the November 2007 archives page and on its own page already though.

How are they doing it? Is Google checking my front page a couple of times every hour? Or are they doing some mojo with my feed or Blogger itself? However, would it then not focus more on the post's own page than on the front page? This really puzzles me, would love to know!

Serious Rains Hitting the South African Garden Route

Hau! My garden turned into a swimming pool!

Image: Photo of my garden right in front of my house.

I went to bed around 05:00 local time and got up at around 13:00. I slept really lekker because it was raining the whole time. I always love hearing the rain on the roof, but not when the root is made of zinc plates, as is often in poorer communities in South Africa as it makes too much noise. Luckily my roof is made of tiles.

After I woke up I could not believe the state of things outside. There is just water, everywhere. Around August 2006 we had some terrible rains that caused quite a bit of terrible flooding. I hope that doesn't happen again. However, for the moment I'm just enjoying being inside, hacking in front of my box. The weather is quite fun for me because I enjoy the sound of the rain outside while working. I also enjoy the darkness outside and artificial lighting as not so much natural light is coming into the house as usual. Wwworking from home is great.

Am looking forward to steamed veggies tonight:

Image: My steam contraption.

Right now I am feeling like that Coca-Cola ad though. :)

For some more information, please see the Bad Weather hitting the Western Cape thread on the South African Garden Route Forum.

Update: We are hearing over the radio that terrible rains are hitting / will hit all over South Africa and some people already had to be evacuated. Apparently the situation is still going to get worse in many areas. To those that are affected, our hearts are with you. We hope this will stop soon as that's terrible.

(Please note that the term "wwworking" is a TM of Rafiq. Registration of this TM is probably pending.)

MySQL: Unicode Text Fields in Keys

I just tried to install mediawiki 1.6.10 on a server running PHP 4 and mysql 4.1.20-log. I got the following error message:

Creating job table...Query "CREATE TABLE `job` (
 job_id int(9) unsigned NOT NULL auto_increment,
 job_cmd varchar(255) NOT NULL default '',
 job_namespace int NOT NULL,
 job_title varchar(255) binary NOT NULL,
 job_params blob NOT NULL default '',
 PRIMARY KEY job_id (job_id),
 KEY (job_cmd, job_namespace, job_title)
 ) TYPE=InnoDB
" failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)".

According to the error message, the problem clearly lies with KEY (job_cmd, job_namespace, job_title) and not the primary key. A int(9) field surely can't cause that. I'm not a MySQL expert to the extent that I would know what the best way would be to solve this, so as I was in a haste I decided to just remove the problematic key and see what happens.

A quick grep revealed the possible origins of the problem:

charlvn@stargate:~/downloads-temp/mediawiki-1.6.10$ grep -r 'KEY (job_cmd, job_namespace, job_title)' ./
./maintenance/tables.sql:  KEY (job_cmd, job_namespace, job_title)
./maintenance/archives/patch-job.sql:  KEY (job_cmd, job_namespace, job_title)
./maintenance/mysql5/tables.sql:  KEY (job_cmd, job_namespace, job_title)
charlvn@stargate:~/downloads-temp/mediawiki-1.6.10$

I just edited those three files and removed the line KEY (job_cmd, job_namespace, job_title) and the comma at the end of the line PRIMARY KEY job_id (job_id), in each of them. This seems to have done the trick. So far everything works as expected. I assume this has mainly been added for performance and not really to serve as any important constraint.

Afterwards, I Googled a bit (yeah I know, should have done that earlier) and found Manual talk:Newcomers guide to installing on Windows: Problem with encodings. The very funny thing is that I thought this was on a Linux machine, but then obviously not. The MySQL version number having -log at the end actually made me wonder as I recall seeing this earlier, probably on Windows as well.

Taking a look at the database afterwards, the encoding that has been set up is utf8_general_ci for the job_cmd field and utf8_bin for job_title. I checked in a database for the same version of mediawiki running without any problems that I know for a fact runs on Linux and the encodings were latin1_swedish_ci and latin1_bin respectively.

This has been a rather interesting exercise for me because one needs to take this into account when creating applications that use MySQL that could potentially be required to run on Windows-based servers. I guess the solution would be to do one of the following:

Interesting shit as always!

Random South African Telecommunication News

I just wrote my last exam for the year this morning (well, yesterday morning, technically speaking) so on the one side I am in a good mood and then on the other side I am in a crappy and highly irritable mood. I read some rather interesting stuff on MyBroadband yesterday though, so I can't help but comment. :)

10 Mbps ADSL by 2011:

Telkom is planning to improve its ADSL speeds and promises far better ease-of-use for broadband by 2011.

WTF?! Let me get this right. We are now almost at the end of 2007. So this means we'll have to wait longer than 3 whole years in order to get 10 mbps? We are already miles behind the rest of the world! People overseas are playing with their ADSL 2+ connections downloading up to 20 mbps, and those are the unlucky bastards that don't have private fibre or some other better form of connectivity.

If we are already so far behind, how far will we be in 2011? I predict that by then the average household in first-world countries will have no less than 500 mbps. So instead of catching up, we are falling further behind.

Neotel promises significant savings:

Neotel launched their Enterprise services recently, promising a 25% or higher saving on ‘derived value’.

So what I (and many, many others) suspected all along is indeed the case - Neotel is not going to make the world of difference to the state of the telecommunication industry of South Africa. They might help to reduce the prices and scale up service delivery, so it's definitely a positive move, but what we want is uncapped 510kbps ADSL at less than R400 per month. Please note that I'm not saying this is Neotel's fault - there are a lot of forces at work. But just giving them access to the SAT-3 cable is clearly not enough to release Telkom's strangle-hold on this country's economy. I fully support Neotel and their operation and still have lots of hope that they will really kick Telkom's butts!

Telkom profits down:

Increased competition, operating expenditure and reducing cost of telecommunications impact on Telkom’s Headline Earnings

Excellent news. So now they are just ripping us off less than they used to. I don't catch this though. Competition? Which competition? Did we have competition? I didn't know that... Oh, Neotel maybe that isn't even up and running properly yet?

More channels for R 139 DSTV Select:

Vodacom’s DSTV Select which was launched earlier this year at a price of R 139-00 per month, has added six more channels to its initial bouquet of 16 channels.

The new channels are Al Jazeera, Magic World, TBN, Rhema, Mindset Learn and Soweto TV.

Excellent. Stuff nobody watches anyway. Ok, I guess some people watch this stuff, but not me. I guess that's to be expected, but what's the big hype about?

Microsoft Windows Power Shell (PoSH)

I didn't think the day would ever come that I would be saying this, but it seems like Microsoft actually invented a decent shell.

Staying in a "small" city like George, the first computers I got to physically interact with were PCs. When I started using PCs back in 1990, the only operating system I used was MS DOS (I can't remember which version, could be 3 or something).

Although at that point in time, my technological standards weren't exactly very high, so I really enjoyed using DOS on a really old computer. The first was a computer (I can't remember which model) with two floppy drives (no hard drive). I think it had a 16-colour (probably 4-bit then) display. Later I moved to a 80286 or something with one floppy drive and one hard drive that was about 8MB or something in size. Ok, it wasn't so old at the time, but it is flipping old now. Later I used Windows 3.1 (which I booted separately from DOS when I felt like it) on a i386 with one floppy and one stiffy drive (no CD/DVD drive - don't be silly). Stiffies were extremely expensive in those days.

Of course later I started using Windows 95 on a Pentium I. I then switched to Windows NT Workstation instead because it's more stable. Windows 98 was so crap I didn't even touch it. When Windows 2000 came I grabbed it and loved it lots. I stuck with it for long before upgrading to Windows XP because the only advantages for me is that it had IPv6 "support" (haha) and booted up much faster. I've been using Linux/BSD "part-time" since the year 2000 but decided to use it "full-time" and chuck Windows out the door roughly a year back. (Tried Solaris 10 but the installation was too slow for me - I think it does well on strong servers with lots of users.)

Had lots of laughs at people using Windows Vista, showing off the visual effects (like it can even be a patch against Linux 3D desktop environments) and then complaining about the various [hard|soft]ware issues they were having, returning back to hacking Linux and giving Vista the finger.

Anyway, how did we get into this nonsense about my crazy life... Back to Windows Shells.

Being used to BASH I spit on DOS. However, I have to say that the new Windows Power Shell (PoSH) does look rather attractive. What I like particularly is that you can do things like this:

"hey i'm tuning you my lanie".ToUpper()

Being used to object orientation as I use it for the gross of the code I write, this is rather attractive to me. This is also rather cool (example taken from the wikipedia page linked to below):

PS> $rssUrl = "http://blogs.msdn.com/powershell/rss.aspx"
PS> $blog = [xml](new-object System.Net.WebClient).DownloadString($rssUrl)
PS> $blog.rss.channel.item | select title -first 8

This displays the latest 8 items of an RSS feed. That's not so bad! Being able to access the .NET framework directly from the shell can be quite handy if you're used to working in that kind of environment.

For those and many more examples, see the Wikipedia PoSH page.

Why Microsoft didn't start with something like this waaaay earlier I have no idea. But if I can access this shell remotely via something like PoSH Remoting I think that this can be quite handy for me when it comes to administrating Windows servers over slow African internet connections when RDP is not an option.

Nothing for the *nix users to be jealous of yet as we have such a range of shells at our disposal we can work out a plan easily to do whatever we like. We have been used to this for a long time, but now the Windows guys can get "with it" as well. It is most certainly a very big step forward for them!

Note to overseas readers: Stiffy is a common computer term, completely socially acceptable in South Africa. It refers to 3½ inch "microfloppy" disks. The term floppy generally refers to 5¼ inch "minifloppy" disks. If you call a 3½ disk a floppy you're likely to get some laughs under the computer people that have been in the business for a while over here. People generally don't even blink at the use of the term "Stiffy" because everybody uses it and expects it. Therefore, keep your dirty thoughts to yourselves and don't bother commenting as I know "stiffy" has, well, interesting meanings in some overseas countries. :P

Check out the Floppy disk Wikipedia article for more info:

In some places, especially South Africa and Zimbabwe, 3½-inch floppy disks have commonly been called stiffies or stiffy disks, because of their "stiff" (rigid) cases, which are contrasted with the flexible "floppy" cases of 5¼-inch floppies. In Finnish, the term is korppu (rusk, crumpet, biscuit) due to its rigidity compared to 5¼-inch lerppu (floppy).

Update: The term PoSH should not be confused with Plain Old Semantic HTML. Another one of the acronyms I love to hate. :)

Gift Cards

My biggest advantage and disadvantage has always been that I was born with a very logical mind. The advantage is that I never really had to learn how to program, I just had to learn a programming language syntax and API, and the rest came naturally. The disadvantage is that the average person is a lot more creative and don't think in strict logical terms like me. That means socially I'm rather inept, which is why I prefer to be in the company of computers, because them I can actually understand.

I find that rarely you have a situation where there's only advantages and no disadvantages to balance things out. It would almost appear as some natural order.

Anyway, I am extremely unsentimental and generally think about life in a very practical way. This is demonstrated by the fact that I might sometimes do things that are seen as generally socially unacceptable. For example, I never managed to see how buying somebody a gift voucher is any better than giving them money. It's actually worse because it typically limits them to a particular chain of stores.

Earlier today (actually yesterday, as it just went past midnight in my timezone), I spotted a link to Seth Godin's blog post The $8 billion story/scam. Since I read a book he authored titled The Big Red Fez a couple of years ago, I have been hooked on this guy. The stuff that comes out of his dome is amazing. I take great inspiration from him and would love to meet him in person one day.

Anyway, back to the blog post. A quick quote, just to convince you to click the above link:

Last year, more than $8,000,000,000 was wasted on these cards. Not in the value spent, but in fees and breakage. When you give a card, if it doesn't get used, someone ends up keeping your money, and it's not the recipient. People spent more than eight billion dollars for nothing... buying a product that isn't as good as cash.

Along the way, we bought the story that giving someone a hundred dollar bill as a gift ("go buy what you want") is callous, insensitive, a crass shortcut. Buying them a $100 Best Buy card, on the other hand, is thoughtful. Even if they spend $92 and have to waste the rest.

Now we are talking!

Ok, I personally won't mind if somebody sends me a voucher for a company like Woolworths because I buy food there every now and then anyways. But generally, I find gift vouchers to be a pain in the rear. You also have to remember about them and redeem them before a certain date otherwise they expire, etc etc. If I get a voucher to a shop I would never otherwise bother visiting, it feels like a general waste to me.

So yeah, I can understand when you give somebody a real gift it's somewhat "special" and sentimental to a lot of people, as it's not about the money it cost to buy or make the gift but about the gift itself. But I still lack to see the difference between giving a R100 note and a R100 gift voucher, other than limiting the recipient.

OpenSocial

I took a quick look at OpenSocial the other day. Although I think this is a really good concept and positive move, I have mixed feelings about the actual implementation.

I really like OpenSocial because to create a separate library to support all the individual proprietary APIs is a real pain as it needs to be updated as new social networking sites are added. If you think about it, the basics of all the APIs are the same anyway so why not standardise and make life easier for everybody.

I like them using Atom 1.0 for the Activities data API. That makes sense because activities is a kind of a "log" really. However, using that for the Persistence data API and the People data API sounds rather silly to me. People is a list, not really a feed of any sort, and persistence is just a bunch of key/value pairs. Although I guess it does no harm (the new use is probably just weird to me), I think they could have better used something like FOAF for people. Or what about some XFN integration? There seems to be very little metadata for people available.

Why is there no OpenID integration? I thought that OpenID would be the perfect compliment to OpenSocial, but instead we just have plain username/password authentication and Google Accounts.

Although I think that the specification could have been better, we have to remember that this is still early times for this project so we'll just wait and see what happens. I am quite enthusiastic to start using this so will try to find every excuse I can in the next month or two. :)

myXchange Update

Image: myXchange Logo

I forgot to mention in the previous post about the next meeting that it will be a bring and braai so make sure you pack enough food and drinks! Also, this meeting is well listed. Indeed, the event is posted on Google Calendar (thanks Jayx), Facebook and of course on iJol.coza. That should be about it but further updates will follow as necessary.

Machine Translations - And you thought it couldn't get worse...

Just in case my other post didn't convince you to unsubscribe immediately, it's about it get worse. Yes, your ordeal is far from over.

Here comes my original text:

Ich kann nicht eigentlich Deutsch sprechen aber ich kann sehr gut Scheiß sprechen. Ich hab noch ein Blog Einschreibung gemacht wegen die Freude.

Ich lieb mein Computermaschine! Ich gehen ein Maschine bauen was alle noobs schnell kann pwnen. Meine Schweine seine fleische schmecke sehr appetitlich! Ich such echter mehr Kartoffeln. Ja ich schreiben als ein echte Depp.

Now here comes the Google translation:

I can not really speak German but I can speak very good shit. I have a blog enrollment made because the joy.

I love my computer machine! I will build a machine was all noobs fast can pwnen. My pig's fleische taste very appetizing! I more such real potatoes. Yes, I write as a real Depp.

And here the Babelfish translation:

I can not actually speak German however I can very well shit speak. I have still another Blog registration made because of the joy. I dear my computer machine! I go for machine building which all noobs fast can pwnen. My pigs his fleische taste very appetitlich! I look for more genuinly more potatoes. I write as a genuine Depp.

Google wins hands-down in my opinion.

This is what I tried to say:


I can't really speak German but I can speak shit very well. I created another blog entry because of the joy.

I love my computermachine. I am going to build a machine that can pwn all the noobs quickly. My pig's meat tastes very appetizing! I want more potatoes though. Yes I am writing like a real fool.


This is why I don't trust computer translations (or at least, not yet)! Although, I did give them an unfair challenge as my German is also pretty shit. For me it is clear that the machine has a problem extracting all the context-specific (and to a certain extent, culture-specific) semantics out of the text to best reconstruct the text in a different language. You can see word association issues in the Google translation with gut which should be associated with sprechen, not with Scheiß. Interesting field this, wouldn't mind researching and working on an implementation one day.

Finally, another myXchange meeting in the Garden Route!

Image: myXchange Logo

After two weeks in Botswana, a 27 Dinner in Cape Town and 7 exams, I am finally starting to recuperate and getting back into the spirit of hacking. I feel terrible about neglecting the myXchange meeting group for so long so let's get back into action ASAP.

We have been venue-less for a while but now have two great venues coming up to hold our meetings in future.

Without further delay, the details for the myXchange 14 November 2007 Get-together:

  • Date: Wednesday 14 November 2007 from 18:30
  • Location: Office Reliance, 123 Mitchell Street, City of George, South Africa

No need to RSVP, just bring yourself. If you don't know where this is and are scared you might get lost, just take down my number 072 405 8378 in case. You are also welcome to contact me earlier as well to get some instructions if you like.

Topics, well, normally are all IT-related to some extent, but non-techies are also welcome of course. We might get a little technical at times but there's general-interest topics that are discussed as well.

Personally, I would really like to discuss the following:

Looking forward to another very interesting evening out!

hCalendar

W3C Validator on NET-enabling start-tag

It seems like the W3C Validator is slowly but surely shedding its strictly theoretical skin and getting more and more practical. Today I spotted the following error:

Image: Screenshot of the W3C Validator in Firefox displaying the warning

Line 91, Column 279: NET-enabling start-tag requires SHORTTAG YES

The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HMTL 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HMTL 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

I got this because for some reason I had <img src="..." alt="..." /> in my previous post.

Please note the typo (HMTL instead of "HTML") which is rather funny!

/> is commonly used in XML but not so commonly used in HTML. It's actually an SGML feature, which is the superset of both XML and HTML 4, but XML overrides it with a different meaning. So effectively, my markup meant <img src="..." alt="..."></img> in XHTML but <img src="..." alt="...">&gt; in HTML 4 (being based on SGML) even though the latter won't normally be parsed as such because, as mentioned by the validator, common user agents don't support it. (Actually, they don't bother with SGML much at all, but rather use a quirky "crapcode"-fixing hacked HTML parser.) They couldn't support that any more either because of the amount of people that send XHTML 1.0 as normal text/html.

Note that not all versions of HTML are based on SGML. For example, the new HTML 5 is not dependent on SGML as it defines its own parsing requirements.

Learning German... A disaster waiting to happen...

I think that German is a really cool language. Have liked it from the first time I ever heard it. Especially in heavy metal / rock / industrial it really works for me (think Rammstein, brothers...) I have been trying to learn German for quite a few years now. My only problem is that it is not really a priority and I always seem to have more pressing issues to deal with. Maybe I must start to blog in German so that I can have a good excuse to learn more.

Ich kann nicht eigentlich Deutsch sprechen aber ich kann sehr gut Scheiß sprechen. Ich hab noch ein Blog Einschreibung gemacht wegen die Freude.

Ich lieb mein Computermaschine! Ich gehen ein Maschine bauen was alle noobs schnell kann pwnen. Meine Schweine seine fleische schmecke sehr appetitlich! Ich such echter mehr Kartoffeln. Ja ich schreiben als ein echte Depp.

i fink dat if sumbody dat does aktualy speek german 4 reel reeds teh above dey wil get an insanitee attak due to teh poornes of my use (and derfor nowlege) of teh german langage. no offens guys, sorrie, am tying my best! one day i'll get it rite if i praktise hard enuff...

Jericho Airing in South Africa

The last episode of the first series of Heroes just aired in South Africa. Although I think this has generally been a really great series (I didn't enjoy it so much at the start but the last couple of episodes were really excellent), I have to admit that I found the end almost a little disappointing. Although, the climax is probably rarely as exciting as one hopes.

To take its place Wednesdays at 20:30 (local time), Jericho will be airing from next week onwards. Sounds pretty interesting and I hear it's about as good as Heroes so am looking forward.

Yes, South African public TV does actually have some pretty cool stuff as well from time to time. I'm just angry that we missed the gross of Stargate SG-1 and Atlantis. Does anybody perhaps know where I can (legally) buy copies of those on DVD?

Google: Speed & PageRank

Although most people probably didn't know this, I used to be seriously into SEO back in 2004. Since then I started coding more and more and eventually got out of it and lost touch with the latest movements by the "big" search engines such as Google, etc which is kind-of sad but one of those things I guess.

Although there are still a ton of Google PageRank indicator extensions for Firefox, the other day I discovered a very cool web-based PageRank checker over at iWEBTOOL. Similar services I used previously only gave the PageRank on one of Google's servers; however, this one checks each individual server separately so that you can see if there might be propagation issues.

Currently this here blog has a ranking of 6 and my main site a ranking of 5, which is not all too bad. I just hope it stays like that as lots of people are experiencing drops but let's see how it goes.

Another thing I am noticing is that Google is indexing my blog extremely quickly. If I post something now, it should appear on Google literally in a matter of hours, if not minutes. Once, I posted something and found it again by accident on Google less than 30 minutes later. Wunderbar!!!

Anyway, check out the search for Stii-shirts. A blog post I created about 14 hours ago already appeared. Here is a screenshot I took earlier today, just as proof:

Screenshot: Google Search Results Page for "stii-shirts"

I wonder how this actually works. Firstly, their spiders are probably visiting my blog often because I post often and they know it. Secondly, Google has been searching for RSS/RDF and Atom feeds for some time now (or at least, they used to already quite a few years ago, and I assume they still do). Thirdly, this blog is hosted on Google's servers, so that might have something to do with it as well.

All-in-all, interesting shit nonetheless!

George Freedom Toaster Updated

Image: Freedom Toaster Site Logo

Ok this has been hanging on my to-blog list for much too long!!! Many apologies, guys! My list is very-very-very-very (did I mention "very"?) long after the exams so I am severely behind.

As many of the local open source enthusiasts already know, the George Freedom Toaster has been updated recently. Jason and Brett came through to George on the 21st of October to refurbish our toaster, now hosted in our very own Freedom Café at the Red House in Courtney Street.

Great meeting you guys after talking online so long! So sorry I couldn't stay to chat!!!

Unfortunately I was quite sick so could not stay for too long. It's actually funny because the previous evening South Africa won the Rugby World Cup and I was probably one of the very few people that were actually not drinking (I watched Rugby with one eye while coding with the other - how's that for multi-tasking!).

Anyway, the toaster is in ship-shape again and loaded with all the latest goodies including Ubuntu Gutsy, so go check it out when you find yourself in the area!

Please see Jayx's post Been there, done that and all I got is this stupid t-shirt for more info.

And Finally, The 27 Dinner Cape Town October 2007 Report-back!

Photo: Mugg & Bean at Canal Walk

First of all, major apologies for only blogging about this so late! I feel terrible! I just had so much to do the last week I really didn't have the time to sit down and compose a long blog post and opted for the smaller, "easier" ones instead in the meantime.

So as all my regular readers will probably know by now, teh_oubie Jayx and I went to Cape Town to "pwn teh noobs" properly over the weekend of the 27th/28th October. Unfortunately, there wasn't much of that going on as we didn't really meet too many noobs, but we did meet a lot of awesome uber-leet pwnerers!!!

Photo: Jayx at Castello's

Friday morning we left George for Cape Town. After we arrived, one of the first things we did was to make a draai at the Shuttleworth Foundation's really fantastic facilities over there. We saw Jason Hudson (in George circles most well known for the Freedom Toaster project) again and he was kind enough to give us a guided tour of their beautiful building and magnificent garden. Their interior decorator deserves an award in my opinion, and their garden designer as well!

Later the afternoon I met up with Dave Duarte and Eric Edelstein at E2. Great place to hang out, I must definitely come again to take a better look at the wear next time I'm over there!

Dave also showed me their new offices where I got to chat with Max Kaizen again. These guys roll around on inflatable gym balls (whatever they are called) just like the people over at Google - really cool! Thinking out of the box, I like! :)

Photo: The FIRST Lego Robotics Competition Awards Ceremony

Saturday we went to the MTN Science Centre. They had a FIRST Lego Robotics competition going on (you can read all about it on their blog). I wish we had a place like that in George! We found some very interesting gizmo's, gadgets and "thingys" over there.

Photo: WTF?! at MTN Science Centre

In the evening we obviously went to the Cape Town 27 Dinner, Jayx and me wearing our Freedom Toaster t-shirts (although I had a jersey on so you couldn't really see mine) and Stii wearing one of his now-famous "Stii-shirts".

I got to meet so many cool people in person I only knew online before! First I sat down with Robynn Burls and Scott Hayes from Encyclomedia. Then I met Vhata and things just started rolling from there. I finally got to meet (in no particular order) Neil Blakey-Milner, Jason from Zoopy and Kerry-Anne from the Cape Town Daily Photo blog.

Photo: Me at some industrial computer terminal

I also made some new friends with Marc Zandhuis from CapeTownMagazine.com, Simon from the South African Fring Blog, Jeremy Thurgood, Tania of ProjectManagement.co.za, Brandon Golding of Optimal Information Systems, Randolf Jorberg and many more.

Of course I also spotted the "usual suspects" like Rafiq as well as the wine legends Graham Knox and Chris Rawlinson from Stormhoek again. Was great to catch up with Brett from the Freedom Toaster project too! Can't wait to get some more time on my hands to throw back into that project if I can.

Belinda and Stii also being there got our George representation up to a respectable four people. Hopefully we can even convince more people to come with next time, then we'll really show the Cape Town guys that George is way hotter than they think. :)

I'm sure the above lists are way incomplete, but please remember, this was my first 27 Dinner so there was a lot for me to absorb. If I didn't remember to list you here, please don't be offended, but comment so that I can add you! :)

Photo: Me eating pizza at the Dros at Canal Walk

I am definitely planning on attending the next 27 Dinner in Cape Town as well! I might even attend one or two in Johannesburg but going all the way up is a little more difficult than shooting over to Cape Town. Will see how things go.

As things are looking right now there's a 50/50 chance I might attend the Cape Town November 2007 Geek Dinner too, but this will become clearer in the next week. Will blog again if things look favourable for me to come over. I really want to attend the next South African Joomla! Day too! So many events, so little time!

For more information about the "George invasion", please see Jayx's post Road trippin’ … like a motherfucker and Stii's post 27dinner in the mutherciti - thank you everyone!. If you would like to know what we were treated to, please see Rafiq's post 27Dinner Cape Town - The tourists are here!.

Photo: Nikki and Jayx with at Canal Walk

Open Letter to MXit

Dear MXit,

Firstly, I want to congratulate you on and thank you for your products and services. You popularised affordable mobile communication in South Africa and deserve a medal for that in my opinion, irrespective of what any of the politicians might think or say.

There has however been something that has been bugging me for a while now. One of the things I like about MXit most is its integration with other instant messaging protocols such as Jabber/XMPP. I used to communicate to people on MXit often using Jabber from my desktop computer. However, for the past couple of months it seems like the XMPP gateway was taken down.

Apparently you are only allowing messages coming from Google Talk's servers. This is cool, but there are also a lot of people (like me) that make use of the local jabber.obsidian.co.za server. Would there be any possibility of whitelisting this server as well on your gateway?

Many thanks in advance for your time; looking forward to your reply!

Kind Regards,

Charl

CLUG Park Avatar

Jonathan Carter today poked me on #clug to get my act together and get myself a proper avatar for the CLUG Park. It's about time so I thought now is as good as ever.

My first attempt looks something like this:

Image: My first attempt at an avatar

I thought it's probably a better idea to attempt to at least try to act like I'm actually a little bit sane. So therefore, my second attempt:

Image: My second, more successful attempt

Despite a lot of help from the #clug people like Stefano and others, I didn't manage to set the semi-transparency on the above image using the Gimp. Although it's a very powerful tool, it's complexity infuriates me. Thanks anyway, guys! One day I'll probably go for lessons and upgrade. :)

Pro at Cooking

I am a really big fan of Pure Pwnage. If you watched a couple of the episodes, you have to be familiar with Dawei (or "Dave" as us white barbarians call him).

Dave obviously pwns at cooking. He makes uber-leet French toast even teh_pwnerer (Jeremy) can't refuse.

He did a short cooking show at the end of the previous Pure Pwnage episode (Series 2 Episode 2) but now he has his own show called Pro at Cooking. Absolutely hilarious; the food looks great, but otherwise he gives a good demonstration of how not to run a cooking show! :D

PHP CamelCase Implode

I thought, just to be thorough, I at least need to come up with a CamelCase alternative to implode to compliment the PHP CamelCase Explode posts (see Version 1.0 and Version 2.0 of my algorithm).

<?php

/**
 * Does the reverse of explodeCase() - takes an array as input and combines all the elements back into a string
 * according to CamelCase format. Uppercase characters are used as the separator between the various segments
 * so all other characters will be taken to lowercase by default (see the preserve parameter). Therefore this
 * will not normally preserve the case of the original strings in the array.
 * @author Charl van Niekerk <charlvn@charlvn.za.net>
 * @param array $array The original array to be converted
 * @param bool $first Should the first character also be taken to uppercase? (e.g. camelCase versus CamelCase)
 * @param bool $preserve Preserve the uppercase characters in the original array and don't convert them.
 * @return string The resulting string combining all of the array elements into CamelCase format.
 */
function implodeCase($array, $first = false, $preserve = false)
{
  // Initialise the string to be returned
  $string = '';
  
  // Loop through each element in the array
  foreach ($array as $i => $segment) {
    // If the preserve case option has not been set
    if (!$preserve) {
      // Make sure the current segment does not contain uppercase characters
      $segment = strtolower($segment);
    }
    
    // If it isn't the first segment or the resulting string must start with an uppercase character
    if ($i || $first) {
      // Capitalise the first character of the segment
      $segment = ucfirst($segment);
    }
    
    // Add this segment to the end of the string
    $string .= $segment;
  }
  
  // Return the resulting string
  return $string;
}

?>

Example of use:

<?php echo implodeCase(array('i', 'PwN', 'tEh', 'nOObs')); ?>

That will output iPwnTehNoobs.

<?php echo implodeCase(array('i', 'PwN', 'tEh', 'nOObs'), true); ?>

That will output IPwnTehNoobs.

<?php echo implodeCase(array('i', 'PwN', 'tEh', 'nOObs'), false, true); ?>

That will output iPwNTEhNOObs.

Jaiku, I'm back!

Back in January I registered with Jaiku after Mark Wubben inspired me with his Ruby status updater. I stopped using it though as it did not have a Jabber bot and picked up on using Twitter instead. However, recently defZA told me that Jaiku now has Jabber integration so, after all this time, I started using Jaiku again. You can see my Jaiku page and follow me (my username is as always charlvn).

In unrelated news, the FOAF Specification has been updated and I found some cool Microformats Icons.

PHP CamelCase Explode 2.0

In an update to yesterday's post PHP CamelCase Explode, here is a different implementation making use of regular expressions:

<?php

/**
 * Splits up a string into an array similar to the explode() function but according to CamelCase.
 * Uppercase characters are treated as the separator but returned as part of the respective array elements.
 * @author Charl van Niekerk <charlvn@charlvn.za.net>
 * @param string $string The original string
 * @param bool $lower Should the uppercase characters be converted to lowercase in the resulting array?
 * @return array The given string split up into an array according to the case of the individual characters.
 */
function explodeCase($string, $lower = true)
{
  // Split up the string into an array according to the uppercase characters
  $array = preg_split('/([A-Z][^A-Z]*)/', $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
  
  // Convert all the array elements to lowercase if desired
  if ($lower) {
    $array = array_map(strtolower, $array);
  }
  
  // Return the resulting array
  return $array;
}

?>

This should do the same as the other algorithm but just using less code.

Don't you just "love" the title? 2.0 is the new green.

Oh yes, and when I mention yesterday, I mean before I went to bed. It's technically speaking still the same day both in South African and UTC terms. There's only two hours of difference anyway.

PHP CamelCase Explode

I just came up with a function that would seem obvious but I didn't find an existing implementation yet. Here goes:

<?php

/**
 * Splits up a string into an array similar to the explode() function but according to CamelCase.
 * Uppercase characters are treated as the separator but returned as part of the respective array elements.
 * @author Charl van Niekerk <charlvn@charlvn.za.net>
 * @param string $string The original string
 * @param bool $lower Should the uppercase characters be converted to lowercase in the resulting array?
 * @return array The given string split up into an array according to the case of the individual characters.
 */
function explodeCase($string, $lower = true)
{
  // Initialise the array to be returned
  $array = array();
 
  // Initialise a temporary string to hold the current array element before it's pushed onto the end of the array
  $segment = '';
 
  // Loop through each character in the string
  foreach (str_split($string) as $char) {
    // If the current character is uppercase
    if (ctype_upper($char)) {
      // If the old segment is not empty (for when the original string starts with an uppercase character)
      if ($segment) {
        // Push the old segment onto the array
        $array[] = $segment;
      }
     
      // Set the character (either uppercase or lowercase) as the start of the new segment
      $segment = $lower ? strtolower($char) : $char;
    } else { // If the character is lowercase or special
      // Add the character to the end of the current segment
      $segment .= $char;
    }
  }
 
  // If the last segment exists (for when the original string is empty)
  if ($segment) {
    // Push it onto the array
    $array[] = $segment;
  }
 
  // Return the resulting array
  return $array;
}

?>

Example of use:

<?php print_r(explodeCase('IPwnTehNoobs')); ?>

This will give you the following:

Array
(
  [0] => i
  [1] => pwn
  [2] => teh
  [3] => noobs
)

Exams? Commented!

Image: Commented Comic

After a month of writing 7 exams (B.Sc. Software Engineering at Unisa), I a thoroughly gatvol. Therefore I now commented my exams for the moment and am going to take a two-week breather. Goodness gracious, great balls of fire!!!

Thanks to Jean-Paul for the heads-up on the above comic.

Coca-Cola: Brrr!

Finally Coca Cola manages to come up with a decent advertisement campaign. I would simply classify the television ads they ran the last couple of months as a lot of "sentimental shit".

Now they came up with this new ridiculous campaign about, well, "Brrr!" It is absolutely hilarious, I love it! Well done, Coke! Please never go back to that sentimental stuff. This almost reminds me of Smirnoff's ads with the Russians. I love them too! KTNXBYE

Copyright © 2004-2009 Charl van Niekerk. All articles are released under the Creative Commons Attribution 2.5 South Africa licence, unless where otherwise stated.