Posts

Buildtype icon plugin - for Android

Image
Android and Gradle So I'm now a full time Android developer (yay) and one of the things I've had to get used to, is the Gradle build system. I'm a fan of Maven and I still don't truly understand Google's choice to embrace an immature and complex system like Gradle, although admittedly the meta-programming model has some powerful features... but I digress. Having just completed a Gradle plugin at work to solve an in-house tooling problem, I decided to have a go at another tooling aspect I have run into. Buildtype icon plugin - for Android All too often, non-release builds of an application are provided with hideous looking launcher icons or none at all. For high profile products, calling a graphics designer to have an icon made is not that great a cost, but the majority of projects I see lack sorely in this aspect. While not a huge deal, it looks unprofessional and it also super annoying not being able to tell build types apart when testing various builds on the s...

Making hard choices

Image
From time to time, we all have to make some hard choices in life. Recently I went through just such a time, when I found myself with 3 different job-offers, that I had to act on relatively swiftly. Now admittedly, this situation belongs to the luxury category of problems, but none the less, it represented a serious decision making challenge to me. None of the jobs were perfect in all aspects (I don't believe such a job exist), so depending of the time of day, I would lean towards one of them, only to change my mind later on that very same day. Clearly, I was in need of a more objective and systematic way of analyzing my options. Prioritization and rating A simple pro-con list did not do much for such a complex scenario, and neither Google nor any of my "self-help literature" had any obvious tools. However, by attacking the problem in a divide-and-conquer fashion, realizing one can't compare apples to oranges, things started to look a bit more clear to me. Aspects...

Rejsekortscanner APK

Ønsker du at installere Rejsekortscanner uden om Google Play, måske fordi din enhed ved en fejl er blokeret, så kan du til hver en tid hente nyeste version her. Linket vil blive (forsøgt) holdt up-to-date med seneste release. Download Rejsekortscanner 2.0

Duck typing in Java

Image
Duck typing in Java According to wikipedia , duck typing is when "an object's suitability is determined by the presence of certain methods and properties (with appropriate meaning), rather than the actual type of the object". Duck-typing thus is almost the definition of a dynamic language like Ruby, Python, Groovy etc. Unlike a hybrid like i.e. C# 4 (thanks to it's dynamic modifier ), Java's type-system does not allow duck-typing - it's an object oriented paradigm where polymorphism is meant as a static modelling mechanism of a type hierarchy. However, the dynamic proxy feature introduced with Java 1.3, does allow us to emulate duck typing. First a disclaimer though, I am far from the first to blog about the subject, even Brian Goetz (now Java's language architect) blogged about it back in 2005. Dynamic Proxy It was back in 2000 that Sun introduced the Dynamic Proxy functionality to JDK 1.3. As the name implies, it caters to the well known Proxy patt...

AVR ATtiny presentation with examples

Image
Where I work, we hold bi-monthy gatherings where we present and/or debate technologies and tools. As a closet electronics engineer, I thought it could be interesting to drag my components to the office and let me colleagues, have some fun with writing programs targeted for 64 bytes of RAM - quite an anticlimax to our 8GB RAM workstations and 128GB RAM servers! I put together a Back to Basics presentation about the popular Atmel ATtiny/ATmega microcontrollers, and put the  accompanying code up on Github . These are the same family of chips being used by the popular Arduino stack, but I prefer to play with the bare metal using the GCC compiler, there's just something cool about seeing your C program being able to run 10 years on a couple of AA batteries due to the extreme effeciency! While nothing spectacular about it, protocol dictates that I mention this to be released under the Creative Commons license.

ER301 NFC/Mifare driver in pure C#

Image
A YouTube viewer found my old  demonstration of ER301 anti-collision and asked if I could make the source code available. So I cleaned it up a bit and wrote this small blog entry about it. When I started tinkering with the unified Danish transit card about a year ago, it was using a cheap Ehuoyan ER301 NFC/Mifare reader which I got from ebay. This was the first time I played with NFC stuff even if I would since move on to other and better devices. The cool thing about the ER301 however, apart from the price, is that it's relatively easy to interface with. This is because it's using a plain virtualized serial port with native ( cp2102 ) driver available in Linux and even Windows. No software came with the ER301 reader but there was a download link at the ebay site. The software was very basic, and all examples revolved around a driver DLL for which the source code sadly was not provided. With the documentation in hand and tracing the traffic going over the serial int...

Øredev 2014 - The good and the bad

Image
Last year I went to the  2013 GOTO conference in Aarhus, Denmark. This year, I got the opportunity to visit the  2014 Øredev conference in Malmø, Sweden. The following is just a short reflection of my experiences and they may of course be entirely different than those of other attendees. The whole setup of Øredev is similar to GOTO and with 1300 attendees I believe they are about the same in size. Being in Sweden, albeit right across the water from Copenhagen, the crowd was predominantly Swedish with perhaps 20-30% of Danes. The speakers were slightly less known than those at GOTO, although a few speakers from Thoughtworks, Oracle and Microsoft stood out. The good Øredev feels quite a bit more intimate and cozy than GOTO did. It could be due to the constrained space and the lighting, but the pillow sacs, live jazz and plenty of popcorn, chips, candyfloss and beer sure didn't derail that perception. Wifi coverage was generally good and there were plenty of se...