The advertising above is just a source of revenue, and sometimes, I don't know what will appear there.

Unique grips and accessories for your 1911!

Clayton Cramer's BLOG

Clayton's commentary on news and events of the day. Broadly speaking, I'm a conservative with libertarian sympathies (getting more conservative as my children get older).



Email me at blogmail at claytoncramer dot com. Sorry to be so indirect, but all spambots must die! But they haven't died yet! Include the word spamIamnot in your subject line to make sure that my spam blocker lets you through.

This page is powered by Blogger. Isn't yours?

Saturday, September 13, 2008
 
Boise Software Engineer Positions

In light of the big layoff at HP in Boise that included at least many dozens, and perhaps hundreds of software engineers, I was quite interested to see on the Idaho Department of Labor website, this position listed:

Job Description

Job Title:

Computer Software Engineers, Systems Software

Job Number:

ID1323905

Location:

Boise

Min Salary:

DOE

Hours/Week:

40

Max Salary:


Duration:

FT over 150 days

Experience:

60 months

Education:

BD

Min Age:

18

DriversLicense:

n/a

Typing:

0

DLEndorsement:

n/a

Shift:

Days

Occupational Lic:

No

Job Description:

Define, analyze and review system requirements that will be used for product definition and development. Take into account customer expectation, product roadmap and company strategy. Manage changes to firmware to correct errors in the original implementation and create extensions to existing programs to add new features or performance improvements through external resources. Review requirements, specifications and designs to assure product quality. Develop and implement plans and tests for product quality assurance. Work with technical marketing teams to understand and prioritize customer escalations and requirements. Partner with development teams to deliver requirements. Ensure software quality. Keep metrics on product release and present to upper management as necessary. MINIMUM JOB REQUIREMENTS: Bachelor`s or foreign degree equivalent in Electronic Engineering, Engineering, Computer Science, Computer Engineering or related field plus five (5) years of post-baccalaureate, progressive experience in job offered, or as a system engineer, software development engineer, systems/software engineer, product engineer, integration process engineer, technical support engineer, project manager or related occupation. SPECIAL SKILLS REQUIREMENTS: C++; Linux; Microsoft Project; Microsoft PowerPoint; Microsoft Excel & Office Tool Suite


Multiple positions--and so generic that it would fit most of the software engineers that HP just laid off. So I decided to apply. It turns out that you have to login to the Idaho Dept. of Labor website and apply before you see who the employer is.
Job ref: BOISHI. Please mail resumes with reference number to Hewlett-Packard Company Attn: P. Ramirez, 19483 Pruneridge Avenue, MS 4206, Cupertino, CA 95014.
The reference number is ID1323905. The email address is petra.ramirez@hp.com.

Well, that's curious. They are looking to hire people with experience quite similar to those that they have just laid off. What's with that? Especially because I can't find the position listed on the internal job list. Anyway, I went ahead and applied, and I would encourage any of you software engineers with the right experience, and who are U.S. citizens or permanent residents, to do likewise. I would be very curious to know if there were some other job requirements that didn't make it into the ad.


Friday, September 12, 2008
 
It Just Gets More Delicious Every Day

Instapundit points to the futures trading on the possibility that Obama Messiah might replace Joe Biden on the Democratic ticket with Hillary Clinton. If Obama and his staff have any brains at all, they would immediately recognize this as about the only action that they could take worse than what they are doing now.

Such a move (no matter what excuse they came up with) would be obviously done in response to the astonishing power of the Palin choice to be President-in-Training. Even many of those Clinton backers who were disgruntled by Obama's refusal to pick Clinton as VP would be enraged by the gross pandering of such a substitution now. I rather suspect that Clinton would refuse such an offer now simply because she would rather see Obama and friends go down to such a whopper defeat that in 2012, the Democratic Party takes its marching orders for Clinton.

Such a replacement would also establish what is becoming obvious to all but the most hopeless idol worshippers: that Obama and his band of winged monkeys lack the judgment to run a decent burger joint, much less the United States. (Once again: those brilliant people that run the Democratic Party appear to be in danger of being outfoxed by those intellectual lightweights, those knuckle-dragging Neanderthals, those ignorant, foolish, snake-handlers known as the Republican Party.) Is anyone old enough to remember George McGovern's choice of Senator Thomas Eagleton to be VP--and then within a week, he abandoned Eagleton because Eagleton had undergone ECT for depression? Even back then, there were a lot of Republicans who thought that this ECT history wasn't so bad--but McGovern's abandonment of Eagleton showed a fundamental lack of integrity.

Now, if Obama Messiah decided to let Clinton be at the top of the ticket, and he took the VP slot, that would certainly give the Democrats some hope of beating Palin and whatshisname--but it's a bit late in the game for that, and would produce an internal fight so bad that Democrats might start looking over their shoulder at the Greens, Peace & Freedom Party, Flat Earthers, and the Let's Have A Party Party with concern.

Labels:



 
Sharpening The C# Program

I decided that all this positioning of controls in dialog windows was really ugly and clumsy, so I decided to use the TableLayoutPanel container instead. It lets you define an table, very much like HTML uses for displaying tables, and you can position stuff at (col, row) within the table.

The first try worked fine--but every cell in the table was used, and it worked fine. When I tried another dialog window, where some of the cells were empty (for example, on the first row), I could not get it to work correctly. Nor could I find an example using the SetRow and SetColumn methods anywhere.

So I changed to using TableLayoutPanel.Add(control, column, row) instead--and it worked just great! Then I fancied it up a bit by changing from the default font for some of the items:

// Bring up a dialog box to ask which links to print.
Form dlgWebPage = new Form();
TableLayoutPanel panel = new TableLayoutPanel();
panel.RowCount = 4;
panel.ColumnCount = 6;
Label printChoices = new Label();
printChoices.Font = new Font("Arial", 12, FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
printChoices.Text = "Which Links To Print?";
printChoices.AutoSize = true;
panel.Controls.Add(printChoices, 3, 0);
Much nicer! There's still some work to take advantage of some of the docking and anchoring capabilities of TableLayoutPanel, but I'm learning one thing at a time.

Also, I decided that I really wanted these dialog windows to resize themselves to exactly fit the controls contained therein. The strategy that I used was to record the maximum X and Y values of the controls within the panel as I added each control:
maxX = Math.Max(maxX, printChoices.Location.X + printChoices.Size.Width);
maxY = Math.Max(maxY, printChoices.Location.Y + printChoices.Size.Height);
I can probably smarten this up to a single function call to which I pass some struct that includes maxX and maxY, and the control. I'll do that tomorrow, I think.

Then, when I am ready to add the panel to the dialog window:
panel.ClientSize = new System.Drawing.Size(maxX, maxY);
dlgWebPage.Controls.Add(panel);
This makes the interior of the panel (the client size) the size of the most extreme outlier of the controls. Then:
dlgWebPage.ClientSize = panel.Size;
This makes the client size of the dialog window the size of the exterior of the panel. Much more elegant!

UPDATE: I'm getting ready to go to bed, so I'm not going to update the source tonight, but the change to factor out the common code was actually quite elegant:
private void maxCoord(ref Point max, Control control)
{
max.X = Math.Max(max.X, control.Location.X + control.Size.Width);
max.Y = Math.Max(max.Y, control.Location.Y + control.Size.Height);
}
In the function that creates the dialog window:
// Keep track of the farthest point down and right within the panel.
Point max = new Point(0, 0);
...
panel.Controls.Add(printChoices, 3, 0);
maxCoord(ref max, printChoices);
...
panel.ClientSize = new System.Drawing.Size(max.X, max.Y);
dlgWebPage.Controls.Add(panel);
dlgWebPage.AutoSize = true;
dlgWebPage.ClientSize = panel.Size;
The next phase of elegance would be to derive a class from TableLayoutPanel that does this for me when I call the Add method, so that it records the coordinates somewhere, and then uses them to resize the client.

Labels:



 
Why They Hate Palin

Very thoughtful column by Dick Morris and Eileen McGann in the September 12, 2008 New York Post about why Democrats are venting such incredible rage on Palin:

Why do Democrats feel so threatened? They've even stopped attacking McCain and President Bush to launch a vicious and sexist barrage at her that would normally make a feminist angry and a Democrat blush.

Basically, it's this: John McCain only endangers Democratic chances of victory this November, but Sarah Palin is an existential threat to the Democratic Party.

She threatens a core element of the party's base - women.

When an African-American like Clarence Thomas, Colin Powell or Condi Rice rises to prominence as a Republican, he or she endangers the Democratic coalition. So would a Republican labor leader.

And so, above all, does the woman Republican running for vice president.

Democrats can't stomach seeing the feminist movement's impetus for greater female political participation and empowerment "hijacked" by a pro-life woman who espouses traditional values. They must obliterate her, lest her popularity eat away at their party's core.

They also point out that she is part of real America. Until a couple of years ago, Palin was a pretty typical American mother and housewife, serving on the PTA, raising kids, with a blue collar husband. Compare that to Hillary Clinton, who has always been part of the elite that pretends to be concerned about us "little people" but has never been one of us. Do you remember when Hillary Clinton put $1000 in a commodities trading account, and it mysteriously grew 100x in a year or two? Yeah, she was just lucky!

Labels:



 
The Election News Gets Better

Gallup reports
that the generic Congressional party preference poll now shows the Democrats only 3% ahead of Republicans:
PRINCETON, NJ -- A potential shift in fortunes for the Republicans in Congress is seen in the latest USA Today/Gallup survey, with the Democrats now leading the Republicans by just 3 percentage points, 48% to 45%, in voters' "generic ballot" preferences for Congress. This is down from consistent double-digit Democratic leads seen on this measure over the past year.
Now, don't get too excited by this. Incumbency remains a powerful advantage, and it is often the case that voters express disapproval of a particular party--and yet support their Representative or Senator who is of that party. But there is the chance that some of the close races (typically a couple dozen in both houses of Congress) might tip Republican because of this. I am not holding out hopes of getting control of both houses--but even narrowing the Democratic margin would make it easier for President-in-Training Palin's boss to get useful stuff done, since a number of the Democrats elected to the House in 2006 were pretty darn conservative!

What does concern me is the enormous number of leftists who might go on rampages if not only Obamessiah loses the election, and Republicans make even modest gains in Congress. There could be horrifying incidents on Rodeo Drive, Central Park West, and in Vail and Aspen as they lose control of their rage behind the steering wheels of their Aston Martins, Ferraris, and Lamborghinis.

Labels:



Thursday, September 11, 2008
 
Memories

That day stands out, as it does just everyone who was an adult or teenager at the time, much like another generation will always remember where they were when they first heard about Pearl Harbor. It's kind of weird that on 9/11/01, I was worrying about my employer, who was starting to give promises instead of paychecks, and I was starting to look for a new position. Today, seven years later, I'm again looking for a new position--although at least the paychecks haven't stopped yet.


 
Watching CNN News: Are They Getting Worse?

We've cut back the number of satellite channels we get in preparation for the looming end of my paychecks, and that means that we no longer get Fox News. I have become increasingly irritated with how full of himself Bill O'Reilly has become over the last couple of years. I have also been so pleased with Glenn Beck's program on CNN. Maybe Beck is as arrogant as O'Reilly in private--but at least Beck doesn't come across that way on the air.

On a number of occasions in the last couple of years, I have flipped back and forth between CNN Headline News and Fox News, and not seen a huge difference. It almost seemed as though Fox's presence had made CNN a little more responsible in admitting that there were, you know, like more than one point of view. And unfortunately, both CNN and Fox are too focused on celebrity news. Anyway, I thought to myself, "Maybe competition has improved CNN's journalistic integrity."

So I was quite disappointed to watch one of CNN's political commentary shows, and see them almost laughing at this crazy idea that Gov. Palin has that anthropogenic global warming isn't proven. They were treating the idea as equivalent to believing that the Earth is flat. You could tell that they were having trouble resisting the urge to start making fun of her redneck stupidity.

There is nothing so tragic as a person who is arrogant in his ignorance.

Labels: ,



 
Imagine If This Scandal Involved Gov. Palin's Pastor

Do you think that there would be anyone, anywhere, who would not have heard about it fifty eight times in one day? From the September 9, 2008 New York Post:

He almost wrecked Barack Obama's presidential dreams, and now firebrand pastor Jeremiah Wright has helped destroy a Dallas church worker's marriage - and her job, The Post has learned.

Elizabeth Payne, 37, said she had a steamy sexual affair with the controversial, racially divisive man of the cloth while she was an executive assistant at a church headed by a popular Wright protégé.

When word of the unholy alliance got out, Payne's husband dumped her, and she was canned from the plum job at Friendship-West Baptist Church, she told The Post.

"I was involved with Rev. Wright, and that's why I lost my job and why my husband divorced me," Payne said.

She refused to reveal when the adulterous affair started or how she met Wright.

But fellow churchgoers at Friendship-West "found out about the affair in the spring," Payne said.

At the time, she was secretary to the Rev. Frederick Haynes III, a longtime Wright disciple.

In April, Payne organized a series of Texas public appearances by Wright, 67. Weeks before, Obama had disavowed his preacher of 20 years after Wright's anti-government rants came to light.

"Liz was by Rev. Wright's side day and night during those days," a church source said.

"It's all true," said Payne, adding that she has filed a wrongful-dismissal claim with the Equal Employment Opportunity Commission to get her job back.

In an ironic twist, Wright last night spoke at an East Orange, NJ, church revival on the subject of "unexpected problems."

"There's no such thing as a problem-free relationship," he told a packed Elmwood United Presbyterian Church. "In life, you'll have unexpected problems."

Now, Obama has disavowed Rev. Wright's racist, hate-filled ideology--after attending his church for twenty years, and only after he became an embarrassment--so perhaps we shouldn't attach too much importance to this. But remember all the nice things that Obama said about Rev. Wright before the disavowal? Hmmm. Rev. Wright. Tony Rezko. Bill Ayers. I think Obama might need some lessons in how to pick friends. I'm not going to jump up and down about John McCain's wonderfulness--but those who keep seeing Obamas as the One need to take a real careful look at their idol.

Labels:



 
Never Too Young?

I confess that with the rapid decline in the age of puberty, and the fierce sexualization of children that the entertainment media promotes, it does seem that sex education needs to be aimed a bit lower in age than it used to be. But kindergarten? Sweetness & Light has the new McCain ad about Obama's major accomplishment in the education area--requiring sex education for kindergartners in Illinois schools--and a clip of Obama boasting about it last year before Planned Parenthood. You can also read the text of the bill, including the fascinating requirements and changes to the old code on this:

Section 5. The School Code is amended by changing Sections 27-9.1 and 27-9.2 as follows:

(105 ILCS 5/27-9.1) (from Ch. 122, par. 27-9.1) Sec. 27-9.1. Sex Education.

(a) No pupil shall be required to take or participate in any class or course in comprehensive sex education if the pupil’s his parent or guardian submits written objection thereto, and refusal to take or participate in such course or program shall not be reason for suspension or expulsion of such pupil. Each class or course in comprehensive sex education offered in any of grades K 6 through 12 shall include instruction on the prevention of sexually transmitted infections, including the prevention, transmission and spread of HIV AIDS. Nothing in this Section prohibits instruction in sanitation, hygiene or traditional courses in biology. (b) All public elementary, junior high, and senior high school classes that teach sex education and discuss sexual activity or behavior intercourse shall emphasize that abstinence is an effective method of preventing unintended is the expected norm in that abstinence from sexual intercourse is the only protection that is 100% effective against unwanted teenage pregnancy, sexually transmitted diseases, and HIV acquired immune deficiency syndrome (AIDS) when transmitted sexually.

There is, very unfortunately, a need to discuss preventing pregnancy in sixth grade, and perhaps even fourth and fifth grade now. But kindergarten? Really? I would hope that in kindergarten, the only sex education that a child needs is, "If someone is touching you in one of your private areas, you need to tell your teacher, or a police officer."

And notice the change in the language about abstinence. Away from the notion of "expected norm" and the indisputably true statement about "100% effective."


 
Oh Dear, A Whole Generation of Liberals Are Going To Have Give It Up

When I was young--and even when I ceased to be young--it was an article of faith that the Rosenbergs were victims of the deranged, McCarthy-era paranoia. I can remember a classmate insisting up and down that the Rosenbergs were executed because of the rampant anti-Semitism of the 1950s. So now we have this interesting admission--finally--in the September 11, 2008 New York Times:
Ever since he was tried and convicted with Julius and Ethel Rosenberg on espionage charges in 1951, Morton Sobell has maintained his innocence.

Until now. In an interview on Thursday, Mr. Sobell, who served nearly 19 years in Alcatraz and other federal prisons, admitted for the first time that he had been a Soviet spy. And he implicated his fellow defendant, Julius Rosenberg, in a conspiracy that delivered to the Soviets vital classified military information and what the American government claimed was the secret to the atomic bomb.

In the interview, Mr. Sobell, who is 91 and lives in the Bronx, was asked whether as an electrical engineer he turned over military secrets to the Soviets during World War II when they were considered allies of the United States. Was he, in fact, a spy?

“Yeah, yeah, yeah, call it that,” he replied. “I never thought of it as that in those terms.”

“What I did was simply defensive, an aircraft gun,” he added. “This was defensive. You cannot plead that what you did was only defensive stuff, but there’s a big difference between giving that and stuff that could be used to attack our country.”

Mr. Sobell drew a distinction between defensive radar and artillery devices and the atomic bomb. But he said that the sketches and other information on the bomb that were passed along to Julius Rosenberg by Ethel’s brother, David Greenglass, an Army machinist at Los Alamos, N.M., where the bomb was being built, were of little value to the Soviets, who had already gleaned much of it from other sources.

“What he gave them was junk,” Mr. Sobell said of Julius Rosenberg. The two men became friends while attending City College of New York in the 1930s.

Mr. Sobell added, though: “His intentions might have been to be a spy. The fact that he didn’t know it was junk makes that debatable.”

Mr. Sobell, who refused to testify at his trial, was sentenced to 30 years imprisonment but was released in 1969. The Rosenbergs were executed in the electric chair at Sing Sing.

Mr. Sobell made his revelations on Thursday as the National Archives, in response to a lawsuit from the National Security Archive, historians and journalists, released the bulk of the grand jury testimony in the espionage conspiracy case against him and the Rosenbergs.

Mr. Sobell is ailing, but says his long-term memory is sound. He has repeatedly professed his innocence and has said earlier of the Rosenbergs, “I would not take the position that they were absolutely innocent.”

In the interview on Thursday, Mr. Sobell affirmed what has become a consensus among historians: that Ethel Rosenberg was aware of her husband’s espionage, but did not actively participate.

“She knew what he was doing,” Mr. Sobell said. “The only thing she may have done is talked to her brother, but Julius knew her brother as well as she did.”

Mr. Greenglass, in an interview for a book by this reporter, “The Brother,” acknowledged that he had lied when he testified that his sister had typed his notes about the bomb — the single most incriminating evidence against her. That allegation emerged months after Mr. Greenglass and his wife testified before the grand jury and only weeks before the trial was to begin.

Government prosecutors later acknowledged that they hoped a conviction and the possibility of a death sentence against Ethel Rosenberg would get her husband to confess and implicate others, including some agents known to investigators through secretly intercepted Soviet cables.

Labels:



Wednesday, September 10, 2008
 
C#: More Improvements, More Learning

I've added Page Setup and Page Preview to the Web Page Link Audit Tool. I spent a bit of time trying to figure out why Print Preview would show the page on the screen--but printed a blank page.

It turned out that my strategy for making the PrintPage method work was to have it use some variables to keep track of whether various parts of the output had been formatted for printing yet. The Page Preview command invoked the PrintPage method to set up output for the screen--but when I hit the Print button in that window, the variables keeping track of printing said that everything was done. You can see how I solved this by looking at how I reset those variables on the last time exiting from PrintPage.

Labels:



 
It Could Be Worse

I visited a co-worker in the hospital today. He had a stroke at work a couple of days after being given the layoff notice. I'm sure that this was a complete coincidence--don't you agree?

His right side is largely paralyzed. He's able to speak, mostly, but he is having trouble putting the words out. I asked him questions to which he could answer yes and no, and he confirmed that he has the words in his head, but can't make his speech apparatus say them. He is in pain.

Kurt was always a cheerful, happy person when I worked with him--and in spite of the circumstances, he is still a shockingly cheerful person.

There are human costs to layoffs, things that don't show up on the stockholder balance sheets, or get discussed at wine and cheese parties.


Tuesday, September 09, 2008
 
Sexual Behavior Among Teens

Well, that should get all sorts of visits from people who will soon be disappointed! I ran into an article by Janice Shaw Crouse touting abstinence education at Townhall.com. My sympathies are definitely with those who would like to see abstinence more strongly encouraged.

At the same time, the existing studies that I have seen, and what I have seen of how teenagers operate (and my own memories of being a hormone-crazed teenager), suggest that abstinence education alone is inadequate, or at best, its value is insufficiently proven. It certainly helps, but teenagers need a lot more supervision than they are getting--or Johnny and Suzie kissing passionately on the couch after school, likely as not, are going to get started down a path that will lead to sexual intercourse, no matter how pure their intentions. And if they aren't using a condom--or at least know where one is--STDs and pregnancy (with all the horrible choices that this leads to) are strong possibilities.

So, I looked at Crouse's article, and I tried to verify her claims:
The Centers for Disease Control and Prevention report that the number of sexually active teens has declined from 54 to 46 percent and that a majority of teens said that abstinence education was an important factor in their decision to abstain from sex. Other extensive studies by the Adolescent and Family Health journal credit abstinence for a 67 percent decline in teen pregnancies. A study by the National Longitudinal Study of Adolescent Health reflected a 40 percent lower likelihood of pregnancy for girls taking virginity pledges.
Look, I really want to believe this. But the best way for me to believe that this is accurate is to see what these studies reported, and how they were performed. Crouse's article has no links, no footnotes, and trying to find the evidence for these claims has not been easy.

The first claim led me to this National Center for Health Statistics press release from December 2004, which in turn led to a fact sheet as well as a detailed report, which indeed reported that the number of sexual active teens declined between 1988 and 2002. Table 1 of the detailed report shows 51.1% of females in 1988 had ever had sexual intercourse, dropping to 49.3% in 1995, and 45.5% in 2002. Among males, the respective percentages were 60.4%, 55.2%, and 45.7%.

From the standpoint of pregnancy, the good news is that those who were sexually active seem to be getting the message about contraception, with reports of the use of some method of contraception at first intercourse much more common in the latter period. If you are going to do something foolish, don't compound your foolishness!

But concerning abstinence education and its benefits? I can't find anything in the report. The closest that I can find is in Table 29, which shows that 31.4% of teenagers aged 15-19 reported that they had not yet had sexual intercourse because it was against their religion or morals. That might be because of abstinence education, but that would only be a guess--and it doesn't tell us if abstinence education is making a difference, or if the values that are being taught at home are doing this.

Table 28 shows what percentage of teens had taken a virginity pledge as of 2002: 20.5% of males, and 25.1% of females. And amazingly enough, it mostly worked. 15.8% of the males and 19.8% of females (or roughly 3/4 of those who took a virginity pledge) had successfully followed through on this. But again, this might tell us what abstinence education did, or what a strong parental encouragement did, or what their own strong moral codes caused them to do.

Most depressing is this tidbit from the fact sheet:
First intercourse was nonvoluntary for 10 percent of teen females
Maybe Johnny and Suzie are making out on the couch after school because no one's home, and they scurry off to the bedroom. But maybe Johnny doesn't take "no" for an answer. Suzie might have genuinely meant "no." She might have had mixed feelings about it, too, half wanting it to happen, and half not wanting it to happen. What was I saying about the need for more supervision for teenagers?

The journal Adolescent and Family Health I managed to find without problem, but I don't know what articles Crouse is referring to, so I can't look for them. The journal doesn't make the content of articles available except to print subscribers, so I can't really read those articles anyway. More importantly, they describe themselves as:

Adolescent & Family Health, the Journal of the Institute for Youth Development, is a peer-reviewed quarterly publication for objective, scientific research that focuses on the common factors influencing youth behavior and risk avoidance.

The Institute believes in a comprehensive, multidisciplinary approach to the avoidance of alcohol, drugs, sex, tobacco, and violence, which includes recognition of the importance of family factors.

I cringe a little when I read this, not because I disagree with their intentions, but for the same reason that I cringe at a lot of the leftist academic journals out there: there's a bit too much "No one I no voted for Nixon!" when you aren't talking to anyone who disagrees with you.

Finally, I found the National Longitudinal Study of Adolescent Health web page. It sounds like one of those well-intentioned research projects that produce vast quantities of data. But "a study by" (as Crouse describes it) doesn't help me find the study. It would appear that the data coming out of this organization is used by a lot of different academics studying various problems.

Footnotes: there's a reason that academics (and anyone else that wants to be taken seriously in the battle of ideas) uses them: they make it possible to see if you know what you are talking about or not.


Monday, September 08, 2008
 
C#: The Web Page Link Audit Tool

Okay, first try is ready for your amusement or use. You can read all about it here.

You can use this program to examine web pages for broken links. You enter a web page from the File menu, and it goes through the web page, testing every link for whether it is broken or working. If a link goes to a web page at the same directory level as the first page you entered, this tool recursively descends, checking all of the links on those pages. Links that are to pages that aren't HTML (or at least, are obviously not HTML) are only checked to make sure that we can open them.

You can print out the results. I'm going to make this smarter with time.

Install it from here.

Pretty obviously, there are tools out there that do this (and a lot more). But it was nice to build something that I actually needed, while learning C#. I started work on this Saturday morning.

It's unfortunate that employers insist on engineers with two years of C#--and aren't prepared to take a couple of months for someone like me to get up to speed.

UPDATE: I've added some smarts in the File Print Links command so that you can select which category of links to print.

UPDATE 2: I've added a check box in the open web page command so that you can tell it to only audit the links in the specified web page--not to recursively examine other web pages at the same or inferior levels. Especially if you have a web page that links to your blog, it can take a very long time to recursively checks this.

Labels:



 
C# Pagination Example Wanted

Unlike Java Swing, which seemed to have a pretty painless way of printing text, C#/.NET is a bit ugly. (Or perhaps I haven't found the right method of making it painless.) To print to the printer, you use the Print method of PrintDocument, which in turn calls a PrintPage method that prints one page at a time. From this method, you draw everything onto a Graphics context just like you are drawing on the screen, and set the HasMorePages element of the PrintPageEventArgs to indicate whether there is another page to format.

What makes this ugly is that if you are trying to figure out how to print a report, you do sequentially: print out the title, and then a series of lines of information, perhaps a summary. I suspect that the way to make this happen in this page by page event driven scheme is to create some sort of output stream that the PrintPage event handler consumes, one page at a time.

There are a number of very simple printing examples out there--so simple that they don't deal with pagination. And there are some very complex schemes, that might make sense if I were a bit further along in my learning of this. But does anyone have a simple C# pagination example?

UPDATE: I came up with a solution, but it isn't very pretty. You can see it, and run the program, from here.

Labels:



 
Mainstream Media Bias

A very funny piece of satire that I just found over here:
"Palin Dodges Tough Questions About Existence of “Alaska”

By Elizabeth Bumiller, New York Times, Wednesday, September 3, 2008; A1

Media Bubble, Sept. 2 — Embattled former beauty queen Sarah Palin* continued to wilt yesterday under the pressure of numerous fair, evenhanded media questions regarding the alleged state of “Alaska.”

Palin has claimed to be “governor” of the legendary northern land mass, which, while heretofore undiscovered by explorers, was once rumored to contain vast expanses rich with oil, gold, and “eski-mos.” Palin first made the “Alaska” claim during an Aug. 29 public appearance alongside elderly, mean-looking cancer victim John McCain.

McCain, a white man with even whiter hair, has long publicly blocked efforts by Barack Obama, a youthful black man with a certain indefinable aura about him, to move into Obama’s new house. Palin, also white-skinned, has been linked to the McCain offensive.

After four days of telling silence from the McCain camp, Palin finally deigned to reappear in public yesterday. In a followup press conference, Palin, who is a girl, lashed out at the media. “Listen to me: Alaska. Is. A. State. Seriously. The 49th state, in fact. Way up north there. What, did somebody go around your newsrooms and hide all the maps underneath the ethics manuals? Or are you idiots just completely insane?”

Shaking her head in a transparent attempt to feign exasperation, Palin — who is perhaps not as pretty as she thinks she is — then left the podium without answering followup questions regarding her plagiarism of CBS’s Northern Exposure. Internet reaction to the unfit mother’s unhinged rant was swift. Andrew Sullivan, right-wing blogger for The Atlantic, saw Palin’s comments as a major misstep. “She’s working the refs. This is what they do. Sure, blame the media. Is it their fault she’s too chicken to back up these suspicious claims? “Look, I’m willing to entertain the idea that there really is a place called ‘Alaska.’ We’ve all heard the old wives’ tales, and I’ve dreamed about such a rugged, outdoorsy paradise since I was about 13 or 14. But why is she so afraid to give us some proof? I mean, I’ve never been there, have you?”

Yukon Cornelius could not be reached for comment.

Update: After consultation with the Association of American Geographers and several DC-area kindergarten students, the Times can now report that many current world maps contain a small area in the northwest corner of North America labeled “Alaska.” Palin’s relationship with the mapmaking industry is currently under investigation."
And the tragedy is that something almost this outrageous wouldn't surprise me in the New York Times.

Labels:



 
The Broken Link Auditor

I mentioned yesterday that for my next C# learning experience, I was writing a program that read web pages and looked for broken links. I am almost ready to make it visible. It does work--and I am not terribly surprised to find that some of my web pages have broken links. When I started it search from my home page, it started auditing my blog, which is in the same directory--and my, are there a lot of broken links, especially in postings from a couple of years back! This isn't surprising, since many of these links to newspaper and magazine articles.

Anyway, I'm glad that I wrote this program, both for the experience, and because it has found a few broken links in my non-blog web pages, and this makes it easier to fix them. You may find it useful for your own web pages.

Labels:



 
Willie Brown on Sarah Palin

Willie Brown has been a lot of things in California politics, including mayor of San Francisco; Speaker of the Assembly (the lower house of the state legislature). He is an unabashed liberal, having sponsored the bill to legalize homosexuality in 1975. (Yes, hard as it may be to believe, homosexual sex used to be a felony in California.)

He's a very cunning politician. When a number of his colleagues were taking bribes from undercover FBI agents, he was smart enough to recognize that such overt bribery was illegal, or at least not what it seemed to be, and returned the envelopes stuffed with cash to the agents.

So this column by Willie Brown in the September 7, 2008 San Francisco Chronicle is quite astonishing:

The Democrats are in trouble. Sarah Palin has totally changed the dynamics of this campaign.

Period.

Palin's speech to the GOP National Convention on Wednesday has set it up so that the Republicans are now on offense and Democrats are on defense. And we don't do well on defense.

Suddenly, Palin and John McCain are the mavericks and Barack Obama and Joe Biden are the status quo, in a year when you don't want to be seen as defending the status quo.

From taxes to oil drilling, Democrats are now going to have to start explaining their positions.

Whenever you start having to explain things, you're on defense.

I actually went back and watched Palin's speech a second time. I didn't go to sleep until 1:30 a.m. I had to make sure I got the lines right.

Her timing was exquisite. She didn't linger with applause, but instead launched into line after line of attack, slipping the knives in with every smile and joke.

And she delivered it like she was just BS-ing on the street with the meter maid.

She didn't have to prove she was "of the people." She really is the people.

There is one thing she should have done: announced when her 17-year-old daughter and the teenage father of the girl's unborn child are getting married and invited all of us to the wedding. It should be like Sunday at church.

As for Palin herself, she is going to be very, very effective on the campaign trail, especially if McCain's people can figure out how to gently keep her from getting into confrontations with the press.

Labels:



Sunday, September 07, 2008
 
Another Slip of the Tongue From Obama

Apparently, some people are using just one little excerpt of Obama referring to "my Muslim faith." Fortunately, there was a reporter there to correct him. From the September 7, 2008 Washington Times:

OBAMA: Now, well, look. Listen. You and I both know that the minute that Governor Palin was forced to talk about her daughter, I immediately said that's off limits. And...

STEPHANOPOULOS: But John McCain said the same thing about questioning your faith.

OBAMA: And what was the first thing the McCain's campaign went out and did? They said, look, these liberal blogs that support Obama are out there attacking Governor Palin.

Let's not play games. What I was suggesting -- you're absolutely right that John McCain has not talked about my Muslim faith. And you're absolutely right that that has not come...

STEPHANOPOULOS: Christian faith.

OBAMA: ... my Christian faith. Well, what I'm saying is that he hasn't suggested...

You could almost wonder: was this just a slip of the tongue? We often find ourselves using certain phrases so often that we don't think about them before we use them. Just to put the best Manchurian Candidate paranoid spin on it--is "my Muslim faith" a phrase that Obama uses often in private, and it just "slipped out"? Probably not. But aren't you glad that there are reporters present to help him through these embarrassing slips? It's unfortunate President Bush hasn't had the advantage of a sympathetic press corps to help him through his Bushisms.

Labels:



 
The Bumper Sticker Someone Needs To Make

Elect Palin and What's His Name in 2008!

UPDATE: CafePress already has something similar:
I'm not voting for McCain.
I'm voting for Palin.

Labels:



 
Sarah Palin's Time Machine

She must have one. How else to explain this? Michelle Malkin tells us about a list that is being circulated of books that supposedly Sarah Palin tried to get banned:

Palin Derangement Syndrome strikes again. This time it’s hysterical librarians and their readers on the Internet disseminating a bogus list of books Gov. Sarah Palin supposedly banned in 1996. Looks like some of these library people failed reading comprehension. Take a look at the list below and you’ll find books Gov. Palin supposedly tried to ban…that hadn’t even been published yet. Example: The Harry Potter books, the first of which wasn’t published until 1998.

The smear merchants who continue to circulate the list also failed to do a simple Google search, which would have showed them that the bogus Sarah Palin Banned Book List is almost an exact copy-and-paste reproduction of a generic list of “Books Banned at One Time or Another in the United States” that has been floating around the Internet for years. STACLU notes that the official Obama campaign website is also perpetuating the fraud.
Now, there are people that believe in banning books. I mentioned back in 2006 liberal law professor Eric Muller's efforts to get Malkin's book prohibited from government bookstores, and his discussion of filing suit against book publishers for selling a book to a public school that he found offensive because it promoted Christianity. But that's par for the course with liberals, who seem at least as hostile to freedom of speech (unless it involves naked children) as any conservative.

Labels:



 
The Racist Who Wants To Be Vice President!

An editorial from the October 25, 2007 Washington Post discusses Joe Biden's theories of race and education:

Biden also stumbled through a discourse on race and education, leaving the impression that he believes one reason that so many District of Columbia schools fail is the city's high minority population. His campaign quickly issued a statement saying he meant to indicate that the disadvantages were based on economic status, not race.

After a lengthy critique of Bush administration education policies, Biden attempted to explain why some schools perform better than others -- in Iowa, for instance, compared with the District. "There's less than 1 percent of the population of Iowa that is African American. There is probably less than 4 or 5 percent that are minorities. What is in Washington? So look, it goes back to what you start off with, what you're dealing with," Biden said. He went on to discuss the importance of parental involvement in reading to children and how "half this education gap exists before the kid steps foot in the classroom."

The Biden campaign moved quickly to clarify the senator's remarks in a statement: "This was not a race-based distinction, but a discussion of the problems kids face who don't have the same socio-economic support system (and all that implies -- nutrition, pre K, etc.) entering grade school and the impact of those disadvantages on outcomes."

Huh? He didn't say that the problem of Washington's school was because the kids were poor, but because they were black.

Now, it is sometimes difficult to tease out whether the problems of ghetto blacks are tied to race, or tied to poverty. There are desperately poor whites in America as well, and they have serious problems too. Sometimes, it is difficult for social scientists to gather data that lets them compare equivalent populations. Where do you find large groups of poor whites living in crowding, substandard housing in an urban area? You get the problem that social scientists call collinearity, which makes it difficult to figure out whether the characteristics of a group are because of race, because of poverty, or perhaps some other factor.

As an example: blacks are very disproportionately violent criminals (usually against other blacks). But because blacks are, on average, much younger than whites, and violent crime is strongly correlated with youth, you may be seeing a consequence of there being a disproportionate percentage of blacks in the peak violent crime years. You may be seeing the consequences of limited job opportunities, or of racism. I've long suspected that lead paint exposure may be a factor as well, since lead poisoning increases aggression and causes retardation, and blacks are disproportionately in older urban centers where there is still a lot of lead paint. There is probably some connection to the absence of fathers; black families have been shattered far more than white families, and again, it is difficult to tease out the exact causes.

Unless the evidence is very clear that race really is the determining factor (for example, sickle cell anemia), it is highly questionable, and incredibly bad politics, to assume that race determines this. Biden isn't too bright, I'm guessing.

Labels: