Sunday, August 31, 2008

C#/.NET

C#/.NET

I'm finding that learning C#/.NET is going a lot faster than learning Java and its user interface did, back ten years ago--and I don't think that I am smarter than I was back then. Perhaps it is because then I was learning a new language (Java) and a new concept (Object-Oriented Programming) and the library classes required to support a user interface.

This time, I'm only learning a new language, and while the library classes are different, there are strong parallels between the Java user interface and .NET. Even if the .NET designers didn't look at Java, this would be unsurprising, since they perform similar functions.

One other aspect that may be making this easier is that I believe that the web is a vastly richer source of examples of C# today than was the case for Java in 1998. Back then, you could find examples in Internet newsgroups like comp.lang.java, and lots of good help at the Javasoft website. Today, everyone and his brother has a website up either giving away examples, offering subscriptions services to help you (and sometimes giving enough clues that I don't have to pay), and MSDN provides a bit of useful information also.

The problem may be that I am learning all this stuff just in time for it become obsolete and irrelevant. That doesn't seem possible with C#/.NET--but hey, if an entire sector of the industry has to disappear to keep unemployed, it could happen!

More seriously, I'm putting some time into learning C#/.NET because there are jobs for it--and energy spent polishing up my Java skills is perilously close to trying to remember how the FORMAT command works in Fortran IV. (You laugh: but I first programming a computer in FORTRAN II.) I just hope that someone doesn't end up saying, "Gee, that's nice, but we don't do C#. How's your Java?"

I Never Ceased To Be Amazed....

I Never Ceased To Be Amazed....

at the ferocious personal attacks that the left uses against conservative blacks or conservative women. All the talk of late is how the hard left end of the Democratic Party is now claiming that Palin's youngest, the one who was born with Down's Syndrome, is actually her daughter's child--and this was all an attempt to cover up the shame! What next? Oh dear, this is about the way the leftist mind works:
I heard the child was born to the daughter, fathered by Satan at midnight under a full moon that converged with the aurora borealis on a fur of a freshly killed and skinned polar bear and witnessed by Inuits that were duly appalled, but sworn to secrecy or their native lands would be drilled for oil and their salmon runs wasted. And later, the mother was seen eating raw Narwhal liver and then dancing naked in the snow and screeching an unearthly howl and seemed to be in a trance or on drugs or something. I read it on a website called "Don't vote for Palin or everybody dies."
I think the problem is that the left projects an awful lot of their own hypocrisy, immorality, and savagery on everyone that doesn't share their point of view.

Reversing a Doubly Linked List In Place

Reversing a Doubly Linked List In Place

It actually only took me about ten minutes to sketch out--without the pressure of interviewers looking down my neck, and expecting an instant answer--and another ten minutes of actually typing in the code to create the linked list, traverse the list, and do the reverse. And once the compiler reminded me of the messy details of how to set up the struct and typedef statements for the linked list structure, it required no debugging.

#include <stdio.h>

#include <malloc.h>

struct dblLink
{
struct dblLink* prev;
struct dblLink* next;
char* data;
};

typedef struct dblLink tNode;

/* Assumes that we have a linked list and we are adding to the end. */
tNode* addNode (tNode* whereToAdd, char* data)
{
tNode* newNode;

if (whereToAdd->next == NULL)
{
/* Add another element. */
newNode = (tNode*)malloc(sizeof(tNode));
if (newNode)
{
newNode->next = NULL;
newNode->prev = whereToAdd;
newNode->data = data;
whereToAdd->next = newNode;
}
}
return (newNode);
}

int main (int argc, char* argv[])
{
tNode* head;
tNode* lastNode;
tNode* node;
tNode* oldPrev;
tNode* oldNext;

/* Create the head. */
head = (tNode*)malloc(sizeof(tNode));
if (head)
{
head->prev = NULL;
head->next = NULL;
head->data = "George Washington";
/* Now add some more entries. */
lastNode = addNode(head, "John Adams");
lastNode = addNode(lastNode, "Thomas Jefferson");
lastNode = addNode(lastNode, "James Madison");
lastNode = addNode(lastNode, "James Monroe");
printf("From head to tail.\n");
/* Print the doubly linked list. */
for (node = head; node; node = node->next)
printf("%s\n", node->data);
/* Reverse the list. */
/* Find the end of the list. */
for (node = head; node->next; node = node->next)
{
}
/* The end of the list will be the new head. */
head = node;
/* Now start at the end of the list, and work backward. */
do
{
oldPrev = node->prev;
oldNext = node->next;
node->prev = oldNext;
node->next = oldPrev;
node = node->next;
}
while (node);
printf("The list is reversed. From head to tail.\n");
/* Print the doubly linked list. */
for (node = head; node; node = node->next)
printf("%s\n", node->data);
}
}

You know, there might be a place for programming like you are a character in 24, trying to solve technical problems in the next ten minutes as though millions of lives are at stake, but I'm not applying for Chloe O'Brian's job.

UPDATE: The more I think about this, the more I suspect that the test question just threw me for a loop and flustered me. If they had said, "Here's what we want to you write. We'll leave the room, and come back in 10-15 minutes to see how you are doing," I probably would have passed the test. But at that point, I had not been on a job interview with complete strangers in at least ten years. You live and you learn. Now, I just need to scare up some job interviews....

I have decided that the chances of finding a job in Boise are quite slim, because I don't have five years of C# experience. (I don't have any, other than what I have learned on my own time these last couple of weeks.) At this point, I'm looking only at positions in the Western U.S., because this makes it possible for me to at least come home perhaps every other weekend. The time and cost of doing some from other parts of the U.S. suddenly makes that part-time job at Big O Tires as a tire technician start to look like the lesser of two evils.

Saturday, August 30, 2008

Is This Interviewing Technique Still In Use?

Is This Interviewing Technique Still In Use?

I think one of the reasons that I became unemployable in the late 1990s, except by people that had worked with me, and knew what I was capable of doing, was an interviewing technique that seemed to have come into vogue about that time. I am under the impression that this approach came out of Microsoft; at least, my first encounter with it on an interview was at a company in the Redmond area started by a bunch of people from the Microsoft Gun Club. Naturally, they knew who I was because of my books; it was kind of gratifying to walk in and see my books on the shelf!

The interviewing technique was a form of high pressure test. I was used to be asking about technical problems that I had solved. I was used to answering questions about the type of projects on which I had worked. I was used to answering questions about to check my level of knowledge of a language or an operating system. In this case, they asked me write some C on the board to reverse a doubly linked list in place. They decided at the end of this exercise that I wasn't smart enough to work for them, and the rest of the day's interviews were cancelled.

I was both infuriated and perplexed. At least in any company in which I have worked, getting it right and getting it efficient matters more than getting it fast. The most realistic estimate of the effectiveness of an engineer is by looking at the products that he has helped develop. At that point, I had led two highly successful user interface products, from a blank sheet of paper through full deployment to large customer bases. I thought that my experience as both a developer and a project leader--as could be attested by my supervisors--would be the most important element in making a hiring decision. Was I ever wrong.

I was not just upset--I was a bit surprised that what was effectively a broad test of intelligence (and specifically, the ability to think on your feet) was still legal. You see, in Griggs v. Duke Power Co. (1971), the U.S. Supreme Court ruled that general tests of intelligence as a condition of employment were illegal. Unless a test measured skills or aptitude specific to the position, it was a violation of the Civil Rights Act, because blacks didn't do as well on intelligence tests as whites. While this was a programming test, and one could say that it had some connection to the job, this artificial of a test was only very remotely connected to the actual work of a software engineer. Now being white, clearly I would not have had a basis for suit. But talk about opening themselves up for a suit if they rejected a black applicant who failed to impress them!

I noticed that for all this company's arrogance--they weren't around a year later. When they explained their marketing strategy and target customer base, I didn't see how it made any sense (although I was too polite to tell them that). But perhaps their marketing was done on the same "let's do it fast and show everyone how smart we are" approach that they expected from their engineers.

