Recent blog entries for berend

4 Jul 2008 »

A while ago I stumbled upon the article A contradiction for Each of the 12 Apostles. I wrote a response, and asked if Joe E. Holman could link to my article. He said he wouldn't. And he would give a response, but never did. So I assume he couldn't answer this article.

16 Jun 2008 »

There are those days I feel I can better retire as a programmer. Or really hate the tools I'm using. Default parameters are deeply, deeply evil. Got recently hit by two Drupal functions that have completely flawed defaults: file_move and file_scan_directory.

Both take deeply flawed default parameters. The scan directory does a recursive scan, file move creates a new file if a file with the same name already exists. This is not apparent from the names, and you don't have to pass in the parameters to make this clear. If you're not deeply aware of this, you might get hit by a bus, like I was. I scanned a directory for new files, once scanned, I moved them to a subdirectory. But the subdirectory was scanned as well of course. So I ended up in a situation where I created more and more files, each with their own nice Drupal generated extension. Which caused some very serious problems for a customer.

I'm so glad I can program in Eiffel the rest of the time. PHP is a nice language, but it is extremely open for very costly mistakes.

6 Jun 2008 »

Still busy with my new HP CM1015. I tried to get the scanner to work by hacking the FreeBSD uscanner.ko module to recognise it. For this spare time kernel hacker this luckily involved no more than adding a USB id. But that didn't really work. Even when hacking the SANE hplj1005 driver to also recognise the ID.

But I finally found out that the HPLIP project completely supports my printer, so that includes scanning. So after "portinstall hplip" I hoped things would work. But it was a bit more difficult than that I found out. For FreeBSD you have to disable the ultp module. So recompile the kernel.

And this time hp-info found my printer:

$ hp-info

HP Linux Imaging and Printing System (ver. 2.8.2) Device Information Utility ver. 3.4

Copyright (c) 2001-7 Hewlett-Packard Development Company, LP This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to distribute it under certain conditions. See COPYING file for more details.

Using device: hp:/usb/HP_Color_LaserJet_CM1015?serial=00CNBY69BGD8

hp:/usb/HP_Color_LaserJet_CM1015?serial=00CNBY69BGD8

Device Parameters (dynamic data): Parameter Value(s)

I deleted all the previous CUPS printers I had setup and started to add HPLIP printers. The nice thing about HPLIP is that the printer is already listed in the drop down box. You could also upload a .ppd file which I did. I uploaded the .pdd file that came with the hplip distribution, which was /usr/local/share/ppd/HP/HP_Color_LaserJet_CM1015-ps.ppd in my case. It turned out to be the same one I used previously.

OK, printer working great. Pushing stuff through to my samba network for my Windows machines was just running cupsaddsmb as I still had everything setup for that Now the scanner.

sane-find-scanner immediately found my scanner. But scanimage -L tells me there's no scanner. I didn't have hpaio in my dll.conf, but adding that didn't help. So still stuck. I now have code that should work, but doesn't. Might be a FreeBSD problem or not. Too bad. It seems the state of printing and scanning on Linux is pretty good with HP printers, so maybe I should check if it works on Linux.

5 Jun 2008 (updated 5 Jun 2008 at 21:43 UTC) »

Bought a new printer this week, the HP CM1015. My 15 year old HP LaserJet 4MP was still working fine, but getting a bit slow and doesn't handle larger jobs anymore. But my HP OfficeJet 1175c broke down, doesn't power up anymore. Probably easy to fix, if you know how.

Anyway, I now have a colour laserjet. Reported Drawbacks are to be that it is somewhat slow and doesn't have a document feeder. For me it is probably faster than what I had, and I used the OfficeJet document feeder only twice a year or so.

The biggest issue is that it had to work with FreeBSD. Although I found some references on the Internet, nothing really helped. But here some tips for people to get it going on FreeBSD 6.3. First install cups with "portinstall cups".

To access the admin page from a machine on the network, make sure cupsd.conf has a proper Listen entry.

