PowerDNS under MacOS X 10.6.4

Thanks to an ent­ry on LSD::RELOAD I was final­ly able to get powerdns to run on my MacOS X 10.6.4 sys­tem.

Out of per­so­nal pre­fe­rence I wan­ted it to run with post­gres­ql ins­te­ad of mys­ql, so the­re was a litt­le figu­ring out invol­ved in how to get things going without the mys­ql dri­ver — appar­ent­ly, the make files only take one data­ba­se backend and do not com­pi­le mul­ti­ple dri­vers at the same time.

Also, secon­da­ry soft­ware omes from Mac­Ports, so paths had to be appro­pria­te­ly matched. And then, the­re was some hand-twea­king of Make­files becau­se -Bsta­tic, -Bdy­na­mic and -lcrypt war­rant spe­cial hand­ling.

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­ting the code to hand­le 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 wri­te a new file, I place all the includes at the very top, befo­re any­thing else hap­pens. But in my cur­rent script, the­re are many code paths that do not requi­re the major part of all tho­se inclu­des. Only in one spe­ci­fic ins­tan­ce do we requi­re the bulk of the code. Pre­vious­ly, any invo­ca­ti­on of that script would have got­ten all the code drag­ged in. Now, I’ve moved the include to just whe­re I need the code (basi­cal­ly, 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, without any chan­ge to the func­tio­na­li­ty.

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

eBooks

So there’s a new Kind­le that looks qui­te attrac­tive. Many things on the Kind­le platt­form appe­ar qui­te nice: You can read the Kind­le books on mul­ti­ple devices (the Kind­le app for iPho­ne and iPad just as well as your desk­top and lap­top com­pu­ter) and have your libra­ry avail­ab­le on all devices equal­ly. 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­ra­ge should be done (local copies for off­line, but basi­cal­ly be acces­si­ble from any­whe­re).
And yet, as with many other of the new media con­sump­ti­on 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 lea­ve such a well-docu­men­ted trail of what I read, when and for how long. I know that by shop­ping at Ama­zon, I alre­ady lea­ve qui­te the trail about my rea­ding habits, and buy­ing stuff on the Kind­le does not chan­ge that all too drasti­cal­ly. And still, I feel that the more data Kind­le 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 chan­ge the libra­ry on the Kind­le without your appro­val or inter­ac­tion. This gives an ent­i­re­ly new mea­ning to the con­cept of „purcha­sing a book.“ It’s actual­ly much more like a public libra­ry: You pay for the pri­vi­le­ge of being allo­wed to read a book, but only litt­le 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­bo­dy else have them. Or I want to be able to loan them; eit­her just for an after­noon of leisu­re or for others to com­ple­te­ly read tho­se books. That’s just not pos­si­ble on the Kind­le. 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­no­te for qui­te a while now, and I must admit that I’m also one of the lovers of that ser­vice. It does data sto­ra­ge 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­nal­ly use only the Mac­in­tosh ver­si­on (but that on mul­ti­ple machi­nes) for work­sta­tion use. But I can also access my data via the iPho­ne app­li­ca­ti­on, or with the ever­no­te web app from just about any­whe­re. There’s also a Win­dows ver­si­on avail­ab­le, but I’ve never play­ed around with that.
I jour­nal all the ide­as that are on my mind wit­hin Ever­no­te; that way, I am sure that I have all ide­as that might war­rant revi­si­ting at a later point are caught, becau­se it’s just so easy and quick to wri­te them down and have them stored in a way that I can access from any­whe­re.
I know that the­re are many more fea­tures (uploa­ding PDFs, cap­tu­ring images and sto­ring them, image reco­gni­ti­on and many more), but none of tho­se have pro­vi­ded important to me. The fact that I can get to all my notes from any­whe­re, and with soft­ware that makes using the sto­ra­ge easy and fast — it does feel like it’s a local app­li­ca­ti­on, becau­se it is — that’s what has me con­vin­ced.
And the best thing? It just works.
High­ly recom­men­ded.

Home media integration and other televisory matters

Fol­lo­wing up on my last pos­ting, the­re are a few more things that come to mind when thin­king about the future of TV sets. With all tho­se video strea­ming ser­vices that I want, I also would like inte­gra­ti­on with my lapop (or iPho­ne or iPad, or wha­te­ver other media con­sump­ti­on devices the­re are in the hou­se­hold). If I see a video on one of my devices, I’d like to be able to easi­ly trans­fer that run­ning stream onto my TV set. So, for ins­tan­ce, I am brow­sing TED and find a pre­sen­ta­ti­on that I’d like to con­ti­nue watching while I do some­thing else on an iPad (which I cur­r­ent­ly don’t own, but that is ano­t­her topic). So then, I’d like to boun­ce the stream off to the TV set in the room I’m cur­r­ent­ly 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 car­ry my iPho­ne on me. I can easi­ly have my ear­pho­nes plug­ged in the­re, and the cable not tang­le with any­thing. So then, my lap­top should link up with the audio out­put of the iPho­ne and trans­fer it’s sound out via the iPho­ne. 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­pho­ne cable.
I’d like to be able to watch HD con­tent, record and play­back it at my leisu­re. 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­r­ent­ly, and without pay­ing a mon­th­ly 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 cabling, we can dis­tri­bu­te the signal to mul­ti­ple TV sets. Any­thing but that would be a step back­ward, to my mind. It would be a gre­at 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­lar­ly gets used for watching TV with a USB TV tuner), but that is even a secon­da­ry goal. I’d be hap­py if we could just get two TV sets. Of cour­se, if we just had one media sto­ra­ge solu­ti­on so that record­ings of TV shows could be shown on any screen around, that would be a plus — but that seems to cur­r­ent­ly not be easi­ly avail­ab­le.
It seems there’s still a gre­at many chal­len­ges out the­re to get media stuff working con­ve­ni­ent­ly and easi­ly …

