Helvensteijn.com

Life is like photography
we use the negatives to develop

Jump to menu

New code section

I just launched a new code section. I always had something like that in the form of some separate pages, but now I integrated it into WordPress, so it looks and behaves the same as the rest of this site.

I’ll have to see if I think any of the old projects are still interesting enough to bring them back to this new section, I haven’t decided yet. I did kick off with two articles, the first explains how I managed to get WordPress to save and display code properly, the other describes one of many inconsistencies in PHP, one I didn’t know about until yesterday.

With these custom post types, WordPress is getting quite powerful as a general purpose CMS, provided you know some PHP to bend it to your will. Only the menu system isn’t quite there yet. The “Code” menu item is not in it’s active state (chevron on the left side) on article pages in the code section as it should be.

H.264 vs. WebM

So, Google wants to be open and is going to drop support for H.264 video from Chrome in favor of WebM somewhere in the not too distant future. That’s interesting, I’m waiting for their announcement to drop support for Flash, too. Seriously, who made this decision? What in the world were they thinking? H.264 may have some patent licensing issues, but it is certainly more open than Flash.

So what are web developers supposed to do now? H.264 has become a de-facto standard on the web. A web developer can today offer a video in H.264 using the HTML5 <video> tag, and use Flash to play the same file as a fallback. Nearly every PC supports one or both. Nearly every mobile device sold today will happily decode H.264 in its video chip. Mobile devices that can decode WebM in hardware are scarce, to say the least.

Does Google really want web developers abandon a de-facto standard for something of less quality that isn’t nearly as widely supported? And with which a patent troll might still have fun someday? Or do they now have to serve two files for the same video, just to cater to Google’s whims? Microsoft’s Tim Sneath hits the nail on the head, if you ask me. One could opt to just offer the H.264 video and have Flash handle it in Chrome. But what if Google does drop support for Flash next year or so? Then what?

And what about users? Chrome’s already got quite a market share. If H.264 is no longer natively supported, Flash is the user’s only option on many sites. YouTube isn’t the only video provider out there. Most, if not all, serve H.264. Google could convert YouTube to WebM, but not all those others. And what if Google does drop support for Flash next year or so? Then what?

To me, this comes of as kind of lame. It seems like Google wants to push its WebM at the expense of its users, and throws the specifics in the hands of web developers so they can mop up the mess. Don’t be evil, anyone? And how about pragmatism? Openness isn’t everything, you know.

Just my two cents.

My own URL shortener

When I started using Twitter about a year ago, I soon realized that if I wanted to tweet about a new blog post on my site, I was going to need a URL shortener. Back then, I chose to use bit.ly’s services, and until recently, saw no reason to change that. Lately, however, it seems everyone is using his/her own domain for short URL’s, so I jumped on the bandwagon, too. :)

A few days ago, I acquired the domain hlvn.st, and now I also have the database structure and some simple PHP scripts in place to make the whole thing do its magic. For the keywords (the part after the / in the short URL) I decided to use 4 case-insensitive alphanumeric characters. That gives me 364 (1,679,616) possibilities, minus a few ones that I blocked for obvious reasons. Seems enough for the time being. If I need more, I can always go up to 5 or even 6 characters, giving me 60,466,176 or 2,176,782,336 possibilities, respectively.

Now that I have my own working URL shortener, I removed all the existing bit.ly short URL’s from my blog posts (they’ll continue to work so long as bit.ly exists, though) and replaced them with hlvn.st ones. I currently intend to only use hlvn.st for blog posts or other parts of my own web site, but in the future I may decide to use it for anything and everything I need short URL’s for. An API is already in place, so WordPress can automatically shrink its permalinks for new posts (like this one).

On a (completely unrelated) side note, let’s cut the two-thousand-whatever-crap. It’s twenty-eleven (twintig-elf for the Dutch among you), which is much easier to pronounce. :P

Christmas as an atheist

Technically, I’m an agnostic, in that I can’t prove or disprove the existence of a deity. But then again, I can’t prove or disprove the existence of the Invisible Pink Unicorn either, so I tend to think of myself as an atheist.

I’ve been asked by some why I would celebrate Christmas as an atheist. Well, here’s why. Anyone who’s actually taken the time to examine the history of Christmas, knows that originally, it had nothing to do at all with Christianity.

Originally, it was just pagan tribes celebrating the winter solstice, among other things. Christianity later took it as their own, linking it (wrongly) with the birth of Jesus of Nazareth. I imagine it was done because those pagans wouldn’t have converted to Christianity if their feasts had been forbidden.

Besides, Christmas has become a tradition in the Western world. It’s just one of the many holidays in winter time to make those short and dark days more endurable. I’d also qualify it more as a commercial holiday, rather than a religious one. Heck, which holiday isn’t nowadays?

So that’s why atheists can celebrate Christmas, too. It’s not a Christian holiday, it’s simply tradition. An on that note, I wish everyone, regardless of religion, a Merry Christmas!