Lastly, I had to add a "Allow From 192.168.1." entry to all <Location> sections, so I could configure cups from my local machine.

Adding the printer wasn't too hard. I installed two versions, the default Color Laserjet Series PCL6, and a Postscript version using a custom PPD I found on the internet. Output seems to be the same, but it seems the PPD has better defaults. The CUPS PCL driver for example defaults to 300 dpi while this is a 600 dpi printer.

Getting it to print required some modifications. It's a USB printer, so I had to set the permissions on /dev/ultp:

chgrp cups /dev/ulpt0
chmod g+w /dev/ulpt0

Restart the cupsd daemon, and I could at least print a test page.

After that I installed two more printers, using the same drivers, but this time enabled the black and white options. The PCL didn't turn off the B&W, while the PPD driver did indeed print in B&W.

UPDATE: oops, that's wrong. Changing permissions doesn't work, because when the printer is turned off and turned on the device disappears with its permissions. The correct way to set the permissions is here.

20 May 2008 »

Spend yesterday on a SEO course by our local search master Michael Brandon. Came away with tons of ideas and understanding. I knew many of the finer technical details, but just missed the forest. So spend most of today optimising the website of Tyndale Park Christian school, the school, the school of my kids to see if it works. The site ranked 39 for "Christian primary school" so see if we can do any better now. Not sure where we ranked for "Christian secondary school, but probably way at the bottom.

The site was created years ago, and we ranked pretty good then, but somehow we slipped, and I haven't paid a lot of attention to it. Ranking high has become a lot more difficult it seems. So let's see, really excited about my changes, so let's see what it does for us.

11 May 2008 »

Space Shuttle uses MS-Dos...:

Edwards attributes that to a lucky twist: The computer was running an ancient operating system, DOS, which does not scatter data all over drives as other approaches do.

1 Mar 2008 »

Two fairly busy days. Crash job to set up a website for SalesNet using Drupal 6. Not finished, but company is adding content first. Monday I'll hope to complete the last theming.

My first real project with Drupal 6. I just felt like a somewhat improved version of Drupal 5. Nothing really shocking, nothing large, just minor. Theming is fairly different though. And not a lot of the modules have been ported yet. So probably will be using Drupal 5 for a while.

30 Nov 2007 »

And that, my friends, is the best description I've come accross:

JS1 favors closures (behavior with attached state) over objects (state with attached behavior)

23 Nov 2007 »

I'm really happy with Emacs 21.1.2. It's extremely stable. Great stuff. Wish FireFox becomes that stable...

Recently also saw the State of AJAX. Although there are good parts, some parts, I think, are really misguided. He thinks JSON is much better for data transfer than XML. Yes. And how do we validate someone has send valid JSON? Not only syntactically, but also semantically. JSON is really a step backward in most cases. It's of course useful in certain others. But after a brief dabble with JSON I'm back to XML. It's the only way I can actually test easily if my server returns valid data.

Crockford complains about the graphics primitives, but SVG is a quite capable solution. CSS is horrible? It's much easier to use than any other alternative available to mankind so far.

Crockford also misses real innovation: innovation on the web is in the libraries these days. jQuery. is an absolutely brilliant new way of looking at the browser.

He believes that browser innovation has halted. That's partly true of course, but mainly because browsers are still catching up and fixing bugs. I think real innovation will come from killer apps: a particular application that will only work on one browser, but that is so compelling that other people will download that browser as well, and through such viral means the market share of that browser becomes dominant enough to take the next step. And such a browser should of course also offer a compelling development platform so those killer application writers will want to use it in the first place.

13 Nov 2007 (updated 14 Nov 2007 at 05:09 UTC) »

Stuart Parmenter explains, unintentionally probably, that you really need a language that has a movable garbage collector, i.e. one that can compact memory. Only one player in town and that is Eiffel: compiles to C, compiles incredibly fast, no overwriting memory, runs on almost any platform.

318 older entries...

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!