We’ve released JUnit 4.5. Potential extenders should find more support, and I find the design fits in my head much better than it once did. Share and enjoy!
I’m coming up on my first anniversary developing software in MacLand. By and large, I can’t explain what took me so long, and I happily upgraded soon after to OS X 10.5, Leopard.
What follows is one of those blog posts that is more likely to be useful to a random person hitting here from a Google search than regular (?!) readers of this blog. You’ve been warned.
It’s been noted that Spaces is a great tool for organizing applications, but it has the odd idea that Spaces should be assigned by Application, rather than by window. This is rather silly, since for each development project, I’m likely to have a browser window or two open, plus a terminal or Emacs instance, plus, often, an Eclipse workspace, and these have much more to do with each other than with other windows from the same applications.
It’s especially annoying, because I have one Emacs window that I’d like to follow me to all Spaces, while the others stay put. I finally figured out how to make this happen: convince OS X that I have two totally different applications that happen to both run Emacs:
- Copy Emacs.app from the Applications folder to some other location (say, the Desktop)
- Rename Emacs.app to Glemacs.app (I can explain the name, if anyone comments and asks…)
- In Finder, right click on Glemacs, and Show Package Contents.
- Browse to Contents/MacOS, and rename Emacs to Glemacs
- Go back and edit Contents/Info.plist. Look for this text:
- Finally, copy Glemacs from your Desktop back into Applications (copying it back in triggers some necessary registration.
<key>CFBundleExecutable</key> <string>Emacs</string> <key>CFBundleIconFile</key> <string>Emacs.icns</string> <key>CFBundleIdentifier</key> <string>org.gnu.Emacs</string>
and edit like so:
<key>CFBundleExecutable</key> <string>Glemacs</string> <key>CFBundleIconFile</key> <string>Emacs.icns</string> <key>CFBundleIdentifier</key> <string>org.gnu.Glemacs</string>
Now, OS X recognizes two different Applications, Emacs, and Glemacs, and you can change Spaces settings for them independently. Share and Enjoy.
Still JUnit? Of course.
Want to know what’s been going on with JUnit? Come check it out at two talks:
- Theory-infected: Or How I Learned To Stop Worrying And Use Unit Theories in JUnit 4 (long talk, Wednesday right after the keynote)
- Run Different: Extending JUnit 4 with Custom Runners (short talk, right before lunch on Thursday)
A new tech report is up:
Theories in Practice: Easy-to-Write Specifications that Catch Bugs
by David Saff, Marat Boshernitsan, and Michael Ernst
Automated testing during development helps ensure that software works according to the test suite. Traditional test suites verify a few well-picked scenarios or example inputs. However, such example-based testing does not uncover errors in legal inputs that the test writer overlooked. We propose theory-based testing as an adjunct to example-based testing. A theory generalizes a (possibly infinite) set of example-based tests. A theory is an assertion that should be true for any data, and it can be exercised by human-chosen data or by automatic data generation. A theory is expressed in an ordinary programming language, it is easy for developers to use (often even easier than example-based testing), and it serves as a lightweight form of specification. Six case studies demonstrate the utility of theories that generalize existing tests to prevent bugs, clarify intentions, and reveal design problems.
Pull up a stool. From 2008 on, the Green Bar will be where I share thoughts and announcements about building, testing, and thinking about software. What’s a green bar? First, it’s this:
For ten years now, test-infected Java programmers have looked forward to that green bar to know that things are as they should be. My four-year-old son knows to bug me to make sure that the bar is green.
However, also think of the green bar as a place where we can meet, share a drink*, and talk about what we want to see happen in software, and the world. The sign on the back wall says “All that’s made is first named.” At the bar, we’ll name it, and then go out to make it.
P.S. I’ve blogged before. Those posts will stay up where they are, and new material will be added here.
* Actually, only talking about software will happen here. For the drinking, and talking about the world, you’ll have to drop me a mail.