10-10-10

Very cool date in geekdom, indeed! As Gizmodo points out, 101010 in binary equals 42 in decimal, which happens to be the answer to life, the universe and everything. 8) Obviously, this date cannot be missing from any nerd’s blog.

Among other things, it is also the atomic number of Molybdenum, rainbows appear 42° above the shadow of the observer’s head, it is the ASCII code for the asterisk (*), the Orion Nebula is the Messier object with that number, and the color with a hue of 42° at maximum brightness and saturation is a medium orange:

One year, one month and one day from now, it’ll be 11-11-11. Binary 111111 equals decimal 63. Seems to be a far less interesting number.

JavaScript Documentation

Have you ever been looking for some JavaScript documentation, but the top ten search results you got from Google were actually of mediocre quality at best? Well, apparently, that’s a fairly common problem. Some folks have picked up the idea to get Mozilla’s JavaScript documentation to be the first result for JavaScript related searches. The Mozilla Foundation is, after all, responsible for JavaScript, so they ought to know something about it.

I routinely use the Mozilla Developer Center to look up information on the topic, and I hardly, if ever, need to look elsewhere. Their DOM section is also quite extensive.

Considering the shady quality of some documentation (especially tutorials) out there, this is not a bad idea. Therefore, I’ll put the badge up here, too. Not that the traffic this site generates is going to be of much help to the cause, but every little bit helps, right? ;)

JavaScript Reference, JavaScript Guide, JavaScript API, JS API, JS Guide, JS Reference, Learn JS, JS Documentation

Helvensteijn.com v5

With the announcement of the previous redesign still on the front page, I’m presenting here Helvensteijn.com version 5. It’s not that I didn’t like the previous design, but it was a little busy. And since I was already thinking about drastically simplifying this whole site, I figured a simplistic design would go nice with it. :)

So what’s up with that simplification? It basically means that this site is now mainly a blog, as opposed to a bunch of pages with a blog somewhere in between. The main menu reflects this: it went from five items — three of which had submenus — to a flat menu with only three items (actually four, but one is visually pulled out of the menu and only appears when scrolling down). As for the blog itself: there are no more categories, only tags. I believe one kind of taxonomy is sufficient for a simple blog. Category archives still exist, but are indistinguishable from tag archives.

The pages that disappeared from the menu are, in fact, still there, but I just won’t link to them anymore. They are now just sitting there along with some other non-public pages. I’m not sure whether or not I’ll keep them online forever, but for now, nobody should see “404 Not Found” errors. If you do, please let me know!

Another thing I wanted to mention is that this layout is much lighter than any of the previous ones. No more than five seven images are used for the theme. I also got rid of jQuery. I like it, but I could easily accomplish all behavior — there really isn’t much of it anyway — without it. The most heavy parts are now the font used for the titles (still Museo) and the Shadowbox script (the thing that pops up images and stuff).

I made heavy use of CSS3 in this design. Rounded corners, transitions (currently supported in Safari, Chrome and Opera), opacity, web fonts, etc. I also made the switch from XHTML 1.0 to HTML 5. Makes the markup a bit more semantic, and also has lots of new form input types. There’s not much support for those yet, but iPhone and iPad present optimized keyboards for e-mail and URL input fields. And since I own both an iPhone and an iPad, I also added some optimizations for those (and other) mobile devices.

As usual, the best experience will be had with recent versions of Safari, Chrome, Opera or Firefox (in that order). IE 7 and IE 8 work, but everything isn’t as nice. IE 6 users are served with a basic stylesheet so everything is at least legible. I can’t say anything about IE 9 yet, but it should rival the other modern browsers.

To conclude with, here’s a screenshot of the previous design for comparison.

a screenshot of the fourth design

Fourth design

To compare with even older designs, those can be found here.

Update, Saturday, September 18, 2010

Got rid of Shadowbox as well. Made a simple implementation myself. It currently only works with images, and not at all in Internet Explorer (problems with positioning, have to look into that). But it is very small: barely more than a hundred lines of (non-minified) code.

E-mail disclaimer

I received an e-mail today with at the bottom the following disclaimer:

Email Disclaimer:

This email and any attachments are confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. This email and any attachments are also subject to copyright. No part of them may be reproduced, adapted or transmitted without the written permission of the copyright owner.

If you have received this email in error please immediately notify the sender by return email and delete the message from your system. Although this email has been checked for viruses and other defects, no responsibility can be accepted for any loss or damage arising from its receipt or use.

Oops, looks like I just disclosed part of it…

I’ve seen this kind of nonsense in e-mails before and generally ignore it, but on this occasion, it really stood out, being twice the font size of the message itself and all. I won’t go into the nature of the e-mail (which has more to do with decency than feeling threatened) but it wasn’t even of the kind that would warrant any disclaimer.

