Category: Uncategorized

  • Useful Eclipse plugins for Java development

    Last time I’ve been posting about how you can increase your java development speed by knowing and using common and handy keyboard shortcuts. This time I’ll be showing you some plugins which I have used over the time. For most of them I can say that they not so much speed up development but instead raise the quality of your sourcecode by giving you hints or adding certain aspects to testing.

    So let’s dive in.

    Subclipse and Subversive are with high probability the most-installed plugins for distributed development and source code versioning. As Eclipse still does not provide builtin functionality for this (because of some licensing issue), these plugins add the required connectors so that it becomes possible to synchronize your source with a SVN server. Both plugins provide everything needed for most of the SVN tasks and differ just in edge cases or the handling and UI details. I’m personally using Subversive for years now because it has a Checkout-Wizard with more functionality than Subclipse offers but that plugin also has evolved since I checked it the last time. I should give it a try again in the near future.

    The JD-Eclipse plugin is a decomplier addon for Eclipse which helps you out if you happen to stumble into Java bytecode eg. during debugging or when you follow references into external libraries. It reconstructs the Java source from the compiled code, so what you get is not the real sourcecode but something which resembles exactly the same function. Nevertheless it’s often interesting how the code behind the APIs works you’re using. Or, if you’re depending on other projects which are currently just closed in your workspace.

    Findbugs is a static source-code-analysis tool which checks your sourcecode for common mistakes optimization potential. It covers a very wide range of different bug types and each found bug or issue in your sourcecode has a small description added. Of course, since it’s a statical analysis this tool is unable to analyze the whole logic in your sourcecode and therefore may also generate false positives, so be sure to not blindly follow each suggestion. But it’s usefulness in general is undeniable.

    Also a static analysis is done by Checkstyle but this one focusses less on programming errors but more on the layout of the code and the correctness of the documentation. For example if your javadoc for a method is missing a new parameter which you just added, Checkstyle would highlight this mismatch for you. It has an extensive ruleset so don’t be surprised if it makes annotations all over your code if you check it for the first time.

    EclEmma and Coverlipse are two plugins which deal with identifying the runtime coverage of your code. They add measuring instruments which allow you to determine which parts of your code are reached by eg. unittests and which parts of your code are still untested and need additional attention. EclEmma is the simpler one of the two but also is faster to get started with. Coverlipse on the other side needs a bit more work to get started but allows deeper inspection and offers a wider range of statistics and visualizations of the covered and uncovered code.

    Another tool to aid with testing is Infinitest. It analyzes your JUnit tests and runs them silently in the background after each change in your sourcecode. It adds some intelligence so that only those tests are run which could be influenced by your changes. Furthermore errors in the tests are directly displayed as source-errors in your sourcecode. Of couse, this is only useful if your testcases can be executed fast and do not need an extended time to execute. The plugin has moved from the free Google-Code project to a commercial website but as far as I can see, the plugin itself is for now still available without cost.

    If you want to quickly set up a shared task repository for your small team without having to set up a full blown Bugzilla, maybe even with a touch of Scrum, Scrum Vision may be the tool for you. It connects the task management of Eclipse (Mylyn) with a Google spreadsheet which also can be shared with other instances of Eclipse for other developers. The IDE aligns with the Scrum methodology to support agile development. This alignment also propagates in the spreadsheet where you can display reports and have a virtual taskboard and also a Burndown Graph.

    If you’d like to close editor tabs the same way as you do in Firefox, by middle-clicking the tab, the Middle Click Closes Tab plugin (although last updated for Eclipse 3.3, it still works with Galileo) enhances your Eclipse with this feature.

    As for Mylyn, which is already completely integrated in Eclpse: Since my last post according Mylyn I collected some additional experience with Mylyn. I also connected it to a local instance of Bugzilla to play a bit around with its integration and how it deals with sharing files and context. But I also think that I should use it more again, as I’ve become a bit lazy with it and fallen back to the previous everything-on-the-screen overloaded development. The promised blog post which hasn’t been posted until now is still on my list for the future, when I know even more about Mylyn. But I already can suggest Mylyn as a tool to leverage the development effectivity by helping the developer to focus on the actual task at hand. If you’re curious, have a look at the excellent Mylyn 3.0 webcast to get started.

    That’s it for now. I hope, there is also something useful in this post which is helpful for your Java development with Eclipse.

  • Useful Eclipse keyboard shortcuts for Java development

    Since I’ve started developing Java in Eclipse I have realized that this is in no way different than with most other IDEs: the speed of development highly depends on the knowledge and intuitive usage of keyboard shortcuts.

    Occassionally I’m asked to slow down a bit so that one can follow my actions or to tell which shortcut I’ve just used. For this reason I’m making this small list of those shortcuts which I’m using pretty much all the time.

    I’ve tested these shortcuts specifically on Eclipse Galileo (3.5.1) and on Windows but most of them are also already present on earlier versions of Eclipse. As for other platforms I don’t really know if all of them (or even any one of it) are available (or at the same combination). Furthermore many of them should also be present when developing different programming languages than Java but I cannot confirm that. You just have to find out yourself. Just in case you do, please let me know in the comments 🙂

    So without further ado:

    Shortcut Function Description
    CTRL+SHIFT+R Open Resource brings up a dialog where you can quickly locate any file or resource in your workspace. Wildcards are supported in the search.
    CTRL+SHIFT+O Organize Imports cleans up the imports-block at the beginning of the file. Adds missing imports (if neccessary) and removes unused ones.
    CTRL+SHIFT+F Format applies proper formatting to the source code according to the style-settings in the *Java->Code Style->Formatter* preferences.
    ALT+UP/DOWN Shift moves the current line or selection up or down one line. Very useful for fast relocation of code, much faster than cut/paste if just moving a few lines.
    CTRL+ALT+UP/DOWN Duplicate duplicates the current line or selection above or below the current line/selection. Allows the fast population of cases in switch/case statements if they differ just marginally or similar situations like variable-initializer blocks. Beware, that this shortcut is often also overridden by some Intel display drivers. If this one does not work for you, try to turn off or change the hotkey assignment in your display driver helper application.
    CTRL+O Quick Outlne brings up a small dialog which allows to search and navigate the outline of the current file. Just start typing to narrow down the results. Supports wildcards. Pressing CTRL-O again toggles the display of inherited methods.
    CTRL+PGUP/PGDOWN Switch Tab changes to the next/previous editor-tab.
    ALT+SHIFT+L Extract Local Variable Creates a local variable from the currently selected expression. Types are automatically added. Try it on the code ‘new HashMap();’ to understand how this can speed up your development. Works on variables, static strings, methods with return values, etc.
    ALT+SHIFT+I Inline Variable opposite of local variable extractions. Replaces all occurences of the currently selected variable with its assigned value. Only works if the value of the variable is set exactly once.
    CTRL+ALT+H Call Hirarchy shows all calls/usages of the currently highligted variable/interface/class/method.
    F3 Open Declaration Jumps to the declaration of the currently highlighted variable/interface/class/method. Similar to holding down CTRL and clicking with the mouse on a variable/interface/class/method.
    CTRL+SHIFT+L Show Key Assist Displays a popup which displays currently assigned keyboard shortcuts. Very useful if you are looking for further shortcuts quickly. A shortcut for shortcuts 😉

    There are many more shortcuts available, including the marking and navigation shortcuts which you should know from Microsoft Word, but the above ones are the ones which became ingrained in me and are now speeding up my Java development enormously. Try to get used to them and use them whenever you can and you’ll realize that there will be fewer and shorter interruptions to your stream of thought and it also aids your concentration.

    If you want to go a tad further and let Eclipse tell you about possible shortcuts (or even force you to use one by cancelling all mouse-events which have a shortcut) you can install the MouseFeed Eclipse Plugin which does exactly this by displaying a small shortcut reminder each time you issue a shortcutted command with the mouse. Although it’s a plugin for Eclipse 3.3, it still works with Galileo.

  • …nuffin’…

    Just a quick posting. Not much happened since last time. Maybe just the fact that a cooling water thermostat in my car was fixed and now the engine reaches proper operating and heating temperatures. Apparently this fault already was present when I bought the car and so I didn’t recognize the weak interior heating to be a fault of the car at all. Nevertheless, now it’s working and nobody has to freeze anymore when being driven in my car.

  • Another university milestone reached

    Today we had to hold an official presentation of our project work and/or our bachelor thesis, which we’re currently working on (or has already been finished).

    I created the presentation over the time of last week and had it ready by Wednesday when we were required to hand it in for the official presentation preparation. The requirements were simple: it had to fit into exactly into an eight minute timespan and cover the basics, our goals and accomplishments of the work.

    Again I tried to create a presentation which was interesting and fast-paced and covered everything essential of my bachelor thesis. According to the feedback I received I managed to do this.

    I think the key for good presentations is that you intimately know everything in your presentation, each sentence and the order of appearance. It’s also neccesary to have more in your mind to talk for each bullet to be able to talk about them and not just read them down from the slides and move on to the next bullet. For me this was not that easy because my retentivity skills are not as good as I wished them to be, so it was even more essential to practice the whole presentation a few times before, preferably even over the course of several days. And it’s also important to not learn full sentences to talk but hang on to keywords and topics for each point you want to talk about. This allows you to speek freely and make a much more confident impression than hanging on to pre-constructed sentences. Furthermore, try to not stand still but move a bit, even if it’s just a few centimeters.

    Of course there are still many things to improve. This time it seems that I had problems with my gesture, keeping my hands below my waist several times which makes an insecure impression. But at least I got my Ahm’ing and Errr’ing right this time and kept it at a minimum.

    Kudos also goes to all of my colleagues who held their presentation together with me. All of them were excellent, well prepared and within the given timeframe with only minor points of potential criticism. For me personally most notably was Ellla who I remember as extremely nervous and on the edge of despair when only thinking of having to present something about two years ago. Today she was just self-confidend, fluid speaking and well prepared on stage with only very minor traces of nervosness. One of the best improvements of all of us.

    Sure, we all were extemely nervous before today. That’s because we attended another presentation of bachelor thesises about a year ago (?) and we remember those candidates’ presentations to be on the whole range from a Steve-Jobs-like presentation to almost helpless stammering (boy, this was really ugly at that time) on stage for the required length of time. And it was a much larger audience at that time because our classes were required to attend these presentations as a preparation for today. Today in contrast there were just we, our supervising teachers for the thesises and one or two more officials from the university. Small and well-known audience.

    It’s been a successful day for all of us, yay! 🙂

  • Another online presence – Twitter

    A few days ago I’ve still been undecisive about Twitter and today you can already find my Twitter feed online at http://twitter.com/kosi2801.

    Setup was easy and fast (of course) and the first tweet has been online in a matter of minutes. What took a bit longer was to sieve out the initial list of other people to follow. There’s a massive amount of stuff which is interesting to me but many of those also have a tweet-frequency which is much to high for me or contain too much of the trivia-tweets that I’ve mentioned in my previous post. And I want to keep my Twitter-list at a reasonable size that I don’t have to spend too much time with catching up all the tweets. The decision for each feed is not easy, does it add enough information-value for me to add their tweets to my list or does it add more noise?

    For now I’ve settled on feeds that only add a handfull of tweets each day so I can scan over all the news in a few moments and process the linked articles (if any) also quickly. But I also know that this will take some tweaking and accustoming from my side to find out the right balance between interest and value for me.

    Since I’m on Twitter now only for a short time I also have to find out how I should set up my tweet-frequency and the content in each. Currently I think it’s mostly exactly the trivia I’m trying to stay away in other feeds but I hope that I will level out somewhere that other readers also get some information out of it for themselves.

    Futhermore I’ve decided for now that I’ll keep my feed in German, as this is much easier for me to tweet when I’m posting from mobile and don’t have an English dictionary at my fingertips (which I use too often even for my own taste). But nevertheless I will respond to tweets and messages in any language I can understand 🙂

    Maybe over time I’ll also connect this blog and SIMsalabim to my Twitter feed as it provides a very quick contact possibility for feedback and questions. But I don’t know yet if this will happen sooner or later…

  • Why to keep teams at a small size

    Just yesterday I read the article from Joel Spolsky about A Little Less Conversation. Despite it being an article from the future, Feb. 1st, it reminded me a lot of the experiences I’ve collected in our company myself.

    In short, Joel repeats once more the sadly not-common-knowledge that the more people are on a team the slower and less effective it gets. "Adding people to a late project makes it later!". He explains this counterintuitively effect, that the number communication paths does not grow in a linear way with the number of team members. Instead it grows much faster so that on a team with 10 people you already have 45 different paths of communication which have to be managed and synchronized. And if everyone on the team has to kept up-to-date with the information-flow the overhead for managing this information (even if just sorting into relevant/irrelevant) can quickly reach nontrivial amounts.

    There are two ways to soften this problem. The one with the bigger impact is to keep your teams below a certain size. In our company the experience seems to come up that our Scrum teams work best if they do not exceed eight people. If with or without Scrum Master depends on the team. The second measure which can be taken is, that not everyone is invited or updated with information which is unrelevant for his or her position. Even more so if there is no influence possible for these people. But people also have to understand that it’s not out of personal dislike or conflicts that they aren’t kept up-to-date with everything on the company but that this lowered information-level allows them to concentrate more on their actual stuff which they are working on and removes a lot of unnecessary interruptions.

  • To twitter or not to twitter…

    For quite a while now I’m having an eye on Twitter. In the beginning I soon stopped to check it regularly because most of the messages just were meaningful in a context unknown to the reader and weren’t even useful as short amusement or something. Nevertheless from time to time I still looked into it especially when there were links from other blogs or news articles centering around it and its technology.

    Meanwhile, while there are still lots of those low-value tweets around, some effective real-world uses have emerged. Ranging from instant news (even directly from the NASA Astronauts) to direct product support channels and even political content there are nowadays a lot of Twitter feeds which can affect a much larger audience than just personal messages. This is also represented in Twitters message question which now says "What’s happening?" instead of "What are you doing?".

    And because of this shift in focus and content I’m again rethinking my opinion of Twitter and really considering to join this social network. Which would also open an additional communication channel to the users who try out SIMsalabim.

    But I still have to think about this a bit because currently I’m already drowning in all the news-sources I’ve set up on Google Reader, FeedReader and email, SMS, IM, etc. I’ll already have to find some time in the future to re-check each and every feed and news-source I’ve listed and sift out the ones which I can really afford to spend my precious time on. And I guess with another source of instant distraction, like Twitter, this wouldn’t get any easier…

  • Maths lecture by Prof. Rudolf Taschner

    On Friday before my lectures started at the University I attended a guest-lecture of Prof. Rudolf Taschner at the 2/BRG Kapfenberg2. The lecture was called "Rechnen mit Gott und der Welt" ("Calculating with God and the World"). The description in the invitation we received sounded quite interesting and because it was scheduled just before start of my real lectures I decided to join this lecture.

    The content of the lecture was about how the mathematical basics have been invented and used by the stronger part of the cultures to keep suppressing the weaker ones, how it influenced the invention of writing and how it helped economics to develop.

    The audience was mostly composed by 13 to 17 year old gymasiasts which in the beginning seemed to be not very happy with their presence at this lecture. But over time Prof. Taschner got their attention with really interesting explainations and funny interpretations and at the end of his lecture these gymnasiasts were applauding enthusiastically.

    Never seen such young people been so excited about maths and history… If there were only more teachers able to explain their stuff like Prof. Taschner can.

  • First year on Stack Overflow

    Almost exactly a year ago I joined the developers community on Stack Overflow. Shortly afterwards I posted my opinions on the Stack Overflow system. Today I’m still a relatively regular contributing member on the site and so far I’ve already earned a batch of badges and I’m approaching 3000 points, where I’ll be able to vote on closure or reopening of questions.

    Today I still think that the Stack Overflow system is a good one for giving and receiving immediate help on various topics. In my opinion the quality of the answers has improved over the time on common questions as did the response time which is often within the single-digit minute range. You have to have a very, very special problem to not receive a usable answer within a reasonable timeframe.

    I’d still recommend this site for all software developers of all experience levels if they’re stuck on a problem for a longer time. Most of the time there are people there which already have had the same problem and found a better solution long ago. Take advantage of others knowledge. I personally just enter the site from time to time and look at interesting questions where I already know the answer myself to check back if there are better solutions or different aproaches have worked for others. And just out of curiousity…

  • Stream urls of Austrias public radios

    (For english version please scroll down a bit!)

    German: Da ich schon öfter nach Urls gesucht habe, über die man die öffentlich-rechtlichen Radioprogramme Österreichs per Stream empfangen kann und nun endlich die Liste entdeckt habe (ua. hier), möchte ich euch diese natürlich nicht vorenthalten. Nachfolgend findet ihr alle (momentan) aktiven Shoutcast-Urls der Sender, sowie die direkten Stream-Urls, die zum Empfang nötig sind.

    English: Because I’ve already been searching several times for the urls of the austrian publicly funded radio stations where you can receive the programs via streaming and I’ve finally found them now (among others here), I’d like to share them with you. Below you find the list of all (currently) active Shoutcast-urls of the radios as well as the direct stream-links which are required for receiving the streams.

    Station Shoutcast MP3 WMA
    Complete ORF webradio list
    Ö1 Liveradio http://mp3stream3.apasf.apa.at:8000 VBR 64kbps
    Ö1 Campus / Radio 1476 http://mp3stream4.apasf.apa.at:8000 VBR 64kbps
    Ö1 Inforadio http://mp3stream6.apasf.apa.at:8000 VBR 48kbps
    Hitradio Ö3 http://mp3stream7.apasf.apa.at:8000 VBR 64kbps
    FM4 http://mp3stream1.apasf.apa.at:8000 VBR 64kbps
    Radio Wien http://mp3stream2.apasf.apa.at:8000 VBR 48kbps
    Radio NÖ http://mp3stream8.apasf.apa.at:8000 VBR 64kbps
    Radio OÖ http://194.232.200.148:8000 VBR
    Radio Salzburg http://194.232.200.147:8000 VBR
    Radio Burgenland http://194.232.200.146:8000 VBR 48kbps
    Radio Steiermark http://mp3stream9.apasf.apa.at:8000 16kbps
    Radio Kärnten http://194.232.200.145:8000 VBR 64kbps
    Slovenski spored 64kbps
    Radio Vorarlberg http://194.232.200.149:8000 VBR 32kbps
    Radio Tirol http://mp3stream10.apasf.apa.at:8000 VBR 20kbps