Chapman's Bits

Musings about technology, philosophy, research … and wine

Latest Posts

Printing in landscape from Mac to HP LaserJet 1200 on Linux print server

Yes, this is a very specific post but having seen many questions about this online, I wanted to post my solution.

First the setup: HP LaserJet 1200 connected to a Linux machine running CUPS print server, sharing the printer out to my home network. Client machines include a Mac OS 10.3 notebook, Win XP desktop, and Win Vista notebook. All are set to use the HP 1200 Postscript and/or PCL driver that came with OS.

The problem: Printing from the Mac to the HP1200 in landscape mode (in any App: Word, Excel, iCal, etc) prints in portrait mode instead, with the edges of the page truncated. Could not find a driver update, and deleting/reinstalling does not fix it.

Solution that worked for me:

(1) go to system properties | printers and “add new printer”. Add it as a “windows printer”, browsing to the workgroup and picking it. The printer should be detected and show up. (If you’re not using the Linux CUPS server, this step will differ. Browse to the printer in the way that fits your setup.)

(2) Give it a name you’ll remember, such as “HP1200v2″. Now the key part: for printer model/driver, do NOT use the LaserJet 1200 driver. Instead, use the “HP LaserJet 6 gimp-beta” driver. This should be available by default in Mac OS.

(3) Click OK, etc., to finish. Test it. Go back and delete your older HP1200 printer setup, and make the new one the default.

My new (old) book available on Freud’s critique of religion

In 1988-89, I wrote a book-length text on Freud’s theory and criticism of religion, when I was studying at Harvard University. A brief version of the thesis was published in 1997 (Psychoanalysis and Contemporary Thought, 20:1), but I never found a chance to update the entire work sufficiently to publish it with a typical academic publisher.

The main argument, which is still insufficiently recognized in discussion of Freud’s ideas on religion, is that Freud’s criticism continued to use his early psychoanalytic ideas that were later amended. If one views religion through his later psychoanalytic theory of anxiety, not all religious behavior would have to be viewed negatively. I demonstrate this through consideration of the modern theology of Paul Tillich.

Rather than let the manuscript languish, my author friend Greg Spira convinced me to make it available through the publisher Lulu. I’m also posting the PDF here for free. I recommend getting the printed version, since I think it’s easier to read. Either way, I hope it provides something of interest until I’m finally able to revise and bring it up to date.

Print version:

PDF text:
Freud, Religion, and Anxiety: How Freud’s Critique of Religion Neglected His Advances in Psychoanalytic Theory

Thoughts on IQ testing for young children and school applications

After having gone through an extensive process of school applications with family, I’d like to address the question of IQ testing for school admissions. IQ tests are used by some public gifted programs as well as some private schools. This is a controversial issue, so I’ll simply issue a blanket apology in advance!

I can address this from two kinds of experience: (1) I was a clinical psychologist before moving into technology research and had extensive training and experience in both adult and child psychological assessment; (2) my own child recently took a standard assessment instrument to apply to school. This is a long post, but there are many important issues here and I’d like to try to be very clear. Note that I’m not an active psychologist any more (it’s been 7 years since I moved to a research position), so take my opinions as educated but not as professional advice.

BTW, in the main part of the post, I leave aside most questions about the validity of IQ assessment. People’s opinions are strong and vary for good reason. If interested, see the “Appendix” at the very end of this post for my position on those issues. Also the comments here are specifically directed at IQ testing for admissions purposes; they do not necessarily apply to IQ assessment used for diagnostic or counseling purposes.

First, there is the question of when to do an IQ assessment. There are assessments for kids as young as 3. However, there are a few things to consider. Perhaps the most important thing to consider is this: cognitive abilities develop quite differently both within and between children. It is not until around age 10 that one can assume that all cognitive abilities will have caught up to one another and more or less stabilized with relative strengths and weaknesses that they will retain later.

What does that mean? Think of physical growth as an analogy. Just as kids go through growing spurts, cognitive abilities likewise can develop in bursts (the “switch” of speech turning on at age 1-3 is one good example). Just because a kid is “behind” at age 4 doesn’t mean that he or she will be at age 8. The same is true of different abilities compared to one another: for some kids, vocabulary may develop faster, while for others it may take longer, even if they ultimately arrive at the same place. In short, an earlier assessment is informative, but more variance can be expected the younger the child is.

