Archive

Archive for January, 2005

Cobb County’s creationism stickers ruled unconstitutional

January 14th, 2005

MSNBC - Judge nixes evolution textbook stickers talks about Cobb County, GA’s ridiculous textbook stickers that describe evolution as “a theory, not a fact”. It’s an interesting ruling, and I think it makes sense.

If they want to pursue the whole “Intelligent Design” idea, they should look for a textbook that talks about that, rather than slapping bogus stickers on real textbooks.

Either that, or they can try to get President Bush to vie for a constitutional amendment that would “clarify” evolution’s position as a theory :)

Politics

Moving beyond xUnit for testing

January 13th, 2005

I’ve used JUnit plenty over the past couple of years. I think that JUnit is an important piece of software, but not because of elegance of design or impressive feature set. JUnit is important because it is ubiquitous. It’s the first testing framework to gain widespread adoption. In fact, JUnit’s best feature today isn’t even a feature a JUnit itself: integration with IDEs. Doing Test Driven Development in Eclipse, you get into this nice rhythm Run Test->Red Bar->Fix Code->Ctrl-F11->Green Bar.

JUnit is also nice because it integrates with Ant, making it easy to set up automated builds.

Many people out there have complained that JUnit is getting a little long in the tooth. Cedric Beust has done something about it for Java: TestNG. The main thing that Cedric’s project fixes is JUnit’s test suite system, making it far easier to slice and dice your tests into different groups for selectively testing parts of your project. Cedric also did away with the assertEquals() and assertTrue() methods, instead sticking with Java’s native assert keyword. TestNG now works with J2SE 1.4 (the last I had looked at it, it required 1.5).

Python has always had testing options. Python’s doctest lets you take an interactive Python session and rerun it, verifying that the results are the same. That seems useful for simpler test cases with less fixture. Like every other language on the planet, Python has its own xUnit framework. It’s even part of the Python standard library. But, of course, there are people who aren’t completely happy with those options…

That’s where py.test comes in. I’ve been playing with py.test since Bob Ippolito clued me into it a few days ago.

When used within an IDE, JUnit is great. If there’s a failure, you can just click to jump to the line that failed. When run via Ant, however, all you get is the exception traceback. And you’ll be sorry if you forgot to include debug info in your compiled files.

py.test has some nice features that attracted my interest immediately and really make up for the fact that it’s not running in an IDE with a nice green/red bar. py.test has nothing for you to subclass. It will hunt down modules, functions and methods that start with test and run those. Just like in TestNG, you use the native assert keyword rather than special methods, but py.test produces output from the failure that provides at least as much information as assertEquals in JUnit:

def test_failing():
    rabbit = {"inthe" : 1}
    hat = {"inthe" : 0}
>   assert rabbit == hat

shows the failure as:

assert {'inthe': 1} == {'inthe': 0}

Notice the marker next to the assert line in the test code? When a test fails, py.test displays the test’s code up to the line that failed. This is more natural in Python than in Java, since the source is generally right there whereas Java is compiled and its unclear where the source would be. It would be a nice option in Java test frameworks to be able to point it at the source and see that kind of view.

py.test also automatically captures stdout. Only if a test fails will the output be displayed. It keeps your test run output nice and tidy. Sure, Java has a logging framework built in (so does Python), but it’s certainly more of a pain to use than doing “print”s and displaying the output when the test fails. This could easily be done in Java as well.

There are other features, like test generators and whatnot, but these couple of features I listed above already make things so much more pleasant than xUnit. I’d be curious to learn about other test frameworks that people are working on.

Software Development

Screen capture tools

January 12th, 2005

There are lots of interesting tools out there for capturing screen displays along with audio for demo purposes. Camtasia Studio - Screen Recording for Demos and Training looks like a good one for the PC. It allows you to easily add callouts and other features like that. It’s $299, but it’s really tuned for making demos and training materials.

There are some nice low-end options on the Mac. On the way low end, there’s Screen Record for only $20. It will record the screen with audio and save it as a Quicktime movie. That may seem pretty raw, but you combine that with iMovie for editing and Keynote for pulling together the demo, and it’s not such a bad thing.

Snapz Pro X is generally regarded as the creme de la creme of screen capture utilities for the Mac. Lots of options, and lots of polish on the UI. It’s $69.

Update 2/20/05: The current version of Wink doesn’t do audio or video capture, but it does let you capture screen shots and add annotations to make nice, compact Flash movies.

By the way, Joel had a good experience with Camtasia.

Update 8/17/05: I just learned about CamStudio, which is free, does audio and video, does captions, produces AVIs and SWFs and runs on Windows. Oh, and did I mention it’s free!

Technology

Interface Builder rocks

January 7th, 2005

If you’ve never developed on a Mac (or NeXT), check this out: Cocoa: Developing Cocoa Objective-C Applications: A Tutorial. See how you just draw a line from the GUI component to the object and select the “outlet” or the “action” that’s appropriate? Why can’t Swing be like that?

And why did the Mono team work on cloning .NET when they could have worked on sprucing up OpenStep and cloned IB?

The world may never know.

