A strong programming background and a penchant for ever-elusive “beautiful code” has led LTU’s Emanuel Palm to develop a new Java library for the Arrowhead Framework.
In striving to establish a set of standards, Arrowhead systems need to be implemented and tested to ensure that they communicate smoothly and securely. The sheer volume of operations and systems in the Arrowhead collaboration means that the project produces large quantities of code. Faced with implementing his own Arrowhead system, Palm decided that it would be convenient to create a base library, although he admits that he hadn’t necessarily realized how much work it would entail to create a well-functioning library.
Years spent working as a professional programmer, means that Palm has experience of numerous coding languages and a wide array of code libraries – both better and poorer examples. He points out that a common shortcoming of code produced purely within the bounds of academia is that once it has served its purpose it remains dormant – at best a potentially interesting dead end on GitHub. An active initiator of so-called GitHub issues, Palm has started a process of discussion about the assumptions and underlying ideas of other code libraries in the Arrowhead project, which in turn has helped promote the creation a supervision board to oversee the development process and create a smoothly functioning feedback loop. Palm hopes that this will contribute to bridging the gap between industry and academia by peaking the interest of active software engineers and continuing the development of useful code – furthering the spillover benefits of the Arrowhead project.
Correctness, convenience and performance – in that order – form the design principles behind the new Arrowhead Base Library. Good programming practice means using minimal code to create a user experience that is as simple and intuitive as possible. Palm’s philosophy is based on the idea of “failing fast”, validating as much user input as possible to help users understand mistakes early rather than allowing them to accumulate and end with time consuming failures later on in the process. He explains that, when it comes to code, “convenience for the library user often means inconvenience for the library creator”, comparing good websites that leave the user feeling that everything is clear and functions seamlessly with sites where “you feel permanently lost”. This convenience means, for instance, not requiring users to explicitly provide information that can be correctly derived from context. Performance means that Palm’s system is optimized for a short start-up time and prioritizes runtime over compile-time.
The result of Palm’s labours is a Java 11 library that approaches Arrowhead systems in a different way to the existing libraries. The library is currently being used by Palm in the implementation of his own Arrowhead system as well as another Arrowhead contractor. For more information visit https://arkalix.se/