The new Bourne movie is out this week, and my wife is definitely going to watch it. In fact, we have a code-word for every chase-the-wrong-guy-who-eventually-wins movie that came out recently (The Contract and Shooter come to mind). Instead of reading the plot summary, i say “it’s just like Bourne” and we’re done. She just has to watch it.
So what is next for Bourne franchise? After Bourne Identity in 2002 and Bourne Supremacy in 2004 comes the new Bourne Ultimatum. It looks like it starts to follow the James Bond franchise (which is, accidentally, the highest worldwide grossing one, but that will most probably fall to Harry Potter that still has two more to go). And if you have any doubts, just look at the initials of the main characters’ names :)
So, will Matt Damon be replaced as Jason Bourne? He’s 37 years old, just four less than Sean Connery was in his last “real” Bond movie (he did come back 12 years later for one more role, though). Which brings an interesting question – how would they name the movies if Matt Damon just goes on unreplaced? Will we see some of these in 15-20 years?
- Bourne Hip Replacement
- Bourne Moving to Florida
- Bourne Hearing Aid
- Bourne Bingo
<font color="#7f0055"><strong>import </strong></font><font color="#000000">java.awt.*;</font>
<font color="#7f0055"><strong>import </strong></font><font color="#000000">java.util.Calendar;</font>
<font color="#7f0055"><strong>import </strong></font><font color="#000000">javax.swing.*;</font>
<font color="#7f0055"><strong>public class </strong></font><font color="#000000">YearOfLinuxDesktop </font><font color="#000000">{</font>
<font color="#ffffff"> </font><font color="#7f0055"><strong>private static class </strong></font><font color="#000000">YearOfLinuxDesktopPanel </font><font color="#7f0055"><strong>
extends </strong></font><font color="#000000">JPanel </font><font color="#000000">{</font>
<font color="#ffffff"> </font><font color="#646464">@Override</font>
<font color="#ffffff"> </font><font color="#7f0055"><strong>protected </strong></font><font color="#7f0055"><strong>void </strong></font><font color="#000000">paintComponent</font><font color="#000000">(</font><font color="#000000">Graphics g</font><font color="#000000">) {</font>
<font color="#ffffff"> </font><font color="#000000">Graphics2D g2d = </font><font color="#000000">(</font><font color="#000000">Graphics2D</font><font color="#000000">)</font><font color="#000000">g.create</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">g2d.setColor</font><font color="#000000">(</font><font color="#000000">Color.white</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">g2d.fillRect</font><font color="#000000">(</font><font color="#990000">0</font><font color="#000000">, </font><font color="#990000">0</font><font color="#000000">, getWidth</font><font color="#000000">()</font><font color="#000000">,
getHeight</font><font color="#000000">())</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">g2d.setColor</font><font color="#000000">(</font><font color="#000000">Color.black</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">Calendar calendar = Calendar.getInstance</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">String str = </font><font color="#000000">(</font><font color="#000000">calendar.get</font><font color="#000000">(</font><font color="#000000">Calendar.YEAR</font><font color="#000000">)</font><font color="#000000">
+ </font><font color="#990000">1</font><font color="#000000">)</font><font color="#000000">+ </font><font color="#2a00ff">
" will be the year of Linux desktop"</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">g2d.setFont</font><font color="#000000">(</font><font color="#000000">g2d.getFont</font><font color="#000000">()</font><font color="#000000">.deriveFont</font><font color="#000000">(</font><font color="#990000">20.0f</font><font color="#000000">))</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">FontMetrics fm = g2d.getFontMetrics</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">g2d.setRenderingHint</font><font color="#000000">(
</font><font color="#000000">RenderingHints.KEY_TEXT_ANTIALIASING,</font>
<font color="#ffffff"> </font><font color="#000000">RenderingHints.VALUE_TEXT_ANTIALIAS_ON</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#3f7f5f">// The following is safe to call on Linux
// as well</font><font color="#3f7f5f"> since the rendering is done in
// Java and not with</font><font color="#3f7f5f"> native APIs.
</font><font color="#ffffff"> </font><font color="#000000">g2d.drawString</font><font color="#000000">(</font><font color="#000000">str, </font><font color="#000000">
(</font><font color="#000000">getWidth</font><font color="#000000">() </font><font color="#000000">- fm.stringWidth</font><font color="#000000">(</font><font color="#000000">str</font><font color="#000000">)) </font><font color="#000000">/ </font><font color="#990000">2</font><font color="#000000">,</font>
<font color="#ffffff"> </font><font color="#000000">(</font><font color="#000000">getHeight</font><font color="#000000">() </font><font color="#000000">- fm.getHeight</font><font color="#000000">()) </font><font color="#000000">/ </font><font color="#990000">2</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">g2d.dispose</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">}</font>
<font color="#ffffff"> </font><font color="#000000">}</font>
<font color="#ffffff"> </font><font color="#7f0055"><strong>public static </strong></font><font color="#7f0055"><strong>void </strong></font><font color="#000000">main</font><font color="#000000">(</font><font color="#000000">String</font><font color="#000000">[] </font><font color="#000000">args</font><font color="#000000">) {</font>
<font color="#ffffff"> </font><font color="#000000">SwingUtilities.invokeLater</font><font color="#000000">(</font><font color="#7f0055"><strong>new </strong></font><font color="#000000">Runnable</font><font color="#000000">() {</font>
<font color="#ffffff"> </font><font color="#7f0055"><strong>public </strong></font><font color="#7f0055"><strong>void </strong></font><font color="#000000">run</font><font color="#000000">() {</font>
<font color="#ffffff"> </font><font color="#000000">JFrame frame = </font><font color="#7f0055"><strong>new </strong></font><font color="#000000">JFrame</font><font color="#000000">(</font><font color="#2a00ff">
"Linux on Desktop is here!!!"</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">frame.add</font><font color="#000000">(</font><font color="#7f0055"><strong>new </strong></font><font color="#000000">YearOfLinuxDesktopPanel</font><font color="#000000">())</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">frame.setSize</font><font color="#000000">(</font><font color="#990000">400</font><font color="#000000">, </font><font color="#990000">300</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">frame.setLocationRelativeTo</font><font color="#000000">(</font><font color="#7f0055"><strong>null</strong></font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">frame.setDefaultCloseOperation</font><font color="#000000">(
</font><font color="#000000">JFrame.EXIT_ON_CLOSE</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">frame.setVisible</font><font color="#000000">(</font><font color="#7f0055"><strong>true</strong></font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">}</font>
<font color="#ffffff"> </font><font color="#000000">})</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">}</font>
<font color="#000000">}</font>
I’m reading the very thorough overview of the “IDE shootout” that took place a few days ago (thanks, Kirk, for summing it up for all those who couldn’t be there), and the following is simply unbelievable:
The next question Aizatsky addressed was why IntelliJ isn’t open source. “Open source is all about the opportunity to contribute back to the project,” said Aizatsky. “But honestly, how many people have ever produced a custom build of Eclipse? I think no one, no one here (at least).”
That is a very interesting definition of open-source. A pity that it’s as far from the reality as the marketing would like you to believe. There’s so many things wrong with it that i don’t even know where to begin.
By taking the literal meaning, “open source” means that the source to your product is open to the general public. You can put restrictive terms of what can be done with that source (think GPL, read-only or even “open and you’re tainted forever” license), but the code is open. Which means that if i want to see how it works, i can. Now, this doesn’t mean that i necessarily want to change it, recompile and redistribute it. Maybe i want to see how it works because i want to learn from the best. Maybe i want to see how it works just to take this one method and use it in my project (if i follow the licensing terms). Maybe i’m stuck with my plugin and i want to see how it works from the inside instead of browsing other plugins and hope that somebody was smart enough to figure it out.
And no, the Early Access Program is not a replacement for opening the read-only repository to the public (or even publishing a tarball). Early Access Program is a cheap and easy way to get a lot of bugs found out before your paying users start complaining about a new version that is unstable. And forums – tried that and didn’t get any answer (that was back in 2005 and things may have changed, but i never bothered coming back when my original requests for help were largely ignored). Give me the source code and i’ll figure it out on my own (hopefully). I did it with NetBeans, i should be able to do it with IntelliJ. But don’t **** me about people not wanting to contribute back to the main trunk being the main reason for not open-sourcing it.
In my previous entry on the subject of bugs i wrote that you’ll always have bugs, and that it’s a good thing. However, the former doesn’t automatically mean the later. You need to follow a few very simple steps to ensure that a bug report results in all those good things that i mentioned. So, let’s start:
- Don’t write a two-page instruction document on “the only true way” to report a bug. True, in some cases it will take a few e-mails back and forth to verify that it only happens under specific OS and specific VM. However, don’t create a 20-point flowchart that your user has to follow before daring to submit a bug report.
- Be open as to how the user can report a bug. Create as many channels as possible, including project forums, mailing lists and, last but most certainly not the least, private e-mail conversation. I can speak only for myself, but more than 50% of the bug reports that i get are sent to my personal e-mail account.
- Even if you don’t have the time to handle it right now, acknowledge the bug report as soon as you can. Most chances are, the user is still online, and you’ll be able to establish his trust and acknowledge his time (after all, he went to all the trouble downloading your library, using it and reporting the bug).
- Fix the bug as soon as you can, even before that sexy new feature that you want to add. A bug fixed on the same day will result in a very satisfied user. He will see that his time was not spent in vain, and that his report was handled in a quick and personal fashion. Wait a week and the user will have moved to another (competing) library.
- Related to the previous one – don’t pile up the bugs for the last few weeks before the next release. Mix bug fixing with adding new (sexy) stuff – this way you won’t get “turned off” during those pre-release weeks (assuming you’re doing it on your free time for the “fun” of it).
- In your “has been fixed” mail to the user, thank him for his time and ask to verify that the fix is working in the real application. If it is not working in the real application, send him a small test that you used to verify your fix and ask him to tweak it so it reproduces the original bug.
- Add the test scenario to your test applications. It can be either automated unit tests, or just another checkbox setting in your UI (some things can’t be automatically tested, especially on UIs).
- Always add comment in your code for a specific bugfix. One of the reasons is mentioned in this excellent article from “Joel on Software” – in a few months when you’ll want to refactor the code, you simply won’t remember why this specific line is there and will be tempted to just throw it away.
- If it’s not a programming bug, it’s a documentation bug. Update your FAQ, update your documentation, update your comments, update your Javadocs.
- Probably the most important one – put yourself in your users’ shoes. Ask yourself, what would you like to happen if you were the one reporting the bug. Would you be pleasantly surprised to get an instant confirmation mail? Wouldn’t it be great to have the bug fixed on the same day, or would you prefer the canned “will be fixed in the next release” reply? Wouldn’t it be great to see that your problem is acknowledged and addressed immediately?
Note that some of these points apply to the closed-source development as well. Even if you’re writing commercial or in-house software, it doesn’t mean that your users will be happy to wait (even if they have to wait, especially for in-house development).