PowerDNS under MacOS X 10.6.4

Thanks to an entry on LSD::RELOAD I was finally able to get powerdns to run on my MacOS X 10.6.4 system.

Out of per­so­nal pre­fe­rence I wan­ted it to run with post­gresql instead of mysql, so there was a little figu­ring out invol­ved in how to get things going wit­hout the mysql dri­ver — appa­r­ently, the make files only take one data­base backend and do not com­pile mul­ti­ple dri­vers at the same time.

Also, secon­dary soft­ware omes from Mac­Ports, so paths had to be appro­pria­tely matched. And then, there was some hand-tweaking of Make­files because –Bsta­tic, –Bdy­na­mic and –lcrypt war­rant spe­cial handling.

This leads to the fol­lo­wing com­mand line:

CXXFLAGS="-I/opt/local/include -DDARWIN" \
./configure --with-pgsql-lib=/opt/local/lib/postgresql84 \
--with-pgsql-includes=/opt/local/include/postgresql84 \
--prefix=/usr/local --with-modules="gpgsql"

Requiring code in PHP

While wri­t­ing the code to handle a small form in PHP, I just rea­li­zed that I have a very bad habit — and many just do the same.

When I write a new file, I place all the includes at the very top, before anything else hap­pens. But in my cur­rent script, there are many code paths that do not require the major part of all those inclu­des. Only in one spe­ci­fic instance do we require the bulk of the code. Pre­viously, any invo­ca­tion of that script would have got­ten all the code drag­ged in. Now, I’ve moved the include to just where I need the code (basi­cally, going into a spe­ci­fic case of a lar­ger switch state­ment … And the load on the web ser­ver has just been redu­ced, wit­hout any change to the functionality.

So why do we all put the inclu­des on top?

eBooks

So there’s a new Kindle that looks quite attrac­tive. Many things on the Kindle platt­form appear quite nice: You can read the Kindle books on mul­ti­ple devices (the Kindle app for iPhone and iPad just as well as your desk­top and lap­top com­pu­ter) and have your library avail­able on all devices equally. The way I under­stand it, you even see your own notes and pro­gress on your books on all plat­forms; this is how sto­rage should be done (local copies for off­line, but basi­cally be acces­si­ble from any­where).
And yet, as with many other of the new media con­sump­tion gad­gets, you get a big bag of con­cerns that at least still give me second thoughts on all of this.
For one, I don’t want to leave such a well-documented trail of what I read, when and for how long. I know that by shop­ping at Ama­zon, I alre­ady leave quite the trail about my rea­ding hab­its, and buy­ing stuff on the Kindle does not change that all too dras­ti­cally. And still, I feel that the more data Kindle trans­fers to Ama­zon, the less com­for­ta­ble I am with rea­ding stuff on such an elec­tro­nic gad­get.
Also, we’ve seen that Ama­zon is able to change the library on the Kindle wit­hout your appro­val or inter­ac­tion. This gives an ent­i­rely new mea­ning to the con­cept of „purchasing a book.“ It’s actually much more like a public library: You pay for the pri­vi­lege of being allo­wed to read a book, but only little of the expe­ri­ence is under your con­trol.
And that brings us around to the next point: I want to be able to pass on books. Once I’ve read them, I want to have some­body else have them. Or I want to be able to loan them; eit­her just for an after­noon of lei­sure or for others to com­ple­tely read those books. That’s just not pos­si­ble on the Kindle. But then, I also think that it’s not pos­si­ble on iBooks, so that levels the play­ing field.
For the time being, I just might be stuck with paper books.

Software I like: Evernote

I’ve been a user of Ever­note for quite a while now, and I must admit that I’m also one of the lovers of that ser­vice. It does data sto­rage the way I felt it should be done. You can access your notes via local app­li­ca­ti­ons on desk­top and lap­top, and that works well. I per­so­nally use only the Mac­in­tosh ver­sion (but that on mul­ti­ple machi­nes) for work­sta­tion use. But I can also access my data via the iPhone app­li­ca­tion, or with the ever­note web app from just about any­where. There’s also a Win­dows ver­sion avail­able, but I’ve never played around with that.
I jour­nal all the ideas that are on my mind wit­hin Ever­note; that way, I am sure that I have all ideas that might war­rant revi­sit­ing at a later point are caught, because it’s just so easy and quick to write them down and have them stored in a way that I can access from any­where.
I know that there are many more fea­tures (uploading PDFs, cap­tu­ring images and sto­ring them, image reco­gni­tion and many more), but none of those have pro­vi­ded import­ant to me. The fact that I can get to all my notes from any­where, and with soft­ware that makes using the sto­rage easy and fast — it does feel like it’s a local app­li­ca­tion, because it is — that’s what has me con­vin­ced.
And the best thing? It just works.
Highly recommended.

Home media integration and other televisory matters

Fol­lo­wing up on my last pos­ting, there are a few more things that come to mind when thin­king about the future of TV sets. With all those video strea­ming ser­vices that I want, I also would like inte­gra­tion with my lapop (or iPhone or iPad, or wha­te­ver other media con­sump­tion devices there are in the hou­se­hold). If I see a video on one of my devices, I’d like to be able to easily trans­fer that run­ning stream onto my TV set. So, for instance, I am brow­sing TED and find a pre­sen­ta­tion that I’d like to con­ti­nue watching while I do some­thing else on an iPad (which I cur­rently don’t own, but that is ano­ther topic). So then, I’d like to bounce the stream off to the TV set in the room I’m cur­rently in and con­ti­nue to use the iPad for other things.
And on the sub­ject of trans­fers: I more often than not carry my iPhone on me. I can easily have my ear­pho­nes plug­ged in there, and the cable not tangle with anything. So then, my lap­top should link up with the audio out­put of the iPhone and trans­fer it’s sound out via the iPhone. That way, I could walk around and con­ti­nue to lis­ten to what I have on the com­pu­ter — or just not be tied to the com­pu­ter by means of head­phone cable.
I’d like to be able to watch HD con­tent, record and play­back it at my lei­sure. And get HD con­tent in such a way so that I can watch dif­fe­rent HD chan­nels on dif­fe­rent TV sets con­cur­rently, and wit­hout pay­ing a monthly sum for every sin­gle device. We can do that now, with the plain ana­log cable ser­vice that we have. By means of cab­ling, we can dis­tri­bute the signal to mul­ti­ple TV sets. Anything but that would be a step back­ward, to my mind. It would be a great plus if the HD con­tent could also be wat­ched on lap­tops (and we have both Win­dows and Mac­in­tosh devices in the hou­se­hold, of which one Win­dows lap­top regu­larly gets used for watching TV with a USB TV tuner), but that is even a secon­dary goal. I’d be happy if we could just get two TV sets. Of course, if we just had one media sto­rage solu­tion so that recor­dings of TV shows could be shown on any screen around, that would be a plus — but that seems to cur­rently not be easily avail­able.
It seems there’s still a great many chal­len­ges out there to get media stuff working con­ve­ni­ently and easily …

TV sets and online experience

It seems that TV sets that offer some form of web con­nec­tivity are the latest craze, right next with the 3D stuff that is not yet ready for con­sump­tion, at least to my mind. I say web con­nec­tivity because it’s about the web more than it is about inter­net con­nec­tivity — the TV sets are even a far cry from fully giving you a decent brow­ser expe­ri­ence, let alone thin­king about other pro­to­cols or app­li­ca­ti­ons. Not that this is neces­sa­rily a bad thing — but one still should be honest about what kind of expe­ri­ence a device is deli­ve­r­ing.
What this is about, though, is that youtube is not enough. Of course it’s fun to look at various video clips and that one site is very rich in all the con­tent it offers. Maybe, if the manu­fac­tu­rer is kind, they’ll also include other online video sys­tems (vimeo, ustream​.tv, or seven­load and myvi​deo​.de in Ger­many) But as we all know, the web is fil­led with so many more oppor­tu­nities. Being in the ger­man TV mar­ket, I also want to be able to look at the online video offe­rings of the local TV sta­ti­ons; inci­den­tally that also requi­res a Flash player on the device. I pre­sume that other mar­kets will have other offe­rings that the con­su­mer might be inte­res­ted in — a con­stant, steady battle for the manu­fac­tu­rer if the want to fol­low this all. And then, there’s video pod­casts, there’s strea­ming stuff com­ing up that we don’t yet even dream about. A night­mare to keep cur­rent, even more of a night­mare if you have to keep pus­hing updates to the sets at the con­su­mers con­stantly.
So we have esta­blis­hed that the requi­re­ments for the TV online expe­ri­ence are high: Flash player, a decent full brow­ser to sup­port all the various offe­rings, a good update path to get new ver­si­ons released (just ima­gine if IE6 had been dis­tri­bu­ted with every TV set that a cer­tain manu­fac­tu­rer ship­ped five years ago, with no clear way for the cust­o­mer to update). I think we’re get­ting dan­ge­rously close to having a full ope­ra­ting sys­tem on the TV set. And then we haven’t even tou­ched inte­gra­ting the nor­mal TV ser­vices, video on demand, time-lapse watching, new ideas about pay per view.
Watching a home enter­tain­ment sys­tem for the living room cer­tainly won’t be get­ting easier!

My code sucks.

Cha­sing a link via Twit­ter, I recently read Your code sucks. Having gone over a lot of other people’s code mys­elf, and wri­t­ing code for long enough to have a good history of my own work to go over, it reso­na­ted with me.

I recently had the mis­plea­sure of debug­ging a piece of code that I wrote almost ten years ago. It was, in many ways, pain­ful to read. Alt­hough I still use the same lan­guage as back then, things have way evol­ved: The lan­guage, for one. Deve­lop­ment tools. (Well, not mine: I still use Emacs.) But most of all: My know­ledge and my men­tal hori­zon in pro­gramming. I’ve looked at various other things to enrich my skill set, brin­ging to my own coding hab­its tools that work well in other lan­gua­ges. I also got to under­stand the tools I use bet­ter (espe­cially data­base tools — those are so rich, and so few tools ever really use them). So, with that expe­ri­ence in mind: My code does suck. But I much pre­fer some­thing that I wrote ten years ago to be pain­ful to read, because it means that I have lear­ned a lot. Even though I feel great satis­fac­tion with the things I write today, I am sure that in ano­ther ten years time, I will look back at todays work and feel a slight sen­sa­tion of being asha­med of what I did.

And this hum­bles me in rea­ding other people’s code. It does not hurt to assume com­pe­tency in others; they may have dif­fe­rent rou­tes they take in sol­ving pro­blems. But if one gets to think like they do, under­stand why they wrote the code the way that they did, that cer­tainly may lead to your taking away some­thing for yourself.

Now, if only ever­yone adhe­red to K&R inden­ta­tion, I could read all the other people’s stuff so much more easily …