Another implication of this is the following: unless a child shows clear deficits within an assessment battery, the main information one gets is that things are “OK” with reference to some norm. It is much more difficult to read significance into the differences between scores (e.g., verbal vs. math) when a child is very young. So the information gained from testing is limited, apart from diagnostics. This is why so much assessment at very young ages is focused on identifying problems and how to address them. That is very different than, say, an assessment with a 12 YO where the relative strengths and weaknesses of skills can be more clearly and reliably assessed.

The second thing to consider is what action one would take on the basis of an assessment. Suppose a school has a particular cutoff (I’ll say more about that below). Given the variance factor, if you’re within 5-10 IQ points or so above or below that, it can be difficult to know what to expect from another test a year later. So the expected outcome can be difficult to plan ahead of time.

My suggestion for any assessment battery is to discuss what you’re looking for with the psychologist who administers the test. In particular, if the main purpose is for school admission, I would suggest careful consideration of which assessment to administer. For instance, if you want to predict a Wechsler score (WPPSI, WISC), it would be most predictive to give a Wechsler test – but this has to be weighed against the fact that the schools will know about the repeated assessment, and that you’d learn less over the course of things than if you gave different assessments (e.g., Wechsler and Stanford-Binet).

I would offer one strong suggestion about an assessment: do not use the words “IQ” or “test” with a child. This process should be viewed as fun and enjoyable, not as something to stress about. If they feel that they’re being tested, it may affect the results negatively. I would describe it instead as something like, “you’ll get to do a lot of different activities, such as looking at pictures and playing with blocks.” The psychologist can take it from there.

Third is the question of how the issues around assessment relates to schools and choosing among them. I don’t have a good answer there, except that I think it is matter of the fit between the child’s temperament, the family’s goals, and the school’s emphases. Family goals differ a lot in education: some families view academic rigor as the sine qua non of schools and want a school to emphasize reading, math, and other such performance measures. Other families are interested to encourage artistic, physical, and emotional development along with academics.

Likewise, there is the question of individual needs of the child. Some gifted children have special emotional needs and benefit from being in homogeneous groups with other gifted kids, while others may do better in a more mixed environment where they interact with a diversity of others. Although no doubt kids can go “faster” to learn academic material in an accelerated environment, that doesn’t mean that every gifted child should do so. There is plenty of time in life (high school, college, grad school) to learn academic material; it just depends on the goals and temperament of the child.

In visiting a number of schools, I’ve seen significant variation on all of those dimensions. Some emphasize academics, while others emphasize as “balanced” curriculum. Some focus on building a close-knit environment where elementary students spend most of their time with 1 teacher, while others have kids changing activities and teachers multiple times a day (sort of like high school).

Finally, it’s unsolicited, but I would share one concern I have as a former psychologist: I think it is questionable whether IQ tests should be used to enforce a cut-off criterion for admissions. IQ tests were developed primarily to conduct assessment of individual strengths and weaknesses – not to serve as selection criteria. This is markedly different than, say, the SAT, which has been explicitly designed for selection purposes. Suppose a school has a cutoff of, say, 96th percentile on an IQ test. How is it that they determined that 96th percentile was the correct cutoff? How do they know that the test is reliable? Individual scores can easily vary by 5-10 points from time to time.

Also, how do they know that the test used for selection has been administered appropriately? Simply using a licensed psychologist is not enough. Selection tests such as the SAT are kept secure and secret until administered in order that everyone taking them is on a level playing field. IQ tests, however, are not secret – it is easy to take the same test multiple times, or with a bit of research even to find the items and their answers (the list of items does not change from person to person or time to time).

My take on it is that some schools like to use the IQ cutoff for two reasons: (1) it makes admissions easier for themselves (esp. in public school gifted programs, where they don’t want to argue endlessly about decisions), and (2) for marketing (it makes people feel good to be in the top X%). That doesn’t mean a school is wrong to use them for those purposes, nor that the school is “bad” for using them in an arguably questionable way. Rather it’s just that one should be clear about what’s happening.

A better approach, IMHO, is when IQ assessment is used not for cutoff purposes but rather as a way to get a better picture of individual strengths & weaknesses. For instance, one school explained that they don’t want classrooms full of kids who are all stronger on one dimension (e.g., language) vs. another (e.g., math), and they use the results both to understand more about each child’s needs and to select balanced classes. Given that young children’s performance varies so much in developmental course, that usage is also suspect in practice, but it makes much better sense than an arbitrary cutoff. As always, I’d certainly suggest to discuss those concerns with both one’s psychologist and the school.