So, if I actually get any interviews, will I be running into this technique? Or has this gone out of fashion?

Plotting Applet

Plotting Applet

Back when I was teaching myself Java, about ten years ago, I wrote a cute little applet to make sure that I knew how to do it. Rather than build something completely useless, or too specific, I thought it would be fun to write a general purpose plotting applet. I used it to plot California county crime data that I had laboriously gathered, but it isn't terribly specific. It will accept any comma separated variable file that meets certain criteria, and plot the data.

It is completely dynamic; it will scale based on the values that you ask it to plot, and it will adjust to conform to the number of rows and columns of data that you provide it. If you give it 30 rows of data, you will get 30 lines drawn. If you give it five lines of data, you will get five lines drawn. It will adjust from two columns to 200 (although it may be very hard to read).

Anyway, if you want to see details, go here. I really enjoyed building this little applet--and I would have loved to have done more of it. Unfortunately, I was utterly unable to find anyone that was interested in having me write Java back then, and now, I'm too rusty to be of any interest to anyone with it.

If Only The Democrats Had An Opposition Party

If Only The Democrats Had An Opposition Party

When you see poll results this bad about the Democrat majority Congress, it should be a cause for celebration:
A new Rasmussen Reports national telephone survey finds that just nine percent (9%) of Likely Voters give Congress positive ratings, while 51% say it's doing a poor job.
Congressional ratings first hit nine percent (9%) back at the beginning of July, marking the lowest ratings recorded by Rasmussen Reports. Ratings hit the same low two weeks later. Congress has not received higher than a 15% approval rating since the beginning of this year.
Indicative of the low opinion most voters have of Congress were the findings in another survey earlier this week of members of the leadership's own party. Just 37% of Democrats say they have a favorable opinion of House Speaker Nancy Pelosi, while 51% have an unfavorable view of her. One-quarter (25%) of Democrats rate their view of the San Francisco Democrat as Very Favorable, but 14% see her in a Very Unfavorable light.
The news is even worse for Senate Majority Leader Harry Reid, who is viewed favorably by 22% of Democrats and unfavorably by 41%. Six percent (6%) of Democrats have a Very Favorable view of the Nevada senator, but 8% regard him Very Unfavorably.
Unfortunately, the Democrats barely have any opposition. Why? Because while there are generally conservative Republicans in the House, like Bill Sali (R-ID) who represents me fairly well, there are plenty of Republicans who are just embarrassments: like Senator Larry "Happy Feet" Craig (R-ID). Like Senator Ted Stevens (R-AK), recently indicted on corruption charges.

Just Made a Substantial Revision of My Web Site

Just Made a Substantial Revision of My Web Site

At least one person can't see. If you click here, and my web site doesn't come up, please let me know at once.

UPDATE: The problem was that he was getting to my website through http://www.claytoncramer.com/index.htm, which is supposed to automatically refresh to http://www.claytoncramer.com/index.html (note the "l" at the end). But it was trying to get to the experimental website, which no longer existed. This problem is now solved.

Feel free to look around. I haven't added very much--mostly I have restructured stuff, and most of the main pages now use stylesheets to get a more consistent and pleasing formatting and appearance. A number of the individual articles haven't been changed to use stylesheets yet, but I will do so in the near future.

Is It True That Hunters Are Stupid?

Is It True That Hunters Are Stupid?

If not, explain why any hunter is planning to vote for Obama? This article by John Lott that appeared in the August 29, 2008 Washington Times points out that in spite of Obama being the most fiercely anti-gun major party presidential nominee in history

Sen. Barack Obama's campaign just won't let the gun issue rest. Mr. Obama and his campaign surrogates continue to assure gun owners that he is on their side, and it appears to be paying off. John McCain only leads Mr. Obama among hunters by 14 percentage points, just about half the 27-point lead that President Bush held over John Kerry in 2004. If Mr. McCain had a similar lead, he would be ahead in most polls, particularly in many battle ground states.
Yet, despite all the Democratic claims to the contrary, Mr. Obama is undoubtedly the most anti-gun candidate ever nominated by a major party for president.

...

ABC New's local Washington, D.C. anchor, Leon Harris, asked Mr. Obama: "One other issue that's of great importance here in the district as well is gun control ... but you support the D.C. handgun ban." Mr. Obama's simple response: "Right." When Mr. Harris said "And you've said that it's constitutional," Mr. Obama again says "right" and is clearly seen on tape nodding his head "yes."

Friday, August 29, 2008

Doing A Major Revision of My Web Page

Doing A Major Revision of My Web Page

I'm thinking that I might try to market myself as a webpage person, since this is one of the jobs that can always be done remotely (unless you are behind a secure firewall, of course). I've already done a significant redo of the ScopeRoller web page to use style sheets, so now it's time to do the same for my primary web page.

I did my original webpage back in 1994, and while it wasn't cutting edge at the time--I was mostly teaching myself how to hand code HTML--it is definitely embarrassingly old-fashioned now. There's also way too much stuff stored at the base level of public_html for me to keep it well organized, so I am working on that as well.

It won't change entirely overnight (although much of the appearance will be obviously improved by tomorrow), but bit by bit, it will start to look like something that was done in this decade, not the last.

Java Applets

Java Applets