TV sets and online experience

It seems that TV sets that offer some form of web con­nec­tivi­ty are the latest cra­ze, right next with the 3D stuff that is not yet ready for con­sump­ti­on, at least to my mind. I say web con­nec­tivi­ty becau­se it’s about the web more than it is about inter­net con­nec­tivi­ty — the TV sets are even a far cry from ful­ly giving you a decent brow­ser expe­ri­ence, let alo­ne thin­king about other pro­to­cols or app­li­ca­ti­ons. Not that this is necessa­ri­ly a bad thing — but one still should be honest about what kind of expe­ri­ence a device is deli­vering.
What this is about, though, is that you­tube is not enough. Of cour­se it’s fun to look at various video clips and that one site is very rich in all the con­tent it offers. May­be, if the manu­fac­tu­rer is kind, they’ll also inclu­de other online video sys­tems (vimeo, ustream​.tv, or seven­load and myvi​deo​.de in Ger­ma­ny) 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­dent­al­ly that also requi­res a Flash play­er on the device. I pre­su­me that other mar­kets will have other offe­rings that the con­su­mer might be inte­rested in — a con­stant, ste­ady batt­le 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­ma­re to keep cur­rent, even more of a night­ma­re if you have to keep pushing updates to the sets at the con­su­mers con­stant­ly.
So we have esta­blished that the requi­re­ments for the TV online expe­ri­ence are high: Flash play­er, 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­gi­ne if IE6 had been dis­tri­bu­t­ed with every TV set that a cer­tain manu­fac­tu­rer ship­ped five years ago, with no clear way for the custo­mer to update). I think we’re get­ting dan­ge­rous­ly clo­se to having a full ope­ra­ting sys­tem on the TV set. And then we haven’t even touched inte­gra­ting the nor­mal TV ser­vices, video on demand, time-lap­se watching, new ide­as about pay per view.
Watching a home enter­tain­ment sys­tem for the living room cer­tain­ly won’t be get­ting easier!

My code sucks.

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

I recent­ly had the misplea­su­re of debug­ging a pie­ce of code that I wro­te 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 loo­ked at various other things to enrich my skill set, brin­ging to my own coding habits tools that work well in other lan­guages. I also got to under­stand the tools I use bet­ter (espe­ci­al­ly data­ba­se tools — tho­se are so rich, and so few tools ever real­ly use them). So, with that expe­ri­ence in mind: My code does suck. But I much pre­fer some­thing that I wro­te ten years ago to be pain­ful to read, becau­se it means that I have lear­ned a lot. Even though I feel gre­at satis­fac­tion with the things I wri­te today, I am sure that in ano­t­her ten years time, I will look back at todays work and feel a slight sen­sa­ti­on 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 assu­me com­pe­ten­cy 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 wro­te the code the way that they did, that cer­tain­ly may lead to your taking away some­thing for yours­elf.

Now, if only ever­yo­ne adhe­red to K&R inden­ta­ti­on, I could read all the other people’s stuff so much more easi­ly …