Archive for February, 2005

How do I find what tests use this method?

Monday, February 21st, 2005

As I said earlier, I’ve been reading Michael Feathers _Working Effectively With Legacy Code_ recently (I’m taking my time with it; it’s a good book). He spends a lot of time talking about techniques to get code under test. However, he spends very little talking about finding out if (and to what extent) a method is under test in the first place. So here’s how I do it:

(more…)

Tags:

I, for one, welcome our new corporate overlords…

Monday, February 21st, 2005

Actually, I don’t. But I have to ask: if they can make it illegal to circumvent copy protection to do something you could legally do without the copy protection, then why can’t it be illegal to circumvent pop-up blockers?

Hmmm… considering that pop-up blockers are arguably a security feature, could the US DMCA be used here?

Tags:

Things that bug me about IntelliJ

Monday, February 21st, 2005

For the last few years, I’ve been saying that IntelliJ is the best Java IDE on the market, but that Eclipse is pretty close. I’ve also been using Eclipse that whole time (having used IntelliJ before that), because my then-employer didn’t like to shell out money if they didn’t have to.

Well, I’m at a different company, and everyone here uses IntelliJ (bought-and-paid -for, even!). And I’m finding that IntelliJ is as good as I remember, but there are a lot of things that are bugging me with it. Enough that I wonder if it’s worth using.
(more…)

Tags: , ,

Beware the mechanical coder, my son…

Friday, February 18th, 2005

Stumbled upon this beauty today (minor changes to protect the guilty)

(more…)

Tags:

Long != meaningful

Wednesday, February 16th, 2005

Meaningful names for variables, methods, and classes go a long way to making uncommented code possible. However, meaning is not conveyed simply by length.

(more…)

Tags:

Reflections on how I got started in this biz…

Thursday, February 10th, 2005

I was listening to the audio presentation by Woz at ITConversations.com recently. I was really interested in his stories about how he got interested in hardware hacking, and it made me reflect on my early experiences with computers.
(more…)

Tags:

Don’t propagate exceptions in test fixtures

Wednesday, February 9th, 2005

Been seeing this pattern a lot today. I’m working with integration tests, which have a lot of test fixtures around to do common tasks (such as inserting data into the database). These test fixtures propagate exceptions. In many cases, they simply declare that they throw java.lang.Exception. Ouch.

(more…)

Tags: ,

Fun facts about time zones

Wednesday, February 9th, 2005

Did you know that there are places in the world with timezone offsets in quarter-hour increments

The timezone for Nepal is UTC+5:45. Chatham Island (a territory of New Zealand) uses UTC+12:45. Interesting…

Tags: ,

Programming by difference

Monday, February 7th, 2005

I’m currently working my way through Michael Feathers Working Effectively With Legacy Code. Damn good book, BTW. Anyway, this was this section on “programming by difference” that got my thinking while reading it.

(more…)

Tags: ,

I must be missing something

Monday, February 7th, 2005

Bush is proposing a 2.5 trillion dollar budget. Supposedly, this manages the following:

  • it is the “president’s most austere budget to date”
  • it pushes the US federal budget deficit to “a record $427 billion”, and “is the third straight year the Bush administration will have set, in dollar terms, a deficit high.”

(more…)

Tags: , ,