Appendix: My $0.02 on IQ “validity”

As a former psychologist, I’d summarize my take on IQ like this: IQ is scientifically “real” in the sense that it can be measured repeatedly and reliably. IQ is “not real” if one takes “real” to mean that it completely defines one’s intelligence or potential. IQ is at least partially determined by both genetics and environment, but researchers differ over how much of a contribution each makes (not to mention that they are highly confounded). Studies of identical twins (including ones separated at birth) suggest that it IQ somewhere around 40-70% determined by genetics – which means 30-60% determined by environment. IQ can be modestly enhanced on the positive side through better environments, but when there is a stable family structure with decent environment, trying to do much more is unlikely to change it.

Some researchers and others have argued that IQ tests demonstrate “cultural bias” (e.g., to the advantage of traditional & suburban families, European heritage, etc), but the research evidence for that is not completely clear. Top-notch assessment developers (e.g., Wechsler, Stanford-Binet, Kaufman) are very sensitive to those issues in the latest versions of tests and have attempted to address them. (I don’t want to get too deeply into the cultural issues here – but it’s something to discuss with a psychologist, if that is of concern). Again, it’s important to realize that IQ doesn’t measure everything – it’s just one particular subset of cognitive skills (which vary somewhat from one test to another).

IQ is one of the best predictors — but not perfect, of course — of later success in strongly academic subjects such as math, vocabulary, etc. However, those are only modestly predictive of other kinds of success in life because there are many other ways to succeed or fail. IQ is modestly affected by “practice effects” of taking the tests repeatedly, but psychologists are on the lookout for that and there are some ways to control for it (e.g., by using a different test, or reporting that it has been taken before).

Once one achieves a “high enough” IQ (top 15% or so), then virtually all potential careers are open in terms of intellectual ability – the differentiating factors are likely to be personality, opportunity, motivation, etc. For instance, the average IQ of attorneys and physicians is said to be the same as that of professors at Ivy League colleges (it’s supposedly between 120-126). In other words, once that level is reached, the differentiators lie elsewhere. There are a few exceptions (e.g., physicists and philosophers are likely to be very high), but even then it is not IQ that is the ultimate predictor of either interest or success.

Even within the areas that IQ tests assess, some skills are more important than others for various professions. For instance, it would be difficult for someone with relatively lower verbal performance to be an attorney or writer, but that wouldn’t necessarily stop them from being, say, an engineer or an accountant. It’s also important to remember that the vast majority of people are within 1 standard deviation of “average” (85-115) and do quite well in life (or, rather, whatever problems they have lie elsewhere).

Finally, there are many other kinds of “intelligence”. That is not to deny that IQ is “real” in some abstract sense, but there are also other abilities that can be just as important: “emotional intelligence”, artistic and musical ability, physical/mechanical aptitude, and so forth. Our society tends to focus strangely on “intellectual horsepower”: society mocks it on the one hand, yet regards it as supreme in some other ways (e.g., in some kinds of academic selection). It is feared and worried about — perhaps because it is rather observable and has the property of being important for some kinds of success yet is largely fixed early in life, which goes against the American egalitarian view.

In short, don’t take IQ for more than it is, or even worry about it until you have a reason to do so. At the same time, that doesn’t imply that one must deny whatever it does mean.

Update on the Toshiba IK-WB 15a

As promised, I wanted to share some of my experience with the new IKWB 15a.  In a nutshell, after using it for 3 days, it seems to be everything that the 11a camera should have been.  The 15a is very stable (no reboots yet) and responsive.  Images load and are streamed rapidly.  Image quality is very good.  Low light performance is especially good — with auto B&W on, it switches from color to B&W images in low light.  These yield crisp, satisfactory photos outside in the middle of the night with street lights on.

Note that I use the camera exclusively with Cat 5 cabling, so performance comments are about 10/100 Ethernet access, not Wi-Fi.

There are a number of changes to the firmware, mostly to add a few functions and make the HTML pages easier to navigate.  One change that I especially appreciated: the FTP recording option can now use a fixed file name.  This option has the camera initiate an FTP upload of images either on a schedule or in case of an alarm such as motion detection.  In the 11a camera, the uploaded files were named with a time & date scheme, such as “LV-NWCAM1-20060815-010544.jpg”.  In the 15a, that is still an option, but it is also possible to give a fixed name to the file, which is overwritten on each upload.  For instance, something like “webcam.jpg”.  That is helpful if you want to post the image directly to a web server. 

