By Jim, on February 7th, 2012% In The White Board Inquisition, I mentioned the FizzBuzz program as a minimum standard for identifying programmers. It’s a simple test that any programmer should be able to write in just a few minutes.
Write a program that outputs the numbers from 1 to N on the console, with these exceptions. If the number is divisible . . . → Read More: FizzBuzz as a litmus test
By Jim, on February 3rd, 2012% PowerShell has some nice built-in command line parameter parsing. I’ve only been wishing for something like this for … well, forever.
Imagine you have a script that accepts four parameters:
-EnvironmentName (or -e), which is mandatory -DestinationDir (or -d), which is mandatory -UserName (or -u), which is optional -Password (or -p), which is optional
Usage . . . → Read More: PowerShell parameter parsing
By Jim, on January 31st, 2012% This is another one of those “I can’t believe I have to address this” posts.
Eventual consistency is sometimes used as an optimization in middle tier and back end processing to help balance the load on busy servers and provide a scalable architectures. In client-centered applications like large Web sites, the idea is to respond . . . → Read More: Eventual consistency and client applications
By Jim, on January 25th, 2012% If you’re looking for examples of Congressional idiocy, it’s hard to beat the story of $1 Billion That Nobody Wants. In short, there are about 1.5 billion one-dollar coins piled in bags in Federal Reserve vaults. Why? Because nobody wants them. Why is the U.S. Mint still making them? Because Congress said so.
Congress has . . . → Read More: A billion dollars that nobody wants
By Jim, on January 18th, 2012% In religion, politics, and other endeavors, Truth is an elusive goal. Depending on your beliefs, Truth might be found in the Bible, the Torah, Koran, the Democratic Party platform, or the lessons you learned while traipsing through the woods. Truth, in most endeavors, is highly subjective.
Truth is subjective in programming, too. If you have . . . → Read More: There is one source of Truth
By Jim, on January 12th, 2012% My friend and business partner David Stafford recently posted a blog entry, .Net’s Sort Is Not Secure. Don’t Use It. Here’s a Better One, in which he shows that the .NET sort implementation (used by Array.Sort and List.Sort, and possibly others) can easily be made to exhibit pathological behavior.
How bad is it? You can construct . . . → Read More: Why you shouldn’t use the .NET sort
By Jim, on January 7th, 2012% The term “technical debt“, as commonly used, refers to the eventual consequences of poor software design or development practices. The Wikipedia article and most other references consider technical debt to be a Very Bad Thing. The literature is filled with examples of development projects whose combined technical debt eventually killed or seriously hampered the company.
. . . → Read More: In Praise of Technical Debt
By Jim, on January 3rd, 2012% You’re probably wondering if this is really necessary. Believe me, I’m a bit surprised by it myself. But every day I see evidence that supposedly competent programmers don’t understand this fundamental point.
What am I talking about?
Let’s say you have two lists. One is a list of accounts and the other is a list . . . → Read More: Half of forever is still forever
By Jim, on December 31st, 2011% I laughed out loud when I saw this picture.
I was nine years old when Dad bought a trampoline. He had us check out some books from the library so we could learn the proper way to jump. I don’t know how much attention everybody else paid to those books, but I kind of . . . → Read More: Elephant on a trampoline
By Jim, on December 29th, 2011% When I started working on yesterday’s blog entry about cache contention, I built an example program that used an array to illustrate the problem. That is, rather than having a struct that contains four counters, I just allocated an array. It made the code somewhat simpler, as you can see here.
const long maxCount = . . . → Read More: More about cache contention
By Jim, on December 28th, 2011% Multithreading is A Good Thing. Many solutions can be structured so that you can bring multiple processor cores to bear on the problem, and you can get very close to linear increases in throughput. That is, your quad-core processor will complete a job four times as fast as a single-core processor. Or very close to . . . → Read More: More threads makes the program slower?
By Jim, on December 26th, 2011% This is the fourth in a series of posts about writing a Web crawler. Read the Introduction for background and a table of contents. The previous entry is Politeness.
In the discussion of Crawling Models, I distinguished between two types of crawlers: “offline” crawlers that download documents and have a separate process create queue segments . . . → Read More: Writing a Web Crawler: Queue Management, Part 1
By Jim, on December 22nd, 2011% I haven’t given up on the carving. I’ve spent the last few weekends cutting up wood and making cutouts for those little birds. I enjoyed making those so much that I decided to send them to family and friends for Christmas. Last week I sent out a dozen, and I have more in the works.
. . . → Read More: Short carving notes
By Jim, on December 20th, 2011% This is the third in a series of posts about writing a Web crawler. Read the Introduction for background and a table of contents. The previous entry is Crawling models.
When you’re writing a Web crawler, it’s important for you to understand that your crawler is using others’ resources. Whenever you download a file from somebody . . . → Read More: Writing a Web Crawler: Politeness
By Jim, on December 20th, 2011% The big news story today was the death of Kim Jong-il, leader of North Korea. Of all the commentary I heard, one idea struck me as rather funny in a “you’re more right than you realize” kind of way. I don’t recall who it was that NPR interviewed, but his comments were to the effect . . . → Read More: The death of Kim Jong-il
By Jim, on December 16th, 2011% This is the second post in a series of posts about writing a Web crawler. Read the Introduction to get the background information.
Expectations
I failed to set expectations in the Introduction, which might have misled some readers to believe that I will be presenting a fully-coded, working Web crawler. That is not the case. . . . → Read More: Writing a Web Crawler: Crawling Models
By Jim, on December 14th, 2011% In C# versus the data structure, I described the skip list data structure and the difficulty I saw with implementing it in .NET. I published a C# implementation a couple of months ago, and it did indeed suffer from excessive memory usage. It performed quite well, but the memory requirement of 100 bytes per node . . . → Read More: Skip list revisited
By Jim, on December 13th, 2011% This is the first of a series of posts about writing a custom Web crawler. It assumes some knowledge of what a Web crawler is, and perhaps what crawlers are typically used for. I don’t know how many posts this subject will require, but it could be a rather long series. It turns out that . . . → Read More: Writing a Web Crawler: Introduction
By Jim, on December 6th, 2011% I’ve put together a desktop computer to use for development at home, and I need to get a new monitor for it. The old ViewSonic 15″ LCD that we paid $1,200 for 10 years ago is still in good shape, but its maximum resolution of 1280 x 1024 is not big enough to do serious . . . → Read More: Shopping for a monitor
By Jim, on December 5th, 2011% Sam and Ralph were among my favorite Looney Tunes characters. I thought of them this morning when I said hello to my co-worker as I came into the office. So I thought I’d look them up on YouTube. Google is great. I searched for [wolf sheepdog looney tunes], and got the Wikipedia article.
All told, . . . → Read More: Sam Sheepdog and Ralph E. Wolf
|
|
|