Software

Can't find what you're looking for? Search the archive!

Technorati pings

Software

Unless I messed up my code, this journal should be sending Technorati pings again. I'm still getting reasonable traffic from the site for older entries so it should be worth it to get listed there again.

(On that topic, I'm considering to return to a more distributed blogging effort, with different blogs for different areas of interest, in order to build more dedicated audiences for each topic. The new profile/music site already is a step towards such a setup, after all.)

Anyway, here's the PHP code that (should) send a proper ping to Technorati:

class Ping
{
function httpPost( $host, $port, $uri, $data, $userAgent = "KikiCMS/0.99" )
{
$url = "http://${host}:${port}${uri}";

$fp = ( $host, $port, $errno, $errstr, 5);
if (!$fp)
return false;

$out = "POST ${uri} HTTP/1.1\r\n";
$out .= "Host: ${host}\r\n";
$out .= "Content-Type: text/xml\r\n";
$out .= "Content-Length: ". strlen($data). "\r\n";

fwrite($fp, $out);
fwrite($fp, "\r\n");
fwrite($fp, $data);
fwrite($fp, "\r\n");
fpassthru($fp);

fclose($fp);
return true;
}

function technoRati( $title, $url )
{
$uTitle = htmlspecialchars($title);
$uUrl = htmlspecialchars($url);
$xml = "\n"
$xml .= "\n";
$xml .= "weblogUpdates.ping\n";
$xml .= "\n";
$xml .= "\n$uTitle\n\n";
$xml .= "\n$uUrl\n\n";
$xml .= "
\n";
$xml .= "
\n";

Ping::httpPost( "rpc.technorati.com", 80, "/rpc/ping", $xml );
}

Include the class when you save (insert) an entry with Ping::technoRati( "My blog", "myurl" ) and you should be ready to go.

The singularity, inevitable

Software

Last week I finally read The singularity is near (2005) by Ray Kurzweil, after having been interested in the subject for a while. Neil describes it as a "utopian freako book", but even though Kurzweil is definitely optimistic his thoughts focus not on the benefits of the singularity but rather the inevitability. (The technological singularity is a future event where technological progress increases so rapidly that the world as we know it, as will as mankind, will be changed beyond recognition.)

Almost everyone I talk to agrees with the basic concept that our technologies improve at an exponential rate. But mention the prospect that we'll be able to dispose of our biological bodies in just half a century time and most people will disagree because it is a) impossible and b) not desirable.

I'm not an expert on nanotechnology so I can't easily agree nor disagree with the timeframe stated by Kurzweil. But I don't believe it's impossible to remove our dependency on biological parts. Most technology we take for granted in 2007 used to be impossible. And we already live in a world where artificial organs are commonplace. There's no reason to assume our brain, although vastly more complex, will be immune to efforts of reconstruction.

That leaves us the idea that living non-biologically (uploaded in a computer) or as a cyborg hybrid is not desirable. But let's take a look at reality: even when the majority of people are reluctant to adopt new technologies, the generation that is growing up with them most certainly are not. Take the mobile phone for ultimate example: my pre-WW2 grandparents don't even have one and my baby-boomer parents can barely use it to send text messages. In the meanwhile, my generation enjoys features such as Internet access, music and picture messaging. And being nearly thirty, I didn't even grow up with cellphones. Those who did never even had to make a choice whether they are desirable or not: the technology simply is. The same will apply to our step towards non-biological bodies.

(I'll expand on the generation gap in a future post. Adding a "plus 1 generation" safeguard to Kurzweil's predictions make them much more plausible because the majority of criticism will be rendered obsolete when taking into account that mankind will not just invent future technologies, but eventually also grow up with them.)

Fun Flash games

Software

We never waste time at work. Never. So we never play:

Seriously. Never.

Integrate AdSense with Google Analytics

Software

Yesterday I found a great resource: the ability to track AdSense clicks in a Google Analytics account. This gives publishers a more advanced way to track their best-performing content, as well as the ability to analyse cross-segment performance. As a further benefit, this makes URL and content channels in AdSense a bit redundant, allowing publishers to focus on style/shape/positioning channels in the actual AdSense reports.

Giving up on MSIE6

Software

Soon I will be making a bold decision: I'm going to stop trying to make my new web sites work in Internet Explorer 6.

First of all, Internet Explorer 7 is a huge improvement. No serious hacks but only a few tweaks and workarounds were necessary to get my designs working in it. Believe it or not, a single static CSS file now actually gives me exactly what I want under all of MSIE7, Firefox , Opera and Safari/Konqueror. MSIE6 has really become the ugly duckling on the web and now that even Microsoft has a somewhat reasonable browser, even Redmond fanboys can escape its CSS horrors.

Also, Microsoft is doing everything it can to get a larger install base for MSIE7. MSIE6 has dropped from nearly 100% (amongst IE users) to 65% in the first few months. This puts the overall market share of MSIE6 under 50% - and falling with every use of Windows Update or Vista install. Consider how MSIE5.5 is already below 1% in market share and it's not a bad assumption something similar will happen to MSIE6 in a year time. And why spend time on getting things to work with obsolete software? This is 2007, where updating software is infinitely easier than it was in 1996 when 14k4 modems roamed the world.

So this is where I draw the line. Bye MSIE6.

Javascript image scaling

Software

If there's one feature I'd like for Javascript to be able to do is to scale images. And I don't mean dynamically adjusting width/height when displaying images, but actually changing the JPEG/PNG data into a smaller image for form uploads.

I've seen all too often that users of a CMS will upload an image straight from their digital camera or scanner and therefore submit a megabyte-sized file. It's easy to scale it on the server end (because most web sites won't display the image in full size), but wouldn't it be nice if it could be transformed on the client side first? It would save a lot bandwidth and upload time.

If anyone knows if this is possible, let me know.

MSIE Javascript workarounds for table manipulation

Software

Sorting tables on the fly can be fun in Javascript, especially when working with standard-compliant browsers. However when MSIE is thrown in the mix, the following workarounds are key to know:

If insertRow doesn't work properly or at all, just use insertBefore(newRow, targetRow). If you actually need to insert after, use targetRow.nextSibling if it is not null and otherwise simply use tbody.appendChild.

If newRow.innerHTML assignments are working, then just move the children of the original row to the new one instead. Like this:

var cells = oldRow.getElementsByTagName("td");
var i;
for ( i=0; i {
var td = cells[i];
newRow.appendChild( td );
}

Note that the counter is not incremented: appendChild removes the element from the source so you'll always be operating on the zeroeth child.

These techniques make sure your table manipulations start working in both MSIE/6 and MSIE/7, while everything is still fine and dandy on KHTML (Konqueror/Safari), Firefox and Opera.

MSIE/6 Hacks

Software

The past days I've discovered a couple of hacks/workarounds for CSS bugs in Internet Explorer. Something tells me I've already discovered each one of those a million times before so I'd better write an entry about them so I'll have a good reference for the future.

Developing web sites is a lot nicer when things suddenly start to look the same in all browsers.

Still angry with MSIE

Software

It's been a (short) while since I've filed a complaint about the dead parrot called Microsoft Internet Explorer, so here I go again:

It is extremely frustrating when a piece of craftmanship (in this case Javascript code) conforms to all known standards in the solar system and then MSIE says "nuh-uh, I have my own rules so your standards-compliant crap is not going to work". Trying to do some magic with insertRow on a TableElement? Tough luck: both MSIE/6 and MSIE/7 will fail.

Maybe I should start writing pages in plain text.

eCPM Calculations

Software

Those of you who've been talking to me recently must be aware that I've been working hard on a new project, based on the profile, calendar, photography and journal functionalities of this site in a far more professional way.

Even though a large part of the motivation comes from a private passion for technology and music, there's a chance that the new site would become more than a hobby. It could very well generate substantial extra income on top of my 9-5 and possibly even serve as a complete substitute for work. Ergo, I did some calculations and made a graph showing the number of pageviews a month required for certain amounts of income, based on pessimistic, expected and optimistic levels of Google Adsense eCPM (average advertisement income per thousand banner impressions).

Bottom line? A tenfold increase of visitors would give me a free trip to London or new Ed Hardy shoes every month. A twentyfold increase would allow me to start working part-time. A hundredfold increase would let me retire alltogether. I'm not convinced that the last option is a realistic one, but the first two sound like something I can pull off.

Definitely to be continued. :-)

(PS: if you want a sneak preview, drop a comment or send me a text/mail.)

(PPS: Arjan, if you read this.. is Operation Valkyrie still on the radar?)

Design failure by design

Software

Earlier this week I was a happy man. I've been working on a new web site and everything worked as expected. The Javascript/AJAX form updates worked wonderfully. The CSS stylesheet rendered exactly the same in every major browser I could get my hands on (Firefox, IE6, IE7, Safari, Konqueror). Life was good.

So what happens the very first time I show the page to a random friend? Yes, indeed, you guessed right. The design looks like crap.

I seriously wish I could just tell potential users of the site to get a recent, decent browser.. but the site targets a large audience so marketshare cannot be ignored. So it's back to the drawing board and back to endless testing to ensure even older Microsoft products render the site a-okay.

Leaguetable for Magic: The Gathering

Software

I just discovered that even though it was not written with the card game in mind, my leaguetable utility is also excellent for generating a player schedule for a Magic draft night. :-)

I love it when software I wrote back in 1999 saves me hours of work, it would not have been nice to play Sudoku in a spreadsheet to get the same results as some clever math from last century.

mod_rewrite Happiness

Software

Once in a while you write some code or a regular expression that makes you proud. Today has been one of those days. I'll admit that what I wrote isn't really special to advanced programmers, but five-minute one-liners that do the equivalent of what an intern could do in a hundred lines after a week make me smile:

RewriteRule ^/users/([^/]+)(/|/([^/]+)(/|/([^/]+)(/)?)?)?$ /users/index.php [L,E=profileId:$1,E=sectionId:$3,E=pageId:$5]

If you understand this, cool - definitely going to beat the average MySpace URL don't you think?

If you don't understand, no worries. You will at least understand why I answer mates and family with "computer stuff" when explaining my job.

Mobile MSN

Software

Skint? Out of batteries? No problem. Add to your MSN list: I finally have got Sony Ericsson's "My Friends" instant messenger working on my (W810i) phone using my regular GPRS settings and a Smart VAS account (will try Yamigo another time). Wicked. This feature definitely beats having to use the WAP interface for eBuddy.com because it runs in the background and interacts with the regular event/alert functions of the phone, while having an optimised interface (T9-enabled) that simply means chat and click instead of having to enter form inputs and submitting them separately.

Rob's a happy mobile user tonight. IMPS rules!

Crippled tags update

Software

Small update to my previous post on this matter: I now actually explained the problem to Powweb (as opposed to reporting it, they need some help sometimes). Hopefully all of my tags will work again soon, including Panic! At The Disco.

Avoid eLife products

Software

Quick warning: do not purchase products made by eLife, such as the K8 multimedia keyboard. First of all, these products simply do not work out of the box under Linux:

Aug 29 12:35:08 jadzia kernel: hub.c: new USB device 00:1d.1-1, assigned address 6
Aug 29 12:35:08 jadzia kernel: usb.c: USB device not accepting new address=6 (error=-110)

Secondly, they don't work under Windows either. The single keyboard that did work only did so for half of its keys.. pretty useless.

But the real shocker is customer support: the web site advertised on the packaging, www.elife4me.com, is "under construction". Google's cache shows a register-spam page ("universal life etna love quote best term insurance death co.") because the domain has expired. And the manual mentions Windows 98 which confirms my feeling that eLife is bankrupt, for good reasons, and Africa is only finding out right now (as am I).

Crippled tags

Software

If you're attempting to access tags such as "Panic! At The Disco".. tough luck. This is what you'll get:

Invalid character in /tags/panic!+at+the+disco.html

The URL can only contain alphanumerics plus the following characters: /.,=:_-

While I understand the safety concerns behind this setup, it is a major regression from Powweb to break RFC 1738/2396 so blatantly. I'm demanding a fix, or I'm taking my money elsewhere.

Find the easter egg!

Software

Nothing new here: I'm still working on new site features, one of them being the expansion of journal entries from a private system to one everyone can enjoy. Unfortunately going from one dedicated journal to a setup where every user can post might cause some regressions. To avoid these, I've posted a journal entry as another user to test properly handling multiple authors.

Try to find a reference to the entry.. if you do, I'll enable the journal beta for your user account! (Alas, no other freebies at the moment, still working on a marketing plan and budget.)

A small hint: the entry is called "Harry Potter and the Invisible Easter Bunny". A small warning: it might be hard to find because at this point any public appearance outside of the daily/weekly e-mail digest would be considered a bug: the easter egg entry is not supposed to show up on my journal anywhere.

Mocking Debian

Software

Taking from an instant messaging conversation with Neil:

Neil: did debian come to a decison on that
Rob; they will when linux 3.0, gcc 5, kde 7 and X99 are out

I know, only funny if you know a bit about Debian release schedules.

Top paying keywords?

Software

I found a page which claims to list the 100 top paying keywords, at least for their (Search7) network delivery. And guess what? It's all pills and gambling: "tramadol online", "buy tramadol", "cheap tramadol", "buy phentermine online", "black jack card game", "buy soma", "online gambling", "online casino", "online poker", "texas holdem".. and so on, and so on.

The on-line advertising world seems to miss out on Nigerian scams, mortgages and webcam teens, but other than that I spot an interesting correlation with popular topics in e-mail spam. One might wonder if these are sometimes the same people, although I doubt it: spam appeals to some because it is dirt cheap, compensating marginal conversion rates with bulk numbers. CPC rates of over $6 however indicate the opposite: strict targetting, to obtain optimal conversion rates. Perhaps some people run hybrid campaigns, but to me there seems to be a completely different business attitude between the two marketing efforts.

Aside from the fact that spam sucks, of course.

© Copyright 1995-2007 Robert John Kaper. All rights reserved.

Tom has more friends but mine are prettier! (#1/1)