Package scope and unit testing with Java

I have a Java unit testing question. First, let me describe a scenario. Let’s say I have a class called IncomeTaxReturn that includes a method, calculateRefund(). That method is public (meaning anybody can call it). I also have a bunch of other methods that are only used by calculateRefund() that package up bits of logic so that the code is easier to understand and to test. The class might include methods like calculateTotalIncome() or lookUpTaxRate(). ...

October 31, 2007

Is whois on the way out?

The New York Times Bits blog notes that the whois database may soon be gone. Being listed in whois is definitely a spam and junk mail magnet, but it remains the best way to track down many kinds of impostors, fraudsters, and online lowlifes. I’ll be sad to see it go. There was always something nice about the idea that if you had a problem with a host at a certain domain, you could look up the domain’s owner and shoot them an email to ask what’s up. ...

October 30, 2007

John Siracusa on Leopard

Yeah, I know that everybody has already blogged John Siracusa’s review of Leopard, but I’m not going to let that stop me. The depth and breadth of his reviews consistently astound me, as does his ability to explain highly technical features in terms any user can understand. He also does an excellent job of not just describing new features, but also explaining how esoteric changes to the kernel will make life better for users, or affect third party application developers. I’m pretty sure he knows more about the Mac than I know about anything. ...

October 30, 2007

Forever '95

Anil Dash had a strong negative reaction to Apple’s little joke at the expense of Windows in Leopard. If you haven’t seen it yet, Apple’s icon for PCs on your network (or anything that looks like a PC) is a CRT monitor displaying the dreaded blue screen of death. It’s funny how Apple’s perception of itself differs from Anil’s perception of it. Apple obviously still sees itself as the struggling computer company, trying to build better products to compete against an incompetent but incredibly powerful Goliath. Apple has always seen itself that way, and still does, apparently, even though it’s now worth more than IBM. ...

October 29, 2007

More on BitTorrent and convenience

Earlier this week I posted about how many people use file sharing because the experience is so much better than the experience provided by people selling goods that can be downloaded. To further bolster my case, I offer this anecdotal evidence: What was astounding: a full 80 percent of those we talked to (in all, about 30 people) said that despite grabbing Leopard off BitTorrent, they a) had already ordered a copy that wasn’t in yet, or b) were planning on buying one regardless. In other words, BitTorrent activity was high, but as we have seen so often, it’s not indicative of how many people are taking Leopard without paying for it. ...

October 27, 2007

How software warps your brain

Last week I had to handle a couple of requests for new projects to be added to our bug tracking system, because adding new projects requires administrative privileges. In both cases, I wound up just giving the people who made the requests administrator privileges themselves, but I was reluctant to do so. The thing is, my reluctance had nothing to do with not trusting the people in question, it was strictly due to the psychology of using the software. We have maybe ten people who use the system, and after promoting two more administrators, I think seven or eight of the users are administrators. Given a system that provides various access privileges, it felt odd to me to basically let everyone be an administrator. There’s a little voice in my head that said that maybe only 25% of the users of a system should be at the top, and honestly I’m not sure where that comes from. ...

October 27, 2007

The allure of conspiracy theories

William Gibson on the allure of conspiracy theories: Conspiracy theories are popular because no matter what they posit, they are all actually comforting, because they all are models of radical simplicity. I think they appeal to the infantile part of us that likes to know what’s going on.

October 26, 2007

How studying economics makes you happier

I loved this post from Marginal Revolution, arguing that studying economics makes you happier. Item #2 on the list is probably the best in terms of framing how happy most people should be. In an alternate universe, I could have a job I hate, earning little more than minimum wage. Instead I do satisfying work for significantly more than minimum wage. What’s to complain about?

October 26, 2007

The state of politics today

According to one poll, more 19-29 year olds would vote for Stephen Colbert for President than would vote for Rudy Giuliani or Fred Thompson.

October 25, 2007

Ed Felten on Comcast and Net Neutrality

Yesterday I pointed to Ed Felten’s post on Comcast’s blocking of some BitTorrent traffic, wondering what it meant for net neutrality. Today he weighs in with his answer to that question.

October 24, 2007