Category Archives: Programming

Command line tools strike again

Every morning at 3:00, one of our servers grabs the latest code from our source repository and runs the build script.  As you would expect, the build usually completes without error and everything’s fine.  From time to time, though, one … Continue reading

Posted in Computers, Programming | 3 Comments

Command line XML processing

Today I got a big XML file full of yummy audio and video links that my Web crawler will just love to slurp up.  Not thinking, I wrote a quick grep command to extract some of the links and send … Continue reading

Posted in Programming | Comments Off

GNU tools for Windows

I got annoyed with Windows today.  I had this HTML file that contained a bunch of links to RSS files I wanted to download and examine.  The task before me was to extract the URLs, remove duplicates, and then download.  It’s … Continue reading

Posted in Computers, Programming | 2 Comments

It’s harder than it looks

Imagine that you have a web site that, among other things, allows your users to search for media (audio and video) using a simple query language.  So, if you want to find Britney Spears videos, you’d just type britney spears … Continue reading

Posted in Programming | 1 Comment

Sniffing network traffic

My latest crawler modifications require me to scrape Web pages that host videos so that I can obtain metadata (title, description, date posted, etc.) that we place in our index.  Unfortunately, there’s no standard way for sites to present such … Continue reading

Posted in Computers, Internet, Programming | 1 Comment

A small change?

I’ve been programming computers for a long time.  Getting paid to write computer programs, even, which I thought was pretty darned funny when I first started.  People were paying me to do something that I loved.  But I digress. After … Continue reading

Posted in Computers, Programming | 2 Comments

Looking for a Ghost Replacement

When describing the problems I was having configuring our new servers, I mentioned that I was going to try using Clonezilla to speed the process.  The idea was to get Windows installed and all the other software configured on one … Continue reading

Posted in Computers, Programming | Comments Off

Another .NET Framework bug?

When faced with inexplicable program behavior, inexperienced programmers often blame the operating system, the runtime library, the compiler, or some other external force for the error.  Even when they discover that the bug is in their code, these programmers often … Continue reading

Posted in Programming | Comments Off

“Highly Unlikely” is not the same as “Impossible”

One of my programs crashed the other day in a very unexpected place:  inside the runtime library.  The exception stack trace is pretty clear on where the error occurred: System.OverflowException: Negating the minimum value of a twos complement number is … Continue reading

Posted in Programming | 3 Comments

Stack Overflow

For most of the ’90s, I was a part of TeamB—a group of volunteers who helped answer questions on Borland’s Compuserve forums.  I met a bunch of really great people doing that, got some free Compuserve time, a few trips … Continue reading

Posted in Internet, Programming | 2 Comments

Source Code is Formal Communication

When developing a new program—especially when trying out many different things—it’s common to pepper your code with various messages that are displayed when the program reaches a particular point or when it encounters a condition that you thought was impossible.  … Continue reading

Posted in Programming | Comments Off

Shakespeare vs. Markov

I’m developing some code to work with Markov models, and as an early test I created a model of Shakespeare’s sonnets.  Then I had the program generate some verse from the model.  For example: If they in thou, thy love, … Continue reading

Posted in Odds 'n Ends, Programming | 2 Comments

No IEnumerable.ForEach?

Overall, I like working with C# and the .NET Framework.  But sometimes I just can’t imagine what the designers were thinking when they put some things together.  High on the list of things I don’t understand is the lack of … Continue reading

Posted in Programming | Comments Off

An Assumption of Competence

My second programming job was with a small commercial bank in Fresno, CA, where I helped maintain the COBOL account processing software.  I was still pretty inexperienced, having only been working in the industry for about 18 months.  My previous … Continue reading

Posted in Debugging, Programming | 1 Comment

Interface Annoyances

We ran into a rather difficult class design problem recently that reveals a shortcoming in C# and, apparently, the .NET runtime (specifically, the Common Language Infrastructure, or CLI). It’s a pretty common problem, and I’m a little bit surprised it … Continue reading

Posted in Programming | 2 Comments

Optimizing the wrong thing

Today I was building a custom hash table implementation and needed a function that, given a number X, would find the next prime number that is equal to or greater than X.  Since X could be pretty large—on order of … Continue reading

Posted in Programming | 1 Comment

Paranoia versus productivity

We had an interesting discussion at the office about how much validation a collection type should do in its constructor. The key question, I think, came down to this: If the constructor can determine that using the instantiated object will … Continue reading

Posted in Programming | Comments Off

Multicore Crisis?

There’s been some talk recently of the next “programming crisis”: multicore computing. I’ll agree that we should be concerned, but I don’t think we’re anywhere near the crisis point. Before I address that specifically, I think it’s instructive to review … Continue reading

Posted in Computers, Programming | 4 Comments

C# and .NET: What’s Next?

About 10 days ago, MSDN’s Channel 9 site released an hour-long video entitled Meet the Design Team, that talks in very vague terms about uncoming features in C# 4.0.  You’ll learn that the language will include more dynamic constructs and built-in … Continue reading

Posted in Programming | Comments Off

Exceeding the Limits

We generate a lot of data here, some of which we want to keep around. Yesterday I noticed that I was running out of space on one of my 750 GB archive drives and figured it was time to start … Continue reading

Posted in Computers, Programming | 3 Comments