So, in order to revive this blog a little, I’ve written a thesis… :)
In a nutshell: poster.pdf (presentation slides are available as well)
So long, and thanks for all the fish.
Here’s a little sort of template toy project regarding contemporary JVM-based REST APIs powering HTML5/JS SPAs:
Built with JDK 8, Spring Boot, Elasticsearch, Jersey 2, Gradle, Yeoman, Bootstrap, AngularJS, fun, and all that jazz…
PS: look ‘ma, no XML! :)
Update 2015: now with ES6 a.k.a. ES 2015 via JSPM/SystemJS…
Update 2016: these days, “isomorphic” Redux/React is all the rage on the FE side of things…
One may want to check out Este.js & co.
On the BE, Spring Boot’s playing nicely with Kotlin, and Spring MVC’s favourable to JAX-RS, IMHO.
After several years of programming Java while always keeping an eye on alternatives around, I’ve recently come to the conclusion:
Actually, there are just a few things still missing in the language these days which would render me a happy camper™ indeed (enjoying its mature ecosystem of libraries & tools).
Especially, since Lombok takes a lot of the general boilerplate code PITA away here (with useful features like convenient property accessors,
hashCode/equals/toString impl., logging facility injection, …).
Also, Guava does a truly good job in enabling one to write more concise and robust code.
Plus, Java 7 brought at least some nice, welcome improvements in
Finally, modern DI with Spring 4 (or Guice) using
javax.inject.* and Java config frees one from most needs for XML and, after all, a build sys beating Maven for real has yet to come.
So namely, here’s a personal wish list FTW:
val foos = ...(like in Scala…)
Pretty please. :)
PS: literal multiline strings, and so on and so forth, could be nice (but I can live without).
PPS: wouldn’t say no to optionally named function/constructor args, though.
Update 2016: these days, Kotlin’s the way to go, IMHO. :)
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one– and preferably only one –obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea – let’s do more of those!
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague.
This R&D project which I’ve finished recently is in its essence implementing an innovative way of visualizing Spotify music collection data. It’s mainly geared towards discovery of similar music related to the currently played tracks of a user. Technically, the project partially builds upon the foundation layed out with a previous labs project – here’s a report (PDF). Organisationally, it was done as a cooperation with Spectralmind and the MIR group of Vienna University of Technology.
Basically, the app connects to Last.fm data for similarity computation with their (more or less) RESTful web service API via JSONP. In addition to that, Spotify’s desktop client plugin apps JS API is used pretty heavily. The graphics are rendered as interactive SVG through Raphaël.js. Plus, Backbone.js is applied as a mean to improve structure and, consequently, maintainability of the app. For layouting the animated visualization itself a force-directed spring graph algorithm implementation is employed which was orginally written within Google’s Caja project and now adapted + tuned for the specific use case here.
In the beginning, the user sees the current track symbolized by a central blue bubble and a loading spinner indicating app activity. Here’s a screenshot:
After that, found similar tracks are arranged as red bubbles in a concentric circle around the central one. Again, a screenshot:
Here’s how the actual animated spring graph layouting visualization initially looks like:
And this is how it can look like when the animation finished rendering:
The history of played tracks is visualized as a diagonal, interactive sort of a time axis which can also be seen here:
Intuitively, clicking on a bubble plays the respective track in the Spotify audio player and triggers a visualization iteration, BTW.
The approach proved to be viable and it can be worthwhile indeed searching and discovering new music fitting to one’s individual taste in an entertaining way with this Spotify plugin app. Nevertheless, there are still numerous details where improvements and enhancements are possible. E.g., the graphics and visualization could be made more pleasant. Apart from that, also further tweaking connected to similarity computation could be done. Yet, as a research prototype demonstrating a proof of concept this is sufficient, it was fun building it, and possibly it’ll show up within a polished product in one way or another. :)
PS & FYI: Spectralmind is currently looking for Android developers – I’d recommend applying since they’re great folks to work with on interesting projects.
Here’re some tips for conveniently generating automated visual app stats from MySQL data.
Corresponding code bits to get one started:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
1 2 3
Often, when developing a mobile app one wants to target iOS as well as Android (+ maybe MS’ OS).
Now, this basically means developing the app from scratch and consequently maintaining it at least twice on different platforms, written in different languages (Objective-C and Java, that is), using different sets of tools etc.
Cumbersome and potentially error-prone. Well, there’s a viable alternative:
With Xamarin one can write mobile apps targetting iOS and Android in C# using .NET (and native) libraries, sharing code (business logic, data & web service layers, utilities, …) while creating fully native UIs built on each platform’s own SDKs, providing access to all respective device capabilities.
In addition to that, there’s for example MonoTouch.Dialog making it easier and more fun to create table-based iOS UIs and for Android there’s a useful visual UI design tool within the MonoDevelop IDE. Plus, there’s Xamarin.Mobile aimed at exposing an unified API facade for accessing common device features. All interesting stuff when used sensibly.
Here’s some demo code (which is loosely based on samples from the recommendable book “Mobile Development with C#”) showing how mentioned shared layers could benefit:
1 2 3 4 5 6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
1 2 3 4 5 6
And with .NET 4.5’s new async features landing in Monoland soon, related code will get even more convenient to write and handle.
Pretty neat, IMHO. What do you think?
A little project aimed at getting one up and running quickly with building a contemporary web app using Play 2 framework.
Contains a bunch of current web dev best practices and niceties, from latest Twitter Bootstrap (LESS) & Backbone.js to CoffeeScript with CommonJS modules support & proper JS bundling.
Here’re a couple of exemplary code snippets to whet one’s appetite:
1 2 3 4 5 6
1 2 3 4 5 6 7
Get it on GitHub while it’s hot.