Some years back, when I was teaching myself Java, I put a couple of Java applets up on my web page that I had written. One of them was a cute little visual toy that I called "Pong on Speed" (even though it wasn't really a video game). The other was a generic plotting tool that took CSV (comma separated variables) files and plotted them. The first data sets that I made available were crime statistics (crimes per 100,000 people) for California counties for the period 1952-1993. (Yes, I had strange notions of what to do with my spare time back then, transcribing data from ancient history--back before any of this stuff was available in a machine readable form.)

Anyway, back when I was doing this, the various web browsers in common use weren't too smart about Java applets. To solve this, I had to put all sorts of stupid JavaScript in there to get them to work with the common web browsers.

Well, the world moves forward. Just about everyone seems to know about the APPLET HTML tag now--and the old JavaScript didn't work with Firefox, and probably a few other browsers. So I went through, cleaned up the mess--and I believe that these should work with all browsers.

Yes, I didn't worry much about this because I wasn't looking for a Java job. Now I suppose that having this stuff operational might be worthwhile.

In case it isn't obvious: the crime plotting applet displays the rates for all counties, and the state as a whole. Pulling down on Plot to the Configuration menu lets you select a county or multiply select counties.

I also took the opportunity to put some Google AdSense advertising at the top as well. How appropriate that the first ad that came out on the Robbery page was MoveOn offering to give away one million Obama buttons!

What a Shocker: Media Behavior At Obama's Speech

What a Shocker: Media Behavior At Obama's Speech

From The Hill:

Several members of the media were seen cheering and clapping for Barack Obama as the Illinois senator accepted the Democratic nomination Thursday.
Standing on the periphery of the football field serving as the Democratic convention floor, dozens of men and women wearing green media floor passes chanted along with the crowd.
Two members of the foreign press exchanged opportunities to take each other's pictue while wearing an Obama hat and waving a flag.
Several others nearby screamed "woo" during some of Obama's biggest applause lines.
Wow! I never would have guessed that the news media aren't being objective about the choice for President!

Wouldn't it be amusing if the progressive insistence on "economic democracy" were applied to the media, and the federal government required all news organizations to hire reporters who shared the views of the majority?

Palin As A Masterstroke

Palin As A Masterstroke

James Lindgren over at Volokh Conspiracy points out that at a Clinton supporter website, there is a vast swarm of enthusiasm for Palin. I suspect that there are Democratic women who are going to vote for McCain/Palin just because there's a woman on the ticket. That's a terrible reason--just like the very large number of Democrats who are going to vote for Obama/Biden just because's there a black person on the ticket.

I would like to think that much of this enthusiasm is driven by Clinton supporters who genuinely perceive how dangerous Obama would be as president because of his leftist naivete about foreign policy.

The most amusing part of the whole process is watching Democrats criticize the choice of Palin because of her lack of experience. This, from the party that just picked Obama? At least Palin will have months to years to get experience as Vice President--a real concern, considering McCain's age. Obama, however, starts out in the top position on January 20, 2009, with no executive experience, and not dramatically more legislative experience than Palin. Palin, at least, has two years of experience as governor of Alaska.

I wish that I could say that the McCain/Palin ticket is an extraordinarily strong one. It really isn't. But once again, the Democratic Party's fixation with leftist anti-Americanism and tokenism has caused them to pick an embarrassingly weak person for the top of the ticket. Even Hillary Clinton would have been a stronger choice than Obama--and that's quite a statement from someone who find Clinton to be destestable.

The Job Hunt

The Job Hunt

It's not exactly going gangbusters. I have applied for several software engineering positions in the Boise area. Unfortunately, these positions, because they are C#, might require several months for me to become completely effective. I fear that this inability to be effective by the end of the first week might be a real problem. The notion of hiring engineers who might actually, you know, learn on the job seems to have evaporated in the last few years.

I've applied for a software engineering job at the Idaho National Laboratory (which is about a 2 1/2 hour drive from here). It's Java, and requires not only the ability to get Secret clearance, but the Q clearance and crypto clearance. This could be interesting--even if it is a long drive.

I've also applied for a not very high paying job as an historian with the Air Force. I was a little befuddled by why an historian might need this:
Position may include training in the carrying and use of firearms because incumbent may be deployed to contingency locations and participate in contingency operations.
We didn't learn about the importance of this in grad school!

I've applied to College of Western Idaho as well for a full-time teaching job. I'm just hoping that all the history Ph.D.s around here don't push me out of the way.

It occurs to me that some of my readers might be able to help.

1. There are reputed to be conservative think tanks in the U.S. I say "reputed" because most "conservative" think tanks are really libertarian, and would have no interest in having me anywhere near them. But if you have contacts with, or influence with any conservative think tanks, even a miserable salary that allowed me to do what I do remotely would be better than unemployment.

2. I'm a pretty darn good writer, and very effective as an editor. I've done some ghost writing assignments in the past for a well-known gun rights author (I'm not naming names, of course), and it worked out well. If you know of a need for a ghost writer or editor, I can do it.

3. I have done technical writing in the past, and I'm quite good at it. I'm a far better writer than the average engineer--and a lot more "technical" than most technical writers. If you know of a company that has need of a technical writer who they can tolerate working remotely, let me know.

Sarah Palin, VP Nominee?

Sarah Palin, VP Nominee?

There's a lot of talk this morning about McCain picking Gov. Sarah Palin (R-AK) as his vice president. The Wikipedia article about her has a lot to like. (This assumes, of course, that it is accurate.) She's a hunter, life member of NRA--and was born in Idaho, and graduated from the University of Idaho. She took on the corrupt Republican Party leadership of Alaska (and there seems to be no shortage of that) and knocked them out of the governor's office. This is such a startling and wonderful thing that it tends to make me very supportive.

She's pro-life, and opposed to same-sex marriage. I can't quite tell from the article if she recognized that she was legally obligated by an Alaska Supreme Court decision to grant benefits to same-sex state employees, or if she thought that it was a good idea.

I am somewhat concerned about her relative lack of experience in government. She has a bit more than Obamessiah, but less than I would prefer--and none in foreign policy areas. Of course, anyone who criticizes her relative lack of experience is in no position to support Obamessiah!

The cynic in me thinks that McCain picked her (if he picked her) because she had five things going for her:

1. A woman. Lots of upset Clinton supporters who aren't thrilled about Obamessiah for other reasons will now have a woman to support.

2. Clean government. The Democrats are at least as dirty as the Republicans on this, and Obamessiah, with his involvement with Rezko, is especially so. There's a lot of people who may find the contrast attractive.

3. A lot of social conservatives have not been happy with McCain. Picking a pro-choice VP like Lieberman would have been bad. Picking a strongly pro-life VP will create some grudging support for McCain.

4. An NRA life member. Yet another reason for gun owners who might be wavering to vote for McCain.

5. No one should vote for a candidate because of their looks--but they do. Obamessiah looks like he stepped off the pages of GQ, and that is certainly something that helps him. And Sarah Palin was first runner-up for Miss Alaska 1984--and let us just say that she is still very attractive.

Nothing Ever Means What It Says

Nothing Ever Means What It Says

The August 29, 2008 Inside Higher Education reports on what at first seems like a rather odd idea: that political science as an academic discipline, should no longer have a subfield focused on American political science:
The precise number of subfields within political science is itself the subject of debate. Most people would include American politics, comparative politics, political theory and international relations. Some would add methodologies or area studies or various other topics, but American politics always makes the list. Should it? What would new organizations for the field look like? While the discussion of this issue Thursday at a panel of the political science association’s annual meeting didn’t find a consensus, there was agreement that the current structure has real flaws.
Scholars who called for the abolition of American politics as a subfield were not arguing that scholars shouldn’t study American politics, which may have been reassuring to audience members, most of whom identified by a show of hands as Americanists. But they said that using the United States as an organizational structure, in isolation from the rest of the world, is producing flawed ideas.
What does "flawed ideas" mean? Now we're getting to the meat of the matter:
Mary Hawkesworth, a political scientist at Rutgers University, said that when the United States is studied in isolation, “certain things get masked.” The “notion of American exceptionalism,” she said, produces “a social amnesia.” For example, she said that that the violence and corruption of the American revolutionaries receives little emphasis, so when students are exposed to the violence of other revolutions, they see no connection to the American revolution and have little tolerance for those other revolutions. Similarly, she said that slavery is taught only as “an aberration in the United States rather than as part of a racist feudalism” imported from Europe.
American politics scholars, she said, largely embrace a view of their work as “non-ideological and moderate,” limiting the critique they may offer of American society. And the current organization of political science, she said, isn’t producing the kinds of understanding that the public needs. Where was political science in predicting the reunification of Germany or the rebound of Russia? she asked. A more global perspective might make the discipline more aware and useful, she said.
Now, if you aren't in the social science academic community, you may be wondering what "American exceptionalism" means. For a great many years, many historians and political scientists believed that there was something quite unusual about America. We were the first of the Western Hemisphere colonies to throw off connection to the Old World. We were, for a number of years, into the mid-20th century, a model to which revolutionaries around the world looked. We strongly influenced at least their rhetoric (such as the French Declaration of Human Rights, and Ho Chi Minh's 1945 declaration of independence from France), and often their governmental structures, such as the Constitutions of Mexico adopted in 1824 and 1857.

The belief in American exceptionalism, while the origins may have been at least partly driven by patriotism, had at least some factual basis. There have been more than a few non-Americans who have recognized that there was something quite remarkable about what happened here. But because it smelled of patriotism, and even worse, of a Providential view of history, simply wasn't acceptable to intellectuals from the 1960s onward.

There's another term that you will occasionally see: "American particularism." This is a watered-down version: the belief that while there isn't anything exceptional about the American experience, there might well be aspects to American history that are somewhat different, even if not necessarily better.

The left is in a rather difficult situation on this idea. On the one hand, they are big on the idea that the U.S. is an exceptionally evil place. As I mentioned earlier this month, the U.S. House of Representatives passed a resolution which claimed that American slavery "resembled no other form of involuntary servitude known in history." This is simply false. Indeed, it was quite similar to slavery throughout the Western Hemisphere, and had some strong similarities to Arab enslavement of European Christians and black Africans.

There were areas of slavery that are "particular" to America relative to the rest of the Western Hemisphere. Some of these differences were bad: compared to the West Indies, American slaves were generally a minority of the population, and their African cultures were pretty effectively stamped out. But to the discomfort of the left, American particularism also includes that some of these differences were good: the U.S. imported a tiny fraction of all the slaves brought to the Western Hemisphere--but working conditions were so much better here that the U.S. ended up today with one of the largest percentages of blacks.

As one example, American slaves were very, very seldom worked to death, unlike the West Indies, where this was common in the sugar cane business. (There were American slaves intentionally worked to death in the Louisiana sugar cane business, where the need to bring in the harvest took precedence over the economic value of a slave's life.) Another example is that in the West Indies in the 18th century, newborn slaves were often thrown into ditches to die; it was cheaper to buy a newly imported adult slave than to invest food in raising a newborn to adulthood.

So what else is driving this concern about "flawed ideas"?
Anne Norton of the University of Pennsylvania agreed that the American politics formulation should go.

...

She also criticized scholars of American politics for their failure to jump on key issues. In an era in which executive power has been abused to encourage torture and to deny civil liberties, too many professors in the field seem more likely to study some Congressional subcommittee, she said, using “extraordinarily small-scale, literature driven methodological studies.”
Oh, now we're getting to the real story. Political science is too focused on being an academic discipline, not enough on being a partisan force.

Thursday, August 28, 2008

McCain's People Are Putting Together Great Ads

McCain's People Are Putting Together Great Ads

Like this one over at Hot Air, where among the many Democrats who say that Obama isn't ready for the job, there's a great quote from 2004:
You know, I am a believer in … in knowing what you’re doing when you apply for a job. Uh, and I think that … if I were seriously to consider running on a national ticket, I would essentially have to start now, before having served a day in the Senate. Now there may be some people who are comfortable doing that, but I am not one of those people. — Barack Obama, 2004

C#/.NET: I Figured This Out, With A Little Help

C#/.NET: I Figured This Out, With A Little Help

I was having some problems with something that others have run into as well:
For some reason a panel is not a first class citizen when it comes to
repainting. If you paint your own graphics into a panel and expect the
panel to refresh after dialogs and menus are dismissed - you will be
disappointed. You must do some fake out of the form to make it thinks
it needs to repaint - and a grid view ( or other less burdensome
control???) that needs repainting will cause a true WM_PAINT to be
sent to this control that you can catch and then force a repaint of
your panel then.
In practice, what this meant was that when I opened a file to load data, it would plot the data in a panel--and the menu clearing would overwrite part of the panel. I could only force the data to replot in the panel by minimizing and maximizing the form.

I asked over on the MSDN forums website, and while the helpful person didn't find me the solution, he got me thinking a bit more carefully, until I did find the solution. I added an event handler for the menu's VisibleChanged property, and had that invalidate the panel. It turns out that as soon as the menu gets done messing with the form, this event happens. I then put a panel1.Invalidate() call there, which forces a refresh of the panel.

UPDATE: It also helps to include the MouseLeave, Paint, and DropDownClosed events.

Wednesday, August 27, 2008

C# Question

C# Question

I'm doing something so simple and obvious, that I can't find a web page that explains it anywhere. In C#, you can draw directly on the Form that comes up when the program starts. But the form includes any menu bar or other controls that you have in the window, and so if you starting drawing at 0,0, it disappears under the menu bar. It looks to me like the obvious way to do this (and the one suggested by how Java does it), is to create a Panel within the Form. What amazes me is that I can't seem to find an example anywhere that does this.

I cannibalized some code that I found out there to this:

public Form1()
{
InitializeComponent();
CreateMyPanel();
}

public void CreateMyPanel()
{
Panel panel1 = new Panel();
// Initialize the Panel control.
panel1.Location = new Point(56, 72);
panel1.Size = new Size(264, 152);
// Set the Borderstyle for the Panel to three-dimensional.
panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;

// Add the Panel control to the form.
this.Controls.Add(panel1);
}
This creates a Panel on the Form just fine. But the problem is that I want Panel events (such as something that invalidates the Panel) to invoke the OnPaint method to draw something in the Panel. But how do I do this? I know that there is some magic incantation that lets you register an event handler for a Panel so that all events get handed off to be executed, but I have not been able to find it. Help!

UPDATE: I received several useful responses from readers--one of them at Microsoft. The upside of an IDE like Visual Studio is that it does so much for you. And that's also the downside. It does so much for you that it is easy to lose track of what it has done. In case someone searches the web trying to find the same answer finds this:

1. Add the Panel to the Form using the [Design] tab and the Toolbox.

2. Right click on the Panel and select Properties (if you don't already have it up).

3. Click the lightning bolt icon in the Properties panel.

4. Double click the Paint property. Visual Studio creates the event handler, and adds the following line to Form1.Designer.cs:

this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);

Everything now works as I expected.

Finally! An Ad About The Obama/Ayers Connection

Finally! An Ad About The Obama/Ayers Connection

Paul Huebl over at Crime, Guns, and Videotape
brought to my attention this campaign ad that Obama is desperately trying to stop.



The claims that Obama isn't a natural born citizen, or is secretly a Muslim? I haven't considered these highly probable--but the connection to William Ayers isn't even arguable--and it is among the most clear-cut examples of how far out the left end of the Democratic Party (of which Obama is their Messiah) really is.

If you don't think that this issue is really important: imagine if John McCain was friends with, and had started his political career in the home of someone who had bombed black churches during the civil rights struggle--and was unapologetic about it today. We would hear nothing but that every single day from the news media--and no one would take McCain seriously as a candidate.

Tuesday, August 26, 2008

C#, .NET, Visual Studio

C#, .NET, Visual Studio

I still think Microsoft's definition of C# leaves much to be desired, but it is close enough to Java that I am rapidly learning how to write Windows applications with menus, drawing graphs, etc. I think I can live with this. Now the only question is: Will anyone be willing to live with me doing C#?

Short-Term U.S. Corporate Thinking

Short-Term U.S. Corporate Thinking

I mentioned earlier
the 1993 law that pretty much required large corporations to compensate their officers in stock options, rather than large salaries--and how this encouraged very short-term thinking--just a quarter or two into the future. A reader mentioned that when Pier-Carlo Falotti took over ASK/Ingres, he commented about how strange it was that U.S. corporations (unlike European corporations) were focused on the quarterly results.

I believe that I have read about another U.S. law that encourages very short-term thinking by U.S. corporations. It was apparently a Depression-era law that requires corporations to either spend their profits within three years, or parcel them out to stockholders. I would love to find more details--but I am not sure where to start looking.

You may be asking yourself, "Why would Congress pass a law that discourages long-term planning?" If this law actually exists (and isn't just a libertarian urban legend), my guess is that there could have been two different motivations:

1. Force corporations to not hoard their money--because Keynes was arguing that Say's Law (which argues that supply and demand for goods are equal) was wrong--that the rich, by hoarding their wealth, were creating an imbalance that caused a shortage of demand for goods.

2. Fear that corporations, if allowed to save up money for decades on end, would become too powerful. You can see this idea expressed in both socialist dystopian novels (H.G. Wells' When The Sleeper Awakes) and socialist utopian novels (Edward Bellamy's Looking Backward). There's a lot of Depression era law that sought to break the power of corporations, such as the Public Utility Holding Company Act of 1935, which had the indirect effect of forcing the sale of the Red Line light rail system in Southern California.

So: is there an expert out there who can point me to the law or regulation that requires corporations to spend or dividend their profits within three years?

Updating The ScopeRoller Website

Updating The ScopeRoller Website

I decided to take a break from waiting for HP to figure out what they want me to do for the next few weeks, and update the ScopeRoller website. In particular, the "Casters" page was huge--about 211K long, plus gobs of pictures, so it took a long time to download, especially for those with dialup connections. Partly this was because the original page only had caster sets for three different mounts--now I support dozens of mounts. And it just grew.

Also, I didn't use stylesheets for the ScopeRoller website when I first put it together--and this really is the proper way to build a website now. You get consistent formatting this way, very much like using the styles in Microsoft Word, rather than applying individual formatting to every paragraph. I also had gobs of individual formatting commands left over from whatever HTML authoring program that I originally used to make the ScopeRoller website. Using stylesheets not only makes it prettier, and easier to change--but I believe that it reduces the number of bytes that have to be downloaded. This has the potential to speed up loading of pages (dependent on the number of files that get loaded indirectly through the include virtual commands).

Anyway, I am uploading the files right now. I may still make a few more tweaks, because the directory at the top is ugly, but it all looks a lot better, and loads much faster than it did before.

Understanding What Happened To HP

Understanding What Happened To HP

The full scale of what HP's layoffs will do to the local economy are just becoming apparent to outsiders. Reading the comments on the Idaho Statesman website really shows how few people really understand the causes.

1. It is not because Carly Fiorina screwed up our printer designs! Look, I dislike Empress Carly as much as anyone, but Carly wasn't designing our printers.

2. It is not because of offshoring of jobs to take advantage of dollar a day labor. Yes, HP tried to move jobs to India and China--but the reasons are not what you think. Some of the offshoring was because some countries required local content in our printers. Brazil, for example, wanted to create a local electronics industry--and so HP ended up with a development group there.

Some of the offshoring was because there were localization requirements, usually around language, sometimes around features.

But much of the offshoring to India was started because, hard as it may be to believe, in the late 1990s, HP, like many other large U.S. companies, couldn't find Americans willing to come to work for them. One of my bosses told me that she was doing college recruiting trips for HP in 1999, and these college kids would ask what kind of car HP was offering. She was confused. It turned out that some companies were leasing cars as incentives to get new college grads to come to work! Offshoring jobs to India made a lot of sense when you couldn't hire college grads--there weren't enough of them to go around.

I was never impressed with the value of offshoring. Sure, labor costs in India were about 1/4 of what they were in Boise--but we were flying engineers and highly specialized equipment both directions, at enormous cost. In addition, while many of the engineers in India were completely competent, I did start to notice the last couple of years a decline in both English competence, and engineering competence--sometimes quite shockingly so. Some projects that had been sent to India--came back, because they weren't being done well.

Why? One of my friends who has spent a bit of time in India tells me that there are a lot of what call themselves colleges there that are really just trade schools, teaching a very narrow set of skills to satisfy particular markets, such as writing software for VxWorks. The demand for "software engineers" was being filled with people that weren't really up to the standards of the first wave of offshore Indian software engineers.

3. A big part of HP's problem was that laser printers became commodity items a lot quicker than many people expected. Once consumers are buying a product strictly on price--completely unconcerned with reputation or features--then HP was engaged in a race to the bottom--one that for structural reasons that I will not discuss, HP was not suited to winning.

4. There is one problem driving not just HP, but a lot of other U.S. companies to constantly slashing workers. In 1993, Democrats in Congress showed how much they hated "rich people" by passing a law that prohibited corporations from deducting as business expenses any annual salary exceeding one million dollars--and the salaries of the next four highest paid officers. So large corporations started to compensate officers with stock options instead. This created a strong incentive for officers of the corporation to keep the stock price rising for the next few quarters--even if it destroyed the long-term viability of the company. Note that this didn't actually prevent corporations from compensating their officers quite generously. (And in truth, Democrats weren't really trying to prevent that--they were just pretending to be on the side of the little guys, while continuing to cozy up to corporate fat cats.) It just created perverse incentives for how to run a large corporation.

A company that is developing complex products will need several years from the start of the process to the point where the product starts to bring in revenue. Think of this as a tunnel: you put money in one end of the tunnel in 2004; it turns into a return on investment in 2008. The products that you start developing in 2005, won't give a return until 2009. Ditto for 2006 to 2010, 2007 to 2011, and 2008 to 2012. If your focus, because of your stock options, is driving up the stock price over the next several quarters, the temptation to go for short-term improvements is very, very strong.

Cutting spending this year may impair profitability in 2012--or maybe it won't. It's hard to tell. But you can almost guarantee that cutting spending on long-term projects this year will drive up the stock price for the next quarter or two. This is why layoffs often lead to higher stock prices. Corporate officers whose primary income is derived from stock options have a strong incentive to cut costs right now. I don't think that stock options are necessarily a bad thing. But it does encourage a short-term view of how to run a company.

Monday, August 25, 2008

The Blade Fell Today

The Blade Fell Today

It was a very sizable lay-off--and I am part of it. There are five weeks during which I am still considered to be working for them, helping to transition my responsibilities over to others (it won't take that long), and four weeks beyond that when I have no job responsibilities, but remain on salary and with full benefits--so that takes me through October 31st.

In theory, I might be able to find another job with the company. I have applied for a couple of positions in Boise, and and half a dozen positions in other divisions scattered around the U.S. Perhaps I can work something out to telecommute, or work one or two weeks a month on site. I'm not holding my breath on this possibility.

In the meantime, I am sending my resume around. There are a few jobs here in Boise (and gobs of competition from other soon to be ex-HP employees). The resume aimed at engineering work is here; the academic C.V. is here. It is a bit late to be looking for a teaching job for the fall, unfortunately.

In the meantime, I will be putting my energy into ScopeRoller; the double secret startup idea that I am trying to get funded; writing articles for popular magazines (because that pays, unlike doing the serious scholarly stuff); and trying to finish the book on deinstutionalization.

Never Bring a Fake Gun To A Gunfight

Never Bring a Fake Gun To A Gunfight

The August 22, 2008 Idaho Statesman has a story that is a reminder that alcohol and guns don't go together--even alcohol and fake guns don't go together:
A 37-year-old Boise man is being held in the Ada County Jail on a felony aggravated assault charge after a handgun standoff late Wednesday night on Table Rock.
Damon Glenn Smith was also charged with felony DUI and misdemeanor resisting arrest after the incident, which occurred at 11:48 p.m. Wednesday on top of the Table Rock mesa, a popular sightseeing spot overlooking Boise.
Witnesses told police the trouble started when a car passed Smith’s truck as both vehicles were on the way up to the top of Table Rock.
Witnesses said when Smith got to the top of the mesa, by the giant fluorescent cross which overlooks the city, he got out of his truck and pulled out a handgun, first threatening the driver of the other car, and then pointing it at other people on top of the mesa and threatening them.
At that point, witnesses said the driver of the car Smith first threatened pulled out a 9 mm handgun, pointed it at Smith, and told him he was going to disarm him. That man then took the handgun from Smith and determined it was fake.
Witnesses told police Smith got into his truck and tried to drive away but was stopped by police, who were responding to a 911 call about the fight.
Smith, who appeared visibly intoxicated had a hard time standing and failed field sobriety tests, according to police reports.
The story doesn't identify the victim who disarmed Smith, but I have received email informing me that he is 19 years old, and part of the "open carry" movement that did their little event at the Boise Zoo a few weeks ago. Being 19 years old, it would be difficult (although not completely impossible) to get a concealed carry permit in Idaho. I'm not keen on teenagers carrying guns around, but pretty clearly, this worked out well.

Sunday, August 24, 2008

You Knew The Job Was Dangerous When You Took It, Superchicken

You Knew The Job Was Dangerous When You Took It, Superchicken

Or so a former boss of mine used to say. This suit somewhat fits that cartoon--but there's a lot here that leaves me very conflicted. This August 10, 2008 Sacramento Bee article is about a lawsuit filed by police officers against a woman who has already lost her husband and son:
This is where Mies, who was 34, died of bullet wounds from the ensuing gunbattle with El Dorado County deputies.

Three deputies and a police dog also were hit in the firefight that morning; all survived.

The bloody date was June 5, 2007. Karen Mies, staggering under the news that her son had murdered her husband, told a family friend she was grateful for one thing: The wounded deputies were alive.

One year later to the day, two of the deputies filed a civil lawsuit against the widow and the estate of her deceased husband, Arthur, and her son. Officers Jon Yaws and Greg Murphy – both recovered and back at work – each is suing the Mies family for $4 million for emotional distress, medical expenses, loss of earning capacity, and punitive damages.

Given her modest circumstances, the 66-year-old hospice nurse says their $8 million claim would be laughable – if the whole situation were not so heartbreaking.

"June 5 was a tragic day for me and my family, and it was a tragic day for the deputies who were injured," Karen Mies said. "We were all victims that day. But this lawsuit is victimizing our family again. What do they want? My husband's dead, my son's dead. Do they want my house and my 10-year-old car?"

In their lawsuit, Yaws and Murphy allege the Mies family was negligent in failing to control their troubled son Eddie, behavior that led to the gunbattle and their injuries. Yaws was wounded in the arm, chest and leg; Murphy was struck once in the leg.

In addition to their physical injuries, the suit alleges the deputies suffered anxiety and humiliation.

The article explains that such suits are rare, and rarely won, because "the firefighter's rule" generally precludes emergency personnel from collecting for damages, on the theory articulated by by boss, above:

"With the firefighter's rule, the reasoning is that they voluntarily agreed to undertake these risks – they know going in that fighting crime or fighting fires is dangerous," said Julie Davies, a professor at McGeorge School of Law. "Additionally, they are paid well to encounter the risks. They're given a whole packet of benefits to compensate them if they're injured, so allowing them to sue citizens would almost be like double taxation."

Davies said there's another consideration, as well: "If people worry that they might be sued by police officers or firefighters, they might hesitate to call on them for help. And that would be bad public policy."

Now, adding to the complexity of this is that the son was mentally ill, and while his parents had made attempts to get help for him--well, regular readers of my column know that our mental health system is a disgrace. There are lots of mentally ill people with far more serious problems than the younger Mies apparently had, who do not receive treatment--and at least partly because our system has bent over backwards to protect the rights of the mentally ill to refuse treatment.

I think there's a strong argument that if Mr. X engages in criminal acts that cause injuries to Mr. Y and Mr. Z, that they have a legitimate claim against Mr. X or his estate. But in this case, they are attempting to hold the parents responsible for failure to prevent their son from gaining access to firearms, and for failure to get him adequate mental health care.

I would agree that failure to keep guns adequately secured from someone living with the family whom they knew to be mentally ill is perhaps a legitimate basis for a civil suit, depending on the circumstances involved. But at least according to this news story:
Filed in El Dorado Superior Court, the lawsuit claims that Eddie Mies should have known that he was "afflicted with certain mental health conditions" that would result in dangerous and violent behavior.
Huh? Eddie Mies was the 34 year old who shot at the police officers, killed his father, and was mentally ill. They want to hold Eddie Mies responsible for being mentally ill? This turns centuries of Anglo-American law concerning legal responsiblity on its head. Now that's crazy.

Lessons Learned On The Sherline Vertical Mill

Lessons Learned On The Sherline Vertical Mill

And fortunately, not ones that required stitches or even bandages! Some of this would be applicable to other vertical mills as well, of course. I've been making a lot more use of the vertical mill of late. As an example, I needed to make a small bearing that provided some adjustment. Here you can see how I did it.


Click to enlarge


I milled one piece of Delrin to have a 1.01" slot in it, and another piece of Delrin that was 1.00" wide. Each has a .50" diameter hole through it--through which a 1/2" steel shaft fits. Then I drilled and tapped 1/4"-20 holes in the bottom part. Some 1/4"-20 hex head bolts lock the bottom part to the shaft.

The top part has a 1/4"-20 tapped hole as well--into which a thumb screw goes. This allows me to adjust the friction against the steel shaft.

As is often observed, buying machine tools doesn't make you a machinist anymore than buying a piano makes you a pianist. I have moved from that category to rank amateur in the last year or two, and I thought I would share a few tricks that I have learned along the way.

The biggest problem with any milling machine is that you can guarantee that it won't be large enough for some project or another that you are going to try. Milling machines move in (at least) three axes: X, Y, and Z. What I have is a Sherline 5000 that has been upgraded to pretty much the specs of the Sherline 5400. It has quite a bit of motion in the Z axis (vertical) and the X axis (side to side) but relatively little motion in the Y axis (front to back). It doesn't matter what milling machine you buy--at some point, you are going to find that it doesn't have enough motion for your project. You could buy the milling machine used to make the Death Star for Darth Vader, and sure enough, there will be some asteroid too big to clamp in the jaws of the mill vise.

What, exactly, is a mill vise? It is like the vises with which you are doubtless familiar, that clamp a object in position so that drill, cut, grind, or file. But a mill vise is far more accurately made. The bottom of a mill vise (where it mates to the milling machine table) should be very, very parallel to bottom of the jaws, where the workpiece will be positioned.

The mill vise also has to hold the workpiece very rigidly in position. If it starts to move even a little, instead of cutting off ten-thousandths of an inch of material with your cutting tool, it will grab ten times that much--and either your cutting tool will stop turning, or the workpiece will get pulled out of the jaws. The net effect is ugly, either way. You may damage the workpiece. At a minimum, you will have to reposition it, and reclamp it.

The mill vise that comes with the Sherline has two irritations, one of which is easy to fix, and one of which is an opportunity to show how clever you are.

1. Take a look in this picture. See the socket head screw on the mill vise (the triangular black piece at the left of the picture)? That's what you tighten to clamp the jaws to prevent your workpiece from moving.


Click to enlarge


You tighten that down with a little tool that Sherline provides. It works great..for a while. The problem is that putting enough force on the socket head to clamp workpieces in place tends to chew up the head. Over time, I found myself having more and more problems getting the vise to hold the workpiece, and I couldn't figure out why. The reason is that I just wasn't clamping the workpiece so well anymore.

The good news is that this 10-32 socket head screw is extremely common, available in just about any hardware store, and you can afford to buy a dozen of them for a couple of dollars. Keep them around; as soon as you start having problems getting a good clamp on a workpiece, replace the screw.

2. Another irritation is that the Sherline mill vise is pretty small. You can't really put anything wider than 2" into the vise. Is there a solution to this? Yup. If you have something wider, you need to build a fixture that is 2" wide that either epoxies onto, or screws into, the workpiece that you need to machine. Or you use the other clamping mechanisms that are offered to hold a workpiece to the table. There are larger mill vises offered by Little Machine Shop.

In addition to the irritations that are specific to this mill vise, there are some that are general--and which any mill vise is going to have.

1. I found out by asking around, and frustrating experimentation, that if the workpiece is more than about four times the height of the mill vise's jaws (which are about 1" high on the Sherline), that the forces exerted by the cutting tool will exceed the friction that the mill vise can exert--and the workpiece will start to slip. This is especially a problem if the cutting tool that you are using is moving parallel to the jaws. In this picture, you can see how I have turned the mill vise to the side, so that the cutting tool will be moving left to right along the table, and therefore perpendicular to the jaws.


Click to enlarge


If you are doing what is called "plunge milling," where you move the cutting tool vertically to machine an edge, again, you are going perpendicular to the jaws, and there is less of a problem. Obviously, you can't get too enthusiastic like this. Try to plunge mill off a tenth of an inch of aluminum or steel, especially if you try to move down too quickly, and your jaws will lose grip. (Well, perhaps Darth Vader's Death Star vertical mill could handle it.)

2. Another aggravation is that if you position the workpiece exactly in the center of the mill vise, you will quickly discover that the back of the mill vise limits your motion in the Y axis--where most vertical mills are a bit deficient, anyway. The back of the mill vise will run into the vertical rail upon which the cutting tool goes up and down. So what's the solution?

Let's take a look at this picture again.


Click to enlarge


I've put the workpiece off center in the mill vise--and for some what I have been doing, it was way more off center than that. Notice how the back of the mill vise (just barely visible between the workpiece and the rail with the sockets in it) is actually sufficiently far to the left that it doesn't impact the vertical rail. Problem solved.

You will also find that turning the mill vise backward--so that the clamping socket head screw is pointing away from you--provides a lot more opportunity for positioning a workpiece. It's a bit clumsy to tighten and loosen the mill vise, but it does provide more ways to get a large workpiece in the right position relative to the cutting tools.

Great Moments in Nerddom

Great Moments in Nerddom

I was busily applying for jobs within my current employer; we have job openings all over the United States. (I'm hoping that telecommuting will be feasible.) One of the jobs for which I was applying asked me to describe a complex technical problem that I needed to solve, and how I did so. I decided to give an example that, when I look back on it now, makes me realize what a hopeless nerd I was.

I was working for a company that sold Interdata minicomputers. At the time, if you bought a minicomputer, you bought extra RAM from the minicomputer maker. An upstart named Keronix decided to make some money by making aftermarket RAM. The various minicomputer makers were not amused or pleased. No one ever established a connection between Data General and the arson fire that destroyed Keronix--but there were people who did not find this implausible.

Anyway, what I explained on the application was that:
My employer had an Interdata 7/16 minicomputer--but when they put the Keronix RAM into it, it would no longer boot the Interdata operating system. My job was to figure out why.

1. I solved the problem by single stepping through the entire boot sequence, using a somewhat out of date listing of the operating system. I did this by inserting branch to self instructions into memory through the front panel of the minicomputer. (This was very easy: the Branch Short * instruction was a single word--I think X'22FE'.)

2. By this approach, I was able to determine that the last instruction executed before everything went haywire was an OC (Output Command) starting a DMA operation to the hard disk controller. The instruction immediately following the OC was suddenly an illegal instruction.

3. Why? Because immediately after the OC instruction, bit 13 of every word in the first 16K of RAM suddenly turned to zero. This meant that the next instruction was illegal (not defined in that processor's instruction set).

4. The illegal instruction interrupt now took place. And the first instruction of the illegal instruction interrupt service routine (ISR)? Why, that was a DI (Disable Interrupts) command. But because bit 13 was now zero, that DI command was itself illegal--and so the illegal instruction ISR started up again. And again.

This was enough information for our hardware engineer to start poking around, and discover that there was something not quite to spec about the hard disk controller--that caused bit 13 of RAM to turn to zero.

This was my first job, when I was 17.
As I said: born to be a nerd.

Friday, August 22, 2008

No, I Don't Believe It

No, I Don't Believe It

But it is always nice to see a Democrat filing a suit like this:
A prominent Philadelphia attorney and Hillary Clinton supporter filed suit this afternoon in the U.S. District Court for the Eastern District of Pennsylvania against Illinois Sen. Barack Obama, the Democratic National Committee and the Federal Election Commission. The action seeks an injunction preventing the senator from continuing his candidacy and a court order enjoining the DNC from nominating him next week, all on grounds that Sen. Obama is constitutionally ineligible to run for and hold the office of President of the United States.

Philip Berg, the filing attorney, is a former gubernatorial and senatorial candidate, former chair of the Democratic Party in Montgomery (PA) County, former member of the Democratic State Committee, and former Deputy Attorney General of Pennsylvania. According to Berg, he filed the suit--just days before the DNC is to hold its nominating convention in Denver--for the health of the Democratic Party.

"I filed this action at this time," Berg stated, "to avoid the obvious problems that will occur when the Republican Party raises these issues after Obama is nominated.".

I don't believe it, mostly because it would be just too convenient, watching the Democratic Party self-destruct. But we all have little fantasies of wonderful but unlikely things that we would like to have happen, don't we? Our Space Brothers could land, bringing us a cure for cancer, hatred, and war. Warren Buffett could transfer $100 million into my savings account. A platinum-iridium meteor weighing 500 pounds could land on my property. A time traveler from the year 2224 could leave the plans for a desktop nuclear fusion reactor in my office. And someone could prove that Obama isn't a natural born citizen of the United States!

Employment

Employment

There's a strong possibility that I will get caught in the big layoff on Monday. If I could have sold the old house in Boise, this wouldn't be a major problem. I wouldn't mind teaching, and if I could get the old house sold, I could just about afford to do it. With only the one house payment, I would not be burning through savings. But that house isn't selling--even at the now bargain price of $289,000.

This suggests that I should be looking for an engineering job. There aren't a lot of jobs for software engineers in the Boise area--and the jobs that are there are for people with experience that I don't have (C#, .NET) or where I have not terribly current experience (Java) but I would be competing with engineers with recent computer science degrees who are decades younger than me.

I was thinking of going through the ABCTE certification process, so that I can get a high school teaching position--but this an extraordinarily bad time to be looking for a teaching position. (And I'm sure that my co-workers with school age children who get laid off on Monday, and have to relocate a month or two into the school year, are going to be even more upset than me. The joys of working for a company run by liberals.)

Pretty obviously, the best situation would be another engineering job, one that pays well enough to keep those mortgages current while I wait for the economy to recover. If you are aware of a position that comes up that could tolerate a telecommuter (perhaps one week a month on site), I would appreciate hearing about it.

My language experience: C (about 18 years, both embedded systems and user interfaces on PC-DOS and Unix); assembly language for antique microprocessors (about eight years, largely embedded); Java (about two years, a little rusty); C++ (just a little); PL/M-86 (about two years--try not to laugh); Korn shell (about six years); Perl (just a little).

My application experience: data communications development (porting an SNMP server, porting a DHCP server, DSL access multiplexer development); telecom (telephone switch code); operating systems (device drivers for antique microprocessors and operating systems, building a file system in PL/M-86); in-circuit emulator development (both user interface design and development, and embedded code); telemetry processing software (for the Voyager mission at JPL); system administrator for a mixed Sun Unix, PC, and Mac network (some years ago).

SCMs: I have made extensive use of ClearCase (these last six years); SourceSafe; and RCS. I have also been ClearCase administrator and SourceSafe for a startup (a dozen engineers), and I set up the wrappers around RCS for another startup--and those wrappers were still in use eight years later.

Technical writing: Regular readers of my blog know that I write law review articles, popular magazine articles, books, and I'm pretty competent at it. I also have substantial experience writing technical manuals. At one startup, I created the technical writing department from scratch, leading a team of three writers in getting our technical manuals going. I'm a lot more technical than the average technical writer (as you can see above), and I'm a far better writer than the average engineer--a perhaps useful combination.

Supervisory experience: At three different companies I have been a manager, supervising groups of 2-3 people (engineers in two companies, technical writers in the third). I'm pretty good at it.

C# Whining Again

C# Whining Again

One of the virtues of Java is that it was a clean sheet of paper. While there are some obvious similarities in keywords and syntax to C, they weren't slaves to it. C++, because it had as its goal to be upward compatible with existing C code, suffers a bit by comparison.

C# doesn't have that need for upward compatibility from C or C++, and that's generally a good thing. But I don't think that one should break upward compatibility without a good reason. In C, and C++:

int *x, y;

means a pointer to an integer x, and an integer y. One of them is a pointer, one is an integer. C# decided that:

int* x, y;

means that both x and y are pointers to an integer. This is a significant difference, one that will almost certainly cause a lot of developers who have moved from C and C++ to make mistakes. Now, C# discourages the use of pointers--they are mostly present for getting access to pre-.NET interfaces--but therefore all the more reason why they should have stuck with the C/C++ declaration syntax.

Thursday, August 21, 2008

Where The Money Is Coming From

Where The Money Is Coming From

It is always interesting to see where the money is coming from in elections. To my surprise, Walt Minnick has raised quite a bit more money than Bill Sali (more than one million dollars vs. not quite $650,000 for Sali)--and when you look at where the money is coming from, it does suggest something about who wants Sali out.

If you go to OpenSecrets.org, they give a variety of ways to breaking out the data. The breakdown of in state vs. out of state money shows that, surprisingly enough for an incumbent, the majority of Sali's contributions are coming from Idahoans: 59%. Minnick's money is even more lopsidedly the other direction: 69% is coming from out of state.

The big individual contributors to Bill Sali are business PACs and the NRA. Minnick's big contributors seem to include a lot of labor unions--no surprise there. The breakdown by zipcode is quite interesting--and may not go over well with a lot of Idahoans.

Top Metro Areas

Walter Clifford Minnick (D)

Metro AreaTotal
BOISE CITY$137,848
NEW YORK$118,073
SEATTLE-BELLEVUE-EVERETT$44,100
PORTLAND-VANCOUVER, OR-WA$30,027
SAN FRANCISCO$20,200

William T. Sali (R)

Metro AreaTotal
BOISE CITY$29,600
WASHINGTON, DC-MD-VA-WV$12,100
CHICAGO$4,500
PHILADELPHIA, PA-NJ$2,300
BOSTON, MA-NH$2,300
CINCINNATI, OH-KY-IN$2,300

Where Does Walt Minnick Stand On Illegal Aliens?

Where Does Walt Minnick Stand On Illegal Aliens?

A recent survey by Rasmussen Reports shows that there is overwhelming support for stopping the influx of illegal aliens into the United States:
A growing majority of Americans believe that gaining control of the border is more important than legalizing illegal immigrants, and three out of four (74%) say the government is not doing enough to make that happen.
Sixty-nine percent (69%) of voters in a new Rasmussen Reports national telephone survey say controlling the border is more important than legalizing the status of undocumented workers, while just 21% think legalization is more important.
Only 14% think the government is doing enough to secure the borders.
Thirty-four percent (34%) say the current immigration situation makes them angry, and another 25% characterize themselves as mildly frustrated. For 40%, immigration is just one of many issues.
These numbers are comparable to the findings in a June survey on the same topic. At that time, 83% directed their anger at the federal government, while only 12% blamed the illegals themselves.
I know where Bill Sali (R-ID) stands:
"President Ronald Reagan was right when he said, “The simple truth is that we’ve lost control of our borders and no nation can do that and survive.” Securing our borders is a matter of national security, personal security and financial security. We cannot claim to be serious about the war on terror or say that we support our troops when terrorists, in many areas, can simply walk across our borders. While employers who knowingly hire illegal immigrants should be prosecuted, the fact remains that terrorists are not coming here looking for jobs. While illegal immigrants are clearly causing serious financial pressure on our schools, courts and health care systems, the terrorists are not coming here for education or health care. Something is terribly wrong when we send our military to secure Iraq’s border with Syria while at the same time refusing to secure the borders of this country.
Congress must take immediate action to secure our borders. Securing our borders will not only enhance our national security, it will improve our financial security by stopping the epidemic of illegal immigration and the great strain that illegal immigrants place on our state and local governments. I would like to note that in 2005 our border patrol apprehended some 115,000 illegal aliens from countries other than Mexico (no one knows how many others made it through).
There are some who say we must give amnesty to the millions of illegal immigrants in our country – I disagree. Amnesty does nothing more than reward illegal behavior. We must keep respect for the rule of law as the principle shaping the heart of our border and immigration policy. It is nonsense to think that a person who broke our laws to enter our country illegally will suddenly begin obeying our laws if we give them legal status through a grant of amnesty.
Where does his Democratic opponent, Walt Minnick, stand? Under "Issues," Minnick has a number of different pages--but not a word about illegal immigration that I can find. Nor was I able to find anything that Minnick has said in the news media on the subject.

I don't know about you, but I think it would be quite entertaining to try and get Minnick to say where he stands on this issue. Since he is a Democrat, I rather suspect that he is going to try and weasel word his response rather than admit that his objective is to keep cheap, easily exploited labor coming into the country for the benefit of business interests.

UPDATE: Here's a video where Minnick agrees that we need to control our borders for national security reasons. He agrees that something needs to be done on the demand side, such as prohibiting hiring of illegal aliens. (Well, it's a bit late to do that. That's already illegal.) Minnick does claim that we need more immigration to fill jobs that Americans won't do, at least when the economy is growing. Minnick says that it "doesn't make sense" to arrest and deport illegal aliens, and wants to give them an incentive to "come out of the shadows" by paying a penalty and getting at the back of line. But he also said that deporting them doesn't make sense. It appears that he supporting the McCain/Kennedy amnesty proposal.

UPDATE 2: Just to be clear about this: Minnick is correct that we don't have the resources to track down and deport all twelve million illegal aliens. But we do have the resources to deport those who come to our attention as a result of Social Security matching when someone starts work, or when an illegal alien is arrested. We do need to work on the demand side--by punishing employers who knowingly hire illegal aliens. We do need a better fence. But when city and county governments prohibit their police officers from informing ICE about illegal aliens that they have arrested--that's idiotic. It might take ten years to get this problem under control, using all of these methods. But it's better than rewarding those who have broken our immigration law, by giving them a path to citizenship.

A Powerful Commentary By Someone Who Used A Gun In Self-Defense

A Powerful Commentary By Someone Who Used A Gun In Self-Defense

This appeared in the August 20, 2008 York [Penn.] Daily Record:

June 28, 2008, was a defining moment in my life. It was the day I shot and killed a man in the defense of my life and the lives of others. We all have defining moments. They might not be as tragic as taking another man's life, but they are events that change the way we look at things -- or even, perhaps, how we live our lives.
Before that muggy Saturday evening in June, I would have said my defining moments were many: graduating from high school; enlisting in the Army; getting married; having children; getting run over by a tow truck; and especially, meeting my fiancée, Maria. All of these events, and more, have happened in my life and changed me.
It is worth reading in full. Mr. Fentiman is clearly a very thoughtful, very articulate man describing a horrible situation where the only realistic choice was for him to intervene to protect a woman from a person who was either insane or so filled with rage that he might as well have been insane.

California vs. the First Amendment

California vs. the First Amendment

I do hope that this gets challenged to the U.S. Supreme Court--there is a real issue here. From the Pacific Justice Institute's press release:
In a major decision likely to re-draw the battle lines of the gay rights movement, the California Supreme Court today ruled against two doctors who declined to artificially inseminate a lesbian.

The doctors, who are Christians, strongly believe that children should be raised whenever possible by a mother and father. To that end, they did not want to participate in the deliberate exclusion of a father as sought by Guadalupe Benitez and her partner, Joanne Clark. Instead, the doctors paid for a referral of Ms. Benitez to other fertility specialists who did not have any moral objections to administering the treatment, and she now has three children. Nevertheless, Ms. Benitez was so offended by the doctors' stance that she sued them under California's sweeping civil rights laws.

Today, California's highest court unanimously ruled that the state's civil rights laws offer virtually no exceptions for people of faith. Unless the ruling is eventually overturned by the U.S. Supreme Court - which only hears about one percent of all the cases appealed to it - or is modified by the gay-friendly California legislature, its implications appear to be far-reaching. For instance, the ruling probably means that, regardless of their beliefs, everyone in the state's wedding industry must service gay weddings, California family law attorneys must handle gay adoptions and same-sex divorces, and so on.
There has been a long tradition in the U.S. of governments, when passing laws, making some accommodation for legitimate religious beliefs. For example, during World War II, our laws provided for conscientious objectors to refuse military service. Many of them were put to work in hospitals instead. Many of the laws prohibiting discrimination against homosexuals exclude religious entities. The argument that liberals use for this naked use of power is that the doctors are providing a service. If they don't want to be subject to the law, they can stop being doctors, or they can leave California. And I rather suspect that this is the goal: to force every Christian in California to either smile stupidly and pretend that there's no problem, or to leave. Unfortunately, there's no chance that liberals will decide that individuals have a right of conscience.

Can you imagine how differently the world would be if 1960s America had been as intolerant of gay rights activists as gay rights activists are of Christians?