(By the way, there is Wotonomy for Swing which is based on the same concepts. The JDNC package also does data binding in a less heinous way than out-of-the-box Swing.)

Software Development

No viable market for open source consumer desktop software

January 7th, 2005

In a comment on A tale of a copycat site, Robert Renling asked me to elaborate on why I say there’s no viable model for open source consumer desktop software. I started adding a comment, but it seemed long enough to turn into a post.

Either there’s no viable model, or the people who have tried have not executed well.

I’m not aware of any successful business doing open source consumer-oriented software. There are some folks doing closed-source adware to make money while leaving the software free, but I don’t know how profitable it is and also think that much of the adware that gets installed is pretty sleazy stuff.

One could conceivably make money by having an open source component that attaches to a closed-source service. If they open sourced the code for the service, people would just get their own servers up and running.

The folks who are making money off of open source software are selling to businesses. Period. I’d be really interested in seeing a counter example, but I don’t think one exists.

Red Hat’s probably the best example. They’re the only one I can think of who even made a go of it. They had their nice boxed Linuxes available for years. As soon as broadband became widely used among geeks (the target market for Linux), the notion of ponying up $30 for a boxed Linux vs. just downloading it seemed pointless.

There are many, many examples of companies that effectively use and contribute to open source, but when it comes time to pay the bills, their products are closed source. Apple is a great example of this.

If someone can cite examples of people who are making a living on PayPal donations or t-shirt sales to support their open source product, I’d consider that a successful business. I don’t think anything even on that small scale has been shown to be sustainable.

It’s unclear to me what the future in consumer software really looks like. I know that, for myself, I’m not going to spend 2 hours to track down a crack for a $40 program (what’s your time worth?). That’s encouraging that there will continue to be a market for programs that provide a good value at a good price.

I can also envision an increase in the software that is provided as a service online. It’s easy to keep that closed-source (piracy is much less of a problem), plus some support headaches go away because you don’t generally have to worry about the bizarre software people have installed on their machines.

Some programs just work better on your desktop. Would you really want to keep all of your financial records on some company’s website (a la Quicken)? Quicken is one of those programs that seems like a reasonable value. And while there are open source competitors, they are no match in usability and features compared to Quicken.

The one thing I do know is that copy protection does not work. We’ll probably see an increase in stupid copy protection schemes that just annoy everyone while not stopping the pirates. I believe in taking some precautions, but not at the cost of serious customer inconvenience.

Software Business

Workstation ergonomics

January 7th, 2005

I’m working at home full-time now, so the ergonomics of my home office are important. I just came across Cornell University’s ergonomics pages which provide a whole bunch of info. For example, I don’t think I would’ve considered a “negative-tilt” keyboard tray, but their diagram makes perfect sense. There’s a company that makes nice looking hardwood ergonomic desks. Notice how the first picture there has a negative tilt keyboard tray? Cool. Sadly, I’m not in a position to replace my desk, because my current desk holds my (rather lonely) music gear. However, maybe I can augment my current desk to be a bit better for me.

And this lousy chair should really go.

Software Development

Jason Orendorff, where are you?

January 7th, 2005

I’ve been reading lots of good things about Jason Orendorff’s path module lately. I’ve been sprucing up my app’s build/packaging process and using os.path a lot. I wish I had Jason’s path module, but his site seems to have fallen over. That seems to be the only place to get the module, short of begging people who already have it (something I’m not above doing :)

Python

ClearSilver built for Windows

January 4th, 2005

I don’t like make. There, I’ve said it.

But, of course, there’s always more to say. I like make plenty when I don’t personally have to work with makefiles. Typing “./configure ; make” is a fine process for building software. But, it wasn’t that easy when I was trying to build ClearSilver for Windows with Python 2.4. There are instructions that came in the ClearSilver tarball that got me part of the way. For some reason, though, the configure script just wasn’t getting my Python include and libs directories right. The simple solution was to just edit rules.mk to point to the correct directory, which worked just fine.

I’m quite thankful for the work that the MinGW people have put in. This kind of thing would be far harder without it.

Python

Micro Extreme Programming (Micro-XP)

January 4th, 2005

I had planned to write an article about using extreme programming (XP) within very small (1-3 person) teams. Luckily, I did a Google search first, and came up with
micro-eXtreme Programming ( µ XP): Embedding XP Within Standard Projects (PDF) by Frank Adrian of Symantec, so now I don’t have to.

Frank comes from the perspective that XP is good, but you can do a form of XP as an individual, even if the rest of your team is not doing it. The style that I’ve chosen to do is to work on 1 week iterations and standard XP-length stories, rather than Frank’s suggested “paragraphs”.

That’s the nice thing about development processes. You can always tailor them to your own specific needs.

Software Development

Cory burns up DRM strawmen

January 2nd, 2005

Cory Doctorow shows how it’s only sane to be concerned about DRM. And not just because of today’s restrictions:

If you are thinking about buying a stereo with a key feature and the choice is between two models, wouldn’t it be useful to know that in one model, the feature is guaranteed to last forever, while in the other, the feature can be revoked at any time due to factors that are beyond your control and shrouded in secrecy?

Technology