In my case, this FTP recording feature would make it possible to feed the image directly into a directory where “motion” can examine it.  In other words, it makes the most essential feature of my self-written recording program (see previous posts) unnecessary!  On the other hand, you’d have to set up and run an FTP server, which I prefer not to do (even on my LAN) because of security holes.  Might be a future possibility to put a standalone FTP server in my network DMZ, though.

One change on imaging is that there is no longer an option for 800×600 images.  Maximum is the same at 1280×960, but the next lower option is 640×480.  That is OK with me, since 800×600 doesn’t work well with “motion” anyway.  The faster responsiveness of the 15a makes the 1280×960 images stream very nicely, either as mjpgs or static jpgs.

There is also additional attention to detail on the hardware side.  The size and appearance of the camera are unchanged, but I noticed two nice details.  First, the 15a camera comes with an extension power cord on the DC side.  This is handy for exterior mounting in particular — you can put the extension cord through a wall and then if the AC/DC brick ever dies, you won’t have to remove the cord from the wall in order to replace the tranformer.  Second, there is a small wrapping strip that fits inside the power/ethernet connector area on the camera, and wraps around the power cord.  This helps hold it in place, so the power connector won’t come loose.

Overall, I’m very satisfied with it, and recommend it highly.  The combination of great pictures, interior/exterior mounting, improved firmware, and a nice lineup of features make it a great deal at its price point (I found a great deal (now gone) at $479, but anywhere up to $550-600 would be satisfactory).

Problem with Delphi Indy 10 components

I added a new camera to my setup this weekend, and got one of the new Toshiba IK-WB 15a cameras — that’s the new model that replaces the IKWB 11 line.  So far, it seems like a very good camera.  It’s more responsive and seems more stable than the IKWB 11a series.

However, when I pointed my self-written camera recording program to it, I couldn’t get a picture.  I guessed that it might be due to a new authentication scheme in the camera, and perhaps my older Indy HTTP components (used in my program) were not compatible.  So I upgraded Indy 10.0.76 to the latest 10.1.5.  (

When I did that and ran Delphi again, I got this error: “Cannot load package ‘IndySystem50 ‘ . It contains unit ‘filectrl’  which is also contained in package ‘Vclx50′“.  Searching the Delphi 5 help boards found no solution to the problem.  Lots of people have had this problem, but no one posted a solution.  As it turns out, all I needed to do was reinstall Indy 10.0.76.   There appears to be a bug in the 10.1.5 compiled packages, at least for Delphi 5.  Use 10.0.76 instead.

As it turns out, the authentication problem with the new 15a camera was simply that it requires a user name and password to grab images (which 11a did not).  In my program, I just added a user name and password to the “user” and “password” properties of the Indy HTTP component.  Works great now!

More on the new Toshiba IKWB 15a camera soon …

Creating a home security camera system, part 3

Getting the picture.  In this part, I talk about how to get the images from the Toshiba camera so they can be used by other programs for archiving and motion detection.  This was trickier than I anticipated.

As mentioned earlier, I selected the Toshiba IK-WB11A camera for the visual part of the network.  The camera worked well right out of the box.  There are various options that can be set on it and are self-explanatory.

My first requirement for this system was to store pictures continually, regardless of whether motion was detected in the images.  That way, regardless of whether the motion detection algorithm works or failes, I will always have a real time backup (backed up in two places).  To do that, I needed to access the images in real time.

This posed a problem: how to access the Toshiba’s photos without using a web browser or their software.  The documentation does not describe how to capture the current image as a simple JPG file.  Eventually I found the answer from another user online: access the current image as :http://your.ip.address/__live.jpg?&&&

With that working, I wrote a Windows program using Delphi that would retrieve the images every second (or at any specified interval) and save them to the network locations.  This uses the Delphi Indy socket components for the http download,  I won’t post my code, as there are good examples online already, such as

Unfortunately, if you want to archive the images indefinitely, you will need to invest in a program to read the image files and save them.  There are a lot of ways to solve that, ranging from writing your own (as I did) to buying one online.  The Toshiba camera offers the onboard ability to detect motion and send email.  However, I did not want to bog it down sending mail and the like — I wanted a fast, responsive camera, not a camera trying to be a server.

Now the second problem arose: I wanted to do motion detection on the live images.  If there was motion detected from one frame to the next, I wanted the frame with motion to be stored on an external machine (not in my house) in real time and also backed up to various local locations.  I set up “motion” on my linux server to monitor the images.  It likes to look at a live stream, not at sequentially saved files with different names.  So I pointed it to the camera URL as above — but it didn’t work.  It seemed that it could not authenticate successfully against the camera, and thus could not get the image.

I solved this with a two-step approach.  First, I modified my file-saving program to save the latest image for a camera to a specific, unchanging file name (in addition to the incrementing file names for the archived images).  Second, I installed the Abyss web server (free for personal use) and configured it to serve up the current camera image files on my network.  Now Motion could look at the file for a given camera and run motion detection perfectly. 

Here’s a screenshot from my application, showing how it archives the images to multiple places and to the web server location.  (Note that the picture quality is low because the hard drive box is very close to the lens.)


This also solved one of my other requirements: to be able to monitor cameras.   I can simply point a web browser to the appropriate file on the web site.  Of course that only runs locally, since I don’t want to serve up images on the Internet.  (That would be easy to configure with Abyss, just not necessary for me since any with motion detected are stored externally anyway).


Creating a home security camera system, part 2

To monitor my home, I had several requirements:

  • Premises to be monitored both inside and outside
  • Detect motion on the cameras, and also to record continuously (as a backup in case motion detection failed)
  • Images to be high resolution, better than standard webcam resolution
  • Images to be archived both onsite and offsite
  • To be alerted automatically when motion detection occurred, and to archive those images specially
  • To do this at a relatively low cost, using as many standard, reusable, and modular components as possible
  • To have high reliability and uptime of the system
  • To be secure
  • To learn something while doing this

Probably the easy way to put all of this together would be to buy a commercial IP camera monitoring suite.  However, there were several prohibitions there, primarily the cost (just the recording software alone is usually $200 and up) and questions about the reusability of the components should I rework the system in the future.

Ultimately, this is what I came up with:

  • Premises to be monitored both inside and outside: selected the Toshiba IK-WB11A, which works both indoors and outdoors.
  • Detect motion on the cameras, and also to record continuously (as a backup in case motion detection failed): I configured the Linux “motion” software, which performs motion detection (see a future post for details on the complex software setup)
  • Images to be high resolution, better than standard webcam resolution: the Toshiba camera has resolution up to 1280×960, which produces a very high quality image.
  • Images to be archived both onsite and offsite: see my future post on archive and software setup.  I save images to multiple local locations and have live email of images offsite whenever motion is detected.  I wrote my own monitoring program (details and maybe even the EXE to be posted in the future).
  • To be alerted automatically when motion detection occurred, and to archive those images specially: same as above.
  • To do this at a relatively low cost, using as many standard, reusable, and modular components as possible: I used standard IP network cameras (Toshiba); wrote my own Windows application to record images; store images on Windows and Linux boxes, and a NAS device; email images to a gmail account; and use free motion detection software.  Any of those pieces could be easily replaced with little need to reconfigure the others.
  • To have high reliability and uptime of the system: using network cameras (instead of PC attached) ensures higher reliability of the units and no downtime from the PC.  Battery backup keeps systems up.  I wrote a Linux script to monitor and restart the motion detection as necessary (see upcoming posts on software)
  • To be secure: my network is configured with double NAT and two firewalls, with stateful packet inspection and no open incoming ports.  External storage is configured with strong passwords and is only known to me.
  • To learn something while doing this — I definitely exceeded this goal!

What I did NOT do.   I did not use standard, PC-attached web cameras.  Their resolution is low, and I was concerned about their uptime reliability (because of USB drivers and the like).  I did not use 802.11 wireless networking, because I found it to be too slow to serve high-resolution images at a moderate framerate (1-2 FPS).  Instead, I used 100mbps CAT-5 (already wired through most of my house).


Creating a home security camera system, part 1

After my house was burgled, I wanted to establish a home security system with 3 goals: (1) to discourage future burglary; (2) to continuously monitor my home; and (3) to store images offsite, so any future intruders could be caught.  After a lot of work, I now have a system that works and meets all of those goals.  However, it wasn’t easy, and I wanted to document some of the technology, tips, and tricks here.

This will take quite a while to document, so I’ll be posting pieces of the solution over time.  Stay tuned …