To make my point: I will not take seriously any e-mail containing such bullshit. I also feel in no way obliged to hold myself to those conditions. I never asked to receive the e-mail, nor was I given a chance to refuse agreement. Had I been given the choice, I would never have agreed. To explain why, let’s go over it sentence by sentence.

This email and any attachments are confidential.
Nothing wrong with that, but e-mail isn’t exactly known to be secure. Moreover, the recipient is usually informed of the confidential nature of the information before the information is actually received, not afterwards.
If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited.
An e-mail client must copy “the material” from the server in order for the disclaimer to be read in the first place, whether it’s the intended recipient’s e-mail client or not. And by merely reading the disclaimer, one is already using “the material”.
This email and any attachments are also subject to copyright.
Of course they are. I, too, have copyright on everything I produce. Happens automatically.
No part of them may be reproduced, adapted or transmitted without the written permission of the copyright owner.
Did sending the message constitute a written permission? Because my server transmitted it to my client, which then transmitted it to my screen, which transmitted it to my eyes, which transmitted it to my brain for processing. I’m sure it was adapted somewhere in all those reproductions.
If you have received this email in error please immediately notify the sender by return email and delete the message from your system.
To notify the sender, one would have to use “the material” to extract the sender’s address. Exactly that was prohibited a few sentences ago, remember? And I don’t delete e-mail that’s not spam, it gets archived for possible later reference. Disclaimer or not.
Although this email has been checked for viruses and other defects, no responsibility can be accepted for any loss or damage arising from its receipt or use.
Sure. Whatever you do, never take responsibility, for anything. Way to go!

Now, I happen to be the intended recipient in this case, but still. It most certainly is not the recipient’s responsibility to make sure he/she is in fact the intended recipient. That’s entirely up to the sender, even more so if the message is confidential as claimed.

Last but not least, a tip: When requesting a favour, it helps not to include such draconian bullshit. Kinda takes away any and all incentive to help.

Quietness

I’ve gone a bit on the quiet side again. Dunno, just not much interesting to report lately I guess. But I felt like posting anyway. ;-)

I did, of course, see the new iPhone being unveiled last Monday. Call me a fanboy if you will, but that thing is just awesome. And yes, I know most features already existed in other phones, but if you ask me, when Apple finally implements something on the iPhone, it’s usually worth the wait. And then, there’s the screen. My dad has an HTC HD2 which sports a gorgeous screen (about 4″, 800×400px), but if the reviews I’ve read are any indication, it’s nothing compared with what Apple calls the “retina display”. To summarize: I can’t wait to own one. :-P

Then, something entirely different, I’ve been messing around with The Sims 3 Ambitions for a couple of days. I wouldn’t go as far as to say it’s even cooler than World Adventures, but it is very cool nonetheless. :-)

Oh, and it’s also my birthday today, but who cares. :-P

Antitrust investigations?

Apparently, the question has arisen wether or not Apple should be subjected to an antitrust investigation. In their youngest SDK license terms, Apple explicitly forbids development of iPhone OS software in languages other than C, Objective C, C++ and JavaScript. That is, apps written in other languages (such as Flash/ActionScript) will no longer be accepted in the App Store. Rumors have also spread that the same goes for apps containing 3rd party ads (which is basically bullshit, since I just got updates for a few ad-containing apps).

So here is the big question: Why, for crying out loud, is it even being considered to investigate Apple in these cases? As I recall from economics class in school, antitrust legislation was originally introduced to prevent monopolists from abusing their market dominance.

In what market does Apple have a monopoly? Surely not in smartphones, if anyone comes close it would be Nokia. Not in ads either, I would say Google has a lot more market share there. So what is it? All that’s left then is the iPhone OS platform itself, but I don’t think that constitutes a market on its own. If any, Apple might have a monopoly on the MP3 player market, but you don’t hear anyone complaining that an iPod nano doesn’t run Flash.

So, Apple has no monopoly on anything related to the iPhone. And yet, these antitrust investigations (or at least pre-investigations) are apparently already underway. Am I the only one who thinks that’s a teeny bit smelly? Am I the only one that thinks Adobe is behind all this?

Frankly, I think Adobe should tuck its tail between its legs and take a hike. For one, Apple is right, Flash downright sucks, especially on non-Windows platforms. Secondly, when Apple needed Adobe the most in the mid 1990′s, Adobe just dropped Apple like a rock and said: “We’ll be focussing primarily on Windows instead of Mac OS from now on”.

Now, some 15 years later, Apple is in the position to bite back with a vengeance. I can’t really say I blame them. In fact, if Apple manages to kill off Flash altogether, you won’t hear me complaining. Adobe had its chance, they couldn’t come up with a (non-crippled) version of Flash that would decently run on a smartphone, so why should Apple be punished for saying: “Sorry, we don’t want that crap on our platform”?

Oh, one more thing: Isn’t it Adobe that won’t hesitate to tell us all that almost every video on the web requires their Flash platform to play? They’re not in any position to be complaining about monopolies.

Just my two cents.