Archive
  • Home
  • Ripsaw Series
  • Accelerated C++

Parks Computing

Pedagogy for the Autodidactic Programmer

Welcome to the personal web site of Paul M. Parks. This is where I keep my web development skills current while sharing snippets of code, utilities, libraries, and what little development wisdom I've gathered in my career. It's also where I show off my family, talk about my hobbies, or just pontificate from time to time.

If you find the articles interesting, or if you'd like more information on a particular topic, let me know [paul@parkscomputing.com].

Looking for Havanafolks.com?

The site www.havanafolks.com should be working fine now. If you still can't get there, please let me know. I apologize for messing up the redirect yesterday. I share web space with my brother Phil, and yesterday when I was converting to Blogger I messed up the redirect that forwards his traffic to his folder. He actually gets a lot more hits than I do, so I feel pretty bad. Sorry, bro!

By the way, the picture is of me and my brothers, Phil and Steve. It was taken at my parent's 50th wedding anniversary / family reunion a couple of years ago, and I think it probably says all I need to say.

Labels: ,

Posted April 27, 2009 0 Comments

Guitar Videos

I've uploaded some videos of me playing the guitar to my YouTube site. Go take a look and let me know what you think.

I've got a lot more stuff that I plan to upload, such as a step-by-step instructional video series on how to play Spanish Fly, which is so far the second most-difficult piece I've ever learned. The most difficult, by far, is Paganini's Caprice No. 24. I'm still trying to polish that one before I post it.

Here's a sample:

Labels: ,

Posted April 26, 2009 0 Comments

Updating More Often

I wired my site up to Blogger so now I won't have any excuse for not updating my site more often. Maybe now I'll drop a new entry in every few days, or perhaps even start writing regular articles.

There's still a lot of content linked from my top menu that's old and out of date. I will probably start moving a lot of that to archive eventually and replace it with more up-to-date content.

Labels: ,

Posted 0 Comments

Pre-emptive Snarkiness

It's all about the sense of humor, people. First of all, read the "pre-emptive snarky comment" that I wrote in the earlier entry about the dragsens utility. It's pretty clear that, first of all, I'm tipping my hat to Raymond Chen by even adding a pre-emptive snarky comment. Second, it should also be clear that I'm mentioning the size only because I'm trying to head off any snarky comments about it. Alas, that just doesn't stop some people.

In my first comment to Raymond's article I mentioned that it took me only eleven minutes to write the utility. That was the entire point of the exercise, really. If the utility happens to be useful as well, that's fantastic. In fact, the reason that I bothered to take an extra 30 seconds and link in the C runtime was to make it easier to use. Just copy it to your favorite USB drive, and off you go. If you don't have 84KB free on your drive for the ZIP file, then that's still okay. You can download the source and VS project and build it any way you like. Not a problem.

So, despite the fact that I clearly stated that I was aware that I could make the utility very tiny if I wanted to take the time to do so (when I said, "Of course you could. So could I."), someone still didn't get it. I guess quoting me out of context, or perhaps even putting words in my mouth, is more fun.

If I wanted to make it smaller, perhaps I could dispense with the CRT altogether. Perhaps I could write it in assembly language. Who knows. It doesn't matter. I just wasn't inclined to take any more time gold-plating what I regarded as a very simple exercise. The utility does what it is supposed to do, with a very tiny investment in programming time. That's all I was out to prove. I made the source freely available, with no strings, in case anyone wanted to tweak it to handle some situation that I didn't think about, or perhaps wanted a different implementation (like setting the width and height separately).

As Raymond might say, I can't believe I had to write that.

Labels: ,

Posted April 15, 2009 0 Comments

Windows Drag Sensitivity Utility

Inspired by an article by Raymond Chen about how to correctly change the Windows mouse drag sensitivity, I wrote a quick utility called dragsens. It's a small command-line utility that will allow you to change the number of pixels the mouse has to travel before a drag operation is initiated. Just download and unzip the utility, then run it at the command line, supplying a single parameter that is the number of pixels for the mouse to travel.

In Raymond's honor, I'll provide my own pre-emptive snarky comment: "That executable is 164KB! I could write that in only 4KB!"

Of course you could. So could I. I linked in the C runtime library so you wouldn't have to install the Visual Studio 2008 distributable package just to run a simple command-line utility. I don't normally do that with typical desktop applications, but for small utilities like this is saves a lot of trouble.

If you'd like modify the utility, or examine its source, you may download the Visual Studio 2008 project. If you just want the utility itself, you may download a ZIP of the executable.

About the Utility

The utility is actually very simple. It accepts a single parameter, which is the number of pixels the mouse must travel with a button depressed before the motion registers as a drag action. Rather than separate out the width and height, I just set both to the same number since this is generally all that's necessary.

BOOL success = FALSE;

success = SystemParametersInfo(SPI_SETDRAGWIDTH, numPixels, NULL, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

if (!success)
{
DWORD error = GetLastError();
std::wcout << L"Error " << std::hex << error << std::dec << " while setting drag width." << std::endl;
return 1;
}

success = SystemParametersInfo(SPI_SETDRAGHEIGHT, numPixels, NULL, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

if (!success)
{
DWORD error = GetLastError();
std::wcout << L"Error " << std::hex << error << std::dec << " while setting drag height." << std::endl;
return 1;
}


It would be fairly simple to modify the application to set the width and height independently, if you so desired.

Update

I'm already at version 1.1. I decided to add a version resource and support for a "/?" parameter.

About the Snarky Comments

Please see the entry entitled Pre-emptive Snarkiness for my response to the comments about my utility that were posted on Raymond's blog.

Labels: , ,

Posted April 10, 2009 3 Comments

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

Subscribe to Posts [Atom]