A month or two back I was contacted by Will Billingsley, a lecturer at the University of Queensland (which I happen to live pretty much over the river from). I met him at JavaOne 2010, given his interest in JavaFX. He asked me if I’d like to give a guest lecture to a class of third-year software students (specifically, CSSE3002 The Software Process). All up there was somewhere between 50 and 80 students, so it was a far bigger turnout than I expected (especially compared to back when I was in third-year a few years back). To quote Will’s initial email to me:
“Essentially we invite people from industry to pass on to students their wisdom and experience from producing software commercially. The title for those talks this year is “how is software engineering more than just design, code, and test” – but you needn’t feel constrained by that — most guests use it as a segue into what they’d really like to talk about.”
“I thought you might be an ideal person to give a talk as your experience working in distributed teams, working on a product where the customers are other developers, and working on a team that’s survived changes in company strategy and ownership, would give you very valuable insights to pass on.”
I thought I was totally unqualified to give a talk, so I tried to push back, but Will convinced me. I decided to cover the lecture topic directly – I had nothing to sell or segue in to. Therefore, this was the first talk I’ve done in a really long time that didn’t have any code in it, which felt rather odd. Unfortunately, given how busy I am with my day job, I didn’t have a great deal of time to actually create a decent slide deck. I basically threw up a bunch of bullet points, and expanded on each slide over the hour or so my talk went for. I actually had enough content to cover another hours worth of topics, but I knew I wouldn’t have time to cover everything, so this is all I presented. Totally bad presentation-foo, but it’s the best I could do.
I doubt there will be much interest in the slides from most visitors to this site, but I thought for the sake of the students that I presented to that I’d post up a PDF of the slides here.
I hope in general that most other software engineers, who decide to read these slides, can agree with what I say. The suggestions are based on my experience – but I invite others to leave comments with their own suggestions and/or suggestions on where I’m wrong.
I’m one of those people that likes to tweak my software to get it to work as well for me as possible. Firefox makes this very easy, as in most cases an add-on exists and it’s a simple matter of downloading it and configuring it. This post outlines some of my most favourite firefox add-ons – hopefully they may also be helpful to you. I’ll spend an inversely proportionate amount of time on each add-on, relative to how likely it is for you to already know about it. I also don’t plan to cover all of them.
Adblock Plus: Blocks annoying ads. Useful, but I’m waiting for people to tell me I’m cheating the Internet.
Blank Your Monitor + Easy Reading: One thing I really don’t like doing is reading white text on a black background (despite it theoretically being better for the planet, e.g. blackle). With this plugin, and a teeny bit of configuration, you can easily toggle any site you come across to use alternative colours, for example the more natural black text on a white background (or any other combination depending on what your eyes like to see).
Download Statusbar: Moves the download progress bars to the south of your web browser, saving you from having to have a separate window stealing focus / space in the taskbar. You can always bring up your old download window by ctrl-J.
Echofon: This is my preferred way of interacting with Twitter, given that it’s always visible in my browser, and doesn’t take up any further system resources. I have tried to use alternative, standalone applications, but I always feel more distracted with them as they pop out of my system tray. At least with Echofon I can ignore it when I’m in my IDE, for example. I imagine this is the exact problem with Echofon for many people, but it works well for me.
FaviconizeTab: Simple Firefox plugin to shrink tabs when double-clicked (or alternatively, but double-click is my preference), such that only the favicon is showing. I find this add-on incredibly useful and constantly have certain tabs set to automatically shrink when loaded. Very highly recommended.
FireFTP: This is all the FTP client I need, and once again it’s one less application I need to have installed on my system.
Read It Later: Want to know how I collect my list of Java desktop / JavaFX links of the week? I just store them all on Read It Later and load them all up each Monday morning. This is a great tool for this purpose, as it’s quick, does what it needs to, and doesn’t get in the way. If you are like me and always coming across interesting sites / articles to read, but don’t have the time to read them right now, just store it in Read It Later and load it up when you have a spare minute.
TabGroups Manager: Often times I have a tonne of tabs open, but they are split between bug reports I’m working on, work stuff, news sites, etc, etc. Often there are logical groups, and this add-on allows for exactly this. You basically get another row of tabs in Firefox, within which you can open other tabs. This allows for you to have a tab for bug reports, a tab for news / time wasting, a tab for work stuff, etc. Whilst it does cost you a few extra pixels of vertical chrome at the top of your Firefox window, I think it pays for itself if you’re anything like me.
Tiny Menu: I’ve rearranged my Firefox chrome quite a bit. In fact, you can see what it looks like to the right. You’ll note that rather than have the traditional ‘File’, ‘Edit’, ‘View’, etc, that I instead have collapsed this down into a single ‘Menu’ menu, which when clicked will show all other menus. I justify this simply by realising how infrequently I need to access these menus. Tiny Menu allows for precisely this functionality, and with a bit of toolbar rejigging, you can easily get back the space taken up by the TabGroups Manager. Of course, if you don’t need the TabGroups Manager add-on, you’ve just got a free ~25 pixels of vertical space that can go towards website content, rather than wasteful browser chrome.
Stop-or-Reload Button: You’ll note in the screenshot I don’t have a stop button. This was initially just because I had deleted it from the toolbar entirely, but then I came across this add-on that does the Smart Thing (i.e. what Google Chrome does I believe). This plugin hides the individual stop / reload buttons, and instead has just one button that shows the stop button when the page is loading, and the refresh button when the page has completely loaded. That’s one less button to have on the toolbar.
I thought I would end by mentioning that I make use of the Chromifox theme, which is basically a Google Chrome knock-off, but it looks clean and simple.
Finally, for what it’s worth, you’ll also note in the screenshot above that I’ve done away with buttons that I don’t need from the toolbar as well. You should seriously consider looking into this – you can get to the toolbar options by right-clicking in an empty space and choosing customise. You’ll be surprised what you don’t actually need.
Well, that’s it for now. I hope that this list helps others, and perhaps it’s a bit more useful than the all too common “Top 100 Firefox add-ons that you aren’t using” lists that seem to pop up all the time. Feel free to leave your thoughts in the comments of other add-ons you like.
Just a quick post: I have had a really bad programming itch ever since I got my new Dell laptop recently. It has a row of media keys to go back, forward, play/pause and stop my music. Unfortunately, these keys only work when iTunes has the focus, which kind of sucks. I decided, finally, to do something about it, and wrote a small program that lets you control iTunes using these media keys, even when it doesn’t have focus. The program lives in your system tray, and you can exit it by right-clicking on it.
There are a number of issues with it, and things I could improve, including:
It only works on Windows.
It requires Java 6.
It only works on x86 computers, although if anyone wants, I can make it work on x64 with a little testing.
It allows for multiple instances to be run, meaning that if you have two instances running, clicking back on your keyboard will take you back two songs.
It doesn’t give any song notification, etc – it is just a controller. If people really want song notification, let me know.
As you should note, the amount of code written is actually minimal: this project is mostly just tying together two other libraries, and of course the iTunes COM interface.
There is a zip file here that contains everything – libs, source code, and a batch file that you can use to start the program. Normal lazy programmers license applies: if your computer crashes and burns, send me photos, but please no complaints. If you use it and (dis)like it, let me know!
I believe that there is a need for a proper Swing 2.0 which is not JavaFX-based, but a true, desktop focused, Java (the language)-based framework. My vision is one shared by numerous others, and in a brief discussion (via twitter no-less), a number of us enumerated what we believe a Swing 2.0 needs. The following list is a brief overview of what Swing 2.0 should be:
Generics-based. No more should we put our objects into various Swing data models and components only to receive Object back. It should be possible to create swing data models and components with the data type specified. There is work in this direction already with the Swing-generics project, although progress is slow. Swing 2.0 should include this project instead of duplicating work.
Support for enumerations where obvious. There are numerous places where public static final ints could be replaced by enumerations. This leads to a cleaner API.
Support for varargs. Once again, there are places where varargs could be used to clean the API.
Improved support for collection frameworks. That is, we should not still be requiring Vector lists, unless syncrhronization is absolutely necessary.
Stricter enforcement of event dispatch thread (EDT) rules. Swing is slow (or so the saying goes). This is untrue, but is unfortunately the perception. This perception exists because developers don’t understand how to deal with the EDT. There exists code out there now that can enforce the rules surrounding the EDT by essentially throwing exceptions when components are handled off of the EDT, and when tasks take too long that should not be run on the EDT. By default, Swing 2.0 would enforce EDT checking, throwing all exceptions discovered. This may make developers unhappy, but the end result is better programs and happier users. It is worth it.
Improved support for bean binding and validation. I won’t go so far as to say we need properties, largely because I don’t know enough to have an informed opinion, and I know that by saying we need properties Swing 2.0 instantly becomes far less possible without major Java language updates. But, I know that projects such as the JGoodiesbeans binding and validation tools are very useful, and make creating data-driven user interfaces far easier and rapid. It may make sense to incorporate these kinds of frameworks into Swing 2.0 to enable users to focus on the business logic, and not getting data to and from the user.
What you may note is missing is any mention of new components, new Look and Feels, etc. That is not my interest – in my opinion Swing 2.0 is a cleanup of the code beneath the existing Swing components. It would be ideal if Swing 2.0 could be API compatible with Swing 1.0, but I would not be adverse to Swing 2.0 becoming a separate Swing library in its own package (i.e. javax.swing2). This would allow for API cleanups, and repurposing of existing API method names.
What do you think? Do we need a Swing 2.0 that has the roughly the above features (make any suggestions you have). Is it too little too late for desktop Java (personally I think not, obviously)? Please, leave any comments or thoughts that you may have – let’s get the discussion started.
Another week, another Swing links. Thanks to everyone sending me links – please keep it up! Also, at the end of this post I have a request for everyone to help me out, so please be sure to read it!
Here are some links regarding Swing and Java GUI’s you may have missed in the last week:
Ken Orr at Exploding Pixels continues his series on skinning the scroll bar in Swing applications. This is part three, and whilst quite code-heavy, it shows how to plug into the Swing UI delegation framework via an extension of BasicScrollBarUI. For more context on this series, see parts one and two.
Not content with one post, Ken Orr blogs about allowing one component to track the size of another component. His post includes easy to follow code that I recommend other Swing developers take a look at for future reference (if you haven’t already worked out how to do this).
Swing-FX blog has updated the fake application that has been a feature of a number of blogpostsrecently. This application is Swing-based with a focus on usability and design. In this update, a number of new components have been integrated, including color choosers, tag clouds, star ratings, ‘customize toolbars‘, etc. The source code is on display, as well as a downloadable project to get all source code.
In other web browser related news, the Chrome Browser for Java (CB4J)has been announced. This is planned to be available for both Swing and SWT, and as stated on the linked post, “the licensing model of CB4J has not been fully defined, we are considering an open source version of CB4J as well as a low-cost, advanced version”.
Announced this week is that jSilhouette has joined the JFXtras project. The JFXtras project is an open effort to fill in the gaps in the current JavaFX library, whereas jSilhouette provides a collection of Java2D shapes that can be used in several modes, and now that it is part of JFXtras, these shapes can also be used in JavaFX. To allow for this immediately, both projects announced newreleases.
Osvaldo Pinali Doederlein has posted his first impressions of working with JavaFX, in terms of the language, and the performance of programs written in JavaFX. He writes JavaFX Balls: the JavaFX version of the Bubblemark RIA benchmark, and makes available all related source code.
That’s it for another week. Three weeks down, who knows how many more to go! Now that you have an idea of how Swing links is working under my direction, I’d love to hear your thoughts. Am I being too thorough, or not thorough enough? Do I include all the posts you’ve come across, or do I post too many links? Is my analysis too long or too short? I’d love your thoughts, as it’ll let me refine things.