ROS (Robot Operating System) is currently the most popular platform for robot development. On ROS, the de facto standard for Java development is a package called rosjava.
I have created an experimental alternative to rosjava that I call Jyroscope. Jyroscope makes it easier to write ROS code using Java.
I’ve been using it for a number of small projects but the code is very much experimental:
You can download the full source from Github
In the remainder of this article, I will demonstrate how to use Jyroscope.
Continue Reading (Published 12 December 2015)
When developing complex applications, JavaServer Faces (JSF) works best when used “statefully”.
In practice, this means using @ViewScoped
backing beans.
A consequence is that client-specific view state is persistent on the server.
JavaServer Faces can also be used in a stateless mode.
Unfortunately, stateless operation presents problems when using validation. In particular, validation failures prevent model update. This means that model state cannot be used to render a view in the event of a validation error.
Input components can use posted-back form data to re-render the view during a validation error.
However, output components (e.g., <h:outputText>
) have no posted-back data.
Their state needs to be maintained using hidden fields in a form.
In JSF, hidden state can be maintained using <h:inputHidden>
.
However, validation interferes with <h:inputHidden>
.
Like any other input component, validation errors prevent all model updates.
My solution to this problem is to use a custom component.
The component works almost the same as <h:inputHidden>
.
Instead of following the usual JSF lifecycle, it performs model update before validation.
Read on for the implementation and an example of its use.
Continue Reading (Published 6 September 2015)
Eleven years ago, I set up keyword alerts for “Prolog” on the major Australian career websites.
For ten years, there was no match. Until one-and-a-half years ago, when I reported a match on this blog.
I've just got another match. I believe that two Prolog jobs in 18 months counts as a boom in the Prolog job market!
Look out, Java. Look out, C#. Look out, Python. Prolog is taking over.
The advertisement disappeared quickly, but I took a few screen-grabs with my phone. I've stitched them back together below (and added the red circle).
Continue Reading (Published 29 July 2015)
In Sydney, it is possible to order a single loaf of bread from an “artisan” bakery for around $15. A fully featured Android smart phone or Windows Phone can be purchased for just over $30.
One smartphone for the price of two loaves of bread.
This smartphone price will, no doubt, come down. The bread prices will, no doubt, increase.
It won’t be long before a loaf of bread you order online will cost more than the computer you used to place the order.
(Published 3 July 2015)
The University of Technology, Sydney recently opened a new building (the ‘Broadway building’). It was created for the Faculty of Engineering and IT. It is wrapped in aluminium screens that are perforated with binary code. The university has a video about it on YouTube.
What do the screens say? How are they encoded? Read on for an explanation.
Continue Reading (Published 19 April 2015)
Visual Studio 2013 has several templates for creating new web projects. A brand new web project with authentication will have over 1500 lines of C# code. This saves a lot of time for new applications.
1500 lines for authentication may be too much if you’re learning ASP.NET. Fortunately, ASP.NET Identity is not too complicated when you start “from scratch”.
What follows is a short tutorial on setting up basic ASP.NET Identity in an empty web project.
Continue Reading (Published 28 March 2015)
This is a photograph of an Apple Newton that I noticed was lost/discarded in a park near my home today.
The hand-held computer is almost 20 years old. In fact, it might be regarded as a museum piece.
It doesn’t make sense to hold onto such a device for so long and then just discard it in the park.
I like to imagine it was owned by a die-hard Newton fanatic. Perhaps he or she felt that no modern smart phone or tablet could rival the classic. Thus, it was left in the park by accident.
For this reason, I left the Newton for their return. I can only hope that the original owner was joyfully reunited with their device.
(Published 8 March 2015)
This is a just-for-fun post. I’ll explore a C# implementation of a theoretical system called Lambda calculus.
It certainly isn’t practical. A calculation of the 25th Fibonacci number (75025) is not complex. An efficient algorithm can calculate it in just a few CPU cycles. A naïve recursive function can calculate it in 3 milliseconds. However, using Church numerals in a Lambda calculus takes 2300 times longer (7100 milliseconds).
The exercise may be pointless from a pragmatic perspective. However, it is interesting to see that the theory can be translated so directly into working C# code.
Continue Reading (Published 1 March 2015)
Published 1 January 2015 by Benjamin Johnston.