Getting Testy on Java
Casey Hare- August 1, 2012Ahhhh, Java.
Java is the same programming language that had rock star status back in the scary late 90s run-up to the dot com crash. It was heralded as the enabling technology that would take the web to new heights… and it produced a lot of pages that took forever to load and then crashed your browser.
However, Java has come a long way since then. It’s powerful, widespread, can create desktop application and, as of 2007, it’s open source. All of those characteristics make it a good option for test and measurement applications, even though it’s not in wide spread use…yet.
Java is easy to learn and there are a ton of books and tutorials out there. It’s also built for deployment, which may not matter if you are building one test, but if your code will go out to many users, potentially all using different OSs (operating systems), Java programs are ready to go. Java programs “compile” down to OS –independent code and that code is run by a run-time engine on the target machine. This means the same code can run on Windows, Linux and Macintosh. It’s hard to believe, but this promise actually delivers most of the time. You might not know it, but the java runtime engine is probably already installed on your machine, thanks to its widespread use by many websites and applications.
For those of you who, like me, learned to program on embedded targets using languages like assembly, C, FORTRAN (ack, I’m dating myself), VB6 and basic, Java will require a new way of thinking. Java is OOP (Object Oriented Programming), which is a powerful way to organize and build code. It requires some up-front work and a different way of looking at code architecture, but Java is the easiest way I know to learn OOP. While OOP will feel very strange at first, once you get the hang of it, it makes a lot of sense and it’s another powerful tool in your toolbox.
For more, head over to Java.com where you can learn about the language, download the SDK (software developer's kit) or, if you really want to go for it, download the full source code. To get started, pick a tutorial similar to what you want to do from the thousands available online, and learn OOP along the way. I recommend getting your OOP background early in your journey; it will serve you well.
Java is the old guard of open source, and for good reason. It’s an obvious choice for software-only, desktop test and measurement applications. So, next up we need to find a way to connect it to our test-and-measurement hardware. Stay tuned for next time, but in the meantime, consider Java and comment below on which languages and hardware you use.
Your order is up: Java, anyone?