Wednesday, July 27, 2011

Any Pluses for Plus? Minuses?

I've been on Google Plus for a few weeks now, and I don't see it as ever being worthwhile. Of course, I still don't see any reason to be on Facebook or Twitter. They all primarily waste time.

I'm not on the verge of deleting my Plus account, but I don't see any good reason not to.

Wednesday, July 20, 2011

Zombies, Firefox, Chrome, and all That

I've been noticing a lot of defunct or zombie evince processes lately and decided to take a couple minutes figuring out what's going on. In the Linux world, evince is a good PDF reader, certainly better than the one freely-available from Adobe. The problem isn't with evince: zombies cannot be held accountable.

All the zombies I had on my system this morning had one of two parent process IDs, that of Firefox (3.6.18) or that of Chrome (13.0.782.56 beta). When a process forks a child, it is supposed to wait() for the child. This can be done asynchronously, so it's little inconvenience for the parent process, and not much for the programmer of the parent process, if said programmer knows what he is doing. The child process, evince in my case, hangs around the process table as a zombie until the parent issues a wait(). This allows a parent process to keep track of the status of its children. Once the parent checks on the child, the child can go away.

Firefox and Chrome are apparently not checking on their children.

Saturday, July 16, 2011

State Farm Encourages Living Dangerously

State Farm is another company that is trying to get customers to ignore TLS (or SSL for my fellow old-timers) by encouraging customers to log in from an apparently insecure page:











The form action for password submission is https://online.statefarm.com/apps/sessionmgmt/LoginService.asp? and that very well may be secure, but the fact remains that they are training their users to submit insecurely.

Cell Phone Risks

Last month I posted a pointer to Michael Blastland's recent column on statistics regarding cell phone usage and cancer. Yesterday, XKCD also had a thoughtful treatment of cell phone risks:


Really, it doesn't seem so surprising to think that cancer may cause cell phones.

OCR in Linux: First Impression

Tonight I was cleaning up and found a couple C programs from 1987. These were on paper, and I've been scanning and then recycling paper lately, and considered doing that here. I didn't want to take the time to type the code, though the programs were short. They were interesting enough that I might want to play with them in the future--one logs a Unix user out, killing all his processes, and the other returns the file name part of a path (dropping the path string before and the file extension). Okay, I'm not sure why that's interesting.

Besides, how many sheets of paper do you have laying around with 1987 dates marked "**** HONEYWELL FEDERAL SYSTEMS INC. CONFIDENTIAL and PROPRIETARY ****"? This dates to when I was on the SCOMP team, though has nothing SCOMP-related or even remotely confidential or proprietary. What was SCOMP? See http://en.wikipedia.org/wiki/Multilevel_security

So I scanned the code with xsane and noticed, as I had before, the option to save as text. As before, it didn't work, but this time I paid attention to the error message, gocr not found. So I googled and then install gocr (see http://jocr.sourceforge.net/) .

gocr does a respectable job, but not great. However, it's better than typing from scratch. Here are some  lines from the scanned text:


-    l2   jnclude stdio.h>
l3   include <signal.h>
l4
15   #define ALL_USEn_PROCS  -l
l6
l7   void main()
18
l9      int     kill();
20      jnt     process_id;
21      int     signal;
22
23      process  id = ALL USR PROCS;
24      signa! =- SIGKTL ;    -
25       void   rintf(''\nkil1ing all  rocesses...\n'');
26       void   ill(prOcess_id,  signa );

So it's missing underscores, curly brackets, and various other things. It looks like it added line numbers, but that's from the paper listing. Not great, but it beats typing that code from scratch, I guess.  There may be some options that help it do a better job, so if this becomes important I'll have a look.