I love WiFi! (well, actually...)

I mean, you gotta love it!

A picture is worth a thousand words:

I love WiFi! (well, actually...)
Working on the balcony

Okay, so much for the showing off. A few hours later:

  • I had to switch to a "High Contrast" Windows color scheme (now I know what these are for!) to be able to see something with my sunglasses. And without the glasses, the sun hurts my eyes!
  • I had to move the table more in front of a window to get better signal strength...
  • I had to plug in the power adapter since WiFiing through the walls really sucks a lot of power...
  • I had to clean the screen at least four times before the sunlight stopped reflecting on the dust... (sorry for sounding like I had never tried to open a laptop outside :.)
  • And now the neighbours are mowing their lawn! Damn it!

Yeah, next time they tell you nice stories about WiFi in the magazines, don't believe what they say! :-/

PS: This is just for fun, I still enjoy WiFi very much. Example.

PHP Output buffering and ob_handlers

PHP has some nice features to do output buffering. You just call ob_start() and anything you output (except headers) does not actually get set back to the webserver (and thus the browser) until you decide it. As the manual puts it "This can be useful in several different situations, especially if you need to send headers to the browser after your script has began outputting data."

One particular use of this feature is to pass an "ob_handler" callback function as an argument to ob_start(). This is supposed to let you do "kewl" post-processing operations like: gzip compression, adding an ETag, adding content-length of your whole output.

Crap!

There are only two situations where ob_handlers are useful:

  • When your webserver can't take care of this for you. But you know, you should really consider switching to Apache, which already has modules to handle all that, and even better: unlike PHP ob_handlers, it can do gzip compression progressively without waiting for the whole page to have generated! :crazy:
  • When you are in desperate need for marketing arguments to write a book on ~` Advanced PHP '~ ! >:XX

Charset conversions (i18n)

Yesterday, I came accross this interesting table which lets me know what conversions I need to do when I paste text from Word into a textarea and further want to use this text on the web...

To be accurate, this table is useful for conversion from the default windows charset (windows-1252 aka CP1252) to the default web charset (ISO-8859-1 aka Latin-1). Nethertheless, this allowed me to check the conversion in my b2evolution software and I noticed that it was missing one conversion (in a total of 27).

Anyway, the world actually extends way beyond cp1252 and Latin-1, so how would one deal with other languages? :?:

For example, how do I convert Latvian from Windows-1257 to iso-8859-13 (close match) ? Or Russian from Koi8-r to iso-8859-5 (funky match) ? Check out this awesome character set database provided by the Institute of the Estonian Language. (Wouldn't it make sense if unicode.org provided this? :crazy:)

By the way, how do I know what charsets are to be used for a particular language? Here's a page by the W3C, but it's a little sparse... Another one.

Atom feed frustration

Today I thought it was time for me to catch up on Atom and add support for this format to b2evolution.

Okay, done. Here's my Atom 0.3 feed. And it validates too.

But I had to leave out a link to comments as well as my categorization! There's no support for these in the spec yet. What a shame! :no:

And finally, the biggest frustration: checked out my feed in the popular SharpReader aggregator... and it turns out it doesn't support "multipart/alternative" content. Bleh! >:XX So I had to leave that out too...

So at least, we have b2evolution supporting Atom in croncrete terms now... but if you ask me, RSS 2.0 is still the most useful syndication format! :roll:

All I want is a damn grep tool!

Is it me or doesn't Windows even include any form of a grep tool? Not even a full grep, but just search and replace of litteral string in files? Not even in recursive, nor in multiple files, just in one damn file? Something I can automate from the command line? Doesn't look so!
Microsoft actually has such a tool. It's called MUNGE. You want it? Buy the resource kit! >:XX Morons!

Then you go google for it... and you find half a dozen beta projects that call themselves things like 'grep for windows' or 'windows grep' or 'wingrep' or whatever name they are smart enough to come up with, but none of them actually runs from the command line! >:XX Morons!

I found one, exactly one tool that does what I need (and also a lot more) and that is immediately available (unzip the EXE and you're ready B) ). I want to share it with you: it's called XchangeCL.

And you know the irony: they don't even call that "grep" in any way! :|

Actually, it's too late right now to search for alternatives, but this one is a $25 